Support

applyDiscountCodes

View as Markdown

Apply a discount to an existing order

mutation

Requires one of commerce.order:create, commerce.order:update, commerce.order:cancel, or commerce.order:complete (use the scope that matches the operation).

Apply a discount to an existing order

Required headers

HeaderRequiredDescription
x-store-idYesID of the store the operation targets. Omitting it returns HTTP 200 with a GraphQL error: extensions.code: "UNAUTHENTICATED".

Go to Authentication for credential setup.

Arguments

  • input ApplyDiscountCodesInput! required
    • discountCodes [String!]! required
    • orderId ID! required — Global ID in format Order_\<KSUID\>

Possible returns

  • Order Order

Last updated on

How is this guide?