Getting issue with heremap multiple pickup and multiple drop api

66 views Asked by At

I am using multiple pickup api with prams as suggested by heremap docs:

https://fleet.ls.hereapi.com/2/findpickups.json?mode=fastest;truck;traffic:disabled&start=waypoint0;50.115620,8.631210;pickup:GRAPEFRUIS,value:1000&departure=2020-11-14T07:30:00&driverCost=20&restTimes=disabled&end=waypoint7;50.132540,8.649280;drop:GRAPEFRUITS,value:1000&destination0=waypoint1;50.118578,8.636551;drop:APPLES,value:30&destination1=waypoint2;50.122540,8.631070;pickup:BANANAS&destination2=waypoint3;50.128920,8.629830;drop:BANANAS,value:30&destination3=waypoint4;50.118654,8.619956;pickup:APPLES&destination4=waypoint5;50.123998,8.640626;drop:PEACHES,value:50&destination5=waypoint6;50.130299,8.613031;pickup:PEACHES&apiKey={key}

drop for GRAPEFRUIT is defined but getting error message: No drop-off point defined for payload GRAPEFRUIS,value:1000

1

There are 1 answers

4
Anatolii Suhanov On

There are several issues with your url:

  1. There is a typo (GRAPEFRUIS)

  2. pickup doesn't have a value field (see https://developer.here.com/documentation/routing-waypoints/dev_guide/topics/api-reference-type-waypoint.html)

  3. "pickup only allowed at optional way points"

So if you change

start=waypoint0;50.115620,8.631210;pickup:GRAPEFRUIS,value:1000

to

start=waypoint0;50.115620,8.631210

and

end=waypoint7;50.132540,8.649280;drop:GRAPEFRUITS,value:1000

to

end=waypoint7;50.132540,8.649280

then this url will work:

https://fleet.ls.hereapi.com/2/findpickups.json?mode=fastest;truck;traffic:disabled&start=waypoint0;50.115620,8.631210&departure=2020-11-14T07:30:00&driverCost=20&restTimes=disabled&end=waypoint7;50.132540,8.649280&destination0=waypoint1;50.118578,8.636551;drop:APPLES,value:30&destination1=waypoint2;50.122540,8.631070;pickup:BANANAS&destination2=waypoint3;50.128920,8.629830;drop:BANANAS,value:30&destination3=waypoint4;50.118654,8.619956;pickup:APPLES&destination4=waypoint5;50.123998,8.640626;drop:PEACHES,value:50&destination5=waypoint6;50.130299,8.613031;pickup:PEACHES&apiKey={key}