账单保存

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

请求参数:

字段名称 字段类型 字段描述 是否必填
source String 云简定义的商旅平台名称,例如携程商旅:ctrip
corpid String 业务公司在商旅平台的对接名称
billHeader BillHeader 账单头信息(账单总信息)
billLineList List 账单行信息(账单单条数据信息) 条件必填,作废账单时不用传

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

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 账单行备注信息
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,增加作废账单的示例

results matching ""

    No results matching ""