Promotion Categories

Mutation

createPromotionCategory — Returns PromotionCategory

Scopes Required: modify_promotion_categories

Arguments Type Description

name

String!

The name of the promotional category

showOnOrder

Boolean

Whether to show the promotional category as "on promotion" on the order edit screen

includeInIntegrations

Boolean

Whether to include this promotional category in the calculation for promotionPrice for barcodes

mdbId

Int

The ID of the master database reference that this promotional category corresponds to

source

String

The promotion source to connect the category to, this is written as "source/id". For more details view shortCode on PromotionCategoryType

outlets

[ID!]

The Outlets which are automatically downloading promotions for this category

Example Mutation
mutation CreatePromotionCategory($name: String!) {
    createPromotionCategory(name: $name) {
        id,
        name,
        parent,
        deleted,
        mdbId
    }
}

# Example variables
{
    "name": "<NAME>"
}

Mutation

deletePromotionCategory — Returns PromotionCategory

Scopes Required: modify_promotion_categories

Arguments Type Description

id

ID!

The ID of the promotional category to delete

Example Mutation
mutation DeletePromotionCategory($id: ID!) {
    deletePromotionCategory(id: $id) {
        id,
        name,
        parent,
        deleted,
        mdbId
    }
}

# Example variables
{
    "id": "<ID>"
}

Mutation

updatePromotionCategory — Returns PromotionCategory

Scopes Required: modify_promotion_categories

Arguments Type Description

id

ID!

The ID of the promotional category

mdbId

Int

The ID of the master database promotional category this corresponds to

name

String

The name of the promotional category

showOnOrder

Boolean

Whether the promotional category should appear in the order edit screen as "on promotion"

includeInIntegrations

Boolean

Whether to include this promotional category in the calculation for promotionPrice for barcodes

source

String

The promotion source to connect the category to, this is written as "source/id". For more details view shortCode on PromotionCategoryType

outlets

[ID!]

The Outlets which are automatically downloading promotions for this category

Example Mutation
mutation UpdatePromotionCategory($id: ID!) {
    updatePromotionCategory(id: $id) {
        id,
        name,
        parent,
        deleted,
        mdbId
    }
}

# Example variables
{
    "id": "<ID>"
}