- 翻譯公司資訊
-
世聯(lián)翻譯公司完成接口開發(fā)規(guī)范中文翻譯
發(fā)布時間:2018-09-11 14:14 點(diǎn)擊:
世聯(lián)翻譯公司完成接口開發(fā)規(guī)范中文翻譯
1 關(guān)于本手冊1.1 資源http://www.w3.org/XML/1.2 支持Please contact 599943@fedex.com2 貨物跟蹤2.1 貨物跟蹤服務(wù)介紹您可以使用聯(lián)邦快遞國內(nèi)限時貨物跟蹤服務(wù)獲得實時的貨物跟蹤信息。2.2 根據(jù)運(yùn)單號進(jìn)行貨物跟蹤2.2.1 說明您可以通過運(yùn)單號跟蹤國內(nèi)限時服務(wù)的包裹。2.2.2 請求格式采用GET方法請求,具體樣例參見2.2.3 應(yīng)答格式共有3種應(yīng)答格式,詳見如下:2.2.3.1 單件貨物詳細(xì)信息樣例:<?xml version="1.0" encoding="UTF-8"?><fedex-express><tracking><detail><tn>120120136268</tn><ptn></ptn><destination>深圳</destination><shipdate>2007-05-28 18:00:00</shipdate><sentby>顏紅霞</sentby><deliveredto>廖正宏</deliveredto><signedforby>楊昌元</signedforby><service>優(yōu)先達(dá)</service><deliverydate>2007-05-29 15:23:00</deliverydate><status>到達(dá)聯(lián)邦快遞工作地點(diǎn)</status><activities><activity><datetime>2008-05-06 10:41:40</datetime><scan>到達(dá)聯(lián)邦快遞工作地點(diǎn)</scan><location>上海</location>聯(lián)邦快遞國內(nèi)服務(wù)接口開發(fā)規(guī)范Page 3 Printed 12/21/2012<details></details></activity><activity><datetime>2007-05-29 15:23:00</datetime><scan>已送達(dá)</scan><location>深圳</location><details></details></activity><activity><datetime>2007-05-29 08:30:52</datetime><scan>貨件已裝車,派送途中</scan><location>深圳</location><details></details></activity><activity><datetime>2007-05-29 07:40:18</datetime><scan>位于當(dāng)?shù)氐穆?lián)邦快遞遞送站</scan><location>深圳</location><details></details></activity><activity><datetime>2007-05-28 18:00:00</datetime><scan>已取件</scan><location>上海</location><details></details></activity></activities></detail></tracking></fedex-express>字段含義:字段名 含義 類型tn 運(yùn)單號 Stringptn 主運(yùn)單號,為空時表示改件為一票一件 Stringdestination 目的地 Stringshipdate 寄件日期 Stringsentby 寄件人 Stringdeliveredto 收件人 Stringsignedforby 簽收人 Stringservicetype 服務(wù)類型 Stringdeliverydate 收件日期 Stringstatus 該件貨物最新狀態(tài) Stringdatetime 該件貨物該次活動時間 Stringscancode 該件貨物該次活動內(nèi)容 Stringlocation 該件貨物該次活動地點(diǎn) Stringdetails 該件貨物該次活動詳細(xì)信息 String2.2.3.2 多件貨物匯總樣例:<?xml version="1.0" encoding="UTF-8"?><fedex-express><tracking><summary><single><ts><tn>120120136268</tn><status>到達(dá)聯(lián)邦快遞工作地點(diǎn)</status><datetime>2008-05-06 10:41:40</datetime><destination>深圳</destination><service>優(yōu)先達(dá)</service></ts><ts><tn>120120136268</tn><status>到達(dá)聯(lián)邦快遞工作地點(diǎn)</status><datetime>2008-05-06 10:41:40</datetime><destination>深圳</destination><service>優(yōu)先達(dá)</service></ts></single><mps><ts><tn>120120004950</tn><status>遞送例外情況</status><datetime>2007-06-18 12:27:49</datetime><destination>長沙</destination><service>優(yōu)先達(dá)</service></ts></mps><missing><tn>230120136268</tn><tn>230120136268</tn></missing><invalid><tn>123</tn></invalid><exception></exception></summary></tracking></fedex-express>字段含義:字段名 含義 類型tn 運(yùn)單號 Stringstatus 該件貨物最新狀態(tài) Stringdatetime 該件貨物最新狀態(tài)時間 Stringdestination 目的地 Stringservice 服務(wù) String2.2.3.3 一票多件匯總樣例:<?xml version="1.0" encoding="UTF-8"?><fedex-express><tracking><mps><ts isp="true"><tn>120120004950</tn><status>遞送例外情況</status><datetime>2007-06-18 12:27:49</datetime><destination>長沙</destination><service>優(yōu)先達(dá)</service></ts><ts isp="false"><tn>210116898750</tn><status>遞送例外情況</status><datetime>2007-06-18 12:27:49</datetime><destination>長沙</destination><service>優(yōu)先達(dá)</service></ts></mps></tracking></fedex-express>字段含義:字段名 含義 類型tn 運(yùn)單號 Stringstatus 該件貨物最新狀態(tài) Stringdatetime 該件貨物最新狀態(tài)時間 Stringdestination 目的地 Stringservice 服務(wù) String2.2.4 查詢單個運(yùn)單2.2.4.1 請求方法:本查詢支持中文和英文,默認(rèn)為中文:GET http://example.example.ex/service/track/xxxxxxxxxxxx英文訪問地址為:GET http://example.example.ex/service/track.en/xxxxxxxxxxxx2.2.4.2 應(yīng)答:如果該件貨物為一票多件,返回內(nèi)容為匯總信息,參見2.2.3.3,如欲查詢該票貨物下某一件貨物詳細(xì)信息,需要再次發(fā)送請求,請求方法為:GET http://example.example.ex/service/track/xxxxxxxxxxxx/XXXXXXXXXXXX獲得的應(yīng)答內(nèi)容參見2.2.3.1如果該件貨物為一票一件,返回內(nèi)容參見2.2.3.1如果該件貨物未能正常查詢出來,返回內(nèi)容參見2.2.3.22.2.5 查詢多個運(yùn)單2.2.5.1 請求方法GET http://example.example.ex/service/track/xxxxxxxxxxxx,xxxxxxxxxxxx運(yùn)單號之間以“,”分隔。2.2.5.2 應(yīng)答返回內(nèi)容為匯總信息,參見2.2.3.2,如欲查詢其中某一件貨物詳細(xì)信息,需要再次發(fā)送請求,請求方法為:GET http://example.example.ex/service/track/xxxxxxxxxxxx,xxxxxxxxxxxx/XXXXXXXXXX如果該件貨物為一票一件,返回內(nèi)容參見2.2.3.1如果該件貨物為一票多件,返回內(nèi)容為匯總信息,參見2.2.3.3,如欲查詢該票貨物下某一件貨物詳細(xì)信息,需要再次發(fā)送請求,請求方法為:GEThttp://example.example.ex/service/track/xxxxxxxxxxxx,xxxxxxxxxxxx/XXXXXXXXXXXX/xxxxxxxxxxxx獲得的應(yīng)答內(nèi)容參見2.2.3.12.3 根據(jù)訂單號進(jìn)行貨物跟蹤請求接口及應(yīng)答2.3.1 說明您可以通過訂單號跟蹤國內(nèi)限時服務(wù)的包裹。2.3.2 請求格式采用GET方法請求,具體樣例參見2.3.3 應(yīng)答格式共有2種應(yīng)答格式,詳見如下:2.3.3.1 單件貨物詳細(xì)信息樣例:<?xml version="1.0" encoding="UTF-8"?><fedex-express><tracking order=”0953770932427”><detail><tn>120120136268</tn><ptn></ptn><destination>深圳</destination><shipdate>2007-05-28 18:00:00</shipdate><sentby>顏紅霞</sentby><deliveredto>廖正宏</deliveredto><signedforby>楊昌元</signedforby><service>優(yōu)先達(dá)</service><deliverydate>2007-05-29 15:23:00</deliverydate><status>到達(dá)聯(lián)邦快遞工作地點(diǎn)</status><activities><activity><datetime>2008-05-06 10:41:40</datetime><scan>到達(dá)聯(lián)邦快遞工作地點(diǎn)</scan><location>上海</location><details></details></activity><activity><datetime>2007-05-29 15:23:00</datetime><scan>已送達(dá)</scan><location>深圳</location><details></details></activity><activity><datetime>2007-05-29 08:30:52</datetime><scan>貨件已裝車,派送途中</scan><location>深圳</location><details></details></activity><activity><datetime>2007-05-29 07:40:18</datetime><scan>位于當(dāng)?shù)氐穆?lián)邦快遞遞送站</scan><location>深圳</location><details></details></activity><activity><datetime>2007-05-28 18:00:00</datetime><scan>已取件</scan><location>上海</location>字段含義:字段名 含義 類型order 訂單號 Stringtn 運(yùn)單號 Stringptn 主運(yùn)單號,為空時表示改件為一票一件 Stringdestination 目的地 Stringshipdate 寄件日期 Stringsentby 寄件人 Stringdeliveredto 收件人 Stringsignedforby 簽收人 Stringservicetype 服務(wù)類型 Stringdeliverydate 收件日期 Stringstatus 該件貨物最新狀態(tài) Stringdatetime 該件貨物該次活動時間 Stringscancode 該件貨物該次活動內(nèi)容 Stringlocation 該件貨物該次活動地點(diǎn) Stringdetails 該件貨物該次活動詳細(xì)信息 String2.3.3.2 一票多件匯總樣例:<?xml version="1.0" encoding="UTF-8"?><fedex-express order=”0953770932427”><tracking><mps><ts isp="true"><tn>120120004950</tn><status>遞送例外情況</status><datetime>2007-06-18 12:27:49</datetime><destination>長沙</destination><details></details></activity></activities></detail></tracking></fedex-express><service>優(yōu)先達(dá)</service></ts><ts isp="false"><tn>210116898750</tn><status>遞送例外情況</status><datetime>2007-06-18 12:27:49</datetime><destination>長沙</destination><service>優(yōu)先達(dá)</service></ts></mps></tracking></fedex-express>字段含義:字段名 含義 類型order 訂單號 Stringtn 運(yùn)單號 Stringstatus 該件貨物最新狀態(tài) Stringdatetime 該件貨物最新狀態(tài)時間 Stringdestination 目的地 Stringservice 服務(wù) String2.3.4 查詢訂單2.3.4.1 請求方法:本查詢支持中文和英文,默認(rèn)為中文:GET http://example.example.ex/service/mctrack/xxxx/xxxxxxxxxxxx英文訪問地址為:GET http://example.example.ex/service/mctrack.en/xxxx/xxxxxxxxxxxx2.3.4.2 應(yīng)答:如果該件貨物為一票多件,返回內(nèi)容為匯總信息,參見2.3.3.2,如欲查詢該票貨物下某一件貨物詳細(xì)信息,需要再次發(fā)送請求,請求方法為:GET http://example.example.ex/service/mctrack/xxxx/xxxxxxxxxxxx/XXXXXXXXXXXX獲得的應(yīng)答內(nèi)容參見2.3.3.1如果該件貨物為一票一件,返回內(nèi)容參見2.3.3.12.4 訪問地址由于不同客戶使用的訪問地址可能不同,具體地址請和銷售部門聯(lián)系,謝謝。3 SERVICE CHECKING3.1 Service Checking 服務(wù)v1.2介紹您可以通過提供一個郵編對(始發(fā)地郵編及目的地郵編)來查詢兩個郵編對之間存在的服務(wù)、遞送時限、電話取件截止時間等信息。3.2 請求格式采用POST 方法請求/ecs/service/3.2.1 請求頭格式:<?xml version="1.0" encoding="utf-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"elementFormDefault="qualified"><xs:element name="RequestDocument" type="RequestDocumentType" /><xs:complexType name="RequestDocumentType"><xs:sequence><xs:element name="head" type="RequestDocumentHeadType"minOccurs="1" maxOccurs="1" /> <!-- head of request --><xs:element name="body" type="xs:anyType" minOccurs="1"maxOccurs="1" /> <!-- content of request --></xs:sequence></xs:complexType><xs:complexType name="RequestDocumentHeadType"><xs:sequence><xs:element name="serialId" minOccurs="0" maxOccurs="1"nillable="true"> <!-- serial id to match with the message request/responsepair --><xs:simpleType><xs:restriction base="xs:string"><xs:patternvalue="[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" /></xs:restriction></xs:simpleType></xs:element><xs:element name="serviceId" type="xs:string" minOccurs="1"maxOccurs="1" /> <!-- service id --><xs:element name="requesterId" type="xs:string" minOccurs="1"maxOccurs="1" /> <!-- requester id --></xs:sequence><xs:attribute name="version" type="xs:string" default="1.0" /> <!-- schema version --></xs:complexType></xs:schema>3.2.2 請求體格式即RequestDocument的body內(nèi)部的格式<?xml version="1.0" encoding="utf-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"targetNamespace="http://cndxp.apac.fedex.com/ecs/remote/schema"xmlns="http://cndxp.apac.fedex.com/ecs/remote/schema"elementFormDefault="qualified"><xs:complexType name="LogisticServicePublicRequestType"><xs:sequence><xs:element name="senderPostalCode" type="xs:string"minOccurs="1" maxOccurs="1" /><xs:element name="recipientPostalCode" type="xs:string"minOccurs="1" maxOccurs="1" /><xs:element name="pickupDate" type="xs:string"minOccurs="1" maxOccurs="1" /></xs:sequence><xs:attribute name="version" type="xs:string" default="1.0" /> <!-- schema version --></xs:complexType></xs:schema>具體參見樣例3.2.3 請求樣例:<?xml version="1.0" encoding="UTF-8" standalone="yes"?><RequestDocument xmlns:sch="http://cndxp.apac.fedex.com/ecs/remote/schema"><head version="1.0"> 請求消息頭版本號,缺省為1.0<serialId>1e690757-87e1-4b0a-84fa-2352f724ddd6</serialId> 消息對編號,uuid格式<serviceId>SERVICE_0002</serviceId> 服務(wù)代碼,必填<requesterId>CUSTOMER_ID</requesterId> 請求方代碼,必填,大小寫敏感</head><body xsi:type="LogisticCodServicePublicRequestType" version="1.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><senderPostalCode>200042</senderPostalCode> 始發(fā)地郵編,必填<recipientPostalCode>100017</recipientPostalCode> 目的地郵編,必填<pickupDate>2013-01-05</pickupDate> 取件日期,必填</body></RequestDocument>3.2.4 字段含義:字段名 含義 類型serialId 消息對編號 UUIDserviceId 服務(wù)代碼 StringrequesterId 請求方代碼 StringsenderPostalCode 始發(fā)地郵編 StringrecipientPostalCode 目的地郵編 StringpickupDate 取件日期 String3.3 應(yīng)答格式共有2 類應(yīng)答格式,正常應(yīng)答格式和異常應(yīng)答格式。3.3.1 應(yīng)答頭格式:<?xml version="1.0" encoding="utf-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"elementFormDefault="qualified"><xs:element name="ResponseDocument" type="ResponseDocumentType" /><xs:complexType name="ResponseDocumentType"><xs:sequence><xs:element name="head" type="ResponseDocumentHeadType"minOccurs="1" maxOccurs="1" /> <!-- head of response --><xs:element name="body" type="xs:anyType" minOccurs="1"maxOccurs="1" nillable="true" /> <!-- content of response --></xs:sequence></xs:complexType><xs:complexType name="ResponseDocumentHeadType"><xs:sequence><xs:element name="serialId" minOccurs="0" maxOccurs="1"nillable="true"> <!-- serial id to match with the message request/responsepair --><xs:simpleType><xs:restriction base="xs:string"><xs:patternvalue="[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" /></xs:restriction></xs:simpleType></xs:element><xs:element name="serviceId" type="xs:string" minOccurs="1"maxOccurs="1" /> <!-- service id --><xs:element name="successFlag" type="xs:boolean"minOccurs="1" maxOccurs="1" /> <!-- "true": success; "false": fail --><xs:element name="errorCode" type="xs:string" minOccurs="0"maxOccurs="1" nillable="true" /> <!-- predefined error code if thesuccessFlag is false --><xs:element name="errorMessage" type="xs:string"minOccurs="0" maxOccurs="1" nillable="true" /> <!-- the detail errormessage of the error code --></xs:sequence><xs:attribute name="version" type="xs:string" default="1.0" /> <!-- schema version --></xs:complexType></xs:schema>3.3.2 應(yīng)答體格式:即ResponseDocument的body 內(nèi)部的格式<?xml version="1.0" encoding="utf-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"targetNamespace="http://cndxp.apac.fedex.com/ecs/remote/schema"xmlns="http://cndxp.apac.fedex.com/ecs/remote/schema"elementFormDefault="qualified"><xs:complexType name="LogisticServicePublicResponseType"><xs:sequence><xs:element name="logisticService" type="LogisticServicePublicType"minOccurs="0" maxOccurs="unbounded" nillable="true" /></xs:sequence><xs:attribute name="version" type="xs:string" default="1.0" /> <!-- schema version --></xs:complexType><xs:complexType name="LogisticServicePublicType"><xs:sequence><xs:element name="serviceCode" type="xs:string" minOccurs="1"maxOccurs="1" /> <!-- FedEx logistic service code --><xs:element name="cutOffTime" type="xs:string" minOccurs="1"maxOccurs="1" /> <!-- latest pickup time --><xs:element name="isCod" type=”xs:int"minOccurs="1" maxOccurs="1" /><xs:element name="transitDays" type=”xs:int"minOccurs="1" maxOccurs="1" /><xs:element name="transitDate" type="xs:string"minOccurs=”1” maxOccurs=”1”/></xs:sequence></xs:complexType></xs:schema>詳見如下樣例3.3.3 正常應(yīng)答樣例:<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ResponseDocument xmlns:sch="http://cndxp.apac.fedex.com/ecs/remote/schema"><head version="1.0"> 響應(yīng)消息頭版本號,缺省為1.0<serialId>1e690757-87e1-4b0a-84fa-2352f724ddd6</serialId> 消息對編號,UUID格式(與所處理的請求消息的消息編號一致)<serviceId>SERVICE_0002</serviceId> 服務(wù)代碼<successFlag>true</successFlag> 服務(wù)是否正常響應(yīng),若為true,則從body 中獲取響應(yīng)內(nèi)容</head><body xsi:type="sch:LogisticServicePublicResponseType" version="1.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">響應(yīng)消息體版本號,缺省為1.0<logisticService><serviceCode>PDS</serviceCode> 服務(wù)代碼<cutOffTime>17:30:00</cutOffTime> 截止取件時間<isCod>1</isCod> 有COD 業(yè)務(wù)<transitDays>1</transitDays> 運(yùn)送天數(shù)<transitDate>2013-01-03 18:00:00</transitDate> 預(yù)計送達(dá)日期時間</logisticService><logisticService><serviceCode>99TS</serviceCode> 服務(wù)代碼<cutOffTime>17:30:00</cutOffTime> 截止取件時間<isCod>1</ isCod> 有COD 業(yè)務(wù)<transitDays>3</transitDays> 運(yùn)送天數(shù)<transitDate>2013-01-05 18:00:00</transitDate> 預(yù)計送達(dá)日期時間</logisticService></body></ResponseDocument>3.3.4 異常應(yīng)答樣例(請求中沒有填寫始發(fā)地郵編):<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ResponseDocument xmlns:sch="http://cndxp.apac.fedex.com/ecs/remote/schema"><head version="1.0"><serviceId>SERVICE_0002</serviceId><successFlag>false</successFlag> 服務(wù)是否正常響應(yīng),若為false,則從errorCode中獲取異常代碼,從errorMessage中獲取異常信息<errorCode>BUS_ERR_000004</errorCode> 異常代碼,BUS前綴為業(yè)務(wù)異常,SYS前綴為系統(tǒng)異常<errorMessage>Not found sender postal code!</errorMessage> 異常消息</head><body xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/></ResponseDocument>3.3.5 異常應(yīng)答樣例(請求中沒有填寫目的地郵編):<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ResponseDocument xmlns:sch="http://cndxp.apac.fedex.com/ecs/remote/schema"><head version="1.0"><serviceId>SERVICE_0002</serviceId><successFlag>false</successFlag><errorCode>BUS_ERR_000005</errorCode><errorMessage>Not found recipient postal code!</errorMessage></head><body xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/></ResponseDocument>3.3.6 字段含義:字段名 含義 類型serialId 消息對編號 UUIDserviceId 服務(wù)代碼 StringsuccessFlag 服務(wù)是否正常響應(yīng)(若為false, 則從errorCode 中獲取異 Boolean常代碼,從errorMessage 中獲取異常信息)serviceCode 服務(wù)代碼 StringcutOffTime 截至取件時間 StringisCod COD 業(yè)務(wù):1=有,0=無 InttransitDays 運(yùn)輸天數(shù) IntTransitDate 預(yù)計派送日期時間YYYY-MM-DD hh24:mi:ss StringerrorCode 異常代碼(BUS 前綴為業(yè)務(wù)異常,SYS 前綴為系統(tǒng)異常) StringerrorMessage 異常消息 String3.4 異常代碼3.4.1 業(yè)務(wù)異常代碼:異常代碼 含義BUS_ERR_000001 NOT_FOUND_REQUEST_SERVICEBUS_ERR_000002 NOT_FOUND_REQUEST_BODYBUS_ERR_000003 MISMATCH_REQUEST_BODY_TYPEBUS_ERR_000004 NOT_FOUND_SENDER_POSTALBUS_ERR_000005 NOT_FOUND_RECIPIENT_POSTALBUS_ERR_000006 RAISED_BY_INERNAL_SERVICE_QUERY_LOGISTIC_SERVICEBUS_ERR_000007 ILLEGAL_INTERNAL_SERVICE_REQUEST_FORMATBUS_ERR_000008 ILLEGAL_INTERNAL_SERVICE_RESPONSE_FORMATBUS_ERR_000009 FAIL_CONVERT_INTERNAL_SERVICE_RESPONSE_TO_XMLBUS_ERR_0000010 NOT_FOUND_PICKUP_DATEBUS_ERR_0000011 NOT_FOUND_SERVICE_SUPPORT_MESSAGEBUS_ERR_0000012 NOT_FOUND_MSG_FROM_POSTAL_SERVICEBUS_ERR_0000013 ERR_FORMAT_PICKUP_DATE3.4.2 系統(tǒng)異常代碼:異常代碼 含義SYS_ERR_0000 CAUSED_BY_SYSTEM_OF_SERVICE_QUERY_LOGISTIC_SERVICE01SYS_ERR_0000 CAUSED_BY_SYSTEM_OF_INERNAL_SERVICE_QUERY_LOGISTIC_S02 ERVICE3.5 服務(wù)地址請和Sales 聯(lián)系。Version Date Description of Change ByV 1.0 March 16, 2009 First Draft Li-xi YaoV 1.1 August16, 2009 Adding tracking by order Li-xi YaoV 1.2 Sep 26, 2009 Example update Xing-Kun TangV 1.3 Sep 22, 2011 Append Service Checking Ian BaoV 1.3.1 Oct 11, 2011 CUSTOMER_ID Ian BaoV 1.3.2 Dec 29, 2011 Change Key Contact & Doc Management Han-Yue LiV 1.3.3 Dec 21, 2012 PDS Han-Yue Li