获取成本中心信息

接口说明: 获取公司的成本中心信息 共两种情况:

  • costId为空时,获取公司所有成本中心信息

  • costId不为空时,获取公司单个指定成本中心信息

请求方式:GET(HTTPS)
请求地址https://api.xinrenxinshi.com/v3/costCenter/list?sign=ZctC7ArnYaMd9dpB7pqufSw2VbQ%3D&timestamp=1600660756695

请求Header:

key value
access_token 获取的access_token的实际值

参数说明

参数 类型 必传(Y/N) 说明
costId String N 成本中心id,不传时,默认返回公司所有成本中心信息
timestamp Long Y 请求时间戳(精确到毫秒)
sign String Y 请求参数签名

返回结果

参数 类型 必传(Y/N) 说明
errcode Integer Y 0成功,其他失败
errmsg String Y 结果描述
costCenterList List<CostCenter> Y 成本中心信息列表

CostCenter

参数 类型 必传(Y/N) 说明
costId String Y 成本中心id
parentId String Y 父成本中心id,顶级父节点id为0
costCenterName String Y 成本中心名称
costCenterCode String Y 成本中心编码

响应示例

{
    "errcode":0,
    "errmsg":"ok",
    "detailMsg":null,
    "costCenterList":[
        {
            "costId":"bf4058d7b95d4cf28738a3fbd818fe9e",
            "parentId":"0",
            "costCenterName":"A",
            "costCenterCode":"A1"
        },
        {
            "costId":"475b45d689d64f709a046f58eb499b93",
            "parentId":"bf4058d7b95d4cf28738a3fbd818fe9e",
            "costCenterName":"B",
            "costCenterCode":"B2"
        },
        {
            "costId":"327890cf3a054331a91060d0e5198786",
            "parentId":"0",
            "costCenterName":"C",
            "costCenterCode":"C3"
        },
        {
            "costId":"7a6f9fc354f7498eacac3d2bcffd88be",
            "parentId":"0",
            "costCenterName":"D",
            "costCenterCode":"D4"
        },
        {
            "costId":"23e9d51cf211439b9a7169fcc104753a",
            "parentId":"475b45d689d64f709a046f58eb499b93",
            "costCenterName":"E",
            "costCenterCode":"E5"
        },
        {
            "costId":"4f926276194f4220acdda328e56c81b6",
            "parentId":"327890cf3a054331a91060d0e5198786",
            "costCenterName":"F",
            "costCenterCode":"F6"
        },
        {
            "costId":"a25389a2760b4cb5bc1eaf0ec765ca7a",
            "parentId":"23e9d51cf211439b9a7169fcc104753a",
            "costCenterName":"G",
            "costCenterCode":"G7"
        }
    ]
}
2020 © 企家有道网络技术(北京)有限公司版权所有@京ICP备15035315号 all right reserved,powered by Gitbookupdate by: 2020-12-16 14:23:56

results matching ""

    No results matching ""