user3863269
user3863269

Reputation: 31

DHL API Integration

In my website I want to implement a rate calculator of DHL.

I want to add 3 fields:

  1. Origin
  2. Destination and
  3. Weight

These 3 values will be sent to DHL server and in return I want to have the RATE.

How can I do that ?

Upvotes: 3

Views: 7849

Answers (2)

I.Porta
I.Porta

Reputation: 31

To do this u have to request DHL Integration Solutions Toolkit/Developer Guides on DHL XML Service. Link: DHL XML Services They will provide you the SiteID and the Password which are required to make a cURL.

Example:

<?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 xmlns="">
        <Request>
            <ServiceHeader>
                <SiteID>XXXXXXXX</SiteID>
                <Password>XXXXXXXX</Password>
            </ServiceHeader>
        </Request>
        <From>
            <CountryCode>IT</CountryCode>
            <Postalcode>90131</Postalcode>
            <City>Palermo</City>
        </From>
        <BkgDetails>
            <PaymentCountryCode>IT</PaymentCountryCode>
            <Date>2014-10-01</Date>
            <ReadyTime>PT12H00M</ReadyTime>
            <DimensionUnit>CM</DimensionUnit>
            <WeightUnit>KG</WeightUnit>
            <Pieces xmlns="">
                <Piece xmlns="">
                    <PieceID>1</PieceID>
                    <Height>10</Height>
                    <Depth>10</Depth>
                    <Width>10</Width>
                    <Weight>8</Weight>
                </Piece>
            </Pieces>
            <PaymentAccountNumber>NNNNNNNNN</PaymentAccountNumber>
            <IsDutiable>N</IsDutiable>
        </BkgDetails>
        <To>
            <CountryCode>FR</CountryCode>
            <Postalcode>75001</Postalcode>
            <City>Paris</City>
        </To>
        <Dutiable>
            <DeclaredCurrency>EUR</DeclaredCurrency>
            <DeclaredValue>241.97</DeclaredValue>
        </Dutiable>
    </GetQuote>
</p:DCTRequest>

Upvotes: 3

Mehmet Salih Yildirim
Mehmet Salih Yildirim

Reputation: 101

You can request SDK from this address, afterwards you will need to develop your application using XML services and then they will check integration process. If they find any flaws, they will let you know about it and they will ask you fix. If everything goes well, you will be certified to use their API.

http://www.dhl.com/en/express/resource_center/integrated_shipping_solutions.html#services

Upvotes: 0

Related Questions