PUT Option
Developing
PUT
{{url}}api/v1/admin/options/{id}
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request PUT 'http://ecompulse.test/api/v1/admin/options/3' \
--header 'Accept: application/json' \
--header 'X-API-Key: exzbLclGAzBCyL0k1Yv29Evu6mwoYOATBF0lWPyT' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Shirt Size",
"values": [
{
"label": "S",
"price": 5.00,
"type": 1
},
{
"label": "M",
"price": 12.00,
"type": 1
}
],
"option_type_id": 1
}'
Response Response Example
{
"status": "success",
"message": "Option updated successfully",
"data": {
"id": 3,
"name": "Shirt Size",
"values": [
{
"label": "S",
"price": 5,
"type": "Fixed"
},
{
"label": "M",
"price": 12,
"type": "Fixed"
}
],
"option_type": {
"id": 1,
"name": "Size"
},
"status": 1
}
}
Request
Path Params
id
integerÂ
required
Example:
3
Header Params
Accept
stringÂ
required
Example:
application/json
X-API-Key
stringÂ
required
Example:
{{key}}
Body Params application/json
Responses
Modified at 2024-05-27 19:01:43