updateSku
View as MarkdownUpdate an existing SKU.
mutation
Requires commerce.product:write.
Update an existing SKU.
status must be DRAFT, ACTIVE, or ARCHIVED.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
idString!requiredinputMutationUpdateSkuInput!requiredbackorderLimitIntoptionalcodeStringoptionalcostIntoptional — DEPRECATED. Use unitCost instead. Deprecated: This cost field cannot specify currency code. UseunitCostinstead.descriptionStringoptionaldisableInventoryTrackingBooleanoptionaldisablePriceOverridesBooleanoptionaldisableShippingBooleanoptionaleanCodeStringoptionalgtinCodeStringoptionalhtmlDescriptionStringoptionalHTMLDescriptionStringoptional — Deprecated: Use htmlDescription instead.isbnCodeStringoptionallabelStringoptionalmetafields[UpsertMetafieldInput!]optionalkeyString!requirednamespaceString!requiredtypeString!requiredvalueString!required
nameStringoptionalshortLabelStringoptional — Deprecated: Use channel-specific overrides for short labels.statusStringoptional — The status of the SKU, one ofDRAFT,ACTIVE,ARCHIVED.unitCostSimpleMoneyInputoptionalcurrencyCodeString!requiredvalueFloat!required — Integer minor units in the smallest currency unit (for USD, cents:1999= $19.99). Send1999, not19.99.
unitOfWeightStringoptional — The unit of weight, one ofKG,GR,LB,OZ.upcCodeStringoptionalweightFloatoptional
Possible returns
SKUSKU— A SKU represents a stock keeping unit (SKU) in the catalog.
Last updated on
How is this guide?