v1

latestOpenAPI 3.0.32026-07-24153644.3 KB
RewardsService

Retrieve a comprehensive list of rewards for a specified customer.

This endpoint is designed to provide a detailed inventory of all rewards generated for a consumer.

Each entry in the list includes pertinent information about a reward, along with its current status (e.g., unavailable, available, used, expired).

Utilize the queryString parameter "pageSize" to define the list size, with a default limit set to 100 items. If no value is specified, our system will assume the default.

In case there are additional items yet to be retrieved, the response will include a pageToken. Include this token in your subsequent request's pageToken field to fetch the next set of items. It is crucial to note that if you modify any queryString parameters, the initial request should not contain a pageToken.

get/api/v1alpha1/customers/{customerId}/rewards

Path parameters

customerIdstring required

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

Query parameters

pageSizeinteger

Rewards per page

pageTokenstring

Enter the token to access the next results page Leave empty to access the first page

storeIdstring

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

Headers

Brandstring required

The brand label provided by us.

Response

A successful response.

nextPageTokenstring

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."
      }
    }
  ],
  "nextPageToken": "NX8DAQEJUGFnZVRva2VuAf-AAAECAQZPZmZzZXQBBAABD1JlcXVlc3RDaGVja3N1bQEGAAAAC_-AAQgB_NNMfbUA"
}