oTMS logo 开放平台
Documentation Help

订单导入

通过订单导入接口,可以将不同外部系统如ERP系统、WMS系统的大量订单进行批量的导入。单次导入最大订单数为100。

版本号 文档 说明
0.1 当前版本文档

配置说明

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

注意: 请合理地调用公共接口。如果发现存在异常调用或者对我们系统性能造成影响等情况,会对API账号的调用进行限制,甚至停用。

目前对该接口的调用限制为每个公司每秒最多40个请求

接口说明

公共参数

环境 HTTP请求方法 HTTPS请求地址 请求主体MIME类型 响应主体MIME类型
正式环境 PUT https://login.otms.cn/ws/orderImport application/xml application/xml
沙箱环境 PUT https://demo.otms.cn/ws/orderImport application/xml application/xml

请求参数

字段名 位置 是否必填 描述 Schema
body body 订单导入请求 OrderImportRequest
Authorization header Basic Authorization。如果不为空,则优先使用该值作身份认证。否则使用请求报文中的用户名与密码 string

响应参数

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

详细描述

ImportedCargoDescription

字段名 类型 是否必填 描述 示例
productCode string 货物/产品的代码
productName string 货物/产品的名称
unitType string 货物/产品的数量单位,包括如下常量:
1 - 托盘
2 - 箱
3 - 袋
4 - 件
5 - 个
6 - 盒
7 - BAG
8 - BC
9 - BK
10 - BT
11 - BX
12 - CA
13 - CUP
14 - EA
15 - FEN
16 - PC
17 - RMB
18 - ROL
19 - SET
20 - SHOP
21 - TA
22 - TK
23 - ZA
24 - ZH
25 - CS
26 - LBS
27 - 把
28 - 包
29 - 杯
30 - 本
31 - 次
32 - 对
33 - 份
34 - 幅
35 - 副
36 - 个-G
37 - 罐
38 - 卷
39 - 块
40 - 片
41 - 瓶
42 - 束
43 - 台
44 - 套
45 - 条
46 - 桶
47 - 页
48 - 张
49 - 支
50 - 只
stackable string 已定义的货物/产品的堆叠限制,包括如下常量:
1 - 不可堆叠
2 - 2层
3 - 3层
4 - 4层
5 - 5层
6 - 6层
7 - 7层
8 - 8层
cargoCategory string 产品类别
unitLength number 单位长度,单位为米,不能为负数
unitWidth number 单位宽度,单位为米,不能为负数
unitHeight number 单位高度,单位为米,不能为负数
unitWeight number 单位重量,单位为公斤,不能为负数
unitInsurance number 单位投保价值。不能为负数

ImportedCargoDetails

字段名 类型 是否必填 描述 示例
totalQuantity integer (int32) 所有运输单位的数量,不能为负数
totalWeight number 所有运输货物的总重量,单位为公斤,不能为负数
totalVolume number 所有运输货物的总体积,单位为立方米,不能为负数
totalInsurance number 所有运输货物的总投保价值,不能为负数
cargoType integer (int32) 货物类型,考虑到oTMS用户存在共识的运输订单交易的性质。包括如下常量:
1 - 普通货物
2 - 温控货物
3 - 危险品
4 - 危险品和温控货物
packageType string 包装类型,oTMS根据运输用途将货物外包装分为4种,考虑到oTMS用户存在共识的运输订单交易的性质,如果订单包括不同的包装类型请用最高的那个。包括如下常量:
A - 散箱,可堆叠,人工装卸货。已有的卡车容量可以被充分利用,运输提供商不需要特别的装货设备
B - 托盘或者木箱,可堆叠,需叉车装卸货。通常卡车利用率高,可以双重叠加托盘,运输提供商需要叉车装卸货
C - 托盘,木箱或不规则形状,不可堆叠,需叉车装卸货。卡车不能被充分利用,建议货物各方根据LDM而不是CBM/MT来协定零担价格
D - 不允许配货,包车运输。这些货主创建的只能整车收费 (根据卡车尺寸付款) 的订单无论大小都是整车装运
E - 保温箱,可堆叠,人工装卸货

ImportedContactPerson

字段名 类型 是否必填 描述 示例
name string 联系人的姓名
phone string 固定电话。固定电话与手机号码二者必须填一个。正则表达式: \d{6,10}(-[0-9]{1,5})?
phoneAreaCode string 区号。若固定电话不为空,则必填。正则表达式: \d{1,4}
mobile string 手机号码。固定电话与手机号码二者必须填一个。正则表达式: \d{11}
email string 邮箱,必须是符合网络标准的有效邮箱

ImportedCustomFields

字段名 类型 是否必填 描述 示例
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
customText31 string 自定义文本字段31
customText32 string 自定义文本字段32
customText33 string 自定义文本字段33
customText34 string 自定义文本字段34
customText35 string 自定义文本字段35
customText36 string 自定义文本字段36
customText37 string 自定义文本字段37
customText38 string 自定义文本字段38
customText39 string 自定义文本字段39
customText40 string 自定义文本字段40
customText41 string 自定义文本字段41
customText42 string 自定义文本字段42
customText43 string 自定义文本字段43
customText44 string 自定义文本字段44
customText45 string 自定义文本字段45
customText46 string 自定义文本字段46
customText47 string 自定义文本字段47
customText48 string 自定义文本字段48
customText49 string 自定义文本字段49
customText50 string 自定义文本字段50
customText51 string 自定义文本字段51
customText52 string 自定义文本字段52
customText53 string 自定义文本字段53
customText54 string 自定义文本字段54
customText55 string 自定义文本字段55
customText56 string 自定义文本字段56
customText57 string 自定义文本字段57
customText58 string 自定义文本字段58
customText59 string 自定义文本字段59
customText60 string 自定义文本字段60
customText61 string 自定义文本字段61
customText62 string 自定义文本字段62
customText63 string 自定义文本字段63
customText64 string 自定义文本字段64
customText65 string 自定义文本字段65
customText66 string 自定义文本字段66
customText67 string 自定义文本字段67
customText68 string 自定义文本字段68
customText69 string 自定义文本字段69
customText70 string 自定义文本字段70
customText71 string 自定义文本字段71
customText72 string 自定义文本字段72
customText73 string 自定义文本字段73
customText74 string 自定义文本字段74
customText75 string 自定义文本字段75
customText76 string 自定义文本字段76
customText77 string 自定义文本字段77
customText78 string 自定义文本字段78
customText79 string 自定义文本字段79
customText80 string 自定义文本字段80
customNum1 number 自定义小数字段1 -- 精确到18位数、6位小数
customNum2 number 自定义小数字段2 -- 精确到18位数、6位小数
customNum3 number 自定义小数字段3 -- 精确到18位数、6位小数
customNum4 number 自定义小数字段4 -- 精确到18位数、6位小数
customNum5 number 自定义小数字段5 -- 精确到18位数、6位小数
customNum6 number 自定义小数字段6 -- 精确到18位数、6位小数
customNum7 number 自定义小数字段7 -- 精确到18位数、6位小数
customNum8 number 自定义小数字段8 -- 精确到18位数、6位小数
customNum9 number 自定义小数字段9 -- 精确到18位数、6位小数
customNum10 number 自定义小数字段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的逻辑名

ImportedLocation

字段名 类型 是否必填 描述 示例
companyName string 地区名称
postcode string 完整的中国邮政编码,精确到6个字符
province string 中文省份名称
town string 中文城市名称
county string 中文区县名称
address string 地址
loading boolean 发货点中的装货标志,收货点中的卸货标志
xttSupport boolean 外部订单追踪支持的标志,默认为false
contact ImportedContactPerson 地区的联系人详细资料
locationRemarks string 发货点/收货点的订单级别的备注
customFields ImportedCustomFields 自定义字段。这适用于启用并且正确配置了自定义字段的公司。
notifyRadius number (double) 通知半径 (进圈距离) ,收发货点收到短信通知的范围
driverOperateRadius number (double) 移动端电子围栏范围
smsNotificationEnabled boolean 开启短信通知的标志,默认为false
matchingStrategy string zipcode匹配模式,0 - 默认,1 - 精确
deliveryCode boolean 是否启用收货码
sendEpodSms boolean 发送EPOD信息
orderEpodUploadType string 回单类型,包括如下常量:
PAPERY_POD - 纸质电子回单
EPOD - 自动生成电子回单

ImportedOrder

字段名 类型 是否必填 描述 示例
sequence integer (int32) 序列数
clientCode string oTMS线下客户公司代码 (承运商帐户适用)
clientReferenceNumber string 调用的系统订单标识符
importId string -
index integer (int32) -
branch string 地区设置中的地区名称
erpNumber string 外部系统的唯一的订单号
orderNumber string oTMS订单号。如果已提供erpNumber,oTMS订单号视为无效。
orderRemarks string 附加的订单备注。
注:此字段不会在“订单详情”或“订单编辑”中显示。
allowUpdate boolean 是否允许更新订单。当标记为 true 时允许更新已存在的订单。默认false。
policyNumber string 保单号
shipFrom ImportedLocation 发货点详细信息。这个节点与shipFromExternalId可以二选一。
shipTo ImportedLocation 收货点详细信息。这个节点与shipToExternalId可以二选一。
timeSchedule ImportedTimeSchedule 订单中的提货/送货时间限制
orderLines array[ImportedOrderLine] 货物/产品明细列表,可能会被隐藏
concealOrderLines boolean 是否需对承运商隐藏货物/产品明细,true隐藏,false显示
rejectDraft boolean 是否启用严格验证模式。被系统判定内容不完整/不一致的订单,当此设置为true时拒绝订单,false 时订单进入草稿箱
autoProcessMode integer (int32) 订单后续处理模式,默认为1,仅导入。可选的值:
1 - 仅导入
2 - 导入和释放
3 - 导入、释放和分配给承运商
4 - 导入、释放和分配给卡车
dispatchBy integer (int32) 价格文件选择模式,默认为1,价格最低,可选的值:
1 - 价格最低
2 - 运输时间最短。
toTruck ImportedTruck 当指定autoProcessMode=4时,待分配订单的卡车信息。
cargoDetails ImportedCargoDetails 包括订单中的尺寸等货物具体参数
transportMode ImportedTransportMode 包括订单中的货运信息
revenue ImportedRevenue 收入。指定订单收入。
cost ImportedRevenue 成本。当指定autoProcessMode=3时,可填写成本和承运商,订单以指定价格分配给指定承运商;当指定autoProcessMode=4时,可填写成本,订单以指定价格分配给卡车。
vendorCode string 承运商在oTMS中的公司代码。当指定autoProcessMode=3时,可填写成本和承运商,订单以指定价格分配给指定承运商。
tempThreshold ImportedTemperature 温度报警阈值。仅适用于货物类型为2 (温控货物) 或4 (危险品和温控货物) 的订单
portableDevice ImportedPortableDevice 便携式设备
customFields ImportedCustomFields 自定义字段。这适用于启用并且正确配置了自定义字段的公司。
requireEpod boolean 要求电子回单。当标记为 true 时必须电子回单,false 时电子回单是可选择的。默认false。
businessType string 订单类型
sellingTariffSelection integer (int32) 销售价格文件选择。可选的值:
1 - 价格最低
2 - 运输时间最短
deliveryCode boolean 是否启用收货码
sendEpodSms boolean 给收货人发送EPOD信息
orderEpodUploadType string 回单类型,包括如下常量:
PAPERY_POD - 纸质电子回单
EPOD - 自动生成电子回单
result LiteOrderImportResultDto -
shipFromExternalId string 发货点外部ID,这个节点与shipFrom二选一,定义在 oTMS 基础数据 (针对货主帐户) 或合作伙伴 (针对承运商帐户) 中
shipToExternalId string 收货点外部ID,这个节点与shipTo二选一,定义在 oTMS 基础数据 (针对货主帐户) 或合作伙伴 (针对承运商帐户) 中

ImportedOrderLine

字段名 类型 是否必填 描述 示例
cargoDescription ImportedCargoDescription 货物/产品详细描述。这个节点与externalId可以二选一。externalId节点是字符串类型,表示基础数据中预定义的货物/产品 ID
quantity integer (int32) 货物/产品的数量
weight number 总重量,单位公斤
volume number 总体积,单位立方米
insuranceValue number 总投保价值
remarks string 货物/产品信息的用户备注
customFields ImportedCustomFields 自定义字段。这适用于启用并且正确配置了自定义字段的公司。

ImportedPortableDevice

字段名 类型 是否必填 描述 示例
deviceNumbers string 便携式设备号,,如有多个以\";\"分隔"

ImportedRevenue

字段名 类型 是否必填 描述 示例
lineHaul number 基础费率,精确到12位数、2位小数,不能为负数
baseRateDescription string 运输费用 (干线) 描述
other number 其他费用,精确到12位数、2位小数,不能为负数
otherFeesDescription string 其他费用描述

ImportedTemperature

字段名 类型 是否必填 描述 示例
minTemp number 当温度低于设定值时,系统会报警。单位为摄氏度,取值范围-10000至10000
maxTemp number 当温度高于设定值时,系统会报警。单位为摄氏度,取值范围-10000至10000
incubatorNumbers string 温控箱编号,如有多个以";"分隔
null boolean -

ImportedTimeSchedule

字段名 类型 是否必填 描述 示例
pickupDate string (date-time) 提货日期。仅日期不含时间,中国标准时区。格式为 yyyy-MM-dd
pickupDateRemarks string 关于提货日期/时间的备注
deliveryDate string (date-time) 送货日期。仅日期不含时间,中国标准时区。格式为 yyyy-MM-dd
deliveryDateRemarks string 关于送货日期/时间的备注
pickupTimeFrom string (date-time) 提货开始时间。仅时间,中国标准时区。格式为 HH:mm:ss
pickupTimeTo string (date-time) 提货结束时间。仅时间,中国标准时区。格式为 HH:mm:ss
deliveryTimeFrom string (date-time) 送货开始时间。仅时间,中国标准时区。格式为 HH:mm:ss
deliveryTimeTo string (date-time) 送货结束时间。仅时间,中国标准时区。格式为 HH:mm:ss

ImportedTransportMode

字段名 类型 是否必填 描述 示例
transportType string 货物运输类型,包括如下常量:
FTL - 整车
LTL - 零担
AIR - 空运
EXPRESS - 快递
RAIL - 铁路
WATER - 水运
truckType string 必需的卡车类型,包括如下常量:
0 - 敞篷车
1 - 厢式车
2 - 任意
3 - 轿运车
4 - 油罐车
5 - 飞翼车
6 - 高栏车
7 - 平板车
8 - 罐车
9 - 冷藏车
transportRemarks string 运输模式的备注
loadingMeter integer (int32) 卡车的装载米数
truckLength number 车长。如果存在,必须从已经定义好的值中选择,按公司分别设置。oTMS定义了全局支持的车长,如果车长不能被oTMS匹配到,会返回错误代码1006。
truckCbmCapacity number 卡车装载 (立方米) 。如果存在,必须从已经定义好的值中选择,按车长对应装载 (立方米) 。oTMS定义了全局支持的车长和对应的装载 (吨/立方米) ,如果装载 (立方米) 不能被 oTMS 匹配到,会返回错误代码1006。
truckMtCapacity number 卡车装载 (吨) 。如果存在,必须从已经定义好的值中选择,按车长对应装载 (吨) 。oTMS定义了全局支持的车长和对应的装载 (吨/立方米) ,如果装载 (吨) 不能被oTMS匹配到,会返回错误代码1007。

ImportedTruck

字段名 类型 是否必填 描述 示例
driver string 司机姓名
truckPlate string 车牌号
phone string 司机手机
null boolean -

LiteOrderImportResultDto

字段名 类型 是否必填 描述 示例
index integer (int32) -
orderImportId string -
orderId integer (int64) -
orderNumber string -
erpNumber string -
status string -
errorCodes array[string] -
errorMsgs array[string] -
errorCodeForDev array[string] -
systemErrorMsg string -
relatedIndexes array[integer] -

OrderImportRequest

字段名 类型 是否必填 描述 示例
version string 请求的版本号。当前版本号为0.1
login string 用户名。用于 API 调用者身份认证。如果请求头中的Authorization不为空,则该值会被忽略。
password string 密码。用于 API 调用者身份认证。如果请求头中的Authorization不为空,则该值会被忽略。
source string -
orders array[ImportedOrder] 待导入的订单列表。一次请求最多可以导入100条订单

OrderImportResponse

字段名 类型 是否必填 描述 示例
version string 响应版本号
responseCode string 全局的反馈代码
processedOrders string 处理的订单数量
orders array[OrderResponse] 处理的订单列表

OrderResponse

字段名 类型 是否必填 描述 示例
sequence integer (int32) 序列数
clientReferenceNumber string 客户查询号,从收到的订单中获取。
注:此字段会显示在“订单详情”或“订单编辑”的“备注”中
importStatus string 订单的导入状态,包括如下常量:
NOT IMPORTED - 未导入
DRAFT - 草稿 (订单信息不全)
INBOX - 已导入
RELEASED - 已释放
DISPATCHED - 已分配
responseCodes array[ResponseCode] 订单响应代码列表,导入结果的详细说明,可能为空
responseCodeParameters object -
orderNumber string 新的oTMS订单号,由系统分配
erpNumber string 外部系统的唯一的订单号
errorMsgs array[string] -

ResponseCode

字段名 类型 是否必填 描述 示例
code string 返回码

报文示例

请求示例

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<orderImportRequest version="0.1" login="username" password="password">
    <orders>
        <order sequence="1">
            <clientCode>TestClient</clientCode>
            <clientReferenceNumber>45989283488</clientReferenceNumber>
            <shipFrom>
                <companyName>TestCompanyFrom</companyName>
                <postcode>204574</postcode>
                <address>Hongkong SuperAdres</address>
                <loading>false</loading>
                <contact>
                    <name>Jimmis</name>
                    <phone>3321506</phone>
                    <phoneAreaCode>22</phoneAreaCode>
                    <mobile>78456985478</mobile>
                    <email>test001@testmail.com</email>
                </contact>
                <locationRemarks>adgrewer</locationRemarks>
            </shipFrom>
            <shipTo>
                <companyName>TestCompanyTo</companyName>
                <postcode>320178</postcode>
                <address>Bedryko SuperAdres</address>
                <loading>true</loading>
                <contact/>
                <locationRemarks>benrets</locationRemarks>
            </shipTo>
            <timeSchedule>
                <pickupDate>2012-12-23</pickupDate>
                <deliveryDate>2012-12-26</deliveryDate>
            </timeSchedule>
            <orderLines>
                <orderLine>
                    <cargoDescription>
                        <productCode>CODE</productCode>
                        <productName>trousers</productName>
                        <unitType>4</unitType>
                        <unitLength>1</unitLength>
                        <unitWidth>2</unitWidth>
                        <unitHeight>1</unitHeight>
                        <unitWeight>10</unitWeight>
                    </cargoDescription>
                    <quantity>211</quantity>
                </orderLine>
                <orderLine>
                    <externalId>SKIRTS</externalId>
                    <quantity>55</quantity>
                    <customFields>
                        <customText1>test brand</customText1>
                        <customNum1>42.0978</customNum1>
                        <customEnum2>LARGE_CARTON</customEnum2>
                    </customFields>
                </orderLine>
            </orderLines>
            <cargoDetails>
                <totalQuantity>266</totalQuantity>
                <totalWeight>9000</totalWeight>
                <totalVolume>23</totalVolume>
                <cargoType>1</cargoType>
                <packageType>A</packageType>
            </cargoDetails>
            <transportMode>
                <transportType>FTL</transportType>
                <truckType>2</truckType>
                <transportRemarks>these are remarks</transportRemarks>
                <truckLength>4.2</truckLength>
            </transportMode>
        </order>
        <order sequence="2">
            <clientCode>TestClient</clientCode>
            <clientReferenceNumber>45989283489</clientReferenceNumber>
            <erpNumber>989384892089883984</erpNumber>
            <shipFrom>
                <companyName>TestCompanyFrom</companyName>
                <postcode>204574</postcode>
                <address>Hongkong SuperAdres</address>
                <loading>false</loading>
                <contact>
                    <name>Jimmis</name>
                    <phone>3321506</phone>
                    <phoneAreaCode>22</phoneAreaCode>
                    <mobile>78456985478</mobile>
                    <email>test001@testmail.com</email>
                </contact>
                <locationRemarks>adgrewer</locationRemarks>
            </shipFrom>
            <shipTo>
                <companyName>Shanghai Corp</companyName>
                <town>上海市</town>
                <address>Nankin Road 782</address>
                <loading>true</loading>
                <contact>
                    <name>Jimmis</name>
                    <phone>3321506</phone>
                    <phoneAreaCode>22</phoneAreaCode>
                    <mobile>78456985478</mobile>
                    <email>test002@testmail.com</email>
                </contact>
                <locationRemarks>benrets</locationRemarks>
            </shipTo>
            <timeSchedule>
                <pickupDate>2012-12-24</pickupDate>
                <deliveryDate>2013-01-02</deliveryDate>
            </timeSchedule>
            <cargoDetails>
                <totalWeight>9000</totalWeight>
                <totalVolume>24.1</totalVolume>
                <cargoType>2</cargoType>
                <packageType>C</packageType>
            </cargoDetails>
            <transportMode>
                <transportType>LTL</transportType>
                <truckType>1</truckType>
            </transportMode>
        </order>
        <order sequence="3">
            <clientCode>TestClient</clientCode>
            <clientReferenceNumber>4598928355</clientReferenceNumber>
            <shipFromExternalId>TestShipFromExternalId</shipFromExternalId>
            <shipToExternalId>TestShipToExternalId</shipToExternalId>
            <timeSchedule>
                <pickupDate>2012-12-23</pickupDate>
                <deliveryDate>2012-12-26</deliveryDate>
            </timeSchedule>
            <orderLines>
                <orderLine>
                    <cargoDescription>
                        <productCode>CODE</productCode>
                        <productName>trousers</productName>
                        <unitType>4</unitType>
                        <unitLength>1</unitLength>
                        <unitWidth>2</unitWidth>
                        <unitHeight>1</unitHeight>
                        <unitWeight>10</unitWeight>
                    </cargoDescription>
                    <quantity>211</quantity>
                </orderLine>
                <orderLine>
                    <externalId>SKIRTS</externalId>
                    <quantity>55</quantity>
                    <customFields>
                        <customText1>test brand</customText1>
                        <customNum1>42.0978</customNum1>
                        <customEnum2>LARGE_CARTON</customEnum2>
                    </customFields>
                </orderLine>
            </orderLines>
            <cargoDetails>
                <totalQuantity>266</totalQuantity>
                <totalWeight>9000</totalWeight>
                <totalVolume>23</totalVolume>
                <cargoType>1</cargoType>
                <packageType>A</packageType>
            </cargoDetails>
            <transportMode>
                <transportType>FTL</transportType>
                <truckType>2</truckType>
                <transportRemarks>these are remarks</transportRemarks>
                <truckLength>4.2</truckLength>
            </transportMode>
        </order>
        <order sequence="4">
            <clientCode>TestClient</clientCode>
            <clientReferenceNumber>45989283688</clientReferenceNumber>
            <shipFrom>
                <companyName>TestCompany</companyName>
                <postcode>204574</postcode>
                <address>Hongkong SuperAdres</address>
                <loading>false</loading>
                <contact>
                    <name>Jimmis</name>
                    <phone>3321506</phone>
                    <phoneAreaCode>22</phoneAreaCode>
                    <mobile>78456985478</mobile>
                    <email>test001@testmail.com</email>
                </contact>
                <locationRemarks>adgrewer</locationRemarks>
            </shipFrom>
            <shipTo>
                <companyName>TestCompany</companyName>
                <postcode>204574</postcode>
                <address>Hongkong SuperAdres</address>
                <loading>true</loading>
                <contact/>
                <locationRemarks>benrets</locationRemarks>
            </shipTo>
            <timeSchedule>
                <pickupDate>2012-12-23</pickupDate>
                <deliveryDate>2012-12-26</deliveryDate>
            </timeSchedule>
            <orderLines>
                <orderLine>
                    <cargoDescription>
                        <productCode>CODE</productCode>
                        <productName>trousers</productName>
                        <unitType>4</unitType>
                        <unitLength>1</unitLength>
                        <unitWidth>2</unitWidth>
                        <unitHeight>1</unitHeight>
                        <unitWeight>10</unitWeight>
                    </cargoDescription>
                    <quantity>211</quantity>
                </orderLine>
                <orderLine>
                    <externalId>SKIRTS</externalId>
                    <quantity>55</quantity>
                    <customFields>
                        <customText1>test brand</customText1>
                        <customNum1>42.0978</customNum1>
                        <customEnum2>LARGE_CARTON</customEnum2>
                    </customFields>
                </orderLine>
            </orderLines>
            <cargoDetails>
                <totalQuantity>266</totalQuantity>
                <totalWeight>9000</totalWeight>
                <totalVolume>23</totalVolume>
                <cargoType>1</cargoType>
                <packageType>A</packageType>
            </cargoDetails>
            <transportMode>
                <transportType>FTL</transportType>
                <truckType>2</truckType>
                <transportRemarks>these are remarks</transportRemarks>
                <truckLength>4.2</truckLength>
            </transportMode>
        </order>
    </orders>
</orderImportRequest>

响应示例

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<orderImportResponse version="0.1">
    <responseCode/>
    <processedOrders>2</processedOrders>
    <orders>
        <order sequence="1">
            <clientReferenceNumber>45989283488</clientReferenceNumber>
            <importStatus>DRAFT</importStatus>
            <responseCodes>
                <responseCode>
                    <code>1018</code>
                </responseCode>
                <responseCode>
                    <code>1007</code>
                </responseCode>
                <responseCode>
                    <code>1005</code>
                </responseCode>
                <responseCode>
                    <code>1014</code>
                </responseCode>
            </responseCodes>
            <orderNumber>001000071</orderNumber>
        </order>
        <order sequence="2">
            <clientReferenceNumber>45989283489</clientReferenceNumber>
            <importStatus>NOT IMPORTED</importStatus>
            <responseCodes>
                <responseCode>
                    <code>1022</code>
                </responseCode>
            </responseCodes>
            <orderNumber/>
        </order>
        <order sequence="3">
            <clientReferenceNumber>4598928355</clientReferenceNumber>
            <importStatus>INBOX</importStatus>
            <responseCodes></responseCodes>
            <orderNumber/>
        </order>
        <order sequence="4">
            <clientReferenceNumber>45989283688</clientReferenceNumber>
            <importStatus>NOT IMPORTED</importStatus>
            <responseCodes>
                <responseCode>
                    <code>1120</code>
                </responseCode>
            </responseCodes>
            <orderNumber/>
        </order>
    </orders>
</orderImportResponse>

错误码解释

全局反馈代码

反馈代码 说明
0客户验证失败
1不支持的请求版本
2请求中的导入订单过多

单个请求反馈代码

反馈代码 说明
1000客户代码未找到。
1001无效的数据类型。
1002备用。
1003shipFromExternalId发货方外部代码未找到。
1004shipToExternalId收货方外部代码未找到。
1005singleLine/externalId产品明细/货物(产品)外部代码未找到。
1006缺少transportType运输方式。
1007truckType车辆类型匹配结果不唯一。
1008truckType车辆类型不匹配。
1009发货方外部代码重复。
1010收货方外部代码重复。
1011货物(产品)外部代码重复。
1012订单未设置价格(仅针对承运商)。
1013发货方oTMS邮政编码匹配到乡镇。
1014发货方oTMS邮政编码只与6位邮政编码匹配。
1015发货方oTMS邮政编码不匹配。
1016发货方oTMS邮政编码与6位和乡镇的都匹配。
1017收货方oTMS邮政编码只与乡镇匹配。
1018收货方邮政编码只与6位邮政编码匹配。
1019收货方oTMS邮政编码不匹配。
1020收货方oTMS邮政编码与6位和乡镇匹配。
1021缺少货物/产品信息。订单明细中至少需提供externalId或cargoDescription之一。
1022ERP单号重复。订单不能导入。
1023试图更新的订单不是由导入接口导入。更新被拒绝。
1024试图更新的订单不在收件箱或草稿箱中。更新被拒绝。
1025没有匹配的价格文件。
1026匹配了多个价格文件。
1027订单信息不全无法自动分配。
1028未提供司机和卡车的信息。
1029匹配到的卡车不唯一。
1030自定义字段不能识别——可能公司已经取消了自定义字段。订单不能导入。
1031未启用自定义字段,将忽略导入订单中的自定义字段。
1032订单缺少必填的自定义字段。订单不能导入。
1033未定义的自定义字段枚举值。订单不能导入。
1034订单明细缺少必填的自定义字段。订单不能导入。
1035用户地区和试图更新的订单地区不匹配。更新被拒绝。
1036货物/产品明细列表中有货物/产品的产品类别无效。订单不能导入。
1037试图更新的订单的货物/产品明细列表中有货物/产品的产品类别不可更新。更新被拒绝。
1038订单的运输时间和价格文件的运输时间不匹配。
1040地区不存在。
1041未提供发货方。
1042未提供收货方。
1043分公司未识别,或用户权限不匹配。
1044拒绝草稿状态订单。rejectDraft为true时,不完整订单将被拒绝而非进入草稿箱。
1049订单信息不完整,订单信息或货物/产品明细信息无效。
1052发货方oTMS邮政编码只与乡镇匹配。
1053收货方oTMS邮政编码只与乡镇匹配。
1070承运商的状态异常。
1072试图更新的订单已有货差。更新被拒绝。
1073试图更新的订单已在账单中。更新被拒绝。
1080无法匹配到卡车。
1081匹配到的卡车与订单不匹配。
1082无法匹配到司机。
1083匹配到的司机不唯一。
1084匹配到的卡车已在途,且绑定的司机不匹配。
1085匹配到的司机已在途,且绑定的卡车不匹配。
1086试图更新的订单被锁定。更新被拒绝。
1090试图更新的订单只能被订单所属公司更新。更新被拒绝。
1091试图更新的订单货物信息有无效信息。更新被拒绝。
1092承运商代码未找到
1093运输成本数据无效
1094货物类型和温度报警阀值不匹配。
1095温度报警阀值无效。
1096温控箱编号无效。
1097包装类型和温控箱编号不匹配。
1098订单已被按量拆分,无法更新数量、重量、体积和保费
1100其他错误。
1116订单导入时,订单总重或总体积不在配置的总重或总体积的正常范围内。
1117订单更新时,被更新订单的总重或总体积不在配置的总重或总体积的正常范围内。
1118发货方如果email里需要追踪信息的连接, Email 或者手机号是必填。订单不能导入。
1119收货方如果email里需要追踪信息的连接, Email 或者手机号是必填。订单不能导入。
1120收货点和发货点不能重复。
1141订单行总重量超过订单总重量。
1142订单行总体积超过订单总体积。
1143订单行总数量超过订单总数量。
1146订单行总保费超过订单总保费。
1150缺少packageType包装类型。
1151缺少cargoType货物类型。
1152时间窗信息不完整,请检查提送货时间。
1160发货方信息不完整。
1170收货方信息不完整。
1181缺少truckType车辆类型。
1182缺少truckLength正确车长。
1183缺少productName产品名称。
1200地区branch长度超长。
1201ErpNumber长度超长。
1202地区名称companyName超长。
1203邮政编码postcode不规范。
1204地址address超长。
1205联系方式不规范。
1206自定义文本超长。
1207自定义数字超出范围。
1208自定义枚举超长。
1209预计提货日期与当前时间相差超过365天。
1210预计送达日期与当前时间相差超过365天。
1211货物/产品的代码productCode超长。
2000订单正在被更新。

API工具