API reference · CashBack
Get Customer Cashback History
- Method
- GET
- Route
-
/loyaltyProgram/customerReport/:document - Base URL
https://ws.autorei.net- Path parameters
:document- Query parameters in the example
limit=20offset=0- Token
- Requires Bearer token
Opens this request in the public API documentation, the official source of the reference.
Description
Lists the cashback statement of a customer of your store: one item per entry, earned or spent, from newest to oldest.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
document |
string | Yes | Customer CPF or CNPJ. The customer must belong to the authenticated store. |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit |
integer | No | Entries per page. Default 20, cap 50 — a value above that is reduced to 50, with no error. |
offset |
integer | No | Starting entry of the page. Default 0. |
status |
string | No | Filters entries by status. Accepts several separated by commas, without spaces: status=TO_RELEASE,RELEASED. If omitted, returns all. |
Accepted values in status: TO_RELEASE, RELEASED, CANCELLED, INVALID_EXPIRED (credit entries) and IN_USE, USED, EXPIRED (debit entries).
Business rules
Unknown status is not rejected
A value outside the list does not produce a validation error: it simply does not match any entry. The result is the "no records" response (400), the same as a filter that found nothing.
A filter with no result and a customer without cashback respond the same
There is no way to tell from the response whether "this customer never had cashback" or "this customer has no entry in the filtered status" — both situations return 400 with no record found.
Response · 200
Array with one object per entry.
| Field | Type | Description |
|---|---|---|
partnerOrder |
integer | Id of the CWS order that generated the entry. Comes as 0 when the entry did not come from a platform order — this is the case for cashback granted by an external order. |
value |
string | Entry amount. String with two decimal places and a dot as the separator ("10.41"), not a number. |
createDate |
string | Entry date and time, in UTC (2024-03-13T21:26:57.161938Z). |
status |
string | Entry status, among the values accepted in status. |
expirationDate |
string | Balance expiration date. Comes as null when the entry has no expiration defined. |
type |
string | credit when the customer earned, debit when they spent. In lowercase. |
Errors
| Code | When |
|---|---|
| 400 | {"status":"BAD_REQUEST","message":"no customer found"} — the document does not match any customer of your store. It is the same response for a nonexistent document and for a customer of another store. |
| 400 | {"status":"BAD_REQUEST","message":"no record found"} — the customer exists, but there is no entry in the requested filter (or the offset went past the end). It is not an error in your request. |
| 401 | Token missing, malformed or expired. |
Example request
curl --request GET 'https://ws.autorei.net/loyaltyProgram/customerReport/:document?limit=20&offset=0' \
--header 'Authorization: Bearer {{access_token}}' Example responses
200Success — statement with earned and used
[
{
"partnerOrder": 0,
"value": "11.80",
"createDate": "2026-09-04T14:15:02.534996Z",
"status": "TO_RELEASE",
"expirationDate": null,
"type": "credit"
},
{
"partnerOrder": 900201,
"value": "15.00",
"createDate": "2026-08-22T18:03:41.229713Z",
"status": "USED",
"expirationDate": null,
"type": "debit"
},
{
"partnerOrder": 900201,
"value": "42.35",
"createDate": "2026-08-14T11:47:09.161938Z",
"status": "RELEASED",
"expirationDate": "2026-11-12T00:00:00-03:00",
"type": "credit"
}
] Used in
- Use casesB2B marketplace: the typical path through the API
- Use casesComplex retail and B2B2C: the typical path through the API
Related endpoints
Generated from the public API collection, published on 2026-09-04: api-docs.cws.digital.