Get Customer Rewards
This endpoint allows to get customer's rewards.
Request
GET <API base url>/customers/{customerId}/rewards
URL query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| language | string | yes | Two letter language code according to ISO 639-1 |
| dateFrom | date | no | Filter by reward's date to get the newest rewards |
| isSpent | bool | no | If specified, only spent rewards are shown |
| isOpened | bool | no | If specified, only opened rewards are shown |
| rewardType | string | no | Filter by reward's type: discount, gift, certificate, plusX, etc. |
| skip | uint32 | no | Paging support: number of records to skip |
| take | uint32 | no | Paging support: number of records to return |
| showArchived | boolean | no | If specified, expired rewards are included |
Response
On success:
{
"value": {
"totalCount": required number,
"data": required array of {
"id": required number,
"createdAt": required date,
"offer": required {
"id": required number,
"merchant": required {
"id": required number,
"marketName": required string,
"logo": optional string (as URL)
},
"ad": required {
"name": required string
}
},
"merchant": required {
"id": required number,
"marketName": required string,
"logo": optional string (as URL)
},
"type" required string (one of - discount, gift, certificate, plusX, etc.)
"text": optional string,
"expiresAt": optional date,
"isSpent": required boolean,
"isOpened": required boolean,
"offerId": required number, // deprecated
"category": optional string,
"customData": optional any
}
}
}