Get Offer List
This endpoint allows to get offers available to a customer.
Request
GET <API base url>/customers/{id}/offers
URL query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | uint64 | yes | Customer identifier |
| language | string | yes | 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 |
| averageChecks | string[] | no | Filter by one or multiple average check categories: cheap, average, expensive |
| isOnline | boolean | no | Filter by possibility to fulfill the conditions online |
| isLiked | boolean | no | If specified, only offers are liked by customer are shown |
| isFavorite | boolean | no | If specified, only offers are added to favorite by customer are shown |
| activationStatus | string | no | Filter by offer activation status (one of - undefined, activated, viewed) |
| isCompleted | boolean | no | If specified, only offers are completed are shown |
| conditionTypes | string[] | no | Filter by one or multiple condition types: none, offersAccumulation, transactionsAccumulation |
| merchants | uint64[] | no | If specified, only offers from merchants with specified identifiers are shown |
| fromDate | date | no | Filter by offer's announce date to get the newest offers |
| toDate | date | no | Filter by offer's end date to get the hottest offers |
| 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:
|
| settlements | string[] | no | If specified, only offers from merchants with locations in specified settlements are shown // deprecated |
| regionIds | uint64[] | no | If specified, only offers in the specified regions are shown |
| showArchived | boolean | no | If specified, ended offers are included |
Response
On success:
{
"value": {
"totalCount": required uint32,
"promotedCount": required uint32,
"data": required array of {
"id": required uint64,
"merchant": {
"id": required uint64,
"marketName": required string,
"logo": optional string (as URL)
},
"category": optional string,
"averageCheck": optional string,
"isOnline": optional boolean,
"likesCount": optional number,
"isLiked": optional boolean,
"activationStatus": optional string (one of - undefined, activated, viewed),
"isFavorite": optional boolean,
"isCompleted": optional boolean,
"startDate": optional string (date in format YYYY-MM-DD),
"endDate": optional string (date in format YYYY-MM-DD),
"announcedFrom": required date,
"receivedAt": required date,
"stats": required {
"likeCount": required number,
"offerRewardLimit": optional number,
"customerRewardLimit": optional number,
"offerRewardCount": required number,
"customerRewardCount": required number,
"customerSpentRewardCount": required number,
"hasAvailablePromoCodes": optional boolean
},
"ad": optional {
"languageCode": required string,
"name": required string,
"description": optional string,
"rewardText": optional string,
"buttonText": optional string,
"buttonUrl": optional string,
"image": optional string (as URL)
},
"reward": optional {
"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
},
"limit": optional {
"used": required number,
"max": required number
}
},
"conditions": optional {
"type": required string (one of - none, offersAccumulation, transactionsAccumulation, referral, registrationBonus),
"targetCount": optional number,
"targetAmount": optional number,
},
"requiresActivation": required boolean,
"progress": optional {
"currentCount": optional number,
"currentAmount": optional number,
},
"customFields": optional { [key:string]: any },
"regions": optional array {
"id": required number,
"name": required string,
"geometry": optional string
},
"marketWide": required boolean,
"locations": optional array of {
"name": optional string,
"address": optional string,
"lon": required double - longitude,
"lat": required double - latitude
}
}
}
}