Promotions
Mutation
activatePromotion — Returns Promotion
Scopes Required: create_advance_promotions
| Arguments | Type | Description |
|---|---|---|
|
id |
The UUID of the promotion being activated |
Example Mutation
mutation ActivatePromotion($id: ID!) {
activatePromotion(id: $id) {
id,
mdbId,
mdbSyncing,
clientId,
name
}
}
# Example variables
{
"id": "<ID>"
}Mutation
clonePromotion — Returns Promotion
Scopes Required: see_promotions create_advance_promotions
| Arguments | Type | Description |
|---|---|---|
|
id |
The UUID of the promotion to clone |
Example Mutation
mutation ClonePromotion($id: ID!) {
clonePromotion(id: $id) {
id,
mdbId,
mdbSyncing,
clientId,
name
}
}
# Example variables
{
"id": "<ID>"
}Mutation
createPromotion — Returns Promotion
Scopes Required: create_advance_promotions
Express promotions require the criteria to be set up differently. All the express promotion's
criteriamust have only one item on it and cannot be excluded. Thecriteriaalso can only havetypeset to eitherSELL_TOTAL,DISCOUNT_PERCENTAGEorDISCOUNT_TOTAL_AMOUNT. Whentypeis set toSELL_TOTALthe item in the criteria can only be product or family.
| Arguments | Type | Description |
|---|---|---|
|
name |
String! |
The name of the promotion |
|
start |
The start date of the promotion, when the field is |
|
|
end |
The end date of the promotion, when the field is |
|
|
promotionCategory |
The UUID of the promotion category for the promotion |
|
|
customerGroups |
The UUIDs of the customer groups that the promotion is available to. Leave unset for the promotion to be available to all customers |
|
|
outlets |
The outlets that the promotion runs on, if not provided, this will add to all Outlets |
|
|
express |
Boolean |
Whether the promotion is an express promotion |
|
mixCriteria |
Boolean |
Whether the criteria should mix together as if they were a single criteria |
|
saleMaxApplicationCount |
Int |
The maximum number of times this promotion can be applied to a single sale, if null then it's unlimited. This must be null for express promotions |
|
criteria |
The criteria for the promotion |
|
|
schedule |
The schedule for how often this promotion reoccurs. If set, this overrides the provided start and end values |
|
|
active |
Boolean |
Whether the promotion is active |
|
clientId |
String |
Your ID of the promotion, this is not displayed anywhere and only available through the API |
|
activatedBy |
String |
If provided, this can be used to toggle the promotion on / off with the |
Example Mutation
mutation CreatePromotion($name: String!) {
createPromotion(name: $name) {
id,
mdbId,
mdbSyncing,
clientId,
name
}
}
# Example variables
{
"name": "<NAME>"
}Mutation
deactivatePromotion — Returns Promotion
Scopes Required: delete_promotions
| Arguments | Type | Description |
|---|---|---|
|
id |
The UUID of the promotion being deleted |
Example Mutation
mutation DeactivatePromotion($id: ID!) {
deactivatePromotion(id: $id) {
id,
mdbId,
mdbSyncing,
clientId,
name
}
}
# Example variables
{
"id": "<ID>"
}Mutation
deletePromotion — Returns Promotion
Scopes Required: delete_promotions
| Arguments | Type | Description |
|---|---|---|
|
id |
The UUID of the promotion being deleted |
Example Mutation
mutation DeletePromotion($id: ID!) {
deletePromotion(id: $id) {
id,
mdbId,
mdbSyncing,
clientId,
name
}
}
# Example variables
{
"id": "<ID>"
}Mutation
updatePromotion — Returns Promotion
Scopes Required: edit_advance_promotions
Express promotions require the criteria to be set up differently. All the express promotion's
criteriamust have only one item on it and cannot be excluded. Thecriteriaalso can only havetypeset to eitherSELL_TOTAL,DISCOUNT_PERCENTAGEorDISCOUNT_TOTAL_AMOUNT. Whentypeis set toSELL_TOTALthe item in the criteria can only be product or family.
| Arguments | Type | Description |
|---|---|---|
|
id |
The UUID of the promotion being updated |
|
|
name |
String |
The name of the promotion |
|
start |
The start date of the promotion, when the field is |
|
|
end |
The end date of the promotion, when the field is |
|
|
promotionCategory |
The UUID of the promotion category for the promotion |
|
|
customerGroups |
The UUIDs of the customer groups that the promotion is available to. Leave unset for the promotion to be available to all customers |
|
|
outlets |
The outlets that the promotion runs on |
|
|
express |
Boolean |
Whether the promotion is an express promotion |
|
mixCriteria |
Boolean |
Whether the criteria should mix together as if they were a single criteria |
|
saleMaxApplicationCount |
Int |
The maximum number of times this promotion can be applied to a single sale, if null then it's unlimited. This must be null for express promotions |
|
criteria |
The criteria for the promotion |
|
|
schedule |
The schedule for how often this promotion reoccurs. If set, this overrides the provided start and end values |
|
|
active |
Boolean |
Whether the promotion is active |
|
clientId |
String |
Your ID of the promotion, this is not displayed anywhere and only available through the API |
|
activatedBy |
String |
If provided, this can be used to toggle the promotion on / off with the |
Example Mutation
mutation UpdatePromotion($id: ID!) {
updatePromotion(id: $id) {
id,
mdbId,
mdbSyncing,
clientId,
name
}
}
# Example variables
{
"id": "<ID>"
}