@myyzs
2018-09-02T01:54:08.000000Z
字数 1853
阅读 26
/api/erp-api/get-dept-list?access_token=ACCESS_TOKEN
POST
参数 | 类型 | 说明 |
---|---|---|
dept_guids | 字符串 | 部门的guid,多个以 “,”分隔,eg: aaaa,bbbb |
tenant_id | 字符串 | 企业的tenant_id |
正常结果
{
"success": 1,
"data": [
{
"dept_guid": "02e9df78-6b35-4dfb-994b-06316b878221",
"dept_name": "长沙明源工程部",
"parent_guid": "ce302a6b-e0c7-4cc3-b376-291e8acbe535",
"is_company": "0",
"is_end_company": "0",
"butype": "1",
"order_hierarchy_code": "0001.0029.0007",
"yzs_order_hierarchy_code": "10000.10012.10006",
"yzs_order_code": "10006"
},
{
"dept_guid": "04f0de1f-c40a-4060-9a12-518bfba866f1",
"dept_name": "区域_公司2",
"parent_guid": "1eadc74d-e67f-46e8-b289-99e025484642",
"is_company": "1",
"is_end_company": "1",
"butype": "0",
"order_hierarchy_code": "0001.0040.0002",
"yzs_order_hierarchy_code": "10000.10020.10001",
"yzs_order_code": "10001"
}
]
}
异常结果
{
"success": 0,
"data": {
"errcode": 100,
"msg": "此接口只支持从ERP初始化而来的租户"
}
}
/api/erp-api/get-dept-list-by-h-codes?access_token=ACCESS_TOKEN
POST
参数 | 类型 | 说明 |
---|---|---|
h_codes | 字符串 | 云助手计算的部门排序code(yzs_order_hierarchy_code),多个以 “,”分隔,eg: 1000.1000,1000.10001 |
tenant_id | 字符串 | 企业的tenant_id |
正常结果
{
"success": 1,
"data": [
{
"dept_guid": "02e9df78-6b35-4dfb-994b-06316b878221",
"dept_name": "长沙明源工程部",
"parent_guid": "ce302a6b-e0c7-4cc3-b376-291e8acbe535",
"is_company": "0",
"is_end_company": "0",
"butype": "1",
"order_hierarchy_code": "0001.0029.0007",
"yzs_order_hierarchy_code": "10000.10012.10006",
"yzs_order_code": "10006"
},
{
"dept_guid": "04f0de1f-c40a-4060-9a12-518bfba866f1",
"dept_name": "区域_公司2",
"parent_guid": "1eadc74d-e67f-46e8-b289-99e025484642",
"is_company": "1",
"is_end_company": "1",
"butype": "0",
"order_hierarchy_code": "0001.0040.0002",
"yzs_order_hierarchy_code": "10000.10020.10001",
"yzs_order_code": "10001"
}
]
}
异常结果
{
"success": 0,
"data": {
"errcode": 100,
"msg": "此接口只支持从ERP初始化而来的租户"
}
}