Preview

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

updateProductVariants

Update the product's variant(s)

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 UpdateProductVariantsInput! PREVIEW

    UpdateProductVariantsInput fields

    productId ID!

    Product id

    configuration [ProductVariantConfigurationInput!]! PREVIEW

    List of option, value that will be computed to correspond to one or more product variants. Example configuration:

    • [] -> to update all the variants for that product.
    • [{optionCode: 'Colour', valueCode: 'Blue'}] -> to update all "blue" variants.
    • [{optionCode: 'Colour', valueCode: 'Blue'}, {optionCode: 'Colour', valueCode: 'Green'}] -> to update the variants that are Blue or Green.
    • [{optionCode: 'Colour', valueCode: 'Blue'}, {optionCode: 'Size', valueCode: 'M'}] -> to update the variants of colour Blue and size M.
    physicalAttributes PhysicalAttributesInput PREVIEW

    Updated physical attributes

    Return Fields

    product Product PREVIEW

    Product

    userErrors [UpdateProductVariantsError!] PREVIEW

    User errors

    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.