接口说明

一个订单对应一个包裹和它的商品描述、重量、派送地址等信息。

请求正文包含一个订单序列,最多可以一次性发送 300 个订单。 同时系统可以接受外部 API 对接系统所产生的包裹运单号 TrackingNo,不过此功能权限需 要经过 eTower 授权确认。 “facility”:需要向物流服务提供方咨询。

路径

HTTP Verb URL
Post/services/shipper/orders

请求字段

1Field (API)Data Type

Length

MandatoryDetails
2referenceNoString80M客户端的订单唯一标识
3referenceNo1String80O客户端订单号
4trackingNoString40O跟踪号
5serviceCodeString64M服务代码,物流商提供
6incotermString3ODDU/DDP
7descriptionString60M英文品名
8nativeDescriptionString255O中文品名
9weightDouble M重量(>=0.000001)
10weightUnitString3O重量单位,枚举值:G, KG,LB
默认值:KG
11lengthDouble O
12widthDouble O
13heightDouble O
14volumeDouble O体积(>=0.01)
15dimensionUnitString3O长度单位,枚举值:M, CM
默认值:CM
16invoiceValueDouble M货值(>=0.01),与sum(itemCount * unitValue)的误差不能超过0.1
17invoiceCurrencyString3M币种,ISO货币代码
18 Boolean1O枚举值:Y/N
默认值:N
19authorityToLeaveBoolean   
20lockerServiceBoolean   
21batteryTypeString64O电池类型,枚举值:
No Battery
Lithium Ion
Polymer
Lithium Ion Alloy
默认值:No Battery
22batteryPackingString64O电池包装,枚举值:
No Battery
Inside Equipment
Packaged with Equipment
Battery Only
Other
默认值:No Battery
23dangerousGoodsBoolean O默认值:false
24skuString128O捡货清单,一般面单上会显示出来
25serviceOptionString60O 
26instructionString255O派送指令
27facilityString20O发件网点,物流商提供
28platformString20O平台代码
29recipientNameString50M收件人名称

限制英语/法语字符/非纯数字
自动去除特殊字符
30recipientTaxIdString100O收件人税号
31recipientCompanyString50O收件人公司名
32phoneString20O电话
33emailString50O邮箱
34addressLine1String200M地址第一行

限制英语/法语字符/非纯数字
自动去除特殊字符
35addressLine2String200O地址第二行
36addressLine3String80O地址第三行
37cityString80M城市
38stateString80M

限制英语/法语字符/非纯数字
自动去除特殊字符
39postcodeString16O邮编
40countryString2M国家二字代码
41shipperNameString50M发件人名称

限制英语/法语字符/非纯数字
自动去除特殊字符
42shipperPhoneString20O电话
43shipperAddressLine1String200O地址第一行
44shipperAddressLine2String200O地址第二行
45shipperAddressLine3String80O地址第三行
46shipperCityString80O城市
47shipperStateString80O
48shipperPostcodeString16O邮编
49shipperCountryString2O国家二字代码
50returnOptionString100O退件选项
51returnNameString50M退件接收人名称
52returnAddressLine1String200M地址第一行
53returnAddressLine2String200O地址第二行
54returnAddressLine3String80O地址第三行
55returnCityString80M城市
56returnStateString80M
57returnPostcodeString16O邮编
58returnCountryString2M国家二字代码
59itemsList OItem信息
60 itemNoString128MItem编号
61 skuString128MSKU
62 descriptionString60M英文品名
如果值为空,设置成订单级别的description
1. 不能包含设置的违禁品关键词
2. 必须是英文和法文字符或数字
63 nativeDescriptionString255O中文品名
64 hsCodeString60OHS Code
65 originCountryString60M国家二字代码,三字代码或名称
66 itemCountInteger M件数,>0
67 unitValueDouble M单价,>0
68 warehouseNo 50O截取前50个字符
69 productURLString512O产品链接
70 itemWeightDouble OItem重量,转换成KG
71extendData List O扩展字段
72 vendoridString12O税号
73 gstexemptionCodeSting4OGST免税码,如果vendorid正确,该字段值自动设置为“PAID”
74 senderTaxIdString255O发货人税号
75 InjectPortString256O订单配送港口,针对加拿大服务
76pieces
array[map,...]
O一票多件包裹信息
77
Parcel Info


单个包裹的请求字段结构同上方要求一致



响应说明

服务端返回与请求相对应的订单结果,包括:

1)     订单状态(status)

Failed(失败),Success(成功),Partial Success(部分成功);

2)     错误消息(errors)

2.1)出错代码(code);

2.2)错误消息(message);

3)     具体的消息列表(data)

   3.1)订单号(orderId)

   3.2)客户编号(referenceNo)

   3.3)跟踪号(trackingNo)

   3.4)该条记录操作状态(status)

   3.5)一票多件(piecesResult)

   3.6)扩展字段(extraProperty)

      3.6.1)飞入港口 (injectPort)

      3.6.2) 清关方式 (customsClearanceType)

   3.7)错误消息列表(errors)

      3.7.1)错误编码(code)

      3.7.2) 错误消息(message) 

   3.8)换单状态(relabelStatus): 0-不换单;1-待处理;2-已完成

4)     警告消息(warnings)

4.1)警告代码(code);

4.2)警告消息(message);




请求报文

单票创建
[
  {
    "referenceNo": "reedzhang1231211",
    "country": "AU",
    "serviceCode": "UBI.AU2AU.AUPOST.1",
    "serviceOption": "Expedited",
    "facility": "can",
    "state": "VICTORIA",
    "city": "Berwick",
    "postcode": "3806",
    "addressLine1": "3 Lakeside Drivie",
    "addressLine2": "",
    "recipientName": "Corrie McKee",
    "phone": "0403536112",
    "email": "corrie.mckee@monash.edu",
    "sku": "sw2111202146745684",
    "invoiceCurrency": "USD",
    "invoiceValue": 6.23,
    "weightUnit": "g",
    "weight": 264,
    "description": "sw2111202146745684",
    "nativeDescription": "连衣裙",
    "shipperName": "Jiang Yuanfei",
    "shipperPhone": "+86 02586707811",
    "shipperAddressLine1": "Prologis (Anbo) Logistics Center Datang Town,Sanshui Industrial Park",
    "vendorid": "111",
    "abnnumber": "",
    "batteryType": "",
    "batteryPacking": ""
    "gstexemptioncode": "PAID",
    "extendData": {
      "injectPort": null
    },
    "orderItems": [
      {
        "itemCount": 1,
        "originCountry": "CN",
        "description": "sw2111202146745684",
        "nativeDescription": "连衣裙",
        "unitValue": 3.87,
        "itemNo": "8247107",
        "sku": "sw2111202146745684"
      },
      {
        "itemCount": 1,
        "originCountry": "CN",
        "description": "sw2201125303640755",
        "nativeDescription": "背心",
        "unitValue": 2.36,
        "itemNo": "9743766",
        "sku": "sw2201125303640755"
      }
    ],
    "shipperCity": "FO SHAN",
    "volume": 0.1
  }
]
一票多件
 [
  {
    "referenceNo": "MAC2022041101012",
    "serviceCode": "UBI.CA2CA.PUROLATOR",
    "recipientName": "AMAZONYYC1",
    "phone": "68765183",
    "addressLine1": "University of Toronto 27",
    "addressLine2": "",
    "addressLine3": "",
    "city": "Toronto",
    "state": " Ontario",
    "postcode": "M5S 1A1",
    "country": "CA",
    "length": "",
    "width": "",
    "height": "",
    "shipperName": "alex",
    "shipperAddressLine1": "test",
    "shipperAddressLine2": "",
    "shipperAddressLine3": "",
    "shipperCity": "ON",
    "shipperState": "ON",
    "shipperPostcode": "k1z3yz",
    "shipperCountry": "CA",
    "shipperPhone": "15000695273",
    "facility": "",
    "weight": 1,
    "invoiceValue": 23.4,
    "invoiceCurrency": "USD",
    "description": "watch,pencil",
    "nativeDescription": "手表,铅笔",
    "sku": "sku001,sku002",
    "orderItems": [
      {
        "itemNo": 1,
        "sku": "sku001",
        "description": "watch",
        "nativeDescription": "手表",
        "hsCode": "hscode001",
        "originCountry": "CN",
        "itemCount": 2,
        "unitValue": 7.8,
        "warehouseNo": "",
        "productURL": "",
        "weight": 2
      },
      {
        "itemNo": 2,
        "sku": "sku002",
        "description": "pencil",
        "nativeDescription": "铅笔",
        "hsCode": "hscode002",
        "originCountry": "CN",
        "itemCount": 1,
        "unitValue": 7.8,
        "warehouseNo": "",
        "productURL": "",
        "weight": 2
      }
    ],
    "pieces": [
      {
        "referenceNo": "MAC2022040601012-1",
        "serviceCode": "UBI.CA2CA.PUROLATOR",
        "recipientName": "AMAZONYYC1",
        "phone": "68765183",
        "addressLine1": "University of Toronto 27",
        "addressLine2": "",
        "addressLine3": "",
        "city": "Toronto",
        "state": " Ontario",
        "postcode": "M5S 1A1",
        "country": "CA",
        "length": "",
        "width": "",
        "height": "",
        "shipperName": "alex",
        "shipperAddressLine1": "test",
        "shipperAddressLine2": "",
        "shipperAddressLine3": "",
        "shipperCity": "ON",
        "shipperState": "ON",
        "shipperPostcode": "k1z3yz",
        "shipperCountry": "CA",
        "shipperPhone": "15000695273",
        "facility": "",
        "invoiceValue": 23.4,
        "invoiceCurrency": "USD",
        "weight": 1,
        "description": "watch,pencil",
        "nativeDescription": "手表,铅笔",
        "sku": "sku001,sku002",
        "orderItems": [
          {
            "itemNo": 1,
            "sku": "sku001",
            "description": "watch",
            "nativeDescription": "手表",
            "hsCode": "hscode001",
            "originCountry": "CN",
            "itemCount": 2,
            "unitValue": 7.8,
            "warehouseNo": "",
            "productURL": "",
            "weight": 2
          },
          {
            "itemNo": 2,
            "sku": "sku002",
            "description": "pencil",
            "nativeDescription": "铅笔",
            "hsCode": "hscode002",
            "originCountry": "CN",
            "itemCount": 1,
            "unitValue": 7.8,
            "warehouseNo": "",
            "productURL": "",
            "weight": 2
          }
        ]
      },
      {
        "referenceNo": "MAC2022040601012-2",
        "serviceCode": "UBI.CA2CA.PUROLATOR",
        "recipientName": "AMAZONYYC1",
        "phone": "68765183",
        "addressLine1": "University of Toronto 27",
        "addressLine2": "",
        "addressLine3": "",
        "city": "Toronto",
        "state": " Ontario",
        "postcode": "M5S 1A1",
        "country": "CA",
        "length": "",
        "width": "",
        "height": "",
        "shipperName": "alex",
        "shipperAddressLine1": "test",
        "shipperAddressLine2": "",
        "shipperAddressLine3": "",
        "shipperCity": "ON",
        "shipperState": "ON",
        "shipperPostcode": "k1z3yz",
        "shipperCountry": "CA",
        "shipperPhone": "15000695273",
        "facility": "",
        "invoiceValue": 15.6,
        "invoiceCurrency": "USD",
        "weight": 1,
        "description": "mask",
        "nativeDescription": "口罩",
        "sku": "sku003",
        "orderItems": [
          {
            "itemNo": 1,
            "sku": "sku003",
            "description": "mask",
            "nativeDescription": "口罩",
            "hsCode": "hscode003",
            "originCountry": "CN",
            "itemCount": 2,
            "unitValue": 7.8,
            "warehouseNo": "",
            "productURL": "",
            "weight": 2
          }
        ]
      },
      {
        "referenceNo": "MAC2022040601012-3",
        "serviceCode": "UBI.CA2CA.PUROLATOR",
        "recipientName": "AMAZONYYC1",
        "phone": "68765183",
        "addressLine1": "University of Toronto 27",
        "addressLine2": "",
        "addressLine3": "",
        "city": "Toronto",
        "state": " Ontario",
        "postcode": "M5S 1A1",
        "country": "CA",
        "length": "",
        "width": "",
        "height": "",
        "shipperName": "alex",
        "shipperAddressLine1": "test",
        "shipperAddressLine2": "",
        "shipperAddressLine3": "",
        "shipperCity": "ON",
        "shipperState": "ON",
        "shipperPostcode": "k1z3yz",
        "shipperCountry": "CA",
        "shipperPhone": "15000695273",
        "facility": "",
        "invoiceValue": 15.6,
        "invoiceCurrency": "USD",
        "weight": 2,
        "description": "pencil,pencil",
        "nativeDescription": "铅笔,铅笔",
        "sku": "sku002,sku002",
        "orderItems": [
          {
            "itemNo": 1,
            "sku": "sku002",
            "description": "pencil",
            "nativeDescription": "铅笔",
            "hsCode": "hscode002",
            "originCountry": "CN",
            "itemCount": 1,
            "unitValue": 7.8,
            "warehouseNo": "",
            "productURL": "",
            "weight": 2
          },
          {
            "itemNo": 2,
            "sku": "sku002",
            "description": "pencil",
            "nativeDescription": "铅笔",
            "hsCode": "hscode002",
            "originCountry": "CN",
            "itemCount": 1,
            "unitValue": 7.8,
            "warehouseNo": "",
            "productURL": "",
            "weight": 1
          }
        ]
      },
      {
        "referenceNo": "MAC2022040601012-4",
        "serviceCode": "UBI.CA2CA.PUROLATOR",
        "recipientName": "AMAZONYYC1",
        "phone": "68765183",
        "addressLine1": "University of Toronto 27",
        "addressLine2": "",
        "addressLine3": "",
        "city": "Toronto",
        "state": " Ontario",
        "postcode": "M5S 1A1",
        "country": "CA",
        "length": "",
        "width": "",
        "height": "",
        "shipperName": "alex",
        "shipperAddressLine1": "test",
        "shipperAddressLine2": "",
        "shipperAddressLine3": "",
        "shipperCity": "ON",
        "shipperState": "ON",
        "shipperPostcode": "k1z3yz",
        "shipperCountry": "CA",
        "shipperPhone": "15000695273",
        "facility": "",
        "invoiceValue": 15.6,
        "invoiceCurrency": "USD",
        "weight": 2,
        "description": "pencil,pencil",
        "nativeDescription": "铅笔,铅笔",
        "sku": "sku002,sku002",
        "orderItems": [
          {
            "itemNo": 1,
            "sku": "sku002",
            "description": "pencil",
            "nativeDescription": "铅笔",
            "hsCode": "hscode002",
            "originCountry": "CN",
            "itemCount": 1,
            "unitValue": 7.8,
            "warehouseNo": "",
            "productURL": "",
            "weight": 2
          },
          {
            "itemNo": 2,
            "sku": "sku002",
            "description": "pencil",
            "nativeDescription": "铅笔",
            "hsCode": "hscode002",
            "originCountry": "CN",
            "itemCount": 1,
            "unitValue": 7.8,
            "warehouseNo": "",
            "productURL": "",
            "weight": 1
          }
        ]
      }
    ]
  }
]

响应报文

ResponseMsg
{
  "status": "Success",
  "errors": null,
  "data": [
    {
      "status": "Success",
      "errors": null,
      "warnings": null,
      "orderId": "jpCMGo8l1riTR6DBD-yrwQ",
      "referenceNo": "BG2206291193743",
      "trackingNo": "91094210305241764976",
      "connoteId": null,
      "piecesResult": null,
      "extraProperty": {},
      "relabelStatus": 1
    }
  ],
  "warnings": null
}