Create Product Option Value
POST
/products/options/{option}This endpoint allows you to create new values in specific option for a specific product by passing the option
as a path parameter.
:::tip[Note]
For the product.type
variable set to product
, creating a new product option value will generate new variant for this new value.
:::
Request
The Option ID. List of Product Option 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": "VG",
"price": 21,
"display_value": "Vg"
}
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 option model object showing its fields and data types.
A unique identifier assigned to a specific product configuration or variant.
The label or title used to describe a specific choice or attribute associated with a product.
A text or content that provides detailed information about a product.
Type of the product option, it can be a radio
button or checkbox
Whether or not the product option is obligatory.
The product option is only relevant to order receiving time when it pertains to date-time selections. ONLY for date time options.
Product option sort refers to the method or criteria used to arrange or order product options.
The manner in which product choices or attributes are presented.
Product option visibility based on condition is applied exclusively to products categorized as 'food' or 'service', allowing certain choices or attributes to be shown or hidden based on specific criteria.
Product option visiblity condition type
Product option visiblity
A unique identifier associated with a specific value or choice within a product option.
{
"status": 201,
"success": true,
"data": {
"id": 1130246629,
"name": "size",
"description": null,
"type": "radio",
"required": false,
"associated_with_order_time": 0,
"sort": null,
"display_type": "text",
"visibility": "always",
"values": [
{
"id": 322122678,
"name": "XL",
"price": {
"amount": 180,
"currency": "SAR"
},
"display_value": "XL",
"option_id": 1130246629,
"image_url": "https://i.ibb.co/jyqRQfQ/avatar-male.webp",
"hashed_display_value": "XL"
}
],
"skus": [
{
"id": 652911549,
"price": {
"amount": 150,
"currency": "SAR"
},
"regular_price": {
"amount": 234,
"currency": "SAR"
},
"stock_quantity": 3000,
"barcode": "barcode-ABC",
"sku": "sku-variant-1551119600",
"related_option_values": [
667315336,
322122678
]
}
]
}
}