This endpoint creates child variants for a given product by defining choices for its attributes. If the product in question is a stand-alone product (neither a parent nor having any children), this operation will transform it into a parent product.
Create Product Attributes: Begin by creating product attributes for the store using the Create Attribute endpoint.
2.
Define Attribute Choices: Next, define choices for these attributes. For example, for a size attribute, choices might include 'small', 'medium', 'large', etc.
3.
Choice Objects in Different Languages: Each choice is an object that accepts values in multiple languages. Currently, English and Arabic are supported.
4.
Submit Attributes and Choices: This endpoint accepts an array of attributes and their respective choices.
5.
Variant Generation: Variants are then created using the cartesian product of these attribute values, resulting in all possible combinations.