接口说明
运输商用于预报大袋。 |
路径
HTTP Verb | URL |
---|---|
Post | /services/integration/carrier/despatchBags |
请求字段
1 | Field (API) | Data Type | Length | Mandatory | Details | |||||||
2 | despatchedTime | Date | 40 | O | 预报时间,为当前时间 | |||||||
3 | operatingAccount | String | O | 操作员在eTower中的账号 | ||||||||
4 | bags | List | M | 大袋信息 | ||||||||
5 | bagNo | String | 80 | M | 大袋号 | |||||||
6 | extendData | Object | O | 扩展属性 | ||||||||
7 | sortCode | String | 32 | O | 分区代码 | |||||||
8 | parcels | List | M | 包裹信息 | ||||||||
9 | barcode | String | 40 | M | 跟踪号 | |||||||
10 | receivedTime | Date | 24 | O | 收货时间
| |||||||
11 | scannedTime | Date | 24 | O | 称重时间
| |||||||
12 | weight | Double | 80 | M | 实际重量,单位为公斤(KG) |
响应内容
a) status:Succeeded/Failed
b) code:
300010 | BagNo不能为空 |
300011 | BagNo已经存在 |
300063 | 不同分区的订单不能装在同一个袋子中 |
130004 | 大袋重量超过限重40kg |
950008 | 请求参数barcode不能为空 |
300015 | 请求参数barcode不能为空 |
300016 | 不存在barcode相关的订单 |
300013 | 请求参数中的barcode有重复 |
300012 | 订单已经装袋 |
300017 | 不同渠道的订单不能装在同一个袋子中 |
请求报文
Request
{ "despatchedTime": "2017-01-06T12:08:08+0800", "operatingAccount": "Pickup_test@qq.com", "bags": [ { "bagNo": "2612_BPO_LAX_LAX_ST029", "extendData": { "sortCode": "M1A1" }, "parcels": [ { "barcode": "RR824564604VU", "receivedTime": "2017-01-05T12:08:08+0800", "scannedTime": "2017-01-05T15:08:08+0800", "weight": 2.8 }, { "barcode": "RR824564649VU", "receivedTime": "2017-01-05T12:08:08+0800", "scannedTime": "2017-01-05T15:08:08+0800", "weight": 1.2 } ] }, { "bagNo": "2512_BPO_LAX_LAX_ST030", "parcels": [ { "barcode": "RR824564621VU", "receivedTime": "2017-01-05T12:08:08+0800", "scannedTime": "2017-01-05T15:08:08+0800", "weight": 2.8 }, { "barcode": "RR824564618VU", "receivedTime": "2017-01-05T12:08:08+0800", "scannedTime": "2017-01-05T15:08:08+0800", "weight": 1.2 }, { "barcode": "RR824564635VU", "receivedTime": "2017-01-05T12:08:08+0800", "scannedTime": "2017-01-05T15:08:08+0800", "weight": 1.2 } ] } ] }
响应报文
Response
[ { "status": "Succeeded", "code": 0, "bagId": "sZoOP9h9D5noRU0JVdS_Hg", "bagNo": "2612_BPO_LAX_LAX_ST029" }, { "status": "Succeeded", "code": 0, "bagId": "euy7ZrJ2Z4n9Syrdwf7udg", "bagNo": "2512_BPO_LAX_LAX_ST030" } ]