0% found this document useful (0 votes)
117 views

Implementing DHL XML Services

This document provides instructions for implementing DHL XML Services, which allows customers to access DHL shipping services via XML requests. It describes the available services, recommended request flows, and how to send/receive XML requests. It also covers using the response to generate PDF shipping labels and includes sample requests and responses.

Uploaded by

wilson ndongo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
117 views

Implementing DHL XML Services

This document provides instructions for implementing DHL XML Services, which allows customers to access DHL shipping services via XML requests. It describes the available services, recommended request flows, and how to send/receive XML requests. It also covers using the response to generate PDF shipping labels and includes sample requests and responses.

Uploaded by

wilson ndongo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Implementing DHL XML Services

Implementing DHL XML Services

Doc. Ref. Implementing DHL XML Services - UK

Document Version 2.4

Status Issued

Created by Customer Integration Management - UK

Date 03-11-2014

Page 1 of 21
Implementing DHL XML Services

Document Control

Revision history:
Version Release Date Comments

1.0 21-06-2010 Draft for comments

1.1 23-06-2010 Updated after feedback received

1.2 24-06-2010 Updated document format

1.3 14-07-2010 Added Countries by Region

1.4 25-08-2010 Updated after feedback received

1.5 22-09-2010 Updated to include enhancements in DHL XML


Services v4.1

1.6 07-02-2011 Updated country list

1.7 31-03-2011 Updated to rebrand product name

1.8 28-11-2011 Updated after feedback received

1.9 13-09-2012 Updated to include information on UK quotes

2.0 08-01-2013 Updated to include new Label functionality and


Global Schema

2.1 11-04-2013 Updated to include some considerations regarding


Capability and Quote services.

2.2 06-01-2014 Updated to include test environment details.

2.3 27-06-2014 Updated Label info and Country Listing

2.4 03-11-2014 Added in additional to assist with development.


Removed Countries by Region. Refer to
Reference_Data file in the root of the toolkit for a full
list

Page 2 of 21
Implementing DHL XML Services

CONTENT

1. INTRODUCTION ........................................................................................................... 4
1.1 DHL XML SERVICES ....................................................................................................... 4
1.2 DHL XML SERVICES TOOLKIT ........................................................................................... 5
2. IMPLEMENTING DHL XML SERVICES .......................................................................... 6
2.1 RECOMMENDED PROCESS FLOWS ...................................................................................... 6
3. SENDING & RECEIVING XML REQUESTS ..................................................................... 7
4. CAPABILITY AND QUOTE SERVICE ............................................................................. 8
4.1 ACCOUNT SPECIFIC RATES: ............................................................................................... 8
4.2 NETWORK TYPE FOR CAPABILITY & QUOTE REQUEST: .............................................................. 8
4.3 SPECIFYING DUTIABLE OR NON-DUTIABLE ............................................................................ 9
4.4 PRODUCT RESTRICTIONS IN CAPABILITY RESPONSE .................................................................. 9
4.5 QUOTE REQUESTS .......................................................................................................... 9
5. SHIPMENT VALIDATION SERVICE ............................................................................. 10
5.1 LICENSE PLATE ENABLED ................................................................................................ 10
5.2 USING THE DUTIES & TAXES PAID SERVICE ......................................................................... 10
5.3 REQUESTING ADDITIONAL INSURANCE............................................................................... 10
5.4 SHIPMENT REFERENCE ................................................................................................... 11
6. BOOK PICKUP ............................................................................................................ 11
6.1 BOOKING PICKUP REQUESTS ........................................................................................... 11
7. RECEIVING LABEL IMAGES IN THE SHIPMENT VALIDATE RESPONSE ..................... 12
7.1 REQUEST .................................................................................................................... 12
7.2 RESPONSE .................................................................................................................. 17
8. USING THE LABEL UTILITY ........................................................................................ 17
9. APPENDIX A – SAMPLE REQUEST INCLUDING LABEL ELEMENT ............................. 18
10. APPENDIX B – SAMPLE RESPONSE INCLUDING LABEL ELEMENTS .......................... 19
11. APPENDIX C – TEST ENVIRONMENT ACCESS ........................................................... 21

Page 3 of 21
Implementing DHL XML Services

1. Introduction

1.1 DHL XML Services

DHL offers an XML based online integration platform that provides Product Availability,
Transit time and Rating, Shipment Booking, Courier Pickup Booking and Tracking services for
DHL Express customers globally from over 140 countries.

DHL XML Services can help DHL customers and vendor partners in the following ways:

 Use own shipping and warehouse management systems to access the complete set of
DHL shipping services
 Provide DHL capabilities from their internal shipping sites, Shopping carts and
Commerce web sites
 No DHL hardware or software deployed on their site
 A standard (XML) and secured (HTTPS and User Authentication) platform to integrate
with DHL and the customer controlling the implementation timelines

Below are list of available services or operations:

 Capability & Quote – Provides list of available product and services for given shipment
criteria along with Booking cut-off, Pickup cut-off and Transit times, Provides total cost
along with breakdown of charges for requested product and certain service
combinations
 Shipment Validation -Validates shipment data and return Waybill, License Plate and
data for label printing
 PDF Label Image utility* – Generates DHL compliant label image using the XML
response from Shipment Validation
 Pickup Request – Can request a courier collection from fixed and ad-hoc addresses
 Pickup Cancellation – Cancel Pickup Requests made via the Pickup Request service.
 Tracking - Obtain shipment details and event visibility filtered by Waybill, License Plate,
or Reference Number and Account Number
 Routing - Validates the origin and destination city and postcodes.
(Note: that these validations are now better performed in Capability Service and hence
we recommend users to stop using Routing Service and instead use Capability Service)

Page 4 of 21
Implementing DHL XML Services

1.2 DHL XML Services Toolkit


This toolkit is provided to DHL clients to help them understand and implement integration with
DHL XML Services solution and can be downloaded using the following link.

http://xmlpitest-ea.dhl.com/toolkit/Toolkit.zip

It contains a detailed description for the format of the Request and Response XML messages for
each service. Sample request and response XML messages that help understand the structure of
the request and response messages are also included.

These messages also help to understand the conditions/data values that might result in an error
response from DHL XML Services server.

The toolkit contains a sample Jasper report that assists in the transformation of a Shipment
Validation Response XML message into the Global Label and Archive Label in A4 -PDF format.

Also included, are two Java tools, detailed below.

1. DHLClient: To send an XML request message to the DHL XML Services application. This
can be directly integrated with the client application or it can be used to understand the
method to establish a connection with DHL XML Services.

2. generateAWB: This is used to transform the Shipment Validate XML Response into the
Global Label and Archive Label in an A4 -PDF format.

3. generateLabel: This is the label utility that allows the user to generate Global Label or
Archive Label or both labels in the required supported GLSv3 format with the Shipment
Validation XML response.

Historically, DHL XML Services was available in three Regions with the XML Request messages
slightly customized for each Region, despite all three Regions being supported by a central
application and accessible by the same web server address.

However, there is now an additional Global Schema which is recommended for use, as the
same request can be used across all three regions below.
 AP-EM Region -Supports countries in Asia, Africa, Australia and Pacific.
 EU Region -Supports countries in Europe.
 AM Region -Supports USA and other countries in North and South Americas.
If the regional requests are used, it is important that the appropriate Regional XSD and
documentation is used based on the country of origin.

A Toolkit PDF document (Toolkit_v4x.pdf) is included in the Zip file download and explains
how to configure the above Java tools as well as detailing how the toolkit is structured once
fully extracted

Page 5 of 21
Implementing DHL XML Services

2. Implementing DHL XML Services

Here is the process of implementing XML integration with DHL


 Download the DHL provided toolkit (http://xmlpitest-ea.dhl.com/toolkit/Toolkit.zip).
 Test Environment Access: Please refer to ‘Appendix C – Test Environment Access’.
 Development: Complete development and XML integration work
 Certification: Contact the CIM Representative to request certification by providing Label
image and Request and Response XML messages as recommended in Test Plan in the
toolkit. Once validated the system is certified as production-ready.
 Go-Live: After passing certification you will receive access to production environment
and then can start using DHL XML Services
 Production Support: Contact DHL Technical Support team for production support via
Telephone : 0844 248 0521 (for all urgent issues) or
Email : ecomuk@dhl.com (for non urgent issues)

2.1 Recommended Process flows

2.1.1 Automated Shipping Process using DHL XML Services

Page 6 of 21
Implementing DHL XML Services

3. Sending & Receiving XML Requests


The request and response phase of a DHL XML Services interaction involves two simple steps -
passing the xml request message to the server URL, and then reading the response.

The provided DHLClient.class (with DHLClient.cmd) can execute this process on behalf of the
calling program, using input parameters to identify the location of the XML request message,
the server URL and the path that the response message should be placed in.

It is suggested that any error responses be dealt with by the customer's application as they
occur, and that the response message folder be kept "clean". Having a large number of error
responses in this directory can slow down the label generation process (see below).

Alternatively some customers choose to implement this simple protocol natively in their server-
side scripting language (e.g. php), rather than using the supplied java code.

There are many ways to implement XML requests and responses with PHP. Any method you
prefer can be used which can handle communications with an XML server.
For example PEAR has many pre built scripts to handle such requests. CURL can also be used to
perform these tasks. Or just use the built in PHP functions that are part of the native language.

Page 7 of 21
Implementing DHL XML Services

4. Capability and Quote Service

Capability (and Quote) service is an essential part of the shipment creation process.

The Capability and Quote service provides a list of available products and services for the given
shipment criteria along with Booking cut-off, Pickup cut-off and Transit times.

It provides the total cost along with a breakdown of charges for required product and certain
service combinations.

It can be a useful way of verifying the address is suitable for the DHL network to assist with
routing and delivery.

Therefore you could use it during address capture routines to validate an address.

Using the Capability and Quote response you can offer the user valid products to use for the
shipment.

The response also includes all the relevant codes to use in the shipment validation request when
creating the label.

Also if you wish to use timed products you must use the capability and quote service to verify
timed products are available to the destination as they are only valid to certain postcode areas.

4.1 Account specific rates:


In order to acquire rates that relate to your agreed tariff with DHL, you must specify your DHL
shipping account number using the PaymentAccountNumber element in the capability and
quote request.

4.2 Network Type for capability & quote request:


There is an element in the BkgDetails segment called NetworkTypeCode.

Valid values are:


 TD for air products.
 DD for road products.
 AL for both air and road products.

Example:

<NetworkTypeCode>AL</NetworkTypeCode>

If this element is not included in the request, the response defaults to TD products only.

Page 8 of 21
Implementing DHL XML Services

4.3 Specifying Dutiable or Non-Dutiable


Included in the request, there is an element in the BkgDetails segment called IsDutiable.

Valid values are:


 N for Non-Dutiable shipments
 Y for Dutiable shipments
Example:

<IsDutiable>N</IsDutiable>

Shipments within the EU or Domestic (GB to GB) should always use N.

Shipments outside the EU should specify Y if the contents are dutiable and require customs
clearance or N if the contents are documents only and do not require customs clearance.

The products returned in the capability response are determined based on this value.

4.4 Product restrictions in Capability response


To check available products returned in the response, you need to reference the
<POfferedCustAgreement> element to check if it is valid to use.

N indicates that it is a standard product and can be used.

If Y is returned it means the product can only be used if there is a pre-arranged agreement in
place with DHL. e.g. ‘Medical Express’ or ‘Express Easy’

Therefore, you must only use products that have a value of N for POfferedCustAgreement
unless otherwise agreed with your DHL Account Manager.

The same concept applies to Special Services with the SOfferedCustAgreement flag.

4.5 Quote Requests


Quotes are unavailable when using Import Express account numbers, or Day Definite (European
Road) products.

Page 9 of 21
Implementing DHL XML Services

5. Shipment Validation Service

The Shipment Validation service is used to prepare the shipment. This service creates a Waybill
number and license plate for each piece in shipment on successful completion of the shipment
validation request. This waybill number and license plate number are sent back to the client that
can be used by client for tracking the shipment.

It also has a label request service to obtain pre-rendered label images in various formats. (For
more information on this, service, please see Section 7 ‘Receiving label images in the
Shipment Validate Response’)

The shipment data is also automatically manifested to operations.

The Global Schema should always be used.

5.1 License Plate enabled


All DHL Shipments must all now include Piece Identifiers (License Plate) as well as the Shipment
Identifier (WayBill number), therefore any ShipmentValidate request messages that are
submitted must include <PiecesEnabled> set to "Y".

This will ensure that individual License Plate identifiers are returned for each piece in the
shipment.

5.2 Using the Duties & Taxes Paid service


Where applicable, to ensure that any Duties & Taxes incurred when shipping a declarable
product are paid by the shipper, additional information is required in the request message for
DTP shipments.
 <DutyPaymentType> set to ‘S’
 <DutyAccountNumber> element included with the relevant account number to be billed
 <TermsOfTrade> set to ‘DDP’
 <SpecialServiceType> set to ‘DD’

5.3 Requesting Additional Insurance


To include insurance on a shipment, the following section should be included after the Shipper
section:

<SpecialService>
<SpecialServiceType>II</SpecialServiceType>
<ChargeValue>2000.00</ChargeValue>
<CurrencyCode>GBP</CurrencyCode>
</SpecialService>

The <ChargeValue> and <CurrencyCode> should reflect the declared value of the shipment. If
the shipment is dutiable, then these values should match the <DeclaredValue> and
<CurrencyCode> values in the dutiable section of the message, otherwise this will return a
validation error.

Also, <InsuredAmount> should be included after the <Contents> element in the request.

Page 10 of 21
Implementing DHL XML Services

5.4 Shipment Reference


The ReferenceID element must be included in the request. This is your own personal reference
for the shipment, such as an order or job number. This reference is linked to the DHL tracking
numbers all through the network and is included in the billing invoice. It can also be tracked on
the network and is useful for cross referencing the DHL tracking numbers.
e.g.

<Reference>

<ReferenceID>ABC-12345</ReferenceID>

</Reference>

6. Book Pickup

6.1 Booking Pickup Requests


If the Pickup Request service is to be used, only one pickup request per shipping address, per
day is required.

Page 11 of 21
Implementing DHL XML Services

7. Receiving label images in the Shipment Validate Response

Customers are now able to request to receive a Base64 encoded label to be returned in the
Shipment Validate Response message

7.1 Request
Include the following in the request XML document.

7.1.1 LabelImageFormat

 <LabelImageFormat> determines the image format included in Shipment Validate


Response message.
Possible formats for the returned label are PDF, ZPL2, EPL2, LP2

Element located in /req: ShipmentValidateRequestEA/LabelImageFormat.

Example:
<LabelImageFormat>PDF</LabelImageFormat>

<LabelImageFormat> Element

<xsd:element name="LabelImageFormat" type="dhl:LabelImageFormat" minOccurs="0"/>


<xsd:simpleType name="LabelImageFormat">
<xsd:annotation>
<xsd:documentation>LabelImageFormat</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:minLength value="3" />
<xsd:maxLength value="4" />
<xsd:enumeration value="EPL2" />
<xsd:enumeration value="LP2" />
<xsd:enumeration value="PDF" />
<xsd:enumeration value="ZPL2" />
</xsd:restriction>
</xsd:simpleType>

7.1.2 RequestArchiveDoc

 <RequestArchiveDoc> indicates whether to receive a generated Archive document


image in the Shipment Validate response message. This should be set to ‘Y’ for all
shipments, unless the shipment is being sent as ‘Paperless Trade’. If the element is not
included, an Archive document image will be returned as default.

Element located in /req: ShipmentValidateRequestEA/RequestArchiveDoc.

Example:
<RequestArchiveDoc>Y</RequestArchiveDoc>

<RequestArchiveDoc> Element

<xsd:element name="RequestArchiveDoc" type="dhl:YesNo" minOccurs="0"/>

Page 12 of 21
Implementing DHL XML Services

7.1.3 CustData

The <CustData> element is used to print additional ‘Customer Specific’ information on the labels. This additional text can
only be printed on the 8x4 format label using the following templates:

8X4_CI_PDF
8X4_CI_thermal

Element located in /req: ShipmentValidateRequestEA/ShipmentDetails/CustData

Example:
<CustData> Customer information to be printed on the label</CustData>

<Resolution> element

<xsd:simpleType name="CustData">
<xsd:annotation>
<xsd:documentation>CustData</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1" />
<xsd:maxLength value="100" />
</xsd:restriction>
</xsd:simpleType>

7.1.4 Label

 <Label> defines the required label template, customer’s logo image plus image format,
and DPI resolution.

It is made up of the following elements


 <LabelTemplate>
 <Logo>
 <CustomerLogo>
 <Resolution>

Element located in /req: ShipmentValidateRequestEA/Label

<xsd:element name="Label" type="dhl:Label" minOccurs="0"/>


<xsd:complexType name="Label">
<xsd:annotation>
<xsd:documentation>Label</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="LabelTemplate" type="LabelTemplate" minOccurs="0"/>
<xsd:element name="Logo" type="YesNo" minOccurs="0"/>
<xsd:element name="CustomerLogo" type="CustomerLogo" minOccurs="0"/>
<xsd:element name="Resolution" type="Resolution" minOccurs="0" />
</xsd:sequence>
</xsd:complexType>

Page 13 of 21
Implementing DHL XML Services

7.1.4.1 LabelTemplate

 <LabelTemplate> indicates the format of the shipping label.

Element located in /req: ShipmentValidateRequestEA/Label/LabelTemplate.

Example:
<LabelTemplate>8X4_A4_PDF</LabelTemplate>

<LabelTemplate> Element
<xsd:simpleType name="LabelTemplate">
<xsd:annotation>
<xsd:documentation>LabelTemplate</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="8X4_A4_PDF" />
<xsd:enumeration value="8X4_thermal" />
<xsd:enumeration value="8X4_A4_TC_PDF" />
<xsd:enumeration value="8X4_CI_PDF" />
<xsd:enumeration value="8X4_CI_thermal" />
<xsd:enumeration value="6X4_A4_PDF" />
<xsd:enumeration value="6X4_thermal" />
</xsd:restriction>
</xsd:simpleType>

If an incorrect Label Image Format type and label template combination is used in
Shipment Validate Request, then the below defaults will be used

a) Label Image Format of “PDF”, default label template is ‘8X4_A4_PDF’ format.


b) Label Image Format of “ZPL2” or “EPL2”, default label template is ‘8X4_thermal’.

The valid combinations are as follows:

LabelImageFormat
PDF EPL2 ZPL2
8X4_A4_PDF 8X4_CI_thermal 8X4_CI_thermal
8X4_A4_TC_PDF 8X4_thermal 8X4_thermal
LabelTemplate
8X4_CI_PDF 6X4_thermal
6X4_A4_PDF

7.1.4.2 Logo

<Logo> determines DHL logo to be printed in thermal label printout. This can be set to
‘N’ only if printing on labels with the DHL logo pre-printed already.

Element located in /req: ShipmentValidateRequestEA/Label/Logo.

Example:
<Logo>Y</Logo>

<Logo> Element
<xsd:element name="Logo" type="YesNo" minOccurs="0"/>

Page 14 of 21
Implementing DHL XML Services

7.1.4.3 CustomerLogo

<CustomerLogo> consists of shipper company logo image in base64 and its image size
format to be printed in Transport label.

Element located in /req: ShipmentValidateRequestEA/Label/CustomerLogo.

<xsd:complexType name="CustomerLogo">
<xsd:annotation>
<xsd:documentation>CustomerLogo</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="LogoImage" type="LogoImage" />
<xsd:element name="LogoImageFormat" type="LogoImageFormat" />
</xsd:sequence>
</xsd:complexType>

LogoImage

<LogoImage> can be used to include shipper company logo image on the returned
label. This should be included as a Base64 encoded string.

Element located in /req:


ShipmentValidateRequestEA/Label/CustomerLogo/LogoImage

Example:
<LogoImage>R0lGODlhAAQAA8QAANLlnLzXa+nyzvr886vNR…..</LogoImage>

<LogoImage> Element

<xsd:simpleType name="LogoImage">
<xsd:annotation>
<xsd:documentation>LogoImage</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:base64Binary">
<xsd:maxLength value="1048576" />
</xsd:restriction>
</xsd:simpleType>

Page 15 of 21
Implementing DHL XML Services

LogoImageFormat

<LogoImageFormat> is to determine the customer’s logo image format.

Element located in /req:


ShipmentValidateRequestEA/Label/CustomerLogo/LogoImageFormat

Example:
<LogoImageFormat>GIF</LogoImageFormat>

<LogoImageFormat> element

<xsd:simpleType name="LogoImageFormat">
<xsd:annotation>
<xsd:documentation>LogoImage Format</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="PNG" />
<xsd:enumeration value="GIF" />
<xsd:enumeration value="JPEG" />
<xsd:enumeration value="JPG" />
</xsd:restriction>
</xsd:simpleType>

7.1.4.4 Resolution

<Resolution> indicates the DPI resolution required for label output on selected printer

Element located in /req: ShipmentValidateRequestEA/Label/Resolution

Example:
<Resolution>200</Resolution>

<Resolution> element

<xsd:simpleType name="Resolution">
<xsd:annotation>
<xsd:documentation>Resolution</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:positiveInteger">
<xsd:minInclusive value="200" />
<xsd:maxInclusive value="300" />
</xsd:restriction>
</xsd:simpleType>

See ‘Appendix A – Sample Request including Label element’ to clarify the location of the
elements in the request.

Page 16 of 21
Implementing DHL XML Services

7.2 Response
The Shipment Validation Response returned will include the following additional elements:

 <OutputFormat> which states the image type returned, corresponding to the content of
<LabelImageFormat> in the corresponding Shipment Validation Request

 <OutputImage> containing the image in base64.

<OutputFormat> Element
<xsd:simpleType name="OutputFormat">
<xsd:annotation>
<xsd:documentation>OutputFormat</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="EPL2" />
<xsd:enumeration value="LP2" />
<xsd:enumeration value="PDF" />
<xsd:enumeration value="ZPL2" />
</xsd:restriction>
</xsd:simpleType>

<OutputImage> Element
<xsd:simpleType name="OutputImage">
<xsd:annotation>
<xsd:documentation>OutputImage</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:base64Binary" />
</xsd:simpleType>

See ‘Appendix B – Sample Response including Label elements’ to clarify the location of the
elements in the request.

8. Using the Label Utility

Customers also have the option of using the Label utility which is included as part of the XML PI
Tool kit, to generate labels from the Shipment Validation Response.
Please refer to ‘Section 3.2 - Generate Global Label and Archive Label Images’ of the
‘ToolKit.pdf’ within the XML toolkit.

Page 17 of 21
Implementing DHL XML Services

9. Appendix A – Sample Request including Label element


<?xml version="1.0" encoding="UTF-8"?>
<req:ShipmentValidateRequestEA xmlns:req="http://www.dhl.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.dhl.com
ship-val-req_EA.xsd">
<Request>
<ServiceHeader>
<MessageTime>2002-08-20T11:28:56.000-08:00</MessageTime>
<MessageReference>1234567890123456789012345678901</MessageReference>
<SiteID>xxxxxxx</SiteID>
<Password>xxxxxxxpwd</Password>
</ServiceHeader>
</Request>
<LanguageCode>en</LanguageCode>
<PiecesEnabled>Y</PiecesEnabled>
<Billing>
<ShipperAccountNumber>xxxxxxxxx</ShipperAccountNumber>
<ShippingPaymentType>S</ShippingPaymentType>
</Billing>
<Consignee>
<CompanyName> Life Centre</CompanyName>
<AddressLine>Changi Business Park</AddressLine>
<City>Beijing</City>
<PostalCode>100085</PostalCode>
<CountryCode>CN</CountryCode>
<CountryName>China</CountryName>
<Contact>
<PersonName>raobeert bere</PersonName>
<PhoneNumber>11234-325423</PhoneNumber>
</Contact>
</Consignee>
<Reference>
<ReferenceID>SHIPMENT REFERENCE </ReferenceID>
</Reference>
<ShipmentDetails>
<NumberOfPieces>1</NumberOfPieces>
<CurrencyCode>GBP</CurrencyCode>
<Pieces>
<Piece>
<PackageType>EE</PackageType>
<Weight>20</Weight>
<Depth>200</Depth>
<Width>210</Width>
<Height>220</Height>
</Piece>
</Pieces>
<PackageType>EE</PackageType>
<Weight>55</Weight>
<DimensionUnit>C</DimensionUnit>
<WeightUnit>K</WeightUnit>
<GlobalProductCode>D</GlobalProductCode>
<LocalProductCode>D</LocalProductCode>
<DoorTo>DD</DoorTo>
<Date>2012-11-19</Date>
<Contents>For testing purpose only. Please do not ship</Contents>
<IsDutiable>Y</IsDutiable>
<CustData>Customer information to be printed on the label</CustData>
</ShipmentDetails>
<Shipper>
<ShipperID>TCN</ShipperID>
<CompanyName>Test Company Name</CompanyName>
<AddressLine>Test Addr1</AddressLine>
<City>London</City>
<PostalCode>TW4 6JS</PostalCode>

Page 18 of 21
Implementing DHL XML Services

<CountryCode>GB</CountryCode>
<CountryName>United Kingdom</CountryName>
<Contact>
<PersonName>enquiry sing</PersonName>
<PhoneNumber>11234-325423</PhoneNumber>
</Contact>
</Shipper>
<LabelImageFormat>PDF</LabelImageFormat>
<RequestArchiveDoc>Y</RequestArchiveDoc>
<Label>
<LabelTemplate>8X4_thermal</LabelTemplate>
<Logo>Y</Logo>
<CustomerLogo>
<LogoImage>Base64:string</LogoImage>
<LogoImageFormat>GIF</LogoImageFormat>
</CustomerLogo>
<Resolution>200</Resolution>
</Label>
</req:ShipmentValidateRequestEA>

10. Appendix B – Sample Response including Label elements


<?xml version="1.0" encoding="UTF-8"?>
<res:ShipmentValidateResponse xmlns:res='http://www.dhl.com' xmlns:xsi='http://www.w3.org/2001/XMLSchema-
instance' xsi:schemaLocation= 'http://www.dhl.com ship-val-res.xsd'>
<Response>
<ServiceHeader>
<MessageTime>2012-11-19T17:08:51+01:00</MessageTime>
<MessageReference>1234567890123456789012345678901</MessageReference>
<SiteID>wakefield</SiteID>
</ServiceHeader>
</Response>
<Note>
<ActionNote>Success</ActionNote>
</Note>
<AirwayBillNumber>4143109180</AirwayBillNumber>
<BillingCode>DSA</BillingCode>
<CurrencyCode>GBP</CurrencyCode>
<CourierMessage>For testing purpose only. Please do not ship</CourierMessage>
<DestinationServiceArea>
<ServiceAreaCode>PEK</ServiceAreaCode>
<FacilityCode>WOC</FacilityCode>
<InboundSortCode>.</InboundSortCode>
</DestinationServiceArea>
<OriginServiceArea>
<ServiceAreaCode>LHR</ServiceAreaCode>
<OutboundSortCode>.</OutboundSortCode>
</OriginServiceArea>
<Rated>N</Rated>
<WeightUnit>K</WeightUnit>
<ChargeableWeight>55</ChargeableWeight>
<DimensionalWeight>1848.0</DimensionalWeight>
<CountryCode>GB</CountryCode>
<Barcodes>
<AWBBarCode> Base 64 Encoded String </AWBBarCode>
<OriginDestnBarcode> Base 64 Encoded String </OriginDestnBarcode>
<DHLRoutingBarCode> Base 64 Encoded String </DHLRoutingBarCode>
</Barcodes>
<Piece>1</Piece>
<Contents>For testing purpose only. Please do not ship</Contents>
<Reference>
<ReferenceID>SHIPMENT REFERENCE </ReferenceID>
</Reference>
<Consignee>
<CompanyName> Life Centre</CompanyName>
<AddressLine>Changi Business Park</AddressLine>

Page 19 of 21
Implementing DHL XML Services

<City>Beijing</City>
<PostalCode>100085</PostalCode>
<CountryCode>CN</CountryCode>
<CountryName>China</CountryName>
<Contact>
<PersonName>raobeert bere</PersonName>
<PhoneNumber>11234-325423</PhoneNumber>
</Contact>
</Consignee>
<Shipper>
<ShipperID>TCN</ShipperID>
<CompanyName>Test Company Name</CompanyName>
<AddressLine>Test Addr1</AddressLine>
<City>London</City>
<PostalCode>TW4 6JS</PostalCode>
<CountryCode>GB</CountryCode>
<CountryName>United Kingdom</CountryName>
<Contact>
<PersonName>enquiry sing</PersonName>
<PhoneNumber>11234-325423</PhoneNumber>
</Contact>
</Shipper>
<CustomerID>131297</CustomerID>
<ShipmentDate>2012-11-19</ShipmentDate>
<GlobalProductCode>D</GlobalProductCode>
<CustData>Customer information to be printed on the label</CustData>
<Billing>
<ShipperAccountNumber>130000279</ShipperAccountNumber>
<ShippingPaymentType>S</ShippingPaymentType>
<DutyPaymentType>R</DutyPaymentType>
</Billing>
<DHLRoutingCode>CN100085+42000000</DHLRoutingCode>
<DHLRoutingDataId>2L</DHLRoutingDataId>
<ProductContentCode>DOX</ProductContentCode>
<ProductShortName>EXPRESS WORLDWIDE</ProductShortName>
<DeliveryDateCode/>
<DeliveryTimeCode/>
<Pieces>
<Piece>
<PieceNumber>1</PieceNumber>
<Depth>200</Depth>
<Width>210</Width>
<Height>220</Height>
<Weight>20</Weight>
<PackageType>EE</PackageType>
<DimWeight>1848.000000</DimWeight>
<DataIdentifier>J</DataIdentifier>
<LicensePlate>JD011000000000534745</LicensePlate>
<LicensePlateBarCode> Base 64 Encoded String </LicensePlateBarCode>
</Piece>
</Pieces>
<LabelImage>
<OutputFormat>PDF</OutputFormat>
<OutputImage> Base 64 Encoded String </OutputImage>
</LabelImage>
</res:ShipmentValidateResponse>

Page 20 of 21
Implementing DHL XML Services

11. Appendix C – Test Environment Access

For development and testing, please use the following details, SiteID and Password are case
sensitive:

URL: https://xmlpitest-ea.dhl.com/XMLShippingServlet

SiteID: CIMGBTest

Password: DLUntOcJma

Your own DHL shipping account can be used in the test environment.

If you don’t have access to a DHL shipping account yet then please ask your DHL CIM
representative for advice.

There is an XML PI test harness available to assist when sending messages to the test server and
for additional sample code, which can be found using the following link:

http://xmlpitest-ea.dhl.com/serviceval/jsps/main/Main_menu.jsp

Page 21 of 21

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy