# 企业用车申请
# 简介
本接口用于合作方同步企业用车审批单
# 服务提供方
享道
# 接口URL
/openapi/ent/application/create
# 请求方式
POST
# 请求频次
单次
# 请求参数
| 参数名称 | 类型 | 必选 | 说明 |
|---|---|---|---|
| timestamp | long | 是 | 请求时间,Unix Timestamp单位毫秒 |
| outer_apply_no | string | 是 | 外部申请单号 |
| ent_code | string | 是 | 享道企业标识 |
| user | object | 是 | 下单人 |
| user.id | string | 是 | 员工唯一标识 |
| user.code | string | 是 | 员工号 |
| user.name | string | 是 | 员工姓名 |
| user.phone | string | 是 | 员工手机号 |
| passengers | list | 否 | 乘车人 |
| passengers[].id | string | 是 | 员工唯一标识 |
| passengers[].code | string | 是 | 员工号 |
| passengers[].name | string | 是 | 员工姓名 |
| passengers[].phone | string | 是 | 员工手机号 |
| service_id | string | 是 | 用车类型,多个用英文逗号分隔参见附录2 |
| ride_type | string | 是 | 运力类型,多个用英文逗号分隔参见附录1 |
| start_time | string | 是 | 开始用车时间, yyyy-MM-dd HH:mm:ss |
| end_time | string | 是 | 结束用车时间, yyyy-MM-dd HH:mm:ss |
| start_cities | list | 是 | 上车城市 |
| start_cities[].code | string | 是 | 城市代码 |
| start_cities[].name | string | 是 | 城市名称 |
| start_cities[].ad_code | string | 否 | 城市行政区域编码 |
| end_cities | list | 是 | 下车城市 |
| end_cities[].code | string | 是 | 城市代码,参见附录6 |
| end_cities[].name | string | 是 | 城市名称 |
| end_cities[].ad_code | string | 否 | 城市行政区域编码 |
| amount_limits | long | 否 | 限额,单位分 |
| count_limits | int | 否 | 用车次数限制 |
| allow_cross_city | bool | 否 | 是否支持跨城,默认false-不支持 |
# 响应参数
| 参数名称 | 类型 | 必有 | 说明 |
|---|---|---|---|
| retCode | int | 是 | 服务响应状态,参见附录5 |
| retMsg | string | 是 | 服务响应状态说明,参见附录5 |
| content | object | 是 | 响应内容 |
| content.apply_no | string | 是 | 享道申请单号 |
| content.outer_apply_no | string | 是 | 外部申请单号 |
# 请求事例
请求
curl --location --request POST 'https://xxx/v1/openapi/ent/application/create' \
--header 'X-Sign: 5e9745dea27fc8b7b4b90aa2565868c0ebf847fd' \
--header 'X-SignAlgorithm: 1' \
--header 'X-Timestamp: 20201020164300' \
--header 'X-MerchantId: open_xxx' \
--header 'Content-Type: application/json' \
--data-raw '{ "timestamp": 123, "outer_apply_no":"xxx", "ent_code":"xx", "user": { "id":"xx", "code":"xx", "name":"xx", "phone":"xx" }, "passengers":[{ "id":"xx", "code":"xx", "name":"xx", "phone":"xx" }], "service_id":1, "ride_type":"compact", "start_time":"2023-08-31 11:11:11", "end_time":"2023-08-31 11:11:11", "start_cities":[{ "code":"021", "name":"上海", "ad_code":"" }], "end_cities":[{ "code":"021", "name":"上海", "ad_code":"" }], "amount_limits": 2000, "count_limits":0, "allow_cross_city":false }'
响应
{
"errCode": 10000,
"errMsg": "successful",
"content": {
"apply_no": "xx",
"outer_apply_no": "xxx"
}
}