字典项子项接口
GET
/api/v1/dictionaries/:category/:code/items/:itemCode/children
获取指定字典项的所有子项。
接口说明
该接口用于获取指定字典项的所有子项。通过指定字典类别、字典代码和字典项代码,可以获取特定字典项的所有子项列表。
路径参数
参数名 | 类型 | 说明 |
---|---|---|
category | string | 字典类别,取值为 "cn"(中国标准)或 "intl"(国际标准) |
code | string | 字典代码,用于唯一标识一个字典 |
itemCode | string | 字典项代码,用于唯一标识一个字典项 |
响应参数
参数名 | 类型 | 说明 |
---|---|---|
code | string | 字典项代码 |
name | string | 字典项名称 |
description | string | 字典项描述 |
parentCode | string | 父项代码 |
sort | number | 排序号 |
status | number | 状态(1-启用,0-禁用) |
响应示例
[
{
"code": "1.1",
"name": "男性新生儿",
"description": "出生时性别为男的婴儿",
"parentCode": "1",
"sort": 1,
"status": 1
},
{
"code": "1.2",
"name": "男性成人",
"description": "成年男性",
"parentCode": "1",
"sort": 2,
"status": 1
}
]
错误码
错误码 | 说明 |
---|---|
400 | 请求参数错误 |
404 | 字典或字典项不存在 |
500 | 服务器内部错误 |