Request
HTTP request
Code Block |
---|
GETPOST httpshttp://www.packloopapis.com/data/v1/parcelrates/userId/trackingCodecalculator |
Info |
---|
userId 为客户端的用户 Id。如果是注册用户的话,这个 Id 为用户系统中的唯一 Id,如果用户为匿名临时用户的话,这个 Id 为系统中为这个用户生成的临时用户 Id。 用户 Id 将会和你提供的用户 Token 一同判断用户在是否有调用这个接口的权限 |
Parameters(参数)
必须 | 参数中文名 | 参数名 | 类型 | 描述 |
---|---|---|---|---|
无参数 | zipOrigination | String | ||
zipDestination | String | |||
shipmentWeightLb | Number | |||
shipmentWeightOz | Number |
Response
返回用户对象的 JSON 数据说明
参数中文名 | 参数名 | 类型 | 描述 |
---|---|---|---|
跟踪代码 | trackingCode | String | 客户端在本地扫描或者输入的跟踪代码 |
人读跟踪代码 | trackingCodeHumanReadable | String | 服务器处理后返回人类可以阅读的代码,这个代码和跟踪代码有存在不一致的时候。 |
运单事件数组 | eventlist | Array | 运单所有发生时间的数组 |
运单事件代码 | eventCode | String | 运单事件发生的内部编码,不同的快递公司可能有不同的编码 |
运单事件名称 | eventName | String | 运单事件发生编码的说明,这里等于需要显示的运单状态 |
运单事件所在城市 | eventCity | String | 运单事件发生的所在城市 |
运单事件州/省 | eventState | String | 运单事件发生的所在州或者省,在美国对应为州,在中国为省 |
运单事件邮政编码 | eventZip | String | 运单事件发生的所在邮政编码 |
运单事件国家 | eventCountry | String | 运单事件发生的所在国家代码,US表示美国,CN 表示中国 |
运单事件时间戳 | eventTimestamp | String | 运单事件发生的具体时间戳,为当地时间 |
返回消息 | code | Integer | 1000(用户名和密码校验成功) 3101(数据不存在,表示的是用户数据在数据中不存在,校验失败) |
返回消息 | message | String | 请参考代码内容对照表 |
JSON
Request
Code Block |
---|
{ "zipOrigination": "03109", "zipDestination": "20770", "shipmentWeightLb": 0, "shipmentWeightOz": 10 } |
Response
Code Block |
---|
{ "zipOrigination": "03109", "zipDestination": "20770", "shipmentWeightLb": 0, "shipmentWeightOz": 10, "ratesMap": { "USPS": [ { "ServiceId": "3", "ServiceName": "Priority Mail Express 2-Day<sup>™</sup>", "retailRate": "28.85", "commercialRate": "25.97" }, { "ServiceId": "2", "ServiceName": "Priority Mail Express 2-Day<sup>™</sup> Hold For Pickup", "retailRate": "28.85", "commercialRate": "25.97" }, { "ServiceId": "23", "ServiceName": "Priority Mail Express 2-Day<sup>™</sup> Sunday/Holiday Delivery", "retailRate": "41.35", "commercialRate": "38.47" }, { "ServiceId": "13", "ServiceName": "Priority Mail Express 2-Day<sup>™</sup> Flat Rate Envelope", "retailRate": "22.95", "commercialRate": "20.66" }, { "ServiceId": "27", "ServiceName": "Priority Mail Express 2-Day<sup>™</sup> Flat Rate Envelope Hold For Pickup", "retailRate": "22.95", "commercialRate": "20.66" }, { "ServiceId": "25", "ServiceName": "Priority Mail Express 2-Day<sup>™</sup> Flat Rate Envelope Sunday/Holiday Delivery", "retailRate": "35.45", "commercialRate": "33.16" }, { "ServiceId": "30", "ServiceName": "Priority Mail Express 2-Day<sup>™</sup> Legal Flat Rate Envelope", "retailRate": "22.95", "commercialRate": "20.66" }, { "ServiceId": "31", "ServiceName": "Priority Mail Express 2-Day<sup>™</sup> Legal Flat Rate Envelope Hold For Pickup", "retailRate": "22.95", "commercialRate": "20.66" }, { "ServiceId": "32", "ServiceName": "Priority Mail Express 2-Day<sup>™</sup> Legal Flat Rate Envelope Sunday/Holiday Delivery", "retailRate": "35.45", "commercialRate": "33.16" }, { "ServiceId": "62", "ServiceName": "Priority Mail Express 2-Day<sup>™</sup> Padded Flat Rate Envelope", "retailRate": "22.95", "commercialRate": "20.66" }, { "ServiceId": "63", "ServiceName": "Priority Mail Express 2-Day<sup>™</sup> Padded Flat Rate Envelope Hold For Pickup", "retailRate": "22.95", "commercialRate": "20.66" }, { "ServiceId": "64", "ServiceName": "Priority Mail Express 2-Day<sup>™</sup> Padded Flat Rate Envelope Sunday/Holiday Delivery", "retailRate": "35.45", "commercialRate": "33.16" }, { "ServiceId": "1", "ServiceName": "Priority Mail 2-Day<sup>™</sup>", "retailRate": "6.85", "commercialRate": "6.05" }, { "ServiceId": "33", "ServiceName": "Priority Mail 2-Day<sup>™</sup> Hold For Pickup", "retailRate": "0.00", "commercialRate": "6.05" }, { "ServiceId": "22", "ServiceName": "Priority Mail 2-Day<sup>™</sup> Large Flat Rate Box", "retailRate": "18.75", "commercialRate": "16.35" }, { "ServiceId": "34", "ServiceName": "Priority Mail 2-Day<sup>™</sup> Large Flat Rate Box Hold For Pickup", "retailRate": "0.00", "commercialRate": "16.35" }, { "ServiceId": "17", "ServiceName": "Priority Mail 2-Day<sup>™</sup> Medium Flat Rate Box", "retailRate": "13.45", "commercialRate": "11.95" }, { "ServiceId": "35", "ServiceName": "Priority Mail 2-Day<sup>™</sup> Medium Flat Rate Box Hold For Pickup", "retailRate": "0.00", "commercialRate": "11.95" }, { "ServiceId": "28", "ServiceName": "Priority Mail 2-Day<sup>™</sup> Small Flat Rate Box", "retailRate": "6.80", "commercialRate": "6.10" }, { "ServiceId": "36", "ServiceName": "Priority Mail 2-Day<sup>™</sup> Small Flat Rate Box Hold For Pickup", "retailRate": "0.00", "commercialRate": "6.10" }, { "ServiceId": "47", "ServiceName": "Priority Mail 2-Day<sup>™</sup> Regional Rate Box A", "retailRate": "0.00", "commercialRate": "6.60" }, { "ServiceId": "48", "ServiceName": "Priority Mail 2-Day<sup>™</sup> Regional Rate Box A Hold For Pickup", "retailRate": "0.00", "commercialRate": "6.60" }, { "ServiceId": "49", "ServiceName": "Priority Mail 2-Day<sup>™</sup> Regional Rate Box B", "retailRate": "0.00", "commercialRate": "8.75" }, { "ServiceId": "50", "ServiceName": "Priority Mail 2-Day<sup>™</sup> Regional Rate Box B Hold For Pickup", "retailRate": "0.00", "commercialRate": "8.75" }, { "ServiceId": "16", "ServiceName": "Priority Mail 2-Day<sup>™</sup> Flat Rate Envelope", "retailRate": "6.45", "commercialRate": "5.75" }, { "ServiceId": "37", "ServiceName": "Priority Mail 2-Day<sup>™</sup> Flat Rate Envelope Hold For Pickup", "retailRate": "0.00", "commercialRate": "5.75" }, { "ServiceId": "44", "ServiceName": "Priority Mail 2-Day<sup>™</sup> Legal Flat Rate Envelope", "retailRate": "6.45", "commercialRate": "5.75" }, { "ServiceId": "45", "ServiceName": "Priority Mail 2-Day<sup>™</sup> Legal Flat Rate Envelope Hold For Pickup", "retailRate": "0.00", "commercialRate": "5.75" }, { "ServiceId": "29", "ServiceName": "Priority Mail 2-Day<sup>™</sup> Padded Flat Rate Envelope", "retailRate": "6.80", "commercialRate": "6.10" }, { "ServiceId": "46", "ServiceName": "Priority Mail 2-Day<sup>™</sup> Padded Flat Rate Envelope Hold For Pickup", "retailRate": "0.00", "commercialRate": "6.10" }, { "ServiceId": "38", "ServiceName": "Priority Mail 2-Day<sup>™</sup> Gift Card Flat Rate Envelope", "retailRate": "6.45", "commercialRate": "5.75" }, { "ServiceId": "39", "ServiceName": "Priority Mail 2-Day<sup>™</sup> Gift Card Flat Rate Envelope Hold For Pickup", "retailRate": "0.00", "commercialRate": "5.75" }, { "ServiceId": "42", "ServiceName": "Priority Mail 2-Day<sup>™</sup> Small Flat Rate Envelope", "retailRate": "6.45", "commercialRate": "5.75" }, { "ServiceId": "43", "ServiceName": "Priority Mail 2-Day<sup>™</sup> Small Flat Rate Envelope Hold For Pickup", "retailRate": "0.00", "commercialRate": "5.75" }, { "ServiceId": "40", "ServiceName": "Priority Mail 2-Day<sup>™</sup> Window Flat Rate Envelope", "retailRate": "6.45", "commercialRate": "5.75" }, { "ServiceId": "41", "ServiceName": "Priority Mail 2-Day<sup>™</sup> Window Flat Rate Envelope Hold For Pickup", "retailRate": "0.00", "commercialRate": "5.75" }, { "ServiceId": "0", "ServiceName": "First-Class Mail<sup>®</sup> Parcel", "retailRate": "3.78" }, { "ServiceId": "0", "ServiceName": "First-Class Mail<sup>®</sup> Large Envelope", "retailRate": "2.83" }, { "ServiceId": "61", "ServiceName": "First-Class<sup>™</sup> Package Service", "retailRate": "0.00", "commercialRate": "3.35" }, { "ServiceId": "53", "ServiceName": "First-Class<sup>™</sup> Package Service Hold For Pickup", "retailRate": "0.00", "commercialRate": "3.35" }, { "ServiceId": "6", "ServiceName": "Media Mail Parcel", "retailRate": "2.61" }, { "ServiceId": "7", "ServiceName": "Library Mail Parcel", "retailRate": "2.48" } ] } } |