createOptionPrice
View as MarkdownCreate a flat price for the option. This will be ignored if a price is present on the option values.
mutation
Requires commerce.product:write.
Create a flat price for the option. This will be ignored if a price is present on the option values.
For
SimpleMoneyInput.value, send 1999 for $19.99 USD, not 19.99.Required headers
| Header | Required | Description |
|---|---|---|
x-store-id | Yes | ID 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
inputMutationCreateOptionPriceInput!requiredoptionIdString!requiredvalueSimpleMoneyInput!requiredcurrencyCodeString!requiredvalueFloat!required — Integer minor units in the smallest currency unit (for USD, cents:1999= $19.99). Send1999, not19.99.
compareAtValueSimpleMoneyInputoptionalcurrencyCodeString!requiredvalueFloat!required — Integer minor units in the smallest currency unit (for USD, cents:1999= $19.99). Send1999, not19.99.
Possible returns
OptionPriceOptionPrice— 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?