how does the departure criteria work for waypoint sequence API

73 Views Asked by At

below is the here waypoint sequence api structure i am trying to execute

https://wse.api.here.com/2/findsequence.json?start=kalwa-thane&destination1=goregaon-mumbai&destination2=andheri-mumbai&destination3=kurla-mumbai&destination4=wadala-mumbai&destination5=prabhadevi-mumbai&end=ghodbandar-road-thane&mode=fastest;car;traffic:enabled&departure=2019-12-05T17:30:00+08:00&improveFor=time&app_id={app-id}&app_code={app-code}

however getting below response

{"results":null,"errors":["Bad Format for Date and Time: 2019-12-05T01:30:00. Error ID: f9f62c75-93da-47c8-a244-81be2140ac01"],"processingTimeDesc":null,"responseCode":"400","warnings":null,"requestId":null}

How to get the output with correct response

2

There are 2 best solutions below

0
On

The '+' symbol in the URL needs to be encoded as '%2b' as per https://www.w3schools.com/tags/ref_urlencode.asp

The HERE Developer Support documentation link shows this in action.

0
On

Could you please try the below request format.

https://wse.api.here.com/2/findsequence.json?start=kalwa-thane;19.20484, 73.00359&destination1=goregaon-mumbai;19.16153, 72.85618&destination2=andheri-mumbai;19.10393, 72.86698&destination3=kurla-mumbai;19.0633, 72.88502&destination4=wadala-mumbai;19.01516, 72.86378&destination5=prabhadevi-mumbai;19.01637, 72.82897&end=ghodbandar-road-thane;19.21895, 72.97815&improveFor=time&app_id=APP_ID&app_code=APP_CODE&departure=2019-12-05T16:02:45Z&mode=fastest;car;traffic:enabled

See the documentation for more details.

Hope this helps!