Preview

addProductVariantOptionValue is in Preview status and is subject to change without notice. For more information about Preview status, see the GraphQL API policy.

addProductVariantOptionValue

Create variant option values for a product

This page contains

    Authorization Rules

    This request requires authorization with at least one of the following scopes:

    Scopes

    ROLE_CHANNEL_ADMIN

    ROLE_DEVELOPER

    ROLE_PARTNER

    Arguments

    input AddProductVariantOptionValueInput! PREVIEW

    AddProductVariantOptionValueInput fields

    productId ID!

    Product ID that variant option value will be added to

    optionCode String!

    Option code that the variant option value will be added to

    valueCode String

    Unique code for the variant option value

    name [LocalStringInput!]!

    Localized values for the variant option value

    isDefaultValue Boolean!

    Determines if this variant option value will be the default value for the given option/value code combination

    hexcode String

    If applicable the hexcode for the option value

    secondaryInformation [LocalStringInput!]

    Additional information about a product variant option value

    Return Fields

    product Product PREVIEW

    Updated product with newly added variant option value

    userErrors [AddProductVariantOptionValueError!] PREVIEW

    User errors that may have occurred while trying to add a new variant option value

    Interactive example

    This is an example mutation query. Use the embedded interactive tool below to edit the query.

    Hint: use Ctrl + Space for autocompleting fields.