Skip to content

ProductVariant_Update#


Description#

This function updates 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
variant_id Number The variant id of the product
attribute_ids Number The attribute ids of the product
AttributeTemplateattribute_id Number The attribute template id 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

Example Request#

{
    "Store_Code": "{{Store_Code}}",
    "Miva_Request_Timestamp": "{{$timestamp}}",
    "Function": "ProductVariant_Update",
    "Product_ID": 1,
    "Variant_ID": 4,
    "Attribute_IDs": 9,
    "AttributeTemplateAttribute_IDs": 1,
    "Option_IDs": 1,
    "Part_IDs": 207,
    "Quantities": 1,
    "Attributes": [
        {
            "attr_code": "ATRIBUTE_CODE",
            "option_code": "OPTION_CODE"
        },
        {
            "attr_code": "ATRIBUTE_CODE",
            "option_code": "OPTION_CODE"
        }
    ],
    "Parts": [
        {
            "part_code": "PART_PRODCUCT_CODE",
            "quantity": 1
        },
        {
            "part_code": "PART_PRODCUCT_CODE",
            "quantity": 1
        }
    ]
}

Example Response#

{
    "success": 1
}