bulkUpdateDiscountSchemes
Requires permission products:discount:update.
Updates several discount schemes in one call, each with its own changes, and records an audit entry for each scheme that changed. Needs the discounts update 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:
- GraphQL
- cURL
mutation BulkUpdateDiscountSchemes($data: BulkUpdateDiscountSchemeDto!) {
bulkUpdateDiscountSchemes(data: $data)
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation BulkUpdateDiscountSchemes($data: BulkUpdateDiscountSchemeDto!) {\n bulkUpdateDiscountSchemes(data: $data)\n}",
"variables": {
"data": {
"updates": [
{
"data": {},
"id": "string"
}
]
}
}
}
EOF
Variables:
{
"data": {
"updates": [
{
"data": {},
"id": "string"
}
]
}
}
Response:
{
"data": {
"bulkUpdateDiscountSchemes": true
}
}
bulkUpdateDiscountSchemes(
data: BulkUpdateDiscountSchemeDto!
): Boolean!
Arguments
bulkUpdateDiscountSchemes.data ● BulkUpdateDiscountSchemeDto! non-null input
The list of schemes and the changes to make to each.
Type
Boolean scalar
The Boolean scalar type represents true or false.