2017-10-19 73 views
2

我想要收取運費。 這裏是我的要求:DHL運輸費

<?xml version="1.0" encoding="utf-8"?> 
<p:DCTRequest xmlns:p="http://www.dhl.com" xmlns:p1="http://www.dhl.com/datatypes" xmlns:p2="http://www.dhl.com/DCTRequestdatatypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.dhl.com DCT-req.xsd "> 
    <GetQuote> 
    <Request> 
     <ServiceHeader> 
     <MessageTime>2017-10-20T11:28:56.000-08:00</MessageTime> 
     <MessageReference>pukka301934229934707056790226292</MessageReference> 
     <SiteID>******</SiteID> 
     <Password>******</Password> 
     </ServiceHeader> 
    </Request> 
    <From> 
     <CountryCode>DE</CountryCode> 
     <Postalcode>10717</Postalcode> 
     <City>BERLIN</City> 
    </From> 
    <BkgDetails> 
     <PaymentCountryCode>DE</PaymentCountryCode> 
     <Date>2017-10-19</Date> 
     <ReadyTime>PT9H</ReadyTime> 
     <DimensionUnit>CM</DimensionUnit> 
     <WeightUnit>KG</WeightUnit> 
     <Pieces> 
     <Piece> 
      <PieceID>1</PieceID> 
      <Height>30</Height> 
      <Depth>30</Depth> 
      <Width>30</Width> 
      <Weight>250</Weight> 
     </Piece> 
     </Pieces> 
     <IsDutiable>Y</IsDutiable> 
    </BkgDetails> 
    <To> 
     <CountryCode>US</CountryCode> 
     <Postalcode>60603</Postalcode> 
     <City>CHICAGO</City> 
    </To> 
    <Dutiable> 
     <DeclaredCurrency>EUR</DeclaredCurrency> 
     <DeclaredValue>90</DeclaredValue> 
    </Dutiable> 
    </GetQuote> 
</p:DCTRequest> 

我收到錯誤:

The requested Global Product Code and Local Product Code is not available based on origin country DE postal location and destination country US postal location for payment country DE. 
Please make sure data entered is valid before proceeding or contact our customer service. 

但是當我改變

<DimensionUnit>CM</DimensionUnit> 
    <WeightUnit>KG</WeightUnit> 

<DimensionUnit>IN</DimensionUnit> 
    <WeightUnit>LB</WeightUnit> 

我得到的航運量。但我需要發送CM和KG的價值。請幫我弄清楚錯誤。

+0

您可以輕鬆地將CM乘以2.54,即KG-LB * 2.21。知道這不是理想的,但應該仍然是同一個包裹。 –

+0

@NigelRen你有沒有在dhl api上工作過,或者至少知道一些關於標籤的知識? –

+0

不,但我知道在美國他們傾向於使用英制單位(英寸和磅)而不是公制。 –

回答

2

其中一個原因可能是您超過了最大重量限制或CM和KG單位的值不正確。

爲重量添加一個較低的值,從10 KG開始。