Update Product Variant
PUT
/products/variants/{variant}This endpoint allows you to update variant details by passing the variant
as a path parameter.
:::caution[Important]
- All variables in the update variant body request are optional.
- Updating one variable at a time is possible, but at least one of the variables must be in the body request payload. Otherwise, an error will be shown if you send an empty body request payload.
:::
Request
The sku value of product variant. Example: 23-TD23-32
The barcode value of product variant. Example: abc01
The price of the product variant. Example: 96.33
The sale price of the product variant. Example: 90.50
The cost price of the product variant. Example: 100.33
Amount of the product variant total stock quantity. Only updated if the store feature manage product by branches is not activated. Example: 4
Stock Keeping Unit is a unique alphanumeric code used to identify and manage specific product variant within a company's inventory system.
The barcode value of product variant.
The price of the product variant.
The sale price of the product variant. Example: 90.50
The original or purchase price at which a product variant or item was acquired by a business or individual, excluding any additional expenses or markups.
Amount of the product variant total stock quantity. Note: Only updated if the store feature manage product by branches is not activated.
Product Variant Weight.
Manufacturer Part Number.
Global Trade Item Number, a unique and standardized identifier used to uniquely represent products, items, or services in the global marketplace, to enable efficient tracking and management across supply chains and retail sector. If product_type
is set to any of the following: product
, group_products
, codes
, digital
, donating
then value can be set. Otherwise, it can be set to null
Sets a threshold value to trigger notifications when inventory falls below.
{
"sku": "23-TD23-32",
"barcode": "abc01",
"price": 96.33,
"sale_price": 90.5,
"cost_price": 100.33,
"stock_quantity": 4,
"weight": 3,
"mpn": 43242342,
"gtin": 54353453
}
Request samples
[api.label.responses]
Response status code, a numeric or alphanumeric identifier used to convey the outcome or status of a request, operation, or transaction in various systems and applications, typically indicating whether the action was successful, encountered an error, or resulted in a specific condition.
Response flag, boolean indicator used to signal a particular condition or state in the response of a system or application, often representing the presence or absence of certain conditions or outcomes.
Detailed structure of the product variant model object showing its fields and data types.
A unique identifier associated with a specific variant of a product or item.
The price of the product variant.
The regular price of the product variant.
The purchase price at which a product or item was acquired, excluding any additional expenses or markups.
The sale price of the product variant.
Whether or not the product variant has a special price.
The amount of the product variant total stock quantity. Only updated if the store feature manage product by branches is not activated.
Whether or not the product variant is of unlimit quantity.
Sets a threshold value to trigger notifications when inventory falls below.
The barcode value of product variant.
A unique Stock Keeping Unit (SKU) identifier assigned to a specific variant of a product.
Manufacturer Part Number, a unique identifier assigned by a manufacturer to a specific product or component, which helps distinguish it from other similar products and facilitates inventory management, product tracking, and ordering processes.
Global Trade Item Number, a unique and standardized identifier used to uniquely represent products, items, or services in the global marketplace, to enable efficient tracking and management across supply chains and retail sectors. If product_type
is set to any of the following: product
, group_products
, codes
, digital
, donating
then value can be set. Otherwise, it can be set to null
The date and time product variant is updated.
An array for the related options to this variant.
An array for the values of the related options to this variant.
The numerical value that represents the mass or weight of a specific variant of a product.
Product Variant Weight Type
Product variant weight label representing the type of the weight.
Whether or not the user subscribed for the sku.
Whether or not enable showing that the product variant is the default
{
"status": 201,
"success": true,
"data": {
"id": 652911549,
"price": {
"amount": 13.5,
"currency": "SAR"
},
"sale_price": {
"amount": 0,
"currency": "SAR"
},
"cost_price": {
"amount": 0,
"currency": "SAR"
},
"stock_quantity": 3000,
"barcode": "barcode-ABC",
"sku": "sku-variant-1551119600",
"related_option_values": [
667315336
]
}
}