Sale__discount
{ collectionName: 'sale__Discount', permissions: ['*', 'read'], } Requires a signed-in staff user. Needs the `sale__Discount` `read` permission. Send the `x-tenant` header (the gateway sets it from your API key).
sale__discount(where: CommonFindDocumentDto!): Discount!{ collectionName: 'sale__Discount', permissions: ['*', 'read'], } Requires a signed-in staff user. Needs the sale__Discount read permission. Send the x-tenant header (the gateway sets it from your API key).
Arguments
where*Returns
- sale__discount
_id*ID!appliesTo?Products a PRODUCT_AMOUNT discount applies to.
buyXGetY?code?StringCustomer-entered code. Only set when method is CODE.
combinesWith?commits?createdAt?DateTimeA date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
eligibility?endsAt?DateTimeA date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
freeShipping?isActive*Boolean!isDemo?Booleanmethod*DiscountMethod!AUTOMATICCODEminimumRequirement?oncePerCustomer*Boolean!startsAt?DateTimeA date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
tenant?Stringtitle*String!type*DiscountType!BUY_X_GET_YFREE_SHIPPINGORDER_AMOUNTPRODUCT_AMOUNTupdatedAt?DateTimeA date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
usageCount?IntOrders that used this discount. Resolved on read.
usageLimit?IntTotal redemptions across all customers. Empty means no limit.
value?Used by PRODUCT_AMOUNT and ORDER_AMOUNT discounts.
query Sale__discount($where: CommonFindDocumentDto!) { sale__discount(where: $where) { _id appliesTo { collectionIds productIds scope } buyXGetY { buys { collectionIds minAmount minQuantity productIds scope } gets { collectionIds productIds quantity scope } maxUsesPerOrder } code createdAt endsAt isActive isDemo method oncePerCustomer }}{ "where": { "and": [ { "and": [ { "and": [ { "and": [ {} ], "key": "string" } ], "key": "string" } ], "key": "string" } ], "key": "string" }}{ "data": { "sale__discount": { "_id": "1", "appliesTo": { "collectionIds": [ "string" ], "productIds": [ "string" ], "scope": "ALL" }, "buyXGetY": { "buys": { "collectionIds": [ "string" ], "minAmount": 10.5, "minQuantity": 10, "productIds": [ "string" ], "scope": "ALL" }, "gets": { "collectionIds": [ "string" ], "productIds": [ "string" ], "quantity": 10, "scope": "ALL" }, "maxUsesPerOrder": 10 }, "code": "string", "createdAt": "<DateTime>", "endsAt": "<DateTime>", "isActive": true, "isDemo": true, "method": "AUTOMATIC", "oncePerCustomer": true } }}Sale__abandoned Carts QUERY
{ collectionName: 'sale__Invoice', permissions: ['*', 'read'], } Requires a signed-in staff user. Needs the `sale__Invoice` `read` permission. Send the `x-tenant` header (the gateway sets it from your API key).
Sale__discounts QUERY
{ collectionName: 'sale__Discount', permissions: ['*', 'read'], } Requires a signed-in staff user. Needs the `sale__Discount` `read` permission. Send the `x-tenant` header (the gateway sets it from your API key).