2.10.3 创建审批用车申请单
接口说明
- 1.最新接口
- 2.如果有审批业务,则需要进行通过该接口创建申请用车审批单
注意:新用车审批接口在创建审批单时,需传递审批用车规则ID给分贝通,若不传递则分贝通会查询该员工是否有审批用车规则,若没有则该审批单不限制用车标准,同时使用该审批单叫车将不会参与分贝通节省奖励活动。
请求方式 | 请求地址 |
---|---|
POST | /open/api/approve/car/create |
字段 | 名称 | 类型 | 必填 | 描述 |
---|---|---|---|---|
access_token | 鉴权Token | string | Y | 5747fbc10f0e60e0709d8d722 |
sign | 签名 | string | Y | oihfnlyeofdh98 |
timestamp | 时间戳 | long | Y | 13位时间戳 1241243250000 |
employee_id | 用户ID | string | Y | 分贝用户id或者第三方用户id,为创建人的ID |
employee_type | 用户类型 | string | Y | 类型,0为分贝用户,1为第三方用户 |
data | 请求数据 | jsonobject | Y | 请求数据 |
data.apply | 申请单内容 | jsonobject | Y | 申请单详细内容 |
data.apply.type | 申请单业务类型 | integer | Y | 12 审批用车 |
data.apply.flow_type | 审批类型 | integer | Y | 固定为4 |
data.apply.third_id | 申请单id | string | Y | 第三方审批单id |
data.apply.third_remark | 第三方备注 | string | Y | 详细备注信息 |
data.apply.rule_id | 规则ID | string | N | 根据公司ID查询规则信息。如果传递,则取rule_id内容 |
data.trip_list | 行程列表 | jsonarray | Y | 行程列表 |
data.trip_list.type | 业务类型 | integer | Y | 用车类型 3.用车 |
data.trip_list.start_city_id | 用车城市ID | string | Y | 城市ID 如:北京:100001,根据城市接口获取 |
data.trip_list.start_time | 出发时间 | string | Y | 行程开始日期 2019-12-13 |
data.trip_list.end_time | 结束时间 | string | N | 行程结束日期 2019-12-23( |
data.apply_taxi_rule_info | 具体用车规则信息 | jsonarray | N | 如果传递rule_id,则该字段值不需要填写,如果rule_id和apply_taxi_rule_info均传递,则取rule_id值 |
apply_taxi_rule_info.allowed_taxi_type | 限制用车类型 | string | N | 为空则为不限制 |
apply_taxi_rule_info.allow_same_city | 同城限制 | boolean | N | true,false |
apply_taxi_rule_info.price_limit_flag | 用车费用限制 | integer | N | 0:不限制 1:限制 2:员工填写 |
apply_taxi_rule_info.price_limit | 单次限制 | integer | N | -1为不限制 |
apply_taxi_rule_info.day_price_limit | 单日限制 | integer | N | -1为不限制 |
apply_taxi_rule_info.total_price | 员工填写金额 | integer | N | 如果限制类型字段price_limit_flag为员工填写,那么该值必填 |
apply_taxi_rule_info.taxi_scheduling_fee | 调度费 | integer | N | (-1为不限制)【5,10,15,20】 |
apply_taxi_rule_info.allow_called_for_other | 是否允许为他人叫车 | boolean | N | true,false |
apply_taxi_rule_info.times_limit_flag | 用车次数限制类型 | integer | N | 0:不限制 1:限制 2:员工填写 |
apply_taxi_rule_info.times_limit | 限制次数 | integer | N | -1:不限制,次数:3 |
请求示例:
"access_token":"5747fbc10f0e60e0709d8d722",
"timestamp":124124325,
"sign":"oihfnlyeofdh98",
"employee_id":"59b74c1323445f2d54dd07922",
"employee_type":"1",
"data":{
"apply": {
"type": 12,
"flow_type": 4,
"third_id": "57613c455eac323d0c17",
"third_remark": "",
"rule_id": 1212
},
"trip_list": [
{
"type": 3,
"start_city_id": "1000001",
"start_time": "2019-09-25",
"end_time": "2019-09-25",
"arrival_city_id": "2000002"
}
],
"apply_taxi_rule_info": [
{
"type": "allowed_taxi_type",
"value": "600,50,700"
},
{
"type": "allow_same_city",
"value": false
},
{
"type": "price_limit_flag",
"value": 0
},
{
"type": "price_limit",
"value": -1
},
{
"type": "day_price_limit",
"value": -1
},
{
"type": "total_price",
"value": 100
},
{
"type": "taxi_scheduling_fee",
"value": 20
},
{
"type": "allow_called_for_other",
"value": true
},
{
"type": "times_limit_flag",
"value": 0
},
{
"type": "times_limit",
"value": -1
}
]
}
响应结果:
{
"request_id": "99dBfiy0SJ2PJitI",
"code": 0,
"type": 0,
"msg": "success",
"data": {
"id": "5d9ea45423445f38ef3d7fdd"
}
}