# 接口说明

  • 1.如果有审批业务,并且需要进行行程审批变更通过该接口变更审批单
  • 2.该接口为新接口,请求地址需要使用新的,参数及加密方式与原来的接口一致,详见下面的请求说明。
名称 描述
HTTP方法 POST
Content-Type application/x-www-form-urlencoded
method /openapi/func/apply/trip/change
字段 名称 类型 必填 描述
access_token token string Y 登录 token
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.third_type 原审批单类型 integer Y 1:分贝通审批单 2:第三方审批单
data.apply_id 原审批单id string Y 原审批单id:apply_id不能与third_id相同
data.apply 申请单内容 jsonobject Y 申请单详细内容
data.apply.type 申请单业务类型 integer Y 1.差旅(对应trip_list下的type值为7、11、15)
data.apply.apply_reason 申请事由 String N 申请事由,不能超过200字符
data.apply.flow_type 审批类型 integer Y 固定为4
data.apply.third_id 申请单id string Y 第三方审批单id:apply_id不能与third_id相同
data.apply.third_remark 第三方备注 string Y 详细备注信息
data.apply.budget 申请单预算 integer Y 预算总额(为trip_list中estimated_amount的总和 )
data.apply.new_cost_attributions (新)费用归属对象集合 jsonarray N (新)费用归属对象集合
data.apply.new_cost_attributions.type (新)费用归属类型 Integer N (新)费用归属类型1.部门 2.项目,3自定义档案
data.apply.new_cost_attributions.third_archive_id (新)三方自定义档案id string N 三方自定义档案id(type为3时必传)
data.apply.new_cost_attributions.archive_name (新)自定义档案名称 string N 自定义档案名称(type为3时必传)
data.apply.new_cost_attributions.details (新)费用归属详情 jsonArray N (新)费用归属详情
data.apply.new_cost_attributions.details.third_id (新)三方费用归属id string N 费用归属类型(type)为1时,该字段值为部门三方id;费用归属类型(type)为2时,该字段为项目三方ID;费用归属类型(type)为3时,该字段值为自定义档案项目三方ID
data.apply.new_cost_attributions.details.name (新)费用归属名称 string N 费用归属类型(type)为1时,该字段值为部门name;费用归属类型(type)为2时,该字段为项目name;费用归属类型(type)为3时,该字段值为自定义档案项目name
data.apply.cost_attribution_list 费用归属对象集合 jsonarray N 费用归属对象集合
data.apply.cost_attribution_list.cost_attribution_id 费用归属id string N 部门ID或项目ID,当传递费用归属时,费用归属三个属性必须同时传递,否则无法识别
data.apply.cost_attribution_list.cost_attribution_name 费用归属name string N 部门名称或项目名称,当传递费用归属时,费用归属三个属性必须同时传递,否则无法识别
data.apply.cost_attribution_list.cost_attribution_category 费用归属类型 integer N 1.部门 2.项目 当传递费用归属时,费用归属三个属性必须同时传递,否则无法识别
data.apply.apply_reason_desc 申请事由补充说明 string N 补充事由说明,小于500
data.apply.change_reason_desc 变更事由补充内容 string Y 变更事由补充内容
data.guest_list 出行联系人信息 jsonarray N 出行联系人信息
data.guest_list.id 出行联系人id string N 出行联系人id(分贝用户ID),当is_employee为false时,不需要传递id,为true时必传
data.guest_list.is_employee 是否是企业员工 boolean N true,
data.guest_list.employee_type 出行联系人类型 integer N 0为分贝用户,1为第三方用户。当is_employee为false时,不需要传递,为true时必传
data.guest_list.name 出行联系人姓名 string N 张三
data.guest_list.phone_num 出行联系人手机号 string N 17080151667
data.custom_fields 自定义字段列表 jsonarray N 自定义字段列表(自定义字段传递时需把字段值告知分贝通,分贝通进行相应配置后,在后台导出审批单时会导出相应字段,否则字段传递值无效)
data.trip_list 行程列表 jsonarray N 行程列表
data.trip_list.type 业务类型 integer Y 行程类型 7.机票 11.酒店 15.火车 40.国际/中国港澳台机票
data.trip_list.start_city_id 出发城市ID string Y 在酒店业务中,start_city_id和arrival_city_id都传入目的地城市ID
data.trip_list.start_time 出发时间 string Y 行程开始日期 2017-12-13
data.trip_list.arrival_city_id 目的地城市 string Y 行程到达城市ID
data.trip_list.end_time 结束时间 string Y 行程结束日期 2017-12-29(在分贝通企业管理后台需开启出发日期配置成时间范围后,可创建时间段审批单)
data.trip_list.estimated_amount 预估价格 integer Y 100,单位分
air_rule_info.air_type 舱位等级 array N 1:商务舱(头等舱), 3:经济舱
air_rule_info.price 价格限制 double N 100 单位元
hotel_rule_info.level 星级 array N 0.二星及以下 1.三星 2.四星 3.五星
hotel_rule_info.price 平均每晚的上限 double N 100,单位元
hotel_rule_info.person_pay 个人支付 boolean N 个人支付
train_rule_info.common_train_seat_type 普通列车席别限制 array N 11.高级软卧 12.软卧 13.硬卧 14.软座 15.硬座 16.无座
train_rule_info.highspeed_train_seat_type 高铁席别限制 array N 1.商务座 2.特等座 3.一等座 4.二等座 5.软卧 6.高铁无座 7.高级软卧 8.动卧 9.硬卧
train_rule_info.price 价格限制 double N 100,单位元

请求示例:


    "access_token":"5747fbc10f0e60e0709d8d722",
    "timestamp":1635820323000,
    "sign":"oihfnlyeofdh98",
    "employee_id":"59b74c1323445f2d54dd07922",
    "employee_type":"1",
    "data":
   {
   	"third_type": 1,
   	"apply_id": "5def123823445f39e2e90f59",
   	"apply": {
   	    "apply_reason","",
   		"type": 1,
   		"budget": 1400,
   		"flow_type": 4,
   		"third_id": "57613c455eac323d0c17",
   		"third_remark": "",
   		"new_cost_attributions":[
        {
            "type":"1",
            "third_archive_id":"5f361f6523445f0f90a7a8db",
            "archive_name":"xxx",
            "details":[
                {
                    "third_id":"5f361f652323223445f0f90a7a8db",
                    "name":"xxx"
                }
            ]
        }
    ],
   		"cost_attribution_list": [{
   				"cost_attribution_id": "od-2fd01a3037c27fff0cba7a34d1c2bb07",
   				"cost_attribution_name": "开放平台",
   				"cost_attribution_category": 1
   			},
   			{
   				"cost_attribution_id": "5a66b2c1235f2417491280",
   				"cost_attribution_name": "test1",
   				"cost_attribution_category": 2
   			}
   		],
   		"apply_reason_desc": "不是出去玩111",
   		"change_reason": "行程变更11",
   		"change_reason_desc": "补充内容111"
   	},
   	"trip_list": [{
   		"type": 15,
   		"start_city_id": "1000001",
   		"start_time": "2019-12-28",
   		"arrival_city_id": "2000002",
   		"end_time": "2019-12-29",
   		"estimated_amount": 1400
   	}],
   	"guest_list": [{
   		"id": "58dca3035f281a5c225c4d84",
   		"is_employee": false,
   		"name": "韩美美",
   		"phone_num": "18518270668"
   	}],
   	"custom_fields": [{
   		"type": "",
   		"value": ""
   	}],
   	"air_rule_info": [{
   			"type": "air_type",
   			"value": [
   				1
   			]
   		},
   		{
   			"type": "price",
   			"value": 100
   		},
   		{
   			"type": "priv_day_min",
   			"value": 10
   		},
   		{
   			"type": "priv_day_max",
   			"value": 10
   		}
   	],
   	"hotel_rule_info": [{
   			"type": "level",
   			"value": [
   				1
   			]
   		},
   		{
   			"type": "price",
   			"value": 100
   		},
   		{
   			"type": "priv_day_min",
   			"value": 10
   		},
   		{
   			"type": "priv_day_max",
   			"value": 10
   		},
        {
   			"type": "person_pay",
   			"value": true
   		}
   	],
   	"train_rule_info": [{
   			"type": "common_train_seat_type",
   			"value": [
   				1
   			]
   		},
   		{
   			"type": "highspeed_train_seat_type",
   			"value": [
   				1
   			]
   		},
   		{
   			"type": "price",
   			"value": 100
   		},
   		{
   			"type": "priv_day_min",
   			"value": 100
   		},
   		{
   			"type": "priv_day_max",
   			"value": 100
   		},
   		{
   			"type": "grap_limit",
   			"value": 20
   		},
   		{
   			"type": "is_same_seat",
   			"value": true
   		},
   		{
   			"type": "grap_common_train_seat_type",
   			"value": [
   				12
   			]
   		},
   		{
   			"type": "grap_highspeed_train_seat_type",
   			"value": [
   				1
   			]
   		}
   	]
   }


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153

响应结果:

{
  "request_id": "xUolOnJHWhIO4YP8MozO",
  "code": 0,
  "msg": "success",
  "data": {
    "id": "58baa2866819481560f013ac"
  }
}
1
2
3
4
5
6
7
8
lastUpdate: 12/5/2023, 2:12:00 PM