Skip to main content

discountSchemes

Requires permission products:discount:list.

Lists the organization's discount schemes, optionally filtered and paged. A scheme's customers and products are loaded only when the query selects them. Omit skip and take to return every scheme; use discountSchemesCount for the total. Needs the discounts list permission.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

query DiscountSchemes {
discountSchemes {
id
code
name
type
createdAt
applicableCustomerTypes
partners {
id
createdAt
discountSchemeId
partnerId
updatedAt
}
}
}

Response:

{
"data": {
"discountSchemes": [
{
"id": "id",
"code": "string",
"name": "string",
"type": "BUY_X_GET_Y",
"createdAt": "2025-01-15T00:00:00Z",
"applicableCustomerTypes": "string",
"partners": [
{
"id": "id",
"createdAt": "2025-01-15T00:00:00Z",
"discountSchemeId": "string",
"partnerId": "string",
"updatedAt": "2025-01-15T00:00:00Z"
}
]
}
]
}
}
discountSchemes(
filter: DiscountSchemeFilterInput
skip: Int
take: Int
): [DiscountScheme!]!

Arguments​

discountSchemes.filter ● DiscountSchemeFilterInput input​

Optional filters: search text, status, scope, active flag, currency and sort order.

discountSchemes.skip ● Int scalar​

How many schemes to skip.

discountSchemes.take ● Int scalar​

How many schemes to return.

Type​

DiscountScheme object​

A discount scheme.