Support

createSkuPrice

View as Markdown

Create a price.

mutation

Requires commerce.product:write.

Create a price.

Use MutationCreateSkuPriceInput (it includes skuId). Nested CreateSKUPriceInput on createSku has no skuId.
For SimpleMoneyInput.value, send 1999 for $19.99 USD, not 19.99.

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 MutationCreateSkuPriceInput! required
    • skuId ID! required
    • value SimpleMoneyInput! required
      • currencyCode String! required
      • value Float! required — Integer minor units in the smallest currency unit (for USD, cents: 1999 = $19.99). Send 1999, not 19.99.
    • compareAtValue SimpleMoneyInput optional
      • currencyCode String! required
      • value Float! required — Integer minor units in the smallest currency unit (for USD, cents: 1999 = $19.99). Send 1999, not 19.99.

Possible returns

  • SKUPrice SKUPrice — Represents the cost of a SKU

Last updated on

How is this guide?