接口说明
本接口用于通过参考号或者跟踪号更新部分订单信息,具体服务是否支持此接口请联系eTower了解。 请注意以下几点:
|
路径
| HTTP Verb | URL |
|---|---|
| Post | /services/shipper/update-order |
请求字段
| 1 | Field (API) | Data Type | Length | Mandatory | Details | |
| 2 | orderID | String | 80 | M | Tracking No跟踪号/Ref No客户端的订单唯一标识 | |
| 3 | description | String | 60 | O | 英文品名 | |
| 4 | nativeDescription | String | 255 | O | 中文品名 | |
| 5 | weight | Double | O | 重量(>=0.000001) | ||
| 6 | weightUnit | String | 3 | O | 重量单位,枚举值:G, KG,LB 默认值:KG | |
| 7 | length | Double | O | 长 | ||
| 8 | width | Double | O | 宽 | ||
| 9 | height | Double | O | 高 | ||
| 10 | dimensionUnit | String | 3 | O | 长度单位,枚举值:M, CM 默认值:CM | |
| 11 | invoiceValue | Double | O | 货值(>=0.01),与sum(itemCount * unitValue)的误差不能超过0.1 | ||
| 12 | invoiceCurrency | String | 3 | O | 币种,ISO货币代码 | |
| 13 | recipientName | String | 50 | O | 收件人名称 限制英语/法语字符/非纯数字 自动去除特殊字符 | |
| 14 | recipientCompany | String | 50 | O | 收件人公司名 | |
| 15 | phone | String | 20 | O | 电话 | |
| 16 | String | 50 | O | 邮箱 | ||
| 17 | address | |||||
| 18 | addressLine1 | String | 200 | O | 地址第一行 限制英语/法语字符/非纯数字 自动去除特殊字符 | |
| 19 | addressLine2 | String | 200 | O | 地址第二行 | |
| 20 | addressLine3 | String | 80 | O | 地址第三行 | |
| 21 | city | String | 80 | O | 城市 | |
| 22 | state | String | 80 | O | 省 限制英语/法语字符/非纯数字 自动去除特殊字符 | |
| 23 | postcode | String | 16 | O | 邮编 | |
| 24 | country | String | 2 | O | 国家二字代码 | |
| 25 | shipperName | String | 50 | O | 发件人名称 限制英语/法语字符/非纯数字 自动去除特殊字符 | |
| 26 | shipperPhone | String | 20 | O | 电话 | |
| 27 | shipperAddress | |||||
| 28 | shipperAddressLine1 | String | 200 | O | 地址第一行 | |
| 29 | shipperAddressLine2 | String | 200 | O | 地址第二行(如标黄字段未更新,则单独更新此字段不生效) | |
| 30 | shipperAddressLine3 | String | 80 | O | 地址第三行(如标黄字段未更新,则单独更新此字段不生效) | |
| 31 | shipperCity | String | 80 | O | 城市 | |
| 32 | shipperState | String | 80 | O | 省 | |
| 33 | shipperPostcode | String | 16 | O | 邮编 | |
| 34 | shipperCountry | String | 2 | O | 国家二字代码 | |
| 35 | shipperEmail | String | 80 | O | 客户邮箱(如标黄字段未更新,则单独更新此字段不生效) | |
| 36 | returnOption | String | 100 | O | 退件选项(如标蓝字段未更新,则单独更新此字段不生效) | |
| 37 | returnName | String | 50 | O | 退件接收人名称 | |
| 38 | returnAddress | |||||
| 39 | returnAddressLine1 | String | 200 | O | 地址第一行 | |
| 40 | returnAddressLine2 | String | 200 | O | 地址第二行(如标蓝字段未更新,则单独更新此字段不生效) | |
| 41 | returnAddressLine3 | String | 80 | O | 地址第三行(如标蓝字段未更新,则单独更新此字段不生效) | |
| 42 | returnCity | String | 80 | O | 城市 | |
| 43 | returnState | String | 80 | O | 省 | |
| 44 | returnPostcode | String | 16 | O | 邮编 | |
| 45 | returnCountry | String | 2 | O | 国家二字代码 | |
| 46 | returnPhone | String | 50 | O | 退货电话 | |
| 47 | orderItems | List | O | Item信息 | ||
| 48 | sku | String | 128 | O | SKU | |
| 49 | description | String | 60 | O | 英文品名 如果值为空,设置成订单级别的description 1. 不能包含设置的违禁品关键词 2. 必须是英文和法文字符或数字 | |
| 50 | nativeDescription | String | 255 | O | 中文品名 | |
| 51 | hsCode | String | 60 | O | HS Code | |
| 52 | originCountry | String | 60 | O | 国家二字代码,三字代码或名称 | |
| 53 | itemCount | Integer | O | 件数,>0 | ||
| 54 | unitValue | Double | O | 单价,>0 | ||
| 55 | weight | Double | O | Item重量,转换成KG | ||
请求内容
Request
[{
"address": {
"country": "CA",
"city": "Belle River",
"postcode": "N0R 1A0",
"addressLine1": "address line 1",
"addressLine2": "",
"addressLine3": "",
"state": "ON"
},
"nativeDescription": "",
"orderId": "Test001",
"dimensionUnit": "",
"length": 0,
"description": "",
"weight": 0,
"invoiceValue": 0,
"invoiceCurrency": "",
"recipientCompany": "",
"returnAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"city": "",
"country": "",
"postcode": "",
"state": ""
},
"returnName": "",
"returnOption": "",
"returnPhone": "",
"shipperAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"city": "",
"country": "",
"postcode": "",
"state": ""
},
"shipperEmail": "",
"shipperName": "",
"shipperPhone": "",
"phone": "",
"width": 0,
"recipientName": "",
"items": [{
"hsCode": "",
"nativeDescription": "",
"originCountry": "",
"description": "",
"weight": 0,
"sku": "sku",
"itemCount": 0,
"unitValue": 0
}],
"email": "",
"height": 0,
"weightUnit": ""
}]
响应内容
服务端返回与请求相对应的跟踪号,包括
1)是否查询成功(status);
2)出错代码(errors);
3)请求id(orderId);
4)客户单号(referenceNo);
5)跟踪号(trackingNo);
响应报文
Response
{
"status": "Success",
"errors": null,
"data": [
{
"status": "Success",
"errors": null,
"orderId": "JDQ002444601000931506",
"referenceNo": "Marco-20200806113127",
"trackingNo": "JDQ002444601000931506",
"connoteId": null
},
{
"status": "Success",
"errors": null,
"orderId": "JDQ002444701000931503",
"referenceNo": "Marco-20200806113130",
"trackingNo": "JDQ002444701000931503",
"connoteId": null
}
]
}
部分成功样例
Response
{
"status": "Partial Success",
"errors": [
{
"code": 100009,
"message": "Order JDQ00244470100093150113 not found"
}
],
"data": [
{
"status": "Success",
"errors": null,
"orderId": "JDQ002444601000931506",
"referenceNo": "Marco-20200806113127",
"trackingNo": "JDQ002444601000931506",
"connoteId": null
},
{
"status": "Failure",
"errors": [
{
"code": 100009,
"message": "Order JDQ00244470100093150113 not found"
}
],
"orderId": "JDQ00244470100093150113",
"referenceNo": null,
"trackingNo": null,
"connoteId": null
}
]
}
失败样例
Response
{
"status": "Failure",
"errors": [
{
"code": 100009,
"message": "Order JDQ00244470100093150113 not found"
},
{
"code": 100009,
"message": "Order JDQ00244460100093150611 not found"
}
],
"data": [
{
"status": "Failure",
"errors": [
{
"code": 100009,
"message": "Order JDQ00244460100093150611 not found"
}
],
"orderId": "JDQ00244460100093150611",
"referenceNo": null,
"trackingNo": null,
"connoteId": null
},
{
"status": "Failure",
"errors": [
{
"code": 100009,
"message": "Order JDQ00244470100093150113 not found"
}
],
"orderId": "JDQ00244470100093150113",
"referenceNo": null,
"trackingNo": null,
"connoteId": null
}
]
}