文档中心 成本中心 根据企业ID获取企业所有的成本中心

根据企业ID获取企业所有的成本中心

1.功能说明

更新成本中心

2.接口调用说明

请求URL

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

HTTP请求方式

POST

输入参数说明

(1)公共参数

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

(2)私有参数

参数名称 是否必须 参数类型 长度限制 描述
enterprise_code string [1,20] 企业编号(集团或运营商形式接入同步,企业形式不填)
请求示例
POST /billing/cost/findByEnterpriseId HTTP/1.1
Host: openapi.guanaitong.tech
Content-Type: application/x-www-form-urlencoded
cache-control: no-cache

access_token=fdd9318db2fdf96f152226231d2b8f49&sign=6fc42a2a0fd3f3fb0602da732272bee406bef5e8&timestamp=1584590939
                    
返回参数说明
参数名称 描述
code 返回码。详见错误返回码
msg 如果错误,返回错误信息。
data 如果没有错误,返回业务数据,此处返回成本中心信息列表List<CostCenterRes>
CostCenterRes对象
cost_center_id integer类型,成本中心id
cost_center_code String类型,成本中心编号
cost_center_name String类型,成本中心名称
status integer类型,状态 1-生效 2-失效
正确返回示例
{
	"code": 0,
	"data": [{
		"cost_center_id": 9,
		"cost_center_name": "test-cost-center-new",
		"cost_center_code": "b1234567890",
		"status": 1
	}, {
		"cost_center_id": 10,
		"cost_center_name": "test-cost-center460",
		"cost_center_code": "test-code460",
		"status": 1
	}, {
		"cost_center_id": 19,
		"cost_center_name": "我的成本",
		"cost_center_code": "20",
		"status": 1
	}],
	"msg": "OK"

}
错误返回示例
{
    "code": 1000210001,
    "msg": "timestamp check failed!",
    "data": null
}