Product Variants Bulk Create Payload
Return type for mutation.
Anchor to FieldsFields
- Anchor to productproduct•Product
The updated product object.
- Anchor to productVariantsproduct•[Product
Variants Variant!] The newly created variants.
- Anchor to userErrorsuser•[Product
Errors Variants Bulk Create User Error!]! non-null The list of errors that occurred from executing the mutation.
Anchor to Mutations with this payloadMutations with this payload
- •mutation
Creates multiple product variants for a single product in one operation. You can run this mutation directly or as part of a bulk operation for large-scale catalog updates.
Use the
mutation to efficiently add new product variants—such as different sizes, colors, or materials—to an existing product. The mutation is helpful if you need to add product variants in bulk, such as importing from an external system.The mutation supports:
- Creating variants with custom option values
- Associating media (for example, images, videos, and 3D models) with the product or its variants
- Handling complex product configurations
NoteBy default, stores have a limit of 2048 product variants for each product.
After creating variants, you can make additional changes using one of the following mutations:
: Updates multiple product variants for a single product in one operation.: Used to perform multiple operations on products, such as creating or modifying product options and variants.
You can also specifically manage product options through related mutations:
Learn more about the product model and adding product data.
- Anchor to variantsvariants•[Product
Variants Bulk Input!]! required An array of product variants to be created.
- Anchor to productIdproduct•ID!
Id required The ID of the product on which to create the variants.
- Anchor to mediamedia•[Create
Media Input!] List of new media to be added to the product.
- Anchor to strategystrategy•Product
Variants Bulk Create Strategy Default:DEFAULT The strategy defines which behavior the mutation should observe, such as whether to keep or delete the standalone variant (when product has only a single or default variant) when creating new variants in bulk.
Arguments