Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DHL Tracking Api and PHP

Tags:

php

tracking

I'm currently working on a project, where i have to get the status of a packet (sent with DHL). I read about the DHL API, which return an XML, but somehow there are no good examples out there. I have found some code snippets, but i have no clue where to register for API Key's.

Have anyone some links or examples for me?

Best regards, Lukas

like image 255
Lukas Avatar asked Feb 15 '13 20:02

Lukas


People also ask

Is DHL API free?

Use AfterShip for easy integration with DHL Express tracking API to get automated delivery updates. AfterShip APIs are the best multi-carrier tracking APIs designed for eCommerce developers. It's 100% free!

How do I get DHL API?

These unique values can be generated under the user account on the My DHL-Parcel Application page. By selecting 'Settings' in the user dropdown menu and clicking the button 'CREATE API KEY' in the tab 'API KEYS', the user-id and key are generated. Hold on to this information, since it will only be given out once.

What is API DHL Global Mail?

The Shipment Tracking API provides up-to-the-minute shipment status reports. Users of this API can: Retrieve tracking information for shipments. Identify the Deutsche Post DHL (DPDHL) service provider involved with the shipment.

How do I track a DHL tracking number?

To track a parcel, start your message with 'Track' and then enter your 10 digit tracking number. Call 0844 248 0844* and say "track a parcel" using our speech recognition telephone system. This service is available 24 hours a day, 7 days a week.


2 Answers

There is also this PHP client that can be used to consume the DHL XML API. It can handle all the different services exposed by DHL.

https://github.com/alfallouji/DHL-API

This client does not rely or depend on any framework and it should be fairly easy to integrate with your own code. You can check the samples folder for example on how to use it.

like image 54
Bashar Avatar answered Sep 30 '22 11:09

Bashar


https://github.com/jklz/DHL-API-Tracking-PHP

It is used to connect into DHL using the XML-PI to track shipments using the Air Way Bill. it can handle a single tracking number or as many as you feed into it (has been tested with 250 and other then taking a little time to run had no problems). automatically takes and breaks the array of tracking numbers into chunks and then sends the request to DHL making sure not to pass the max number that can be tracked per request then returns the results as a array.

like image 25
Garry Avatar answered Sep 30 '22 13:09

Garry