1.1 接口说明

在优音云客服系统中,可通过设置–>字典设置,获取字典名称。
根据字典名称进行精确查询字典数据集。

1.2 调用形式

https://ykf.uincall.com/openapi/dict/list?tenant_id=acf528a2-d0e2-4a7b-8513-74cb399xxxxx&access_token=670253572927b24acffc41078ddxxxxx

1.3 调用方式

POST

1.4 传入参数

非必填参数,调用接口时请传递参数名,参数值可为空

序号 名称 类型 是否必填 说明
1 dict_name String 必填,字典名称(字符串非空则精确查询),字符串为空是查询全部
2 page Int 页码参数(int类型的正整数)
3 size Int 每页条数(int类型的正整数,最大50)

1.5 回应参数

序号 名称 类型 是否必填 说明
1 errcode Number 状态码:0成功,及其他非0错误码,详见错误码列表
2 errmsg String 状态说明
3 data Object数组 rows元素含有多个Object表单元素对象(有数据则返回结果集;无则为空):其中Object元素对象属性如下:1、current:当前页码;
2、size:每页条数;
3、total:总个数;4、pages:总页数;
5、records:数据Object数组;(有数据则返回结果集;无则为空)点击查看详情
Object类型属性如下:
5.1id:字典id唯一标识 ;
5.2title:字典名称;
5.3is_hava_child: 该字典是否还有多级字典选项,0无,1有;
5.4 items: Object类型数组(字典选项结果集,无则为空);点击查看详情
Object类型属性如下:
5.4.1id:itemsid,字典选项id唯一标识 ;
5.4.2item:字典选项名称;
5.4.3level: 该字典选项所处的层级,0:一级字典,1:二级字典,2:三级字典;
5.4.4seq: 该字典选项在所处层级的顺序;
5.4.5childs: Object类型数组,该字典选项的子字典选项,无则为空;
5.4.6dict_id: 字典id唯一标识;
5.4.7parent_id: 父字典选项的字典选项id

1.6 使用样例

调用:

url:https://ykf.uincall.com/openapi/dict/list?tenant_id=acf528a2-d0e2-4a7b-8513-74cb399xxxxx&access_token=670253572927b24acffc41078ddxxxxx

POST数据:
{
    "dict_name":"产品归属",
    "page":1,
    "size":10
}

响应:

{
"errcode": 0,
"errmsg": "success",
"data": {
    "current": 1,
    "size": 10,
    "total": 1,
    "pages": 1,
    "records": [
        {
            "id": "2c2db76c4e7d474eaacd8f7a16xxxxxx",
            "title": "产品归属",
            "items": [
                {
                    "id": "afbcbf65ca6e4ca48d19b4e7bexxxxxx",
                    "item": "北京优音",
                    "level": "0",
                    "seq": 0,
                    "childs": [
                        {
                            "id": "cfaa9938e51543258069365fd9xxxxxx",
                            "item": "北京销售A组",
                            "level": "1",
                            "seq": 0,
                            "childs": [],
                            "dict_id": "2c2db76c4e7d474eaacd8f7a16xxxxxx",
                            "parent_id": "afbcbf65ca6e4ca48d19b4e7bexxxxxx"
                        },
                        {
                            "id": "9d4db1fed1d34013a4b0d34de2xxxxxx",
                            "item": "北京销售B组",
                            "level": "1",
                            "seq": 1,
                            "childs": [],
                            "dict_id": "2c2db76c4e7d474eaacd8f7a16xxxxxx",
                            "parent_id": "afbcbf65ca6e4ca48d19b4e7bexxxxxx"
                        }
                    ],
                    "dict_id": "2c2db76c4e7d474eaacd8f7a16xxxxxx",
                    "parent_id": ""
                },
                {
                    "id": "f9e0a1da60574eec824c4f09b6xxxxxx",
                    "item": "西安优音",
                    "level": "0",
                    "seq": 1,
                    "childs": [
                        {
                            "id": "3f76368d518a4aba95b5a0cd9exxxxxx",
                            "item": "西安BD",
                            "level": "1",
                            "seq": 0,
                            "childs": [],
                            "dict_id": "2c2db76c4e7d474eaacd8f7a16xxxxxx",
                            "parent_id": "f9e0a1da60574eec824c4f09b6xxxxxx"
                        },
                        {
                            "id": "2e6f5370e6d641f483fbf76e48xxxxxx",
                            "item": "西安销售",
                            "level": "1",
                            "seq": 1,
                            "childs": [
                                {
                                    "id": "8638ba61bac54f1a805b389b0bxxxxxx",
                                    "item": "西安销售A组",
                                    "level": "2",
                                    "seq": 0,
                                    "childs": [],
                                    "dict_id": "2c2db76c4e7d474eaacd8f7a16xxxxxx",
                                    "parent_id": "2e6f5370e6d641f483fbf76e48xxxxxx"
                                },
                                {
                                    "id": "40b82c17ddd949b7a53c93fcd2xxxxxx",
                                    "item": "西安销售B组",
                                    "level": "2",
                                    "seq": 1,
                                    "childs": [],
                                    "dict_id": "2c2db76c4e7d474eaacd8f7a16xxxxxx",
                                    "parent_id": "2e6f5370e6d641f483fbf76e48xxxxxx"
                                },
                                {
                                    "id": "d3bfc2a4c98c494d81b56680b4xxxxxx",
                                    "item": "新兵训练营",
                                    "level": "2",
                                    "seq": 2,
                                    "childs": [],
                                    "dict_id": "2c2db76c4e7d474eaacd8f7a16xxxxxx",
                                    "parent_id": "2e6f5370e6d641f483fbf76e4xxxxxx"
                                }
                            ],
                            "dict_id": "2c2db76c4e7d474eaacd8f7a16xxxxxx",
                            "parent_id": "f9e0a1da60574eec824c4f09b6xxxxxx"
                        },
                        {
                            "id": "f91048612c014c74b54f8baaaexxxxxx",
                            "item": "西安售后",
                            "level": "1",
                            "seq": 2,
                            "childs": [],
                            "dict_id": "2c2db76c4e7d474eaacd8f7a16xxxxxx",
                            "parent_id": "f9e0a1da60574eec824c4f09b6xxxxxx"
                        }
                    ],
                    "dict_id": "2c2db76c4e7d474eaacd8f7a16xxxxxx",
                    "parent_id": ""
                },
                {
                    "id": "21e670f8858946dbbf5f50531cxxxxxx",
                    "item": "深圳优音",
                    "level": "0",
                    "seq": 2,
                    "childs": [
                        {
                            "id": "1f4dc758b9404b0a9a8e4d079exxxxxx",
                            "item": "深圳销售A组",
                            "level": "1",
                            "seq": 0,
                            "childs": [],
                            "dict_id": "2c2db76c4e7d474eaacd8f7a16xxxxxx",
                            "parent_id": "21e670f8858946dbbf5f50531cxxxxxx"
                        },
                        {
                            "id": "0c7ffdc8455d4aad95654d47c1xxxxxx",
                            "item": "深圳销售B组",
                            "level": "1",
                            "seq": 1,
                            "childs": [],
                            "dict_id": "2c2db76c4e7d474eaacd8f7a1xxxxxx",
                            "parent_id": "21e670f8858946dbbf5f50531cxxxxxx"
                        }
                    ],
                    "dict_id": "2c2db76c4e7d474eaacd8f7a16xxxxxx",
                    "parent_id": ""
                }
            ],
            "is_hava_child": 1
        }
    ]
}
}
文档更新时间: 2024-09-24 14:29   作者:admin