Skip to Content
StoreOSv0.27.1
Core GraphQL APIReferenceMutations

Sale__update Discount

{ collectionName: 'sale__Discount', permissions: ['*', 'update'], } Requires a signed-in staff user. Needs the `sale__Discount` `update` permission. Send the `x-tenant` header (the gateway sets it from your API key).

MUTATIONsale__updateDiscount(input: UpdateDiscountInput!, where: CommonFindDocumentDto!): Boolean!

{ collectionName: 'sale__Discount', permissions: ['*', 'update'], } Requires a signed-in staff user. Needs the sale__Discount update permission. Send the x-tenant header (the gateway sets it from your API key).

Arguments

input*
where*

Returns

sale__updateDiscount*Boolean!
Example Request
mutation Sale__updateDiscount($input: UpdateDiscountInput!, $where: CommonFindDocumentDto!) {  sale__updateDiscount(input: $input, where: $where)}
Variables
{  "input": {    "appliesTo": {      "scope": "ALL"    },    "buyXGetY": {      "buys": {        "scope": "ALL"      },      "gets": {        "quantity": 10,        "scope": "ALL",        "value": {          "type": "FIXED_AMOUNT"        }      }    }  },  "where": {    "and": [      {        "and": [          {            "and": [              {                "and": [                  {}                ],                "key": "string"              }            ],            "key": "string"          }        ],        "key": "string"      }    ],    "key": "string"  }}
Example Response
{  "data": {    "sale__updateDiscount": true  }}