Parameter | Type | Default | Description |
---|---|---|---|
scope | enum | standard | Determines the scope the API operates on. See Offers scoping |
per_page | integer | 100 | Number of results to be returned per request (100 is the maximum) |
page_no | integer | 1 | Number of results page |
include_pagination_info | boolean | false | When true, pagination info (containing info like total records count, next page) will be returned |
order_by | string | "name" | See order_by param |
collection_ids | integer[] | null | When present, only offers belonging to least one of given collections will be returned |
stores | string[] | null | When present, only offers having at least one of given stores will be returned |
store_ids | integer[] | null | When present, only offers having at least one of given stores will be returned |
ids | integer[] | null | When present, only offers with this id will be returned |
type | string | null | When present, only offers of this type will be returned |
campaign_id | integer[] | null | When present, only offers with this campaign_id will be returned |
search | string | null | When present, only offers that match the query string will be returned |
usable | boolean | false | When true, only offers that are usable will be returned |
liked | boolean | false | When true, only offers that have been liked by member |
order_by
paramorder_by
param, which has similar syntax as ORDER BY keyword in SQL statements.order_by=usable ASC, created_at DESC
will return offers sorted by their usability, then by their creation date./guest/
context:Key | Type | Optional? | Description |
---|---|---|---|
offers | Offer[] | no (may be empty) | See Offer model |
pagination_info | PaginationInfo | yes | See Pagination info model |
{
"offers": [
{
// (...) - see Offer model
}
],
"pagination_info": {
// (...) - see Pagination info model
}
}