Get Privilege List
This endpoint allows to get privileges available to a customer.
Request
GET <API base url>/customers/{id}/privileges
URL query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | uint64 | yes | Customer identifier |
| language | string | no | Two letter language code according to ISO 639-1 |
| query | string | no | Search query |
| categories | string[] | no | Filter by one or multiple categories: grocery, automotive, electronics, shopping, kids, pets, wineAndDine, travel, entertainmentAndSport, education, taxi, repair, utilities, visa, banks, others, health, beauty, entertainment, sport, hobby, gifts |
| merchants | uint64[] | no | If specified, only privileges from merchants with specified identifiers are shown |
| fromDate | date | no | Filter by offer's announce date to get the newest privileges |
| toDate | date | no | Filter by offer's end date to get the hottest privileges |
| cardTypes | string[] | no | Filter by one or multiple card types |
| skip | uint32 | no | Paging support: number of records to skip |
| take | uint32 | no | Paging support: number of records to return |
| sort | string | no | Type and field of sorting:
|
Response
On success:
{
"value": {
"totalCount": required uint32,
"data": required array of {
"id": required uint64,
"startDate": optional string (date in format YYYY-MM-DD),
"endDate": optional string (date in format YYYY-MM-DD),
"category": optional string,
"configs": required {
["cardType": string] : {
"reward": optional {
"isAvailable": required boolean,
"merchant": {
"id": required uint64,
"marketName": required string,
"logo": optional string (as URL)
},
"type": required string (one of - discount, gift, certificate, plusX, etc.),
"certificate": optional {
"provider": required string,
"id": optional string, // Deprecated
"ids": optional array of string,
"value": optional number
},
"hasAvailablePromoCode": optional boolean
},
"ad": optional {
"name": required string,
"description": optional string,
"rewardText": optional string,
"image": optional string (as URL)
}
}
}
}
}
}