文档中心 成本中心 新增成本中心

新增成本中心

1.功能说明

新增成本中心

2.接口调用说明

请求URL

https://openapi.guanaitong.tech/billing/cost/addCostCenter

HTTP请求方式

POST

输入参数说明

(1)公共参数

发送请求是必须传入公共参数,详见公共参数

(2)私有参数

参数名称 是否必须 参数类型 长度限制 描述
enterprise_code string [1,20] 企业编号(集团同步,企业不填)
cost_center_code string [1,50] 成本中心编号
cost_center_name string [1,100] 成本中心名称
请求示例
POST /billing/cost/addCostCenter HTTP/1.1
Host: openapi.guanaitong.tech
Content-Type: application/x-www-form-urlencoded
cache-control: no-cache

access_token=1f55a10840b0e9c72f0964e3fa42439b&sign=ba441d441cef428ba1601ebea54eca91e4f7538f
&cost_center_name=cost-center5826739&timestamp=1578968309&cost_center_code=a1235826739
                    
返回参数说明
参数名称 描述
code 返回码。详见错误返回码
msg 如果错误,返回错误信息。
data 如果没有错误,返回业务数据,此处返回成本中心id
正确返回示例
{
    "code":0,
    "msg":"OK",
    "data":1234
}
错误返回示例
{
    "code": 1000210001,
    "msg": "timestamp check failed!",
    "data": null
}