接口说明
一个订单对应一个包裹和它的商品描述、重量、派送地址等信息。 |
路径
HTTP Verb | URL |
---|---|
Post | /services/shipper/orders |
请求字段
1 | Field (API) | Data Type | Length | Mandatory | Details | |
2 | referenceNo | String | 80 | M | 客户端的订单唯一标识 | |
3 | referenceNo1 | String | 80 | O | 客户端订单号 | |
4 | trackingNo | String | 40 | O | 跟踪号 | |
5 | serviceCode | String | 64 | M | 服务代码,物流商提供 | |
6 | incoterm | String | 3 | O | DDU/DDP | |
7 | description | String | 60 | M | 英文品名 | |
8 | nativeDescription | String | 255 | O | 中文品名 | |
9 | weight | Double | M | 重量(>=0.000001) | ||
10 | weightUnit | String | 3 | O | 重量单位,枚举值:G, KG,LB 默认值:KG | |
11 | length | Double | O | 长 | ||
12 | width | Double | O | 宽 | ||
13 | height | Double | O | 高 | ||
14 | volume | Double | O | 体积(>=0.01) | ||
15 | dimensionUnit | String | 3 | O | 长度单位,枚举值:M, CM 默认值:CM | |
16 | invoiceValue | Double | M | 货值(>=0.01),与sum(itemCount * unitValue)的误差不能超过0.1 | ||
17 | invoiceCurrency | String | 3 | M | 币种,ISO货币代码 | |
18 | Boolean | 1 | O | 枚举值:Y/N 默认值:N | ||
19 | authorityToLeave | Boolean | ||||
20 | lockerService | Boolean | ||||
21 | batteryType | String | 64 | O | 电池类型,枚举值: No Battery Lithium Ion Polymer Lithium Ion Alloy 默认值:No Battery | |
22 | batteryPacking | String | 64 | O | 电池包装,枚举值: No Battery Inside Equipment Packaged with Equipment Battery Only Other 默认值:No Battery | |
23 | dangerousGoods | Boolean | O | 默认值:false | ||
24 | sku | String | 128 | O | 捡货清单,一般面单上会显示出来 | |
25 | serviceOption | String | 60 | O | ||
26 | instruction | String | 255 | O | 派送指令 | |
27 | facility | String | 20 | O | 发件网点,物流商提供 | |
28 | platform | String | 20 | O | 平台代码 | |
29 | recipientName | String | 50 | M | 收件人名称 限制英语/法语字符/非纯数字 自动去除特殊字符 | |
30 | recipientTaxId | String | 100 | O | 收件人税号 | |
31 | recipientCompany | String | 50 | O | 收件人公司名 | |
32 | phone | String | 20 | O | 电话 | |
33 | String | 50 | O | 邮箱 | ||
34 | addressLine1 | String | 200 | M | 地址第一行 限制英语/法语字符/非纯数字 自动去除特殊字符 | |
35 | addressLine2 | String | 200 | O | 地址第二行 | |
36 | addressLine3 | String | 80 | O | 地址第三行 | |
37 | city | String | 80 | M | 城市 | |
38 | state | String | 80 | M | 省 限制英语/法语字符/非纯数字 自动去除特殊字符 | |
39 | postcode | String | 16 | O | 邮编 | |
40 | country | String | 2 | M | 国家二字代码 | |
41 | shipperName | String | 50 | M | 发件人名称 限制英语/法语字符/非纯数字 自动去除特殊字符 | |
42 | shipperPhone | String | 20 | O | 电话 | |
43 | shipperAddressLine1 | String | 200 | O | 地址第一行 | |
44 | shipperAddressLine2 | String | 200 | O | 地址第二行 | |
45 | shipperAddressLine3 | String | 80 | O | 地址第三行 | |
46 | shipperCity | String | 80 | O | 城市 | |
47 | shipperState | String | 80 | O | 省 | |
48 | shipperPostcode | String | 16 | O | 邮编 | |
49 | shipperCountry | String | 2 | O | 国家二字代码 | |
50 | returnOption | String | 100 | O | 退件选项 | |
51 | returnName | String | 50 | M | 退件接收人名称 | |
52 | returnAddressLine1 | String | 200 | M | 地址第一行 | |
53 | returnAddressLine2 | String | 200 | O | 地址第二行 | |
54 | returnAddressLine3 | String | 80 | O | 地址第三行 | |
55 | returnCity | String | 80 | M | 城市 | |
56 | returnState | String | 80 | M | 省 | |
57 | returnPostcode | String | 16 | O | 邮编 | |
58 | returnCountry | String | 2 | M | 国家二字代码 | |
59 | items | List | O | Item信息 | ||
60 | itemNo | String | 128 | M | Item编号 | |
61 | sku | String | 128 | M | SKU | |
62 | description | String | 60 | M | 英文品名 如果值为空,设置成订单级别的description 1. 不能包含设置的违禁品关键词 2. 必须是英文和法文字符或数字 | |
63 | nativeDescription | String | 255 | O | 中文品名 | |
64 | hsCode | String | 60 | O | HS Code | |
65 | originCountry | String | 60 | M | 国家二字代码,三字代码或名称 | |
66 | itemCount | Integer | M | 件数,>0 | ||
67 | unitValue | Double | M | 单价,>0 | ||
68 | warehouseNo | 50 | O | 截取前50个字符 | ||
69 | productURL | String | 512 | O | 产品链接 | |
70 | itemWeight | Double | O | Item重量,转换成KG | ||
71 | extendData | List | O | 扩展字段 | ||
72 | vendorid | String | 12 | O | 税号 | |
73 | gstexemptionCode | Sting | 4 | O | GST免税码,如果vendorid正确,该字段值自动设置为“PAID” | |
74 | senderTaxId | String | 255 | O | 发货人税号 | |
75 | InjectPort | String | 256 | O | 订单配送港口,针对加拿大服务 |
响应说明
服务端返回与请求相对应的订单结果,包括:
1) 订单状态(status)
...
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": "",
"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
}
]
}
]
}
] |
响应报文
代码块 | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "status": "Success", "errors": null, "data": [ { "status": "Success", "errors": null, "warnings": null, "orderId": "z1Mkp-bpgIHPRFCcNg0cbw", "referenceNo": "Sammy2022318022939", "trackingNo": "9274890260113400044444", "connoteId": null, "piecesResult": null, "extraProperty": { "injectPort": "EWR", "customsClearanceType": "T" } } ], "warnings": null } |
...