ProductVariant_Insert
#
Description#
This function inserts a new product variant.
Request Parameters#
Parameter |
Type | Description |
---|---|---|
product_id Edit_Product Product_Code Product_SKU |
Number String String String |
ID Number of product Product code string Product code string Product SKU string |
attribute_ids |
Number | The attribute id of the product |
AttributeTemplateattribute_ids |
Number | The attribute template ids of the product attribute |
option_ids |
Number | The option id numbers of the product |
part_ids |
Number | The id numbers of the product parts |
quantities |
Number | The part quantities for the product variant |
Response Parameters#
Parameter |
Type | Description |
---|---|---|
success |
Boolean | Boolean value indicating if the API request was successful |
product_id |
Number | The product id for the variant |
variant_id |
Number | The new variant id |
Example Request#
{
"Store_code": "beta",
"Function": "ProductVariant_Insert",
"Product_ID": 1,
"Attribute_IDs": 9,
"AttributeTemplateAttribute_IDs": 1,
"Option_IDs": 1,
"Part_IDs": 206,
"Quantities": 1
}
Example Response#
{
"success": 1,
"data": {
"product_id": 1,
"variant_id": 9
}
}