POST Option
Developing
POST
{{url}}api/v1/admin/options
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'http://ecompulse.test/api/v1/admin/options' \
--header 'Accept: application/json' \
--header 'X-API-Key: exzbLclGAzBCyL0k1Yv29Evu6mwoYOATBF0lWPyT' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Shirt size",
"values": [
{
"label": "s",
"price": 0.00,
"type": 1
},
{
"label": "m",
"price": 12.00,
"type": 1
}
],
"option_type_id": 1
}'
Response Response Example
{
"status": "success",
"message": "Option created successfully",
"data": {
"id": 3,
"name": "Shirt size",
"values": [
{
"label": "s",
"price": 0,
"type": "Fixed"
},
{
"label": "m",
"price": 12,
"type": "Fixed"
}
],
"option_type": {
"id": 1,
"name": "Size"
},
"status": 1
}
}
Request
Header Params
Accept
stringÂ
required
Example:
application/json
X-API-Key
stringÂ
required
Example:
{{key}}
Body Params application/json
Responses
Modified at 2024-05-26 23:03:08