v1

latestOpenAPI 3.0.32026-07-24153644.3 KB
RewardsService

Simulates a reward redemption for a specified order value.

This endpoint is designed to simulate a reward redemption with a authentication laywer.

The response includes pertinent information about the simulation operation.

post/api/v1alpha1/rewards:simulate

Headers

Brandstring required

The brand label provided by us.

Request body

customerIdstring required

The customer identifier must be the same as that sent to Dito.

orderValuestring required

Total value of the customer order.

storeIdstring

The store identifier must be the same as that sent to Dito.

sellerIdstring

The seller identifier must be the same as that sent to Dito.

sourcestring

The source represents where the redemption request comes from (e.g., pdv, ecommerce, mobile).

orderVoucherstring

The order voucher is the code of the voucher used in the order.

sellerVoucherstring

The seller voucher is the code of the voucher used in the order.

orderDiscountstring

The order discount is the total discount applied to the order.

Example request

{
  "source": "pdv",
  "orderVoucher": "ORDERVOUCHER",
  "sellerVoucher": "SELLERVOUCHER"
}

Response

A successful response.

cashbackTotalValuestring

Amount available for cashback on the order.

Example response

{
  "rewards": [
    {
      "reward": {
        "id": 1,
        "dueDate": "2024-02-02T04:22:18-03:00",
        "rate": 20,
        "status": "available",
        "availableAt": "2024-02-02T04:22:18-03:00",
        "createdAt": "2024-02-02T04:22:18-03:00",
        "canceledAt": "2024-02-02T04:22:18-03:00"
      },
      "campaign": {
        "id": 1,
        "name": "Every store with 10 cashback",
        "description": "All products have a 10% cashback until the end of the month or the end of stock. The cashback will be available 7 days after the purchase date and can be used for up to 20% of the next purchase."
      }
    }
  ]
}