结算流水保存接口
- 接口:open/third/order/save/common
- Method:POST
- 数据格式:JSON
- 接口说明:此接口用于保存结算信息,主键为source&statementId,重复会依据主键更新结算信息。
- 正式环境:https://api.cloudpense.com/thirdparty/common/statement/save
- 测试环境:http://52.81.174.170:8081/thirdparty/common/statement/save
- 文档末尾有文档版本记录
参数:
请求参数
字段 | 类型 | 释义 | 必填 |
---|---|---|---|
headerId | int | 结算头编号,没有不填 | N |
userId | int | 云简的员工编号,没有可以不填 | N |
companyId | Int | 云简的公司编号 | Y |
source | string | 订单来源,标准值列表-附录1:渠道 | Y |
sourceType | string | 订单类型,标准值列表-附录2:订单类型 | Y |
data | json | 订单原始数据,随便渠道定义,可不传 | N |
detail | json | 详细信息,具体为flightDetail,hotelDetail,trainInfo,taxiDetail | Y |
statementId | string | 结算单号,渠道唯一 | Y |
statementType | Int | 结算单类型,标准值列表-附录11:结算单类型 | Y |
orderId | string | 订单编号 | Y |
checkBatchNo | string | 对账批次号 | N |
balanceBatchNo | string | 结算批次号 | N |
passengers | 出行人/入住人在姓名数组 | Y | |
passengerList | 出行人/入住人的云简的编号数组 | N | |
amount | decimal | 订单总额 | Y |
companyPay | decimal | 公司支付金额 | Y |
documentNum | string | 云简的申请单号 | N |
linkHeaderId | int | 云简的申请单头编号 | N |
linkLineId | int | 云简的申请单行编号 | N |
description | string | 系统描述字段 | N |
comments | string | 用户描述字段 | N |
invoiceStatus | int | 开票状态,标准值列表-附录20:开票状态 | N |
orderDatetime | long | 订单时间,0时区时间 | N |
startDatetime | long | 订单开始时间,0时区时间 | N |
endDatetime | long | 订单结束时间,0时区时间 | N |
statementDatetime | long | 结算时间,0时区时间 | N |
destinationCity | Integer | 出发城市(仅机票、火车票、打车需要这个字段) | N |
destinationCityTo | Integer | 到达城市 | N |
payType | Integer | 支付方式,0:公司支付;1:个人支付;3:混合支持 | N |
flightDetail
字段 | 类型 | 释义 | 必填 |
---|---|---|---|
flight_no | string | 航班号 | Y |
is_share | boolean | 是否是共享航班 | Y |
carrier | string | 共享航班号 | N |
air_company | string | 航空公司 | Y |
air_company_code | string | 航司代码 | Y |
seat | int | 舱位在云简的代码,标准值列表-附录6:舱位 | Y |
cabin | string | 舱位中文名字 | Y |
cabin_type | string | 舱位的航司编码 | Y |
dep_city | int | 出发城市在云简系统内的城市编号 | Y |
dep_datetime | string | 出发时间yy-MM-DD hh:mm:ss | Y |
dep_term | string | 出发航站楼 | Y |
dep_city_name | string | 出发城市名字 | Y |
dep_airport | string | 出发机场 | Y |
dep_airport_code | string | 出发机场代码 | Y |
arr_city | int | 到达城市在云简系统内的城市编号 | Y |
arr_datetime | string | 到达时间yy-MM-DD hh:mm:ss | Y |
arr_term | string | 到达航站楼 | Y |
arr_city_name | string | 到达城市 | Y |
arr_airport | string | 到达机场 | Y |
arr_airport_code | string | 到达机场的代码 | Y |
currency | string | 价格币种 | Y |
order_id | string | 订单号,渠道内唯一 | Y |
fly_time | int | 飞行时间,秒 | N |
discount | decimal | 折扣,经济舱按1计,例8折为0.80 | N |
yprice | decimal | 经济舱价格,没有可不填或填0 | N |
price | decimal | 机票价格(改签结算单时,是升舱费),没有可不填或填0 | N |
amount | decimal | 结算总价,没有可不填或填0 | N |
taxation | decimal | 总税费(国际机票就是税费,国内机是基建费+燃油费),没有可不填或填0 | N |
oil_fee | decimal | 燃油费,没有可不填或填0 | N |
airport_fee | decimal | 机建费,没有可不填或填0 | N |
service_price | decimal | 预定服务费,没有可不填或填0 | N |
statement_id | string | 结算单号,渠道内唯一 | Y |
full_name | string | 预定人名字 | Y |
ticket_no | string | 票号,有的话尽量提供 | N |
document_num | string | 云简的申请单号,有的话尽量提供 | N |
change_price | decimal | 改签费,没有可不填或填0 | N |
change_service_price | decimal | 改签服务费,没有可不填或填0 | N |
refund_price | decimal | 退票费,没有可不填或填0 | N |
refund_service_price | decimal | 退票服务费,没有可不填或填0 | N |
passenger_name | 出行人名字列表,这里机票原则上是单人 | Y | |
statement_date | string | 结算日期yy-MM-DD hh:mm:ss | Y |
order_date | string | 预定日期yy-MM-DD hh:mm:ss | Y |
send_ticket_price | decimal | 送票费,没有可不填或填0 | N |
send_invoice_price | decimal | 配送报销行程单的费用,没有可不填或填0 | N |
insurance_price | decimal | 保险费,没有可不填或填0 | N |
other_price | 其他价格,没有不填 | N |
hotelDetail
字段 | 类型 | 释义 | 必填 |
---|---|---|---|
order_id | string | 订单号 | Y |
statement_id | string | 结算单号,渠道内唯一 | Y |
document_num | string | 云简的申请单号 | N |
price | decimal | 房费,没有可不填或填0 | N |
amount | decimal | 结算总价,没有可不填或填0 | N |
service_price | decimal | 预定服务费,没有可不填或填0 | N |
extra_charge | decimal | 后收服务费(补税点的费用),没有可不填或填0 | N |
send_invoice_price | decimal | 配送发票的费用,没有可不填或填0 | N |
invoice_type | int | 发票类型,标准值列表附录12:发票类型 | N |
currency | String | 币种 | Y |
star | int | 星级 | N |
hotel_name | String | 酒店名字 | Y |
hotel_address | String | 酒店地址 | N |
rooms | int | 房间数 | Y |
room_type | String | 房型名 | N |
city_id | int | 云简的城市编号 | Y |
city_name | string | 城市名字 | Y |
end_date | String | 离店日期 yyyy-MM-DD | Y |
start_date | String | 入住日期 yyyy-MM-DD | Y |
full_name | String | 预定人名字 | Y |
order_date | String | 预定日期 yyyy-MM-DD hh:mm:ss | Y |
passenger_name | 入住人名字数组 | Y | |
statement_date | String | 结算时间 yyyy-MM-DD hh:mm:ss | Y |
other_price | 其他价格,没有不填 | N |
trainInfo
字段 | 类型 | 释义 | 必填 |
---|---|---|---|
statement_id | string | 结算单号 | Y |
order_id | string | 订单号 | Y |
train_no | string | 车次,例,G235 | Y |
train_code | string | 第三方车次编码 | Y |
train_class | int | 舱位代码,标准值列表-附录21:火车票坐席代码 | Y |
train_class_name | string | 舱位名字,例2等座。 | Y |
train_type | int | 火车类型编码,标准值列表-附录22:火车类型代码 | N |
train_type_name | string | 火车类型,比如动车、快车等 | Y |
price | decimal | 价格,单个行程,没有可不填或填0 | Y |
dep_city | int | 出发城市在云简系统内的城市编号 | Y |
dep_date_time | string | 出发日期 YYYY-MM-DD hh:mm:ss | Y |
dep_station_code | int | 出发火车站编码 | Y |
dep_station_name | string | 出发火车站名称 | Y |
dep_station_en | string | 出发火车站名称英文 | Y |
dep_city_name | string | 出发城市名字 | Y |
arr_city | int | 到达城市在云简系统内的城市编号 | Y |
arr_date_time | string | 到达日期 YYYY-MM-DD hh:mm:ss | Y |
arr_station_code | integer | 到达火车站编码 | Y |
arr_station_name | string | 到达火车站名称 | Y |
arr_station_en | string | 到达火车站名称英文 | Y |
arr_city_name | string | 到达城市 | Y |
amount | decimal | 总的支付金额,没有可不填或填0 | N |
service_price | decimal | 预定服务费,没有可不填或填0 | Y |
change_price | decimal | 改签费,没有可不填或填0 | N |
change_service_price | decimal | 总改签服务费,没有可不填或填0 | N |
refund_price | decimal | 退票金额,没有可不填或填0 | Y |
refund_service_price | decimal | 总退票服务费,没有可不填或填0 | Y |
insurance_price | decimal | 总保险费,没有可不填或填0 | N |
send_ticket_price | decimal | 配送费,没有可不填或填0 | N |
paper_ticket_fee | decimal | 纸质票出票费,没有可不填或填0 | N |
grab_service_fee | decimal | 抢票费,没有可不填或填0 | N |
card_no | String | 证件号码 | N |
card_type | String | 证件类型 | N |
card_type_id | int | 证件类型编号,标准值列表-附录7:证件类型 | N |
passenger_name | String | 用户名字(证件上的名字) | Y |
passenger_type | String | 乘客类型的描述 | N |
passenger_type_id | Int | 乘客类型编号标准值列表-附录8:乘客类型 | N |
gender | String | F为女,M为男标准值列表-附录19:性别 | N |
user_id | Int | 云简提供的员工序号,非本公司员工可不填 | N |
ticket_no | String | 票号 | Y |
taxiDetail
字段 | 类型 | 释义 | 必填 |
---|---|---|---|
statement_id | string | 结算单号,渠道内唯一 | Y |
amount | decimal | 实际变动金额(结算的本质是和月度账单能够对齐),没有可不填或填0,amount = price - refund_price;amount = company_pay + person_pay | N |
price | decimal | 原始总价,没有可不填或填0,price = amount + refund_price;price = company_pay + company_refund + person_pay + person _refund | N |
order_id | string | 订单号 | Y |
refund_price | decimal | 实际退款金额,没有可不填或填0 | N |
document_num | string | 申请单号 | N |
mileage | decimal | 里程 | N |
pay_time | string | 支付时间 YYYY-MM-DD hh:mm:ss | Y |
phone | string | 预定人手机号 | Y |
city_name | string | 城市名字 | Y |
city_id | int | 城市编号 | Y |
company_pay | decimal | 公司实际支付金额,没有可不填或填0 | N |
person_pay | decimal | 个人实际支付金额,没有可不填或填0 | N |
is_invoice | int | 0,未开票,1已开票 | N |
use_car_type | int | 用车类型,标准值列表-附录10:用车方式 | Y |
location_from | string | 出发地址 | N |
location_to | string | 到达地址 | N |
order_date | string | YYYY-MM-DD hh:mm:ss | N |
start_datetime | string | 出发时间YYYY-MM-DD hh:mm:ss | N |
end_datetime | string | 到达时间YYYY-MM-DD hh:mm:ss | N |
company_refund | decimal | 公司实际退款,没有可不填或填0 | N |
person _refund | decimal | 个人实际退款,没有可不填或填0 | N |
passenger_phone | string | 乘客手机号 | Y |
passenger_name | string | 乘客名字 | Y |
refund_time | string | 退款时间 YYYY-MM-DD hh:mm:ss | N |
otherPrice
字段 | 类型 | 释义 | 必填 |
---|---|---|---|
price | decimal | 金额 | Y |
price_type | decimal | 费用的描述(比如:餐费) | Y |
文档版本记录
版本号 | 编写日期 | 更改内容 |
---|---|---|
V1.0 | 2020.01.01 | 初稿 |
V1.1 | 2020.05.26 | 新增linkHeaderId,linkLineId |
V1.2 | 2020.09.24 | 明确service_price为预定服务费,明确statementType为数字 |
V1.3 | 2024.02.21 | 更改结算保存地址 |
V1.3 | 2024.04.17 | 新增 order_datetime,start_datetime,end_datetime,statement_datetime,destination_city,destination_city_to,pay_type 字段 |