Skip to main content

activateDiscountScheme

Requires permission products:discount:update.

Turns a discount scheme on. A percentage scheme whose percentage is out of range cannot be activated. Needs the permission to edit discounts.

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:

mutation ActivateDiscountScheme($id: String!) {
activateDiscountScheme(id: $id) {
id
code
name
type
createdAt
applicableCustomerTypes
partners {
id
createdAt
discountSchemeId
partnerId
updatedAt
}
}
}

Variables:

{
"id": "string"
}

Response:

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

Arguments​

activateDiscountScheme.id ● String! non-null scalar​

The ID of the discount scheme.

Type​

DiscountScheme object​

A discount scheme.