- 01.认证中心
- 02.用户接口
- 03.角色接口
- 04.菜单接口
- 05.部门接口
- 06.字典接口
- 07.文件接口
- 08.系统配置
- 09.通知公告
- 10.日志接口
- 11.代码生成
新增字典项
POST
https://api.youlai.tech/api/v1/dicts/{dictCode}/items
/api/v1/dicts/{dictCode}/items
06.字典接口
请求参数
Path 参数
dictCode
string
必需
Header 参数
Authorization
string
可选
默认值:
{{tokenType}} {{accessToken}}
Body 参数application/json
字典项表单
id
integer <int64>
字典项ID
dictCode
string
字典编码
value
string
字典项值
label
string
字典项标签
sort
integer <int32>
排序
status
integer <int32>
可选
tagType
string
可选
示例
{
"id": 0,
"dictCode": "string",
"value": "string",
"label": "string",
"sort": 0,
"status": 0,
"tagType": "string"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.youlai.tech/api/v1/dicts//items' \
--header 'Authorization: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": 0,
"dictCode": "string",
"value": "string",
"label": "string",
"sort": 0,
"status": 0,
"tagType": "string"
}'
返回响应
🟢200OK
application/json
Body
code
string
可选
data
object
可选
msg
string
可选
示例
{
"code": "string",
"data": {},
"msg": "string"
}
🟠400Bad Request
🟠403Forbidden
🟠404Not Found
修改于 2025-04-14 09:06:18