API reference · CashBack
Get Customer Cashback History
https://api.sandbox.cws.digital/v1/cashback/customers/{document}/statementIn homologationDescription
Lists the cashback statement of a customer of your store: one item per entry, earned or spent, from the most recent to the oldest.
Accepted values in status: TO_RELEASE, RELEASED, CANCELLED, INVALID_EXPIRED (credit entries) and IN_USE, USED, EXPIRED (debit entries).
Parameters
Path parameters
| Field | Type | Required | Description | Value |
|---|---|---|---|---|
| document | string | Yes | Customer's CPF or CNPJ, with numbers only (and letters, in the alphanumeric CNPJ). See Document with numbers only in the route. |
Query parameters
| Field | Type | Required | Description | Value |
|---|---|---|---|---|
| status | string | No | Filters the entries by status. Accepts several separated by commas: | |
| limit | integer | No | Entries per page. Default 20, maximum 50. A value above that is reduced to 50, and an invalid value uses the default, with no error. | |
| offset | integer | No | How many entries to skip before the page. Default 0. |
Business rules
Document with numbers only in the route
Send the customer's CPF or CNPJ without ., / and -: 46693537308. The slash of a formatted CNPJ breaks the route.
An unknown status is ignored
A value outside the list does not cause an error: it is dropped from the filter. With no valid value, the statement brings all statuses.
A nonexistent customer and an empty statement respond differently
A document with no customer in your store responds 404 with the message Customer not found in the CWS database.
A customer with no entry in the filter, or an offset past the end, responds 404 with the message No record found.
Responses
- 401
Missing, malformed or expired token.