Support

updateOptionPrice

View as Markdown

Update an existing price object for an option.

mutation

Requires commerce.product:write.

Update an existing price object for an option.

Sending only value can clear compareAtValue. Include both fields if you need to keep the compare-at price.
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

  • id String! required
  • input MutationUpdateOptionPriceInput! required
    • 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.
    • value 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

  • OptionPrice OptionPrice — Represents the additional cost of an option added to a SKU group (e.g 'Toppings' option for a coffee drink).

Last updated on

How is this guide?