oTMS logo 开放平台
Documentation Help

账单事件推送

通过账单事件推送接口,oTMS系统将账单事件推到指定的服务中,接收系统应按照oTMS的要求返回指定的响应格式进行返回信息反馈。

说明: 账单事件推送接口为反向调用接口。

配置说明

oTMS同时在生产环境和测试环境中提供推送功能,其中测试环境用于集成测试。两种环境下都需要由oTMS系统管理员分配API帐号密码后方可使用。

接口说明

公共参数

环境 HTTP请求方法 HTTPS请求地址 请求主体MIME类型 响应主体MIME类型
正式环境 PUT - application/json application/json
沙箱环境 PUT - application/json application/json

请求参数

字段名 位置 是否必填 描述 Schema
Authorization header 事件推送用户验证,接收系统根据自己的需求确认是否添加改验证,如添加改验证功能需提供用户名密码至oTMS
body body 账单事件推送请求 array[OrderForBillingEventDto]

响应参数

状态码 描述 响应模型
200 successful operation PushBillingEventResponse

详细描述

CustomFieldDto

字段名 类型 是否必填 描述 示例
customText1 string 自定义文本字段1
customText2 string 自定义文本字段2
customText3 string 自定义文本字段3
customText4 string 自定义文本字段4
customText5 string 自定义文本字段5
customText6 string 自定义文本字段6
customText7 string 自定义文本字段7
customText8 string 自定义文本字段8
customText9 string 自定义文本字段9
customText10 string 自定义文本字段10
customText11 string 自定义文本字段11
customText12 string 自定义文本字段12
customText13 string 自定义文本字段13
customText14 string 自定义文本字段14
customText15 string 自定义文本字段15
customText16 string 自定义文本字段16
customText17 string 自定义文本字段17
customText18 string 自定义文本字段18
customText19 string 自定义文本字段19
customText20 string 自定义文本字段20
customText21 string 自定义文本字段21
customText22 string 自定义文本字段22
customText23 string 自定义文本字段23
customText24 string 自定义文本字段24
customText25 string 自定义文本字段25
customText26 string 自定义文本字段26
customText27 string 自定义文本字段27
customText28 string 自定义文本字段28
customText29 string 自定义文本字段29
customText30 string 自定义文本字段30
customNum1 string 自定义小数字段1 -- 精确到18位数、6位小数
customNum2 string 自定义小数字段2 -- 精确到18位数、6位小数
customNum3 string 自定义小数字段3 -- 精确到18位数、6位小数
customNum4 string 自定义小数字段4 -- 精确到18位数、6位小数
customNum5 string 自定义小数字段5 -- 精确到18位数、6位小数
customNum6 string 自定义小数字段6 -- 精确到18位数、6位小数
customNum7 string 自定义小数字段7 -- 精确到18位数、6位小数
customNum8 string 自定义小数字段8 -- 精确到18位数、6位小数
customNum9 string 自定义小数字段9 -- 精确到18位数、6位小数
customNum10 string 自定义小数字段10 -- 精确到18位数、6位小数
customEnum1 string 自定义枚举变量1
customEnum2 string 自定义枚举变量2
customEnum3 string 自定义枚举变量3
customEnum4 string 自定义枚举变量4
customEnum5 string 自定义枚举变量5
customEnum6 string 自定义枚举变量6
customEnum7 string 自定义枚举变量7
customEnum8 string 自定义枚举变量8
customEnum9 string 自定义枚举变量9
customEnum10 string 自定义枚举变量10

RateDetailDto

字段名 类型 是否必填 描述 示例
rateName string 费用名称:
Base:干线费用
Pick Up:提货费
Delivery:送货费
Loading Unloading:装卸费
Extra Points:附加费
Other:其他费用
InsuranceFee:保费
Accessorial cost(pick up)
Accessorial Fee(Delivery Fee)
Accessorial Fee(Loading/unloading)
Accessorial Fee(Customized)
Accessorial Fee(Insurance)
Accessorial Fee(Special delivery)
Accessorial Fee(Repack/label)
Accessorial Fee(Reversal rountine)
Accessorial Fee(position fee)
Accessorial Fee (road/bridge)
Accessorial Fee(Other)
Compensation
rate number 精确到18位数、6位小数
description string 描述

AdjustmentRateDto

字段名 类型 是否必填 描述 示例
adjustmentType int 1:赔偿
2:特殊费用
3:调整费用
rate number 精确到18位数、6位小数
description string 描述

AdjustmentRateDetailDto

字段名 类型 是否必填 描述 示例
adjustmentType int 1:赔偿
2:特殊费用
3:调整费用
rate number 精确到18位数、6位小数
reason string 调整原因
description string 描述

OrderForBillingEventDto

字段名 类型 是否必填 描述 示例
orderType string 事件类型
1:送达
2:账单接受
billingId string 账单ID
billingName string 账单名称
billingType string 账单类型
billingCreator string 账单创建人
billAcceptedAt string 账单接受时间
customFields CustomFieldDto 自定义字段信息
partnerCode string 合作公司代码
partnerName string 合作公司
partnerHeadOfficeCode string 合作公司上级公司代码
partnerHeadOfficeName string 合作公司上级公司
orderNumber string 订单号
erpNumber string ERP编号
orderRemarks string 订单备注
shipFrom string 发货方
origin string 始发地
shipTo string 收货方
destination string 目的地
allocateTime string 分配时间
pickupSla string 预计提货时间
actualPickup string 实际提货时间
deliverySla string 预计送达时间
actualDelivery string 实际送达时间
totalVolume number 货量
totalWeight number 重量
totalQry number 运输单位数量
vat number 税率
totalRate number 总价(OTMS账单)
finalRate number 最终价格(OTMS账单)
ContractBaseRate number 价格文件合同费(FAP账单)
freightRate number 干线合同费用(FAP账单)
freightRateInclTax number 干线合同费用(含税)(FAP账单)
totalAccessorialFee number 附加费总计(FAP账单)
totalCost number 总费用(FAP账单)
totalCostInclTax number 含税总费用(FAP账单)
consolidated boolean 是否整合
shipFromExternalId string 发货方外部代码
shipToExternalId string 收货方外部代码
rateDetail array[RateDetailDto] 基础费用明细
adjustmentRate array[AdjustmentRateDto] 特殊费用
billingTotal number 账单总价
billingRecalculationMethod string 账单费用调整方式
BY_RMB
BY_PERCENT
billingRecalculationAmount number 账单调整费用
billingRemarks string 账单备注
adjustmentRateDetails array[AdjustmentRateDetailDto] 特殊费用明细
fapRateDetail array[RateDetailDto] 附加费明细

PushBillingErrorMsg

字段名 类型 是否必填 描述 示例
mestx string 订单校验结果。格式:${orderType}-${orderNumber}-${checkResult}.PS:如无特殊需求请忽略

PushBillingReturnBody

字段名 类型 是否必填 描述 示例
item array[PushBillingErrorMsg] 订单检验结果列表 PS:如无特殊需求请忽略

PushBillingEventResponse

字段名 类型 是否必填 描述 示例
type string 处理结果 S:成功 E:失败 O:其他错误
msg string 备注
return array[PushBillingReturnBody] 订单检验结果列表 PS:如无特殊需求请忽略

报文示例

请求示例

[
                    {
                      "orderType": "1",
                      "billingId": "650",
                      "billingName": "2012.D",
                      "billingCreator": "Li Na",
                      "billAcceptedAt": "2016-11-11T23:59:00.000",
                      "customFields": {
                        "customEnum1": "1",
                        "customEnum2": "2",
                        "customEnum3": "3",
                        "customEnum4": "4",
                        "customText1": "li",
                        "customNum1": "1"
                      },
                      "partnerCode": "WH",
                      "partnerName": "物流有限公司-武汉公司",
                      "partnerHeadOfficeCode": "SP",
                      "partnerHeadOfficeName": "ch",
                      "orderNumber": "WH12793490",
                      "erpNumber": "234",
                      "allocateTime": "2016-11-11T23:59:00.000",
                      "pickupSla": "2016-11-11T23:59:00.000",
                      "deliverySla": "2016-11-14T23:59:00.000",
                      "actualDelivery": "2016-11-14T23:59:00.000",
                      "totalVolume": "100cbm",
                      "totalWeight": "100kg",
                      "vat": "11",
                      "totalRate": "100",
                      "finalRate": "100",
                      "consolidated": "false",
                      "shipFromExternalId": "0506",
                      "shipToExternalId": "8S67",
                      "rateDetail": [
                        {
                          "rateName": "base",
                          "rate": "80",
                          "description": "base rate"
                        },
                        {
                          "rateName": "pickup",
                          "rate": "10",
                          "description": "pickup rate"
                        }
                      ],
                      "adjustmentRate": [
                        {
                          "adjustment_type": "1",
                          "rate": "-10",
                          "description": "compensation"
                        },
                        {
                          "adjustment_type": "2",
                          "rate": "9",
                          "description": "special fee"
                        },
                        {
                          "adjustment_type": "3",
                          "rate": "19",
                          "description": "manually change"
                        }
                      ]
                    },
                    {
                      "orderType": "1",
                      "billingId": "650",
                      "billingName": ".D",
                      "billingCreator": "Li Na",
                      "billAcceptedAt": "2016-11-11T23:59:00.000",
                      "customFields": {
                        "customEnum1": "2",
                        "customEnum2": "3",
                        "customEnum3": "5",
                        "customEnum4": "4",
                        "customText1": "li",
                        "customNum1": "1"
                      },
                      "partnerCode": "WH",
                      "partnerName": "物流有限公司-武汉公司",
                      "partnerHeadOfficeCode": "SP",
                      "partnerHeadOfficeName": "ch",
                      "orderNumber": "WH12793490",
                      "erpNumber": "234",
                      "allocateTime": "2016-11-11T23:59:00.000",
                      "pickupSla": "2016-11-11T23:59:00.000",
                      "deliverySla": "2016-11-14T23:59:00.000",
                      "actualDelivery": "2016-11-14T23:59:00.000",
                      "totalVolume": "100cbm",
                      "totalWeight": "100kg",
                      "vat": "11",
                      "totalRate": "100",
                      "finalRate": "100",
                      "consolidated": "false",
                      "shipFromExternalId": "0506",
                      "shipToExternalId": "8S67",
                      "rateDetail": [
                        {
                          "rateName": "base",
                          "rate": "80",
                          "description": "base rate"
                        },
                        {
                          "rateName": "pickup",
                          "rate": "10",
                          "description": "pickup rate"
                        }
                      ],
                      "adjustmentRate": [
                        {
                          "adjustment_type": "1",
                          "rate": "-10",
                          "description": "compensation"
                        },
                        {
                          "adjustment_type": "2",
                          "rate": "9",
                          "description": "special fee"
                        },
                        {
                          "adjustment_type": "3",
                          "rate": "19",
                          "description": "manually change"
                        }
                      ],
                      "billingTotal":3244598.22,
                      "billingRecalculationMethod":"BY_RMB",
                      "billingRecalculationAmount":0.00,
                      "billingRemarks":"备注"
                    }
                    ]

响应示例

{
                    "type":"S"
                }

错误码解释

全局反馈代码

反馈代码 说明

单个请求反馈代码

反馈代码 说明
S成功。
E失败
O其他