Update Product Option Value
PUT
/products/options/values/{value}This endpoint allows you to update value details in a specific option for a specific product by passing the value
as a path parameter.
Request
The Option Value ID. List of Product Option Value ID can be found here.
A descriptive label or title given to a specific attribute, feature, or characteristic associated with a product, helping to define and differentiate its various qualities or options.
The additional price which will be added to the product price when the customer adds/selects this value. Alternatively the value is set 0 if there is no additional price.
The specific quantity or number of units available for a particular option or variation of a product.
The display value in UI based on display type of option, by default will use the name of value as display value when the 'display_value=text', but in case you used 'image' then you need to set the image id as value You can upload a new image to product using attach image endpoint then use 'image' id from response, otherwise when use 'color' as display type you need to pass the color for example '#000' for black color
The option to indicate if this value is the default value of the product option.
{
"name": "XzL",
"price": 121,
"display_value": "xzzl"
}
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.
Detailed structure of the product value model object showing its fields and data types.
A unique identifier assigned to a value associated with a product.
Identifying label for a product attribute.
The extra price added when a customer selects a specific value; use 0 to indicate no additional cost. Applicable for product types: service and food.
The extra formatted price added when a customer selects a specific value.
The UI displays values based on the option's display type. By default, it shows the name when display_value=text
. For image
, use the image ID (uploaded via the attach image endpoint). For color
, provide a value like #000
for black.
Is the option value is advanced or not
A unique identifier assigned to a specific choice or configuration available to customers, aiding in precise tracking and management of selectable product attributes.
The web address where the corresponding image is hosted.
if option.type
= image
then hashed display value return image id
.
if option.type
= text
then hashed display value return value name
Translation of option values in different languages
This option will be enabled when this particular value is the default value.
Whether or not the option value is out of stock.
{
"status": 201,
"success": true,
"data": {
"id": 667315336,
"name": "salvalueupdated",
"price": {
"amount": 0,
"currency": "SAR"
},
"display_value": "",
"option_id": 1833119338,
"image_url": "https://i.ibb.co/jyqRQfQ/avatar-male.webp",
"hashed_display_value": "",
"skus": [
{
"id": 652911549,
"price": {
"amount": 110,
"currency": "SAR"
},
"regular_price": {
"amount": 234,
"currency": "SAR"
},
"sale_price": {
"amount": 100,
"currency": "SAR"
},
"stock_quantity": 13,
"barcode": "barcode-ABC",
"sku": "sku-variant-1551119600",
"related_option_values": [
667315336,
322122678,
569679762,
1318371393
]
},
{
"id": 1966914519,
"price": {
"amount": 9.9,
"currency": "SAR"
},
"regular_price": {
"amount": 0,
"currency": "SAR"
},
"sale_price": {
"amount": 100,
"currency": "SAR"
},
"stock_quantity": 20,
"barcode": "",
"sku": "23-TD23-32",
"related_option_values": [
667315336,
322122678,
1552401892,
1318371393
]
},
{
"id": 1799056677,
"price": {
"amount": 9.9,
"currency": "SAR"
},
"regular_price": {
"amount": 0,
"currency": "SAR"
},
"sale_price": {
"amount": 100,
"currency": "SAR"
},
"stock_quantity": 20,
"barcode": "",
"sku": "23-TD23-32",
"related_option_values": [
667315336,
322122678,
1209980149,
1318371393
]
},
{
"id": 673658412,
"price": {
"amount": 9.9,
"currency": "SAR"
},
"regular_price": {
"amount": 0,
"currency": "SAR"
},
"sale_price": {
"amount": 100,
"currency": "SAR"
},
"stock_quantity": 20,
"barcode": "",
"sku": "23-TD23-32",
"related_option_values": [
667315336,
322122678,
393917653,
1318371393
]
}
]
}
}