Support

Create a new SKU.

mutation

Requires commerce.product:write.

Create a new SKU.

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 CreateSKUInput! required
    • label String! required
    • attributeValueIds [String!] optional
    • attributeValues [AssociateAttributeValueToSKUInput!] optional
      • attributeName String! required
      • valueName String! required
    • backorderLimit Int optional
    • code String optional
    • cost Int optional — DEPRECATED. Use unitCost instead. Deprecated: This cost field cannot specify currency code. Use unitCost instead.
    • description String optional
    • disableInventoryTracking Boolean optional
    • disablePriceOverrides Boolean optional
    • disableShipping Boolean optional
    • eanCode String optional
    • gtinCode String optional
    • htmlDescription String optional
    • HTMLDescription String optional — Deprecated: Use htmlDescription instead.
    • inventoryQuantities [CreateSKUInventoryInput!] optional
      • locationId String! required
      • quantity Int! required
    • isbnCode String optional
    • mediaObjects [CreateMediaObjectInput!] optional
      • type String! required — The type of the media, one of PHOTO, VIDEO, IMAGE, AUDIO.
      • url String! required
      • label String optional
      • metafields [CreateMetafieldInput!] optional
        • key String! required
        • namespace String! required
        • type String! required — Metafield value type. Live catalog validation accepts lowercase values such as boolean, string, stringMultiLine, number, numberDecimal, date, dateTime, json, measurement, url, reference, money, list.string, list.number, list.numberDecimal. Uppercase STRING is rejected.
        • value String! required
      • name String optional
      • position Int optional
    • metafields [CreateMetafieldInput!] optional
      • key String! required
      • namespace String! required
      • type String! required — Metafield value type. Live catalog validation accepts lowercase values such as boolean, string, stringMultiLine, number, numberDecimal, date, dateTime, json, measurement, url, reference, money, list.string, list.number, list.numberDecimal. Uppercase STRING is rejected.
      • value String! required
    • name String optional
    • prices [CreateSKUPriceInput!] optional
      • 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.
    • references [CreateReferenceInput!] optional
      • origin String! required
      • value String! required
    • shortLabel String optional
    • skuGroupId String optional
    • status String optional — The status of the SKU, one of DRAFT, ACTIVE, ARCHIVED.
    • unitCost 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.
    • unitOfWeight String optional — The status of the SKU, one of KG, GR, LB, OZ.
    • upcCode String optional
    • weight Float optional

Possible returns

  • SKU SKU — A SKU represents a stock keeping unit (SKU) in the catalog.

Last updated on

How is this guide?