Skip to main content
Skip table of contents

Public API

getStatusForPublicUser

This procedure returns information about the state of shipment items, as it is available via the public DHL Tracking (DHL Sendungsverfolgung für Jedermann) API / website:

SQL
getStatusForPublicUser(String <i_appname>, String <i_password>,String <i_code>, String <i_codename>, String <i_fromdate>, String  <i_todate>, String <i_zipcode>, String <i_international_shipment>)

Parameters

Name

Description

Required parameters

i_appname

User name

i_password

User password

i_code 

Piece code or piece customer reference. You can provide up to 15 piece codes or piece customer references (separated by a semicolon) per call when providing null as the international shipment and null as the zip code value. Otherwise, only 1 piece code/piece customer reference allowed

i_code-name

'piece-code' or 'piece-customer-reference'

Optional parameters

i_from_date

Starting date. Format: yyyy-MM-dd

i_to_date

Ending date. Format: yyyy-MM-dd

i_zip_code

Receiver zip code (5 digits or more)

i_internation_shipment

TRUE or FALSE

DHL Track and Trace web service checks the number format of the piece-code / piece-customer-reference. If the number format is not valid, searching for this shipment data will be cancelled.

A piece code or piece customer reference can be ambiguous if null is provided for the zip code and/or the international shipment parameters. In this case, no shipment state will be delivered and the request will be cancelled. Ambiguity will be denoted through a respective state-code. The returned state-code has to be interpreted as shown below:

Code

Detailed search

78

For identification of national shipments, at least a zip-code must be provided

79

For identification of national and international shipments, at least a zip-code and the international-shipment must be provided

80

For identification of international national shipments at least the international-shipment and (if existing) a zip-code with not less than 5 digits must be provided

To avoid ambiguity, please provide the zip code and/or the international shipment parameters.

SQL
CALL DHL_TnT.getstatusForPublicUser('john.doe','fxeiu483','23454664553','piece-code','2012-01-01','2012-05-01','','true')

dGetPiece

This procedure returns the current state of one or more shipment items. Compared to getStatusForPublicUser, it delivers more detailed information:

SQL
dGetPiece(String <i_appname>, String <i_password>,String <i_code>, String <i_codename>, String <i_fromdate>, String  <i_todate>)

Parameters

Name

Description

Required parameters

i_appname

User name

i_password

User password

i_code 

Piece code or piece customer reference or an order number of a single pickup from a pickup-station ("tas-order-no"). You can provide up to 20 piece codes or piece customer references (separated by a semicolon) per call

i_code-name

'piece-code' or 'piece-customer-reference' or 'tas-order-no'

Optional parameters

i_from_date

Starting date. Format: yyyy-MM-dd

i_to_date

Ending date. Format: yyyy-MM-dd

DHL Track and Trace web service checks the number format of the piece-code / piece-customer-reference / order number. If the number format is not valid, searching for this shipment data will be cancelled

SQL
CALL DHL_TnT.dGetPiece('john.doe','fxeiu483','23454664553','piece-code','2012-01-01','2012-05-01')

Aside from the state info, this request also delivers a temporary valid piece-id, which is needed for requesting the route (single piece events) of the shipped item via dGetPieceEvent.

dGetPieceEvent

This procedure returns the route - containing single events for a single shipped item:

SQL
dGetPieceEvent(String <i_appname>, String <i_password>,String <i_code>)

Parameters

Name

Description

Required parameters

i_appname

User name

i_password

User password

i_code 

Piece code or piece customer reference or an order number of a single pickup from a pickup-station ("tas-order-no"). You can provide up to 20 piece codes or piece customer references (separated by a semicolon) per call

SQL
CALL DHL_TnT.dGetPieceEvent('john.doe','fxeiu483','487hfs86293u402652ih3',)

dGetPieceDetail

This procedure returns the state of shipped items and events associated with them:

SQL
dGetPieceDetail(String <i_appname>, String <i_password>,String <i_code>, String <i_codename>, String <i_fromdate>, String  <i_todate>)

Parameters

Name

Description

Required parameters

i_appname

User name

i_password

User password

i_code 

Piece code or piece customer reference or an order number of a single pickup from a pickup-station ("tas-order-no"). You can provide up to 20 piece codes or piece customer references (separated by a semicolon) per call

i_code-name

'piece-code' or 'piece-customer-reference' or 'tas-order-no'

Optional parameters

i_from_date

Starting date. Format: yyyy-MM-dd

i_to_date

Ending date. Format: yyyy-MM-dd

The dGetPieceDetail procedure is a combination of requesting the state of shipped items (dGetPiece) and requesting the events associated with a single shipped item (dGetPieceEvent). It provides the opportunity to request all information about a shipped item in one request.

SQL
CALL dGetPiece('john.doe','fxeiu483','23454664553','piece-code','2012-01-01','2012-05-01')
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.