List Offers
Pending
GET
https://api.mpc.dev.placewise.com/v3/{loyalty_club_slug}/offers
API Permit:Offers:Api:Offers:List
API Context:Loyalty Club
Authorizations:UserToken
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
scope | enum | standard | When present, only offers from given scope will be returned |
types | string[] | null | When present, only offers of given types will be returned |
per_page | integer | 100 | Number of results to be returned per request (100 is the maximum) |
page_no | integer | 1 | Number of results page |
sort_by | string | "name" | What attribute should results be sorted by? Supported attributes are: ["name", "usable_since", "usable_until", "visible_since", "visible_until", "created_at", "updated_at", "archived_at"] |
sort_direction | string | "asc" | Direction of sorting: "asc" or "desc" |
collection_ids | integer[] | null | When present, only offers belonging to at least one of given collections will be returned |
store_ids | integer[] | null | When present, only offers belonging to at at least one of given store_id will be returned |
status | enum | null | When present, only offers with this status will be returned. See: statuses |
campaign_id | integer | null | When present, only offers with this campaign_id will be returned |
audience_id | integer | null | When present, only offers with this audience_id will be returned |
search | string | null | When present, only offers that match the query string will be returned |
extras | object | null | When present, only offers that match given values will be returned. See: below |
ids | integer[] | null | When present, only offers having one of provided IDs will be returned |
without_collection | boolean | false | When present, only offers without collections will be returned |
without_audience_id | boolean | false | When present, only offers without audiences will be returned |
without_campaign_id | boolean | false | When present, only offers without campaigns will be returned |
without_store | boolean | false | When present, only offers without store will be returned |
with_archived | boolean | false | When present, also archived offers will be returned |
only_archived | boolean | false | When present, only archived offers will be returned |
visible_since_after | datetime | null | When present, only offers with greater visible_since will be returned |
visible_since_before | datetime | null | When present, only offers with lesser visible_since will be returned |
visible_until_after | datetime | null | When present, only offers with greater visible_until will be returned |
visible_until_before | datetime | null | When present, only offers with lesser visible_until will be returned |
usable_since_after | datetime | null | When present, only offers with greater usable_since will be returned |
usable_since_before | datetime | null | When present, only offers with lesser usable_since will be returned |
usable_until_before | datetime | null | When present, only offers with lesser usable_until will be returned |
Filtering by extras
extra
attribute(s).?extras[<attribute>]=(!)<value>
?extras[category]=Food
extras["category"].toString() = 'Food'
.?extras[category_id]=!3&extras[type]=external
extras["category_id"].toString() != '3' && extras["type"].toString() == 'external'
.Response Body
Key | Type | Optional? | Description |
---|---|---|---|
offers | Offer[] | no (may be empty) | See Offer model |
pagination_info | PaginationInfo | no | See Pagination info model |
Example
Pagination Info
{
"offers": [
{
// (...) - see Offer model
}
],
"pagination_info": {
// (...) - see Pagination info model
}
}
Request
Path Params
loyalty_club_slug
stringÂ
required
Example:
infinity-mall
Query Params
publication_status
enum<string>Â
optional
Allowed values:
publishedunpublisheddraftscheduledexpired
Example:
published
excluded_publication_status
stringÂ
optional
Example:
expired
cms_tag_ids[]
array[integer]
optional
Example:
["7","10"]
Header Params
X-Loyalty-Club-Slug
stringÂ
required
Default:
{{LOYALTY_CLUB_SLUG}}
X-Client-Authorization
stringÂ
optional
Default:
{{API_TOKEN}}
Request samples
Responses
Modified at 2025-01-28 10:10:28