企业额度账户查询¶
功能说明¶
查询企业额度资产账户及余额,具体额度名称对应关系如下
| 资产类型 | product_category |
|---|---|
| 福利额度 | 1 |
| 员工午餐 | 2 |
| 员工用车 | 3 |
| 员工通讯 | 4 |
| 关爱额度 | 12 |
接口地址¶
- 测试环境: https://openapi.guanaitong.tech/assets/limit/enterprise/get
- 生产环境: https://openapi.guanaitong.com/assets/limit/enterprise/get
HTTP请求方式¶
- Method: POST
- Content-Type: application/x-www-form-urlencoded
参数说明¶
-
公有参数
发送请求是必须传入公共参数,详见公共参数
-
私有参数
| 参数名称 | 是否必须 | 参数类型 | 长度限制 | 描述 |
|---|---|---|---|---|
| account_openid | 否 | string | [32] | 额度账户的 openid。不填时,返回所有的额度账户。 |
| enterprise_code | 否 | string | [1,20] | 企业编号(集团和运营商必填,企业不填) |
请求示例¶
POST /assets/limit/enterprise/get HTTP/1.1
Host: openapi.guanaitong.tech
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
access_token=61b74556b4eb62ba84ea990a10d68dc6&account_openid=ea6977a16bccfce0e4d09e728ff64b64&
timestamp=1494317866&sign=d94bbd5de270435d879988b2ca3040b120efa8b7
返回参数说明¶
| 参数名称 | 描述 |
|---|---|
| code | 返回码。详见错误代码。 |
| msg | 如果错误,返回错误信息。 |
| data | 如果没有错误,返回企业资产数组 |
| data.account_openid | 企业账户openid (对应EnterpriseLimitId) |
| data.name | 账户名称 |
| data.product_category | 产品类型 |
| data.balance | 账户余额 |
| data.status | 账户状态 ,额度账户状态 1有效 2无效 |
| data.sub_limits | 额度子账户 |
| data.sub_limits.id | 子账户id,用于子账户给员工发放 |
| data.sub_limits.name | 额度子账户名称 |
| data.sub_limits.status | 额度子账户状态 1有效 2无效,发放时只能选择有效的子账户 |
正确返回示例¶
{
"code": 0,
"msg": "OK",
"data": [
{
"account_openid": "b10a3a576cffe12e9bfd366f2e6b5f92",
"balance": 10049988.96,
"name": "关爱福利XX型",
"sub_limits": [
{
"name": "关爱福利XX型",
"id": 1034,
"status": 2
},
{
"name": "子额度A",
"id": 2096,
"status": 1
}
],
"product_category": 19,
"status": 1
},
{
"account_openid": "b3c1faafa6e8570693b93f4ac1e780c6",
"balance": 810,
"name": "关爱额度",
"sub_limits": [
{
"name": "关爱额度",
"id": 3,
"status": 1
},
{
"name": "子额度100",
"id": 4,
"status": 1
},
{
"name": "关爱额度200",
"id": 5,
"status": 1
}
],
"product_category": 12,
"status": 1
},
{
"account_openid": "d574c2b6cfd649c115d1bb3b82f5dcc1",
"balance": 0,
"name": "关爱额度+",
"product_category": 112,
"status": 1
},
{
"account_openid": "6eab1c6153d787c33c840591710c7d84",
"balance": 50000,
"name": "奋斗食代",
"product_category": 7,
"status": 1
},
{
"account_openid": "6c855a7f3f149b61efb1fea646f58137",
"balance": 0,
"name": "奋斗食代+",
"product_category": 107,
"status": 1
}
]
}