创建选项集信息
数据包括:选项集名称、选项集信息(选项值、排序、颜色、分值)
Request
Body Params application/json
{
"name": "Status option set",
"options": [
{
"value": "In progress",
"index": 1,
"color": "#2196F3",
"score": 50
},
{
"value": "Completed",
"index": 2,
"color": "#4CAF50",
"score": 100
}
],
"enableColor": true,
"enableScore": true
}
Request Code Samples
curl --location --request POST 'https://www.nocoly.com/v3/app/optionsets' \
--header 'HAP-Appkey;' \
--header 'HAP-Sign;' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Status option set",
"options": [
{
"value": "In progress",
"index": 1,
"color": "#2196F3",
"score": 50
},
{
"value": "Completed",
"index": 2,
"color": "#4CAF50",
"score": 100
}
],
"enableColor": true,
"enableScore": true
}'
Responses
application/json
Option set created successfully
{
"data": {
"optionsetId": "option_set_123"
},
"success": true
}
Modified at 2026-03-30 07:15:12