Create Value
POST {{baseUrl}}/products/options/:option
You can create new values in specific option for a specific product by providing the ID of the option you want to create new values in it in the option path parameter.
💡 Note
For product.type=product creating new product option value will generate new variant for this new value.
Request Body
{"name"=>"<string>", "price"=>"<number>", "quantity"=>"<integer>", "display_value"=>"<string>", "is_default"=>"<boolean>"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: Created
{"status":"\u003cnumber\u003e","success":"\u003cboolean\u003e","data":{"id":"\u003cinteger\u003e","name":"\u003cstring\u003e","description":"\u003cstring\u003e","type":"checkbox","required":"\u003cboolean\u003e","associated_with_order_time":"\u003cinteger,boolean\u003e","sort":"\u003cinteger\u003e","display_type":"image","visibility":"always","visibility_condition_type":"!=","visibility_condition_option":"\u003cinteger\u003e","visibility_condition_value":"\u003cinteger\u003e","values":[{"id":"\u003cnumber\u003e","name":"\u003cstring\u003e","price":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"},"display_value":"\u003cstring\u003e","option_id":"\u003cnumber\u003e","image_url":"\u003cstring\u003e","hashed_display_value":"\u003cstring\u003e","skus":[{"id":"\u003cinteger\u003e","price":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"},"regular_price":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"},"sale_price":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"},"stock_quantity":"\u003cinteger\u003e","barcode":"\u003cstring\u003e","sku":"\u003cstring\u003e","related_option_values":["\u003cinteger\u003e","\u003cinteger\u003e"],"is_default":"\u003cboolean\u003e","weight":"\u003cnumber\u003e","weight_type":"\u003cstring\u003e","weight_label":"\u003cstring\u003e"},{"id":"\u003cinteger\u003e","price":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"},"regular_price":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"},"sale_price":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"},"stock_quantity":"\u003cinteger\u003e","barcode":"\u003cstring\u003e","sku":"\u003cstring\u003e","related_option_values":["\u003cinteger\u003e","\u003cinteger\u003e"],"is_default":"\u003cboolean\u003e","weight":"\u003cnumber\u003e","weight_type":"\u003cstring\u003e","weight_label":"\u003cstring\u003e"}],"is_default":"\u003cboolean\u003e"}],"skus":[{"id":"\u003cinteger\u003e","price":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"},"regular_price":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"},"sale_price":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"},"stock_quantity":"\u003cinteger\u003e","barcode":"\u003cstring\u003e","sku":"\u003cstring\u003e","related_option_values":["\u003cinteger\u003e","\u003cinteger\u003e"],"is_default":"\u003cboolean\u003e","weight":"\u003cnumber\u003e","weight_type":"\u003cstring\u003e","weight_label":"\u003cstring\u003e"},{"id":"\u003cinteger\u003e","price":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"},"regular_price":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"},"sale_price":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"},"stock_quantity":"\u003cinteger\u003e","barcode":"\u003cstring\u003e","sku":"\u003cstring\u003e","related_option_values":["\u003cinteger\u003e","\u003cinteger\u003e"],"is_default":"\u003cboolean\u003e","weight":"\u003cnumber\u003e","weight_type":"\u003cstring\u003e","weight_label":"\u003cstring\u003e"}]}}