Promotions
Query
promotion — Returns Promotion
Scopes Required: see_promotions
| Arguments | Type | Description |
|---|---|---|
|
id |
The ID of the promotion to retrieve |
Example Query
query GetPromotion($id: ID!) {
promotion(id: $id) {
id,
mdbId,
mdbSyncing,
clientId,
name
}
}
# Example variables
{
"id": "<ID>"
}Query
promotions — Returns ConnectionType of Promotion
Scopes Required: see_promotions
Sortable Fields
Fields from Promotion that can be used to sort the connection items
- name
- createdAt
- updatedAt
| Arguments | Type | Description |
|---|---|---|
|
search |
String |
Searches for a promotion that contains this string |
|
promotionCategories |
Searches for promotions that are in these promotion categories |
|
|
outlets |
Searches for promotions that are in these outlets |
|
|
products |
Searches for promotions that contain these products |
|
|
brands |
Searches for promotions that contain these brands |
|
|
categories |
Searches for promotions that contain these categories |
|
|
families |
Searches for promotions that contain these families |
|
|
tags |
Searches for promotions that contain these tags |
|
|
showInactive |
Boolean |
Whether to extend the search to include inactive promotions |
|
customerGroups |
Searches for promotions that apply to these customer groups |
|
|
current |
Boolean |
Get only promotions that may be running right now (or false for only promotions that are not running right now) |
|
start |
Get promotions that start after this time (inclusive) (using this will exclude promotions with no start date) |
|
|
end |
Get promotions that end before this time (inclusive) (using this will exclude promotions with no end date) |
|
|
endedSince |
Get the promotions that have ended since this time (inclusive) |
Example Query
query GetPromotions($search: String) {
promotions(search: $search) {
edges {
node {
id,
mdbId,
mdbSyncing,
clientId,
name
}
},
pageInfo {
hasNextPage,
endCursor
}
}
}
# Example variables
{
"search": "<SEARCH>"
}