Skip to Content
StoreOSv0.27.1
Core GraphQL APIReferenceMutations

Sale__create Discount

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

MUTATIONsale__createDiscount(input: CreateDiscountInput!, tenant: String): CommonMutationResponse!

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

Arguments

input*
tenant?String

Returns

  1. sale__createDiscount
_id*ID!
Example Request
mutation Sale__createDiscount($input: CreateDiscountInput!) {  sale__createDiscount(input: $input) {    _id  }}
Variables
{  "input": {    "method": "AUTOMATIC",    "title": "string",    "type": "BUY_X_GET_Y"  }}
Example Response
{  "data": {    "sale__createDiscount": {      "_id": "1"    }  }}