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
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!
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With