Support

createAttributeValues

View as Markdown

Create new attribute values.

mutation

Requires commerce.product:write.

Create new attribute values.

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 [CreateAttributeValueInput!]! required
    • attributeId String! required
    • label String! required
    • 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

Possible returns

  • AttributeValue [AttributeValue!] — Value for an Attribute.

Last updated on

How is this guide?