51tracking API

多语言调用 API 

API 调用的多语言内容

注意:以下所指的情况仅对支持多语言查询部分起作用。

 

 

API 调用

1.用户如果在创建跟踪目标时没有传语言参数,那么请求到的数据将为默认语言数据(en 或 cn)。

2.如果想指定返回数据的语言类型,在创建跟踪目标时需要传对应的语言参数。

(1) 获取多个运单号的物流信息

https://api.51tracking.com/v2/trackings/get
ParamDescriptionDefault value
page (optional)Page to display1
limit (optional)Items per page (max 2000)100
status (optional)Items in this statusnull
created_at_min (optional)Start date and time of trackings created(format:The unix timestamp example:1076599161)null
created_at_max (optional)End date and time of trackings created.(format:The unix timestamp example:1076570361)now
lang (optional)Return to language type (only when courier official website supports).了解更多信息null

E.x.

http://api.51tracking.com/v2/trackings/get?page=1&limit=25&created_at_min=1441314361&created_at_max=1446949161&lang=en
										

 

(2) 创建单个运单号

https://api.51tracking.com/v2/trackings/post

要求身体 params:

Param描述
tracking_numberTracking number
carrier_codeCarrier code
title (optional)Title of the tracking
customer_name (optional)Customer name of the tracking.
customer_email (optional)Email address to receive email notifications of the customer.
order_id (optional)Text field for order ID.
lang (optional)返回语言类型 (仅当快递官网支持时有用).了解更多信息

E.x.


  {
    "tracking_number": "RP325552475CN",
    "carrier_code": "china-ems",
    "lang":"en"
  }
										

 

(3) 创建多个运单号

https://api.51tracking.com/v2/trackings/batch

要求身体 params:

Param描述
tracking_numberTracking number
carrier_codeCarrier code
title (optional)Title of the tracking
customer_name (optional)Customer name of the tracking.
customer_email (optional)Email address to receive email notifications of the customer.
order_id (optional)Text field for order ID.
lang (optional)返回语言类型 (仅当快递官网支持时有用).了解更多信息

E.x.


[
  {
    "tracking_number": "RP325552475SG",
    "carrier_code": "singapore-post",
    "lang": "en"
  }, 
  {
    "tracking_number": "LK664578623CN",
    "carrier_code": "china-ems",
    "lang": "cn"
  }
]
										

 

(4) 列出单个运单号物流信息

https://api.51tracking.com/v2/trackings/{carrier_code}/{tracking_number}

返回指定语言类型(仅当官网支持时可用).了解更多信息

E.x.

https://api.51tracking.com/v2/trackings/ups/1Z97X17XYW06605211/en

 

(5) 获取单个运单号实时物流信息

https://api.51tracking.com/v2/trackings/realtime

Request body params:

ParamDescription
tracking_number快递单号
carrier_code运输商简码
destination_code (optional)目的国二字简码.
tracking_ship_date(optional)寄件日期,格式为20181001(年月日),部分运输商(如德国邮政)要求填写发件日期才可以查询物流信息,故查询此类运输商时需要传此参数
tracking_postal_code(optional)收件地邮编,部分运输商(如Mondial Relay法国快递)要求填写邮编才可以查询物流信息,故查询此类运输商时需要传该参数
specialNumberDestination(optional)目的国参数,部分运输商要求填写目的国家才可以查询物流,故查询此类快递时需要传该参数
order (optional)Text field for order ID.
lang (optional)返回语言类型 (仅当快递官网支持时有用).了解更多信息

E.x.


  {
    "tracking_number": "RP325552475CN",
    "carrier_code": "china-ems",
    "lang":"en"
  }
										

     

 

前台显示

1.用户在前台查询单号数据,当前选定的语言将会被当做默认查询语言,在快递支持该语言查询数据的情况下,将返回该语言类型的数据,否则默认语言将会是英文(en)或中文(cn)。

如:当前选定页面的语言为英文,则英文将为查询数据时的默认语言。

     

后台显示

1.用户在后台查询单号数据,当前选定的语言将会被当做默认查询语言,在快递支持该语言查询数据的情况下,将返回该语言类型的数据,否则默认语言将会是英文(en)或中文(cn)。

如:当前选定页面的语言为英文,则英文将为查询数据时的默认语言。

     

webhook数据推送

1.webhook推送的数据将会是用户在后台添加的单号语言数据,添加单号时选定的语言将会被当做默认查询语言,在快递支持该语言查询数据的情况下,将返回该语言类型的数据,否则默认语言将会是英文(en)或中文(cn)。

如:当前添加跟踪号的语言为英文(en),则返回英文类型数据。

E.x.

  • Response  200
  • Body
    {
    "meta":{
       "code":200,
       "type":"Success",
       "message":"Success"
    },
       "data":{
    	"id":"7eabcb811fa10ab1f77d10418579a7f5",
    	"tracking_number":"LX203960974CN",
    	"carrier_code":"china-ems",
    	"lang":"en",
    	...
    	"origin_info":{
    		"weblink":"http:\/\/www.ems.com.cn\/",
    		"phone":null,
    		"carrier_code":"china-ems",
    		"trackinfo":[
    		{
    			"Date":"2016-11-15 08:23",
    			"StatusDescription":"\u672a\u59a5\u6295",
    			"Details":"\u745e\u5178"
    		},{
    			"Date":"2016-11-14 09:34",
    			"StatusDescription":"\u5230\u8fbe\u5904\u7406\u4e2d\u5fc3,\u6765\u81ea\u4e2d\u56fd \u5e7f\u5dde",
    			"Details":"\u745e\u5178"
    		}
    		...
    		]
    	},
    	"destination_info":{
    		"weblink":"http:\/\/www.posten.se\/",
    		"phone":null,
    		"carrier_code":"sweden-posten",
    		"trackinfo":[{
    			"Date":"2016-11-15 15:04",
    			"StatusDescription":"Posten has not been able to reach the recipient for delivery before 10.00. New delivery attempt to be made no later than 18.00. The item will subsequently be treated as an ordinary letter",
    			"Details":"535031, Sweden"
    		},{
    			"Date":"2016-11-15 14:00",
    			"StatusDescription":"The shipment item could not be delivered because the recipient was not possible to reach. A notice has been given and the shipment item is delivered to a service point.",
    			"Details":"535031, Sweden"
    		}
    		...
    		]
    		}
    	},
    	"verifyInfo":{
    	  "timeStr":1488249109,
    	  "signature":"4b279021f5c041f6e3344e7a0636cc26201ab24b91adcea6d38331cb89221d45"
    	}
    }
    										

 

目前支持的多语言运输商列表

运输商简码 快递名称 支持的语言
139express 139 ECONOMIC Package cn,ru
17postservice 17 Post Service en,cn
acscourier ACS Courier en,gr
adicional Adicional Logistics mz,an,pt
al8856 Ali Business Logistics en,cn
alpha-fast Alpha Fast en,th
aramex Aramex en,tr
armenia-post Armenia Post hy,en,ru
asendia-de Asendia Germany en,de
austria-post Austrian Post en,fr
azerbaijan-post Azerbaijan Post ru,en
bartolini BRT Bartolini it,en,fr,de
belgium-post Bpost en,de,fr,nl
belpochta Belarus Post ru,en
bosnia-and-herzegovina-post Bosnia And Herzegovina Post bs,en
br1express BR1 Express cn,en
brazil-correios Brazil Correios pt,en,es
bt-exp LJS cn,en
canada-post Canada Post en,cn,ar,fr
canpar Canpar Courier en,fr
cdek CDEK Express en,cn,ru
china-ems China EMS en,cn
china-post China Post en,cn
chronopost France EMS - Chronopost en,fr
chronopost-portugal Chronopost Portugal en,pt
cnexps CNE Express en,cn,ja
colicoli Colicoli en,cn,fr
colissimo Colissimo en,fr,de,es,nl,it
correo-argentino Argentina Post en,pt,fr,es
correos-bolivia Bolivia Post en,pt,fr,es
correos-spain Correos es,en,cn,pt,fr
ctt Portugal Post - CTT pt,en
czech-post Česká Pošta cs,en
denmark-post Denmark post en,dk
dhl DHL en,cn,tw,es,ru,it,jp,fr,kr
dhl-active DHL Active Tracing en,es,de,sv,pl,fr
dhl-es DHL Spain Domestic en,sp,pt,es
dhl-germany Deutsche Post DHL de,en
dhl-global-logistics DHL Global Forwarding cn,en
dhl-poland DHL Poland Domestic en,pl
dhlglobalmail DHL ECommerce en,cn,ca,es,de,ru,pt,ja,fr,ko,pl
dhlink Dhlink cn,en
dhlparcel-nl DHL Parcel Netherlands en,nl
dpd DPD en,de,fr,nl,it,cs,es,pl
dpd-de DPD Germany en,de
dpd-ro DPD Romania en
dpx DPX EXPRESS cn,en
ecargo-asia Ecargo en,kr
egypt-post Egypt Post ar,en
emirates-post Emirates Post ar,en,ur
epacket ePacket en,cn
ets-express ETS Express en,cn
fedex Fedex en,cn,es,de,ru,nl,pt,it,jp,fr,ko,tr,fi,cs
finland-posti Finland Post - Posti ru,en,lt,fi,sv,et,lv
gdwse WSE Logistics cn,en
georgian-post Georgia Post en,ka
gls GLS en,cn,tw,es,de,ru,nl,pt,it,jp,fr,ko,tr,fi,cs
gls-de GLS Germany en,de
gls-es GLS Spain(GLS ES) en,es,pt
gls-italy GLS Italy en,it
gls-pl GLS Poland(GLS PL) en,pl
greece-post ELTA Hellenic Post gr,en
hong-kong-post Hong Kong Post en,cn,tw
iceland-post Iceland Post is,en
inpost-paczkomaty InPost Paczkomaty en,pl
international-seur International Seur en,fr,es
israel-post Israel Post ru,ar,he,en
japan-post Japan Post en,ja
jcex JCEX en,cn
jetlogistic jetlogistic cn,en
jt-express-th J&T Express TH cn,en
kazpost Kazakhstan Post ru,en,kz
kerry-logistics Kerry Express en,cn,tw
korea-post Korea Post en,kr
kyrgyzpost Kyrgyzstan Post ru,en,kg
landmark-global Landmark Global en,fr,de,nl
laposte La Poste fr,en,de
latvijas-pasts Latvia Post lv,en
lietuvos-pastas Lithuania Post en,lt
luxembourg-post Luxembourg Post en,de,fr,lu
macao-post Macao Post en,cn,tw,pt
mailamericas MailAmericas en,es
malaysia-post Malaysia Post ar,ms
matkahuolto Matkahuolto en,sv,fi
moldova-post Moldova Post ru,en,ro
newgistics Newgistics en,cn
nova-poshta Nova Poshta en,ua,ru
omniva Estonia Post ru,en,es
poczta-polska Poland Post pl,en
posten-norge Posten Norge no,en
postnl-3s PostNL International 3S en,cn,fr,it,de,nl,es
purolator Purolator en,fr
rosan ROSAN EXPRESS en,ru
russian-post Russian Post en,ru
sagawa Sagawa ja,en
saudi-post Saudi Post ar,en
seino SEINO(西濃運輸) en,cn
serbia-post Serbia Post rs,en,sr
sf-express S.F Express en,cn
sfb2c SF International en,cn
sfcservice SFC Service en,cn
sinoair SINOAIR en,cn
slovakia-post Slovakia Post sk,en
speedaf Speedaf Express cn,en
sweden-posten PostNord sv,en,pt
swiss-post Swiss Post fr,en,it,de
taqbin-jp Yamato Japan en,ja
taxydromiki Geniki Taxydromiki en,bg,gr
tnt TNT en,cn,tw,es,de,ru,nl,pt,it,jp,fr,ko,tr,fi,cs
tnt-reference TNT Reference en,cn,tw,es,de,ru,nl,pt,it,jp,fr,ko,tr,fi,cs
tunisia-post Tunisia Post ar,fr
turkey-post Turkey Post tr,en
ukraine-post Ukraine Post en,ua
ups UPS en,cn,tw,es,de,ru,it,fr
urvaam urvaam es
wise-express Wise Express en,cn
wishpost WishPost en,cn
yanwen YANWEN en,cn
ybdexpress Ybd Express cn,en
ydhex YDH en,cn
yunlu YL express en,cn
zes-express ESHUN International Logistics cn,en
zyouexpress ZYEX en,cn

查物流轨迹,就用51Tracking