Skip to main content

Get Privilege List

This endpoint allows to get privileges available to a customer.

Request

GET <API base url>/customers/{id}/privileges

URL query parameters

NameTypeRequiredDescription
iduint64yesCustomer identifier
languagestringnoTwo letter language code according to ISO 639-1
querystringnoSearch query
categoriesstring[]noFilter 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
merchantsuint64[]noIf specified, only privileges from merchants with specified identifiers are shown
fromDatedatenoFilter by offer's announce date to get the newest privileges
toDatedatenoFilter by offer's end date to get the hottest privileges
cardTypesstring[]noFilter by one or multiple card types
skipuint32noPaging support: number of records to skip
takeuint32noPaging support: number of records to return
sortstringnoType and field of sorting:
  • date -- sort by date ascending
  • -date -- sort by date descending

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)
}
}
}
}
}
}