TMS接口
接口均使用表单POST方式提交
身份认证 (红色的是账号和密码)
地址
https://tms.czl.net/selectAuth.htm?username=TEST&password=123456
返回值:
json
{
'customer_id': '6581',
'customer_userid': '6901',
'ack': 'true'
}
ack=true
则代表认证成功,customer_id
和customer_userid
用于新建订单
渠道列表
地址
https://tms.czl.net/getProductList.htm
返回:
json
[{"product_id": "***", "product_shortname": "***小包"}]
轨迹查询
地址
https://tms.czl.net/selectTrack.htm?documentCode=**********
(跟踪号可传多个,用逗号隔开)建议批量请求,单个单号请求限制一秒最多请求五次
返回:
json
[
{
"ack": "true",
"data": [
{
"consigneeCountry": "收件国家代码 country code",
"productKindName": "物流方式 express type",
"referenceNumber": "参考号 ref number",
"trackContent": "末条轨迹内容 the last track content",
"trackDate": "末条轨迹时间 the last track date",
"trackLocation": "上海 the last track location",
"trackSignperson": "签收人 sign person, if no sign it's empty",
"trackingNumber": "跟踪号 tracking number",
"trackDetails": [
{
"track_content": "轨迹内容 track content",
"track_date": "轨迹时间 track date",
"track_location": "上海 track location",
"track_signdate": "签收时间 sign date, if no sign it's empty",
"track_signperson": "签收人 sign person, if no sign it's empty"
}
]
}
]
}
]
获取跟踪号
地址
https://tms.czl.net/getOrderTrackingNumber.htm?documentCode=订单号https://tms.czl.net/getOrderTrackingNumber.htm?order_id=订单id
查价
https://tms.czl.net/defaultPriceSearchJson.htm?weight=重量&country=国家二字代码(例如US)&cargoType=P(P包裹,D文件,B PAK袋)
查价其他参数(非必需)
参数名 | 含义 | 可选值 |
---|---|---|
length | 长 | |
width | 宽 | |
height | 高 | |
postcode | 邮编 | |
express_type | 快递类型 | DHL FEDEX UPS ARAMEX |
group_code | 分类 | XB代表小包,KD代表快递 |
返回结果
json
[{
"charge_weight": "重量",
"freight_amount": "速递运费金额",
"oil_amount": "燃油",
"other_amount": "杂费",
"price_formula": "计费公式说明",
"price_note": "价格备注",
"product_name": "运输方式名称",
"product_note": "操作备注",
"product_tracking": "是否可跟踪标记",
"total_amount": "总金额"
}]