Promotions

Query

promotion — Returns Promotion

Scopes Required: see_promotions

Arguments Type Description

id

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

[ID]

Searches for promotions that are in these promotion categories

outlets

[ID]

Searches for promotions that are in these outlets

products

[ID]

Searches for promotions that contain these products

brands

[ID]

Searches for promotions that contain these brands

categories

[ID]

Searches for promotions that contain these categories

families

[ID]

Searches for promotions that contain these families

tags

[ID]

Searches for promotions that contain these tags

showInactive

Boolean

Whether to extend the search to include inactive promotions

customerGroups

[ID]

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

DateTime

Get promotions that start after this time (inclusive) (using this will exclude promotions with no start date)

end

DateTime

Get promotions that end before this time (inclusive) (using this will exclude promotions with no end date)

endedSince

DateTime

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>"
}