libretrack icon indicating copy to clipboard operation
libretrack copied to clipboard

DHL Support

Open TheLastProject opened this issue 2 years ago • 10 comments

It would be nice if DHL could also be supported.

There is documentation for an API but it seems to require a business account, not sure how that all works: https://dhlparcel.github.io/api-gtw-docs/

TheLastProject avatar Jul 20 '21 22:07 TheLastProject

It seems to be enough to register a developer account https://developer.dhl.com/user/register

proninyaroslav avatar Jul 21 '21 07:07 proninyaroslav

Would be awesome!

oneiricbotcelot avatar Aug 23 '21 12:08 oneiricbotcelot

Well, I think the Terms of Use need to be reviewed, first.

I'm not a lawyer, so not sure if my assessments are correct, but there are parts in the Terms of Use, which indicate that using the API to "replicate" the behaviour and functionality of "existing clients made by DHL" is explicitly forbidden. This could be interpreted as: don't make a dedicated client for showing and editing delivery information, as there is already an official DHL app for it.

Another part explicitly allows DHL to "review" your application. If a "review" is undertaken, it may result in generating "requests to change your app", which basically means, if my unqualified assessment is correct, that DHL can review this app anytime and tell the maintainer of this app to change lots of stuff and he is forced to actually do it, to be compliant with the Terms of Use.

DHL may also reject the API usage altogether, for no specific reason.

The Terms of Use always talk about a single app and how it's going to use the API. I guess, this would all still apply, even if everyone provided his own access token, because it's still the same app, that uses the same API functionality.

Can anyone read the Terms of Use and deliver a qualified review for it?

https://developer.dhl.com/terms-use

theAkito avatar Jul 30 '22 14:07 theAkito

Notably, other delivery apps do implement DHL support without any fuss. If you try to duplicate the functionality of their business solutions, they'll probably object. Simply providing end-user parcel tracking shouldn't be an issue. If it is, they'll revoke your account and DHL support in the app will cease working. But I do not expect that to be an issue.

knghtbrd avatar Nov 18 '22 22:11 knghtbrd

Notably, other delivery apps do implement DHL support without any fuss.

Does not matter the slightest bit. A lot of stuff is simply tolerated, but not 100% uncontroversial. One example of such a scenario is youtube-dl.

That said, you need to provide a company name, when registering a developer account. Not sure, how literally they take this information.

theAkito avatar Nov 18 '22 22:11 theAkito

My point being … what's the worst they can do? Revoke your access, basically. They're granting you access in exchange for you following those terms. Terms which are vaguely not specific. In Western countries, when there's room for interpretation in contract terms, the person who DIDN'T write the contract may use any reasonable interpretation that is favorable to them. Plus if DHL were to sue, they'd have to demonstrate "actual damages". From an app that didn't cost them any money and didn't make any money.

They could still revoke the developer account, of course. That's about all, though.

knghtbrd avatar Nov 19 '22 00:11 knghtbrd

My point being … what's the worst they can do? Revoke your access, basically. They're granting you access in exchange for you following those terms.

That would result in a loss of time, as resources would've been needed to implement something, that may not be used, anyway.

Either way, I'm not opposed to an implementation. My first point is, that it's best to follow the terms of service strictly, because if one starts off by doing something, which may be legally controversial, one is already putting oneself in a bad light. My second point is, that what you are saying is reasonable, but would a lawyer say the same? I don't know.

theAkito avatar Nov 19 '22 00:11 theAkito

https://github.com/T-vK/DHL-Open-Source-Push-Notifications/blob/master/dhl

Here's my implementation. The solution is quite simple: Don't use their official API, just scrape the website, no need to accept any ToS. That's perfectly legal as courts have ruled again and again.

T-vK avatar Feb 21 '23 01:02 T-vK

https://github.com/T-vK/DHL-Open-Source-Push-Notifications/blob/master/dhl

Here's my implementation. The solution is quite simple: Don't use their official API, just scrape the website, no need to accept any ToS. That's perfectly legal as courts have ruled again and again.

Very good point. Is the script complete?

I hope, they don't change their website too often. The last time, I used an inofficial, obfuscated API from a service, I had to adjust it several times within a couple of weeks, because it constantly changed...

theAkito avatar Feb 21 '23 01:02 theAkito

I think I wrote it 3 years ago and I never had to change it. In fact I'm tracking packages with it at this very moment. I would say the script is complete. It does everything I need, but I'm sure there are ways to improve upon it.

T-vK avatar Feb 21 '23 01:02 T-vK