2017-10-19 72 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开始。