账单保存

  • 接口: thirdparty/common/bill/save
  • Method: POST
  • 接口说明: 供第三方商旅平台调用,保存账单

请求参数:

字段名称 字段类型 字段描述 是否必填
source String 云简定义的商旅平台名称,例如携程商旅:ctrip 是
account String 当前租户的账户信息 是
data BillHeaderInfo 账单信息 是

BillHeader:

字段名称 字段类型 字段描述 是否必填
billCode String 账单对应的唯一主键 是
billName String 账单名称 条件必填,作废账单时不用传
startDate Date 账单起日期 否
endDate Date 账单止日期 否
sourceType String 账单类型,支持:flight, train, hotel, taxi, meal 否
checkBatchNo String 对账批次 否
branchCode String 分公司代码 否
branchName String 分公司名称 否
totalAmount BigDecimal 账单总金额 条件必填,作废账单时不用传,为空则取行上amount的和
totalCompanyPay BigDecimal 账单公司支付总金额 否
totalServicePrice BigDecimal 总服务费 条件必填,作废账单时不用传,为空则取行上servicePrice的和
remarks String 账单备注信息 否
enabledFlag String 账单启用标识 否,可选值:Y/N
billLineList List 账单行信息(账单单条数据信息) 条件必填,作废账单时不用传

BillLine:

字段名称 字段类型 字段描述 是否必填
orderId String 订单id 是
billLineNo String 账单行信息对应的唯一主键 是
startDateTime Date 账单行信息的开始时间,一般对应订单中行程的开始时间 否
endDateTime Date 账单行信息的结束时间,一般对应订单中行程的结束时间 否
orderDate Date 订单日期 否
branchCode String 分公司代码 否
branchName String 分公司名称 否
departmentCode String 部门代码 否
departmentName String 部门名称 否
costCenterCode String 成本中心代码 否
costCenterName String 成本中心名称 否
amount BigDecimal 账单行总金额 是
companyPay BigDecimal 账单行公司支付总金额 否
personPay BigDecimal 账单行个人支付总金额 否
price BigDecimal 去税金额(机票为票面金额,不包含机建燃油) 是,为空则取amount-servicePrice
unitPrice BigDecimal 单价 是,为空则取price
quantity Integer 数量 是,为空则默认为1
servicePrice BigDecimal 服务费 是
passengerName String 乘客姓名 否
employeeNumber String 员工号 否
journeyId String 商旅平台的审批单号 否
documentNum String 云简的审批单号 否
description String 账单行描述信息 否
remarks String 账单行备注信息 否
supplierName String 机票的供应商 否
airCompanyCode String 航司code 否
airCompanyName String 航司名称 否
discount BigDecimal 机票折扣 否
stationFrom String 飞机出发机场或火车出发站 否
stationTo String 飞机到达机场或火车到达站 否
flightClass Integer 飞机舱位类型 否
flightNo String 机票航班号 否
trainClass Integer 火车坐席类型 否
trainNo String 火车车次号 否
shopName String 酒店名称/餐厅名称 否
roomType String 酒店房型 否
star String 酒店星级 否
mileage BigDecimal 打车里程 否
carType Integer 打车车型 否
runningTime Integer 打车运行时长 否
actualEndAddress String 打车实际到达地址 否
actualStartAddress String 打车实际出发地址 否
startAddress String 打车出发地址 否
endAddress String 打车到达地址 否
otherPrice BigDecimal 其他金额(高速费,过桥费,等候费) 否
postServiceFee BigDecimal 后收服务费 否
orderAmount BigDecimal 订单原始金额 否
destinationCity Integer 出发城市 否
destinationCityTo Integer 到达城市 否
billType Integer 账单行的类型(类似order_type) 否
payType Integer 支付方式 否
projectCode String 项目code 否
projectName String 项目名称 否
invoiceTitle String 抬头信息 否
column1~50 String 自定义字段,可传一些额外信息,可用字段column1-column50 否
price1~20 BigDecimal 自定义金额,可传一些详细金额,可用字段price1-price20 否

请求示例(保存账单):

{
 "source":"ctrip",
 "corpid":"S122822",
 "billHeader":{
 "billCode":"1125908755871069",
 "billName":"预存机票",
 "totalAmount":6151,
 "totalCompanyPay":6151,
 "totalServicePrice":100,
 "sourceType":"flight",
 "startDate":1696320636000,
 "endDate":1698999036155
 },
 "billLineList":[
 {
 "orderId":"25111554454",
 "billLineNo":"5445666889",
 "startDateTime":1697184636000,
 "endDateTime":1697271036000,
 "orderDate":1697212800000,
 "amount":835,
 "companyPay":835,
 "price":825,
 "unitPrice":825,
 "quantity":1,
 "servicePrice":10,
 "passengerName":"张三",
 "documentNum":"REQ0000000038"
 }
 ]
}

请求示例(作废账单):

{
 "source":"ctrip",
 "corpid":"S122822",
 "billHeader":{
 "billCode":"1125908755871069",
 "enabledFlag":"N"
 }
}
//作废账单时必填以上字段

返回参数:

字段名称 字段类型 字段描述
resCode Integer 响应状态码
resMsg String 响应状态信息

返回示例:

{
 "resCode": 10000,
 "resMsg": "success"
}
{
 "resCode": 9999,
 "resMsg": "渠道名不能为空"
}

文档版本记录

版本号 编写日期 更改内容
V1.0 2023.11.03 初稿
V2.0 2023.11.06 增加字段branchCode,branchName,departmentCode,departmentName,costCenterCode,costCenterName
V3.0 2023.11.13 修改description字段拼写错误
V4.0 2023.12.12 billLineNo设为必传值
V5.0 2024.01.23 totalAmount,amount,servicePrice设为必传值,增加price,unitPrice,quantity,totalServicePrice字段
V6.0 2024.02.26 增加字段enabledFlag,增加作废账单的示例
V7.0 2026.03.05 新增字段:supplierName、airCompanyCode、airCompanyName、discount、stationFrom、stationTo、flightClass、flightNo、trainClass、trainNo、shopName、roomType、star、mileage、carType、runningTime、actualEndAddress、actualStartAddress、startAddress、endAddress、otherPrice、postServiceFee、orderAmount、destinationCity、destinationCityTo、billType、payType、projectCode、projectName、invoiceTitle

results matching ""

    No results matching ""