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
Unique identification number assigned to a Product SKU Variant . List of Product SKU IDscan be found here.
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 for the default branch, it well ignored if the quantities
has been used in the body
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.
Optional for manage multi-branch quanaties
The branch id where you need to update the quantity
The new quantity
The reason ID of the quantity change
{
"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,
"quantities": [
{
"branch": 863926575,
"quantity": 100,
"reason_id": 303342349
},
{
"branch": 989845784,
"quantity": 89,
"reason_id": 303342349
}
]
}
Request samples
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.
{
"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
]
}
}