ZeiP / harbour-paketti

SailfishOS application for tracking packages
Other
6 stars 5 forks source link

Add Spring GDS for tracking #42

Open andywuest opened 3 years ago

andywuest commented 3 years ago

Hi,

any chance you can add Spring GFDs (https://www.spring-gds.com/) for the app? I have ordered something from Spain and they seem to send it via https://www.spring-gds.com/ The package can be tracked via a tracking code with the following URL:

https://marketingtradei.aftership.com/api/v2/shipments?tracking_number=&lang=en

The payload of the response looks like:

{"meta":{"code":200,"message":"OK"},"data":{"trackings":[{"id":"_removedbyme____","uuid":"__removedbyme____","checkpoints":[{"slug":"spring-gds","city":null,"created_at":"2021-02-23T18:11:40.649Z","location":null,"country_name":null,"message":"PARCEL CREATED","country_iso3":null,"tag":"InfoReceived","subtag":"InfoReceived_001","checkpoint_time":"2021-02-23T19:08:58","coordinates":[],"state":null,"zip":null}],"destination_courier_name":null,"origin_courier_name":"Spring GDS","language":"de","scheduled_delivery_date":null,"signed_by":null,"slug":"spring-gds","subscribed_messengers":[],"subtag":"InfoReceived_001","tag":"InfoReceived","tracking_number":"___removed_by_me____","courier_tracking_link":"https://www.spring-gds.com/","courier_redirect_link":null,"origin_country_iso3":null,"destination_country_iso3":"DEU","updated_at":"2021-02-23T18:11:40.649Z","shipment_type":"Hermes Home - Sign","delivery_time":0,"shipment_delivery_date":null,"order_promised_delivery_date":null,"pickup_location":null}],"instant_tracked_tracking_ids":[]}}

On The tracking page it is rendered like this:

Screenshot_20210223_203013

andywuest commented 3 years ago

If there are more information - i can post an update - so far the parcel was only created.

ZeiP commented 3 years ago

Thanks for the suggestion! Is the API you mentioned Spring GDS's or the sender's? At first glance it looks like it might be under license from the sender, in which case it's likely that adding it to the application might be against the license, I'm afraid. I couldn't find any tracking codes for Spring GDS to test with, but it seems they've made it quite hard to implement the tracking API they're using on their web page, too.

If the API you provided were provided by Spring or at least using it were allowed it would be quite easy to implement the tracking. Let me know if you have any further information regarding the API and where you found the API address. You can also send specific information to paketti-app@ardcoras.fi instead of posting it here.