Skip to main content

discountScheme

Requires permission products:discount:read.

Returns one discount scheme. Fails if the scheme does not exist. Needs the discounts read 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 DiscountScheme($id: String!) {
discountScheme(id: $id) {
id
code
name
type
createdAt
applicableCustomerTypes
partners {
id
createdAt
discountSchemeId
partnerId
updatedAt
}
}
}

Variables:

{
"id": "string"
}

Response:

{
"data": {
"discountScheme": {
"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"
}
]
}
}
}
discountScheme(
id: String!
): DiscountScheme!

Arguments​

discountScheme.id ● String! non-null scalar​

The ID of the discount scheme.

Type​

DiscountScheme object​

A discount scheme.