接口说明
一个订单对应一个包裹和它的商品描述、重量、派送地址等信息。 请求正文包含一个订单序列,最多可以一次性发送 300 个订单。 同时系统可以接受外部 API 对接系统所产生的包裹运单号 TrackingNo,不过此功能权限需 要经过 eTower 授权确认。 “facility”:需要向物流服务提供方咨询。 一票多件,我们会拿一票多件中第一票订单的ref no作为master ref no,作为一个关系来关联该订单以下pieces中的子单的关系。 |
路径
| 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 | serviceOption | String | 64 | O | 服务选项,物流商提供 | ||
| 7 | incoterm | String | 3 | O | DDU/DDP | ||
| 8 | description | String | 255 | M | 英文品名 | ||
| 9 | nativeDescription | String | 255 | O | 中文品名 | ||
| 10 | weight | Double | M | 重量(>=0.000001) | |||
| 11 | weightUnit | String | 3 | O | 重量单位,枚举值:G, KG,LB, 默认值:KG | ||
| 12 | length | Double | O | 长 | |||
| 13 | width | Double | O | 宽 | |||
| 14 | height | Double | O | 高 | |||
| 15 | volume | Double | O | 体积(>=0.01) volume默认单位就是立方米 | |||
| 16 | dimensionUnit | String | 3 | O | 长度单位,枚举值:M, CM,IN 默认值:CM | ||
| 17 | invoiceValue | Double | M | 货值(>=0.01),与sum(itemCount * unitValue)的误差不能超过0.1 | |||
| 18 | invoiceCurrency | String | 3 | M | 币种,ISO货币代码 | ||
| 19 | pickUp | Boolean | 1 | O | 枚举值:Y/N 默认值:N | ||
| 20 | authorityToLeave | Boolean | O | 不需要签名(置放于收货人门口) | |||
| 21 | lockerService | Boolean | 3 | O | |||
| 22 | batteryType | String | 64 | O | 电池类型,枚举值:
| ||
| 23 | batteryPacking | String | 64 | O | 电池包装,枚举值:
| ||
| 24 | dangerousGoods | Boolean | O | 默认值:false | |||
| 25 | sku | String | 128 | 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 | shipperEmail | String | 80 | O | 客户邮箱 | ||
| 51 | returnOption | String | 100 | O | 退件选项
| ||
| 52 | returnName | String | 50 | O | 退件接收人名称 | ||
| 53 | returnAddressLine1 | String | 200 | O | 地址第一行 | ||
| 54 | returnAddressLine2 | String | 200 | O | 地址第二行 | ||
| 55 | returnAddressLine3 | String | 80 | O | 地址第三行 | ||
| 56 | returnCity | String | 80 | O | 城市 | ||
| 57 | returnState | String | 80 | O | 省 | ||
| 58 | returnPostcode | String | 16 | O | 邮编 | ||
| 59 | returnCountry | String | 2 | O | 国家二字代码 | ||
| 60 | returnPhone | String | 50 | O | 退货电话 | ||
| 61 | orderItems | List | O | Item信息 | |||
| 62 | itemNo | String | 128 | O | Item编号 | ||
| 63 | sku | String | 128 | M | SKU | ||
| 64 | description | String | 255 | M | 英文品名 如果值为空,设置成订单级别的description 1. 不能包含设置的违禁品关键词 2. 必须是英文和法文字符或数字 | ||
| 65 | nativeDescription | String | 255 | O | 中文品名 | ||
| 66 | hsCode | String | 60 | O | HS Code | ||
| 67 | originCountry | String | 60 | M | 国家二字代码,三字代码或名称 | ||
| 68 | itemCount | Integer | M | 件数,>0 | |||
| 69 | unitValue | Double | M | 单价,>0 | |||
| 70 | warehouseNo | 50 | O | 截取前50个字符 | |||
| 71 | productURL | String | 512 | O | 产品链接 | ||
| 72 | weight | Double | O | Item重量,重量单位跟包裹weightUnit一致 | |||
| 73 | use | String | 255 | O | 商品用途 | ||
| 74 | material | String | 255 | O | 商品材质 | ||
| 75 | extendData | Object | Item拓展信息 | ||||
| 76 | itemExportInvoiceValue | Double | O | 物品出口申报金额,支持两位小数 | |||
| 77 | itemExportInvoiceCurrency | String | 255 | O | 物品出口申报币种 | ||
| 78 | asinNo | String | 255 | O | Amazon平台 ASIN No | ||
| 79 | extendData | Object | O | 扩展字段,仅展示部分,具体字段根据服务要求有所不同 | |||
| 80 | vendorid | String | 12 | O | 发件人税号 | ||
| 81 | gstexemptionCode | Sting | 4 | O | GST免税码,如果vendorid正确,该字段值自动设置为“PAID” | ||
| 82 | senderTaxId | String | 255 | O | 发货人税号 | ||
| 83 | injectPort | String | 255 | O | 订单配送港口 | ||
| 84 | originPort | String | 255 | O | 订单起始港口 | ||
| 85 | postage | Decimal (12, 2) | 255 | O | 运费 | ||
| 86 | icms | Decimal (12, 2) | 255 | O | 巴西icms 费用 | ||
| 87 | vat | Decimal (12, 2) | 255 | O | 税号 | ||
| 88 | agentID | String | 10 | O | parcelShopID | ||
| 89 | coveramount | Double | O | 保费金额,针对于特定服务的额外投保业务 | |||
| 90 | shipperCompanyName | String | 255 | O | 发件人公司名 | ||
| 91 | shipperOrganizationCode | String | 255 | O | 发件人企业统一社会信用代码 | ||
| 92 | mailingDate | String | O | 时间格式是YYYY-MM-DD HH:mm:SS | |||
| 93 | exportInvoiceValue | Double | O | 包裹出口申报金额,支持两位小数 | |||
| 94 | exportInvoiceCurrency | String | 255 | O | 出口申报币种 | ||
| 95 | recipientFamilyName | String | 50 | O | 收件人姓氏 | ||
| 96 | recipientMiddleName | String | 50 | O | 收件人中间名 | ||
| 97 | recipientPassportSerial | String | 50 | O | 护照本编号(护照序列号) | ||
| 98 | recipientPassportNumber | String | 50 | O | 护照证件号码 | ||
| 99 | passportIssueDate | String | O | 护照签发日期,时间格式是YYYY-MM-DD | |||
| 100 | OOH_Option | String | 50 | O | 是否为澳邮OOH订单,传值为Y时判断为澳邮OOH订单 | ||
| 101 | onlineInsurance | ||||||
| 102 | insuranceCurrency | String | 3 | O | 投保额币种 | ||
| 103 | insuranceAmount | Double | / | O | 投保额 | ||
| 104 | beneficiaryType | String | 255 | O | 被保险人类型 1=个人 | ||
| 105 | organizationCode | String | 255 | O | 如果beneficiaryType=1,请填写身份证号码 如果beneficiaryType=2,请填写组织机构代码证 | ||
| 106 | beneficiary | String | 255 | O | 被保险人 | ||
| 107 | insure | String | / | O | 是否投保 1=是 | ||
| 108 | contactName | String | 20 | O | 被保人真实姓名 | ||
| 109 | pieces | array[map,...] | O | 一票多件包裹信息 | |||
| 110 | Parcel Info | 单个包裹的请求字段结构同上方要求一致 | |||||
响应说明
服务端返回与请求相对应的订单结果,包括:
| 序号/层级 | Field (API) | 中文参考 | 详情 |
|---|---|---|---|
| 1 | status | 订单状态 | Failure: 失败; Success: 成功; Partial Success: 部分成功 |
| 2 | errors | 错误消息(顶层) | 错误消息集合,包含 code、message |
| 2.1 | errors[].code | 出错代码 | 出错代码 |
| 2.2 | errors[].message | 错误消息 | 错误消息内容 |
| 3 | data | 具体的消息列表 | 订单记录列表,每项包含以下字段 |
| 3.1 | data[].orderId | 订单号 | 订单号 |
| 3.2 | data[].referenceNo | 客户编号 | 客户编号 |
| 3.3 | data[].trackingNo | 跟踪号 | 跟踪号 |
| 3.4 | data[].referenceNo1 | 客户编号1 | 客户编号1 |
| 3.5 | data[].status | 该条记录操作状态 | 该条记录的操作状态 |
| 3.6 | data[].piecesResult | 一票多件 | 一票多件结果/信息 |
| 3.7 | data[].extraProperty | 扩展字段 | 扩展字段对象 |
| 3.7.1 | data[].extraProperty.injectPort | 飞入港口 | 飞入港口 |
| 3.7.2 | data[].extraProperty.customsClearanceType | 清关方式 | 清关方式 |
| 3.7.3 | data[].extraProperty.lastMileCarrier | 尾程运输商 | 尾程运输商 |
| 3.8 | data[].errors | 错误消息列表 | 该条记录的错误消息列表,包含 code、message |
| 3.8.1 | data[].errors[].code | 错误编码 | 错误编码 |
| 3.8.2 | data[].errors[].message | 错误消息 | 错误消息内容 |
| 3.9 | data[].relabelStatus | 换单状态 | 0:不换单 1:待处理 2:已完成 |
| 4 | warnings | 警告消息 | 警告消息集合,包含 code、message |
| 4.1 | warnings[].code | 警告代码 | 警告代码 |
| 4.2 | warnings[].message | 警告消息 | 警告消息内容 |
请求报文
* 请注意,API请求报文为序列,支持一次性发送多票订单,结构为[{},{},{}],最外层为 [ ]
单票创建
Request
[
{
"referenceNo": "TESTING1231211",
"country": "AU",
"serviceCode": "服务代码,请联系物流商提供",
"serviceOption": "服务选项,请联系物流商提供",
"facility": "can",
"state": "VICTORIA",
"city": "Berwick",
"postcode": "3806",
"addressLine1": "3 Lakeside Drivie",
"addressLine2": "",
"recipientName": "Corrie McKee",
"phone": "0403536112",
"email": "corrie.mckee@monash.edu",
"sku": "dress2111202146745684",
"invoiceCurrency": "USD",
"invoiceValue": 6.23,
"weightUnit": "g",
"weight": 264,
"description": "dress211120214674568",
"nativeDescription": "连衣裙",
"shipperName": "Jiang Yuanfei",
"shipperPhone": "+86 02586707811",
"shipperAddressLine1": "Prologis (Anbo) Logistics Center Datang Town,Sanshui Industrial Park",
"batteryType": "",
"batteryPacking": ""
"extendData": {
"vendorid": "111",
"injectPort": null,
"postage": 12.3,
"icms": 12.1,
"vat": 1,
"OOH_Option":"Y"
},
"orderItems": [
{
"itemCount": 1,
"originCountry": "CN",
"description": "dress2111202146745684",
"nativeDescription": "连衣裙",
"unitValue": 3.87,
"itemNo": "8247107",
"sku": "dress2111202146745684",
"extendData":{
"itemExportInvoiceValue": 0.1,
"itemExportinvoiceCurrency":"USD"
}
},
{
"itemCount": 1,
"originCountry": "CN",
"description": "vest2201125303640755",
"nativeDescription": "背心",
"unitValue": 2.36,
"itemNo": "9743766",
"sku": "sw2201125303640755"
}
],
"shipperCity": "FO SHAN",
"volume": 0.1
}
]
一票多件
Request
[
{
"referenceNo": "MAC2022041101012",
"serviceCode": "服务代码,请联系物流商提供",
"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": "服务代码,请联系物流商提供",
"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": "服务代码,请联系物流商提供",
"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": "服务代码,请联系物流商提供",
"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
}
]
}
]
}
]
响应报文
单票
Response
ResponseMsg
{
"status": "Success",
"errors": null,
"data": [
{
"status": "Success",
"errors": null,
"warnings": null,
"orderId": "",
"referenceNo": "",
"refNo1": "",
"trackingNo": "",
"connoteId": null,
"piecesResult": null,
"extraProperty": {},
"relabelStatus": 1
"lastMileCarrier":null
}
],
"warnings": null
}
一票多件
Response
{
"status": "Success",
"errors": null,
"data": [
{
"status": "Success",
"errors": null,
"warnings": null,
"orderId": "",
"referenceNo": "",
"trackingNo": "",
"connoteId": null,
"piecesResult": [
{
"status": "Success",
"errors": null,
"warnings": null,
"orderId": "",
"referenceNo": "",
"trackingNo": "",
"connoteId": null
},
{
"status": "Success",
"errors": null,
"warnings": null,
"orderId": "",
"referenceNo": "",
"trackingNo": "",
"connoteId": null
},
{
"status": "Success",
"errors": null,
"warnings": null,
"orderId": "",
"referenceNo": "",
"trackingNo": "",
"connoteId": null
}
],
"extraProperty": {}
}
],
"warnings": null
}