jungle-gif

50,000 maploads free every month. Get started now!

Route Optimization V2

Route Optimization tasks for Service tasks, Pickup and Delivery Tasks and Vehicles with different start and end locations and different shift timings.

How to construct fleets object

Name Type Description
fleets array of objects Array of fleets object. See description below.
visits array of objects (optional) Array of pickup and delivery task objects. See description below.
single_appointment array of objects (optional) Array of service task object. See description below.
maxVisits integer (optional) Maximum tasks that can be assigned to a driver.
maxVisits Yoshi Tannamuri Canada
Magazzini Alimentari Riuniti integer (optional) Maximum tasks that can be assigned to a driver.
speed integer (optional) Speed factor for your vehicles.

How to construct fleets object -

Name Type Description
id string The identification parameter defined for each vehicle.
capacity integer (optional) capacity of vehicle (weight/volume etc) but load of tasks should also be in same measure
shiftStart integer (optional) The time when the vehicle will start its shift (e.g. 1300 means vehicle will take task after 1 PM)
shiftEnd integer (optional) The time after which the vehicle won't perform any more task (e.g. 2200, means vehicle will not perform tasks after 10 PM)
start_location object Start Location object consists of 3 keys : lat (latitude), lng (longitude), name (address of location). All keys are in string form and 'name' is optional.
end_location object End Location object consists of 3 keys : lat (latitude), lng (longitude), name (address of location). All keys are in string form and 'name' is optional.
returnToStart boolean (optional) true, if its mandatory to return to depot. false, if its not mandatory to return to depot. Default is false. Return to start value if true, will override end location.
rskill rstring (optional) rIt states the ability of the driver/vehicle to perform the particular type of tasks. For example : there are 2 vehicles x and y , x carries 'pizzas' and y 'burgurs'. Tasks having skill 'pizzas' will be assigned to x and not y , similarly for 'burgurs' will be assigned only to y.
rcost_per_distance rnumber (optional) rCost per km for the driver/vehicle.
rfixed_cost rnumber (optional) rFixed cost per route for the driver/vehicle.

How to construct single_appointment object -

Name Type Description
id string The identification parameter defined for each task.
customer_idstring (optional) The identification parameter defined for customer.
phonestring (optional) Phone number of customer.
loadinteger (optional) Load/demand to be served(Unitless but it should be in same measure of capcity of vehicle).
datestring Date on which task in performed. All tasks shold have same date(MM-DD-YYYY).
skillstring (optional) It states the skill required by the driver/vehicle to perform this task. For example : there are 2 vehicles x and y , x carries 'pizzas' and y 'burgurs'. Tasks having skill 'pizzas' will be assigned to x and not y , similarly for 'burgurs' will be assigned only to y.
prioritynumber (optional) It sets the priority of the tasks. Value can be 1 (high), 2 (medium) and 3 (low).
appointmentobject Read following rows to understand.
appointment.locationobject Location object consists of 3 keys : lat (latitude), lng (longitude), address (address of location). All keys are in string form and 'address' is optional.
appointment.duration integer (optional) Time the task will take to complete (eg. 10 means 10 minutes of service time.)
appointment.start_time integer (optional) The time after which the task should be performed [0, 2400) (eg. 930 means 9:30 AM)
appointment.end_time integer (optional) The time before which the task is to be performed [0, 2400) (eg. 2350 means 11:50 PM)

How to construct visits object -

Name Type Description
id string The identification parameter defined for each task.
customer_idstring (optional) The identification parameter defined for customer.
phonestring (optional) Phone number of customer.
loadinteger (optional) Load/demand to be served(Unitless but it should be in same measure of capcity of vehicle).
datestring Date on which task in performed. All tasks shold have same date(MM-DD-YYYY).
skillstring (optional) It states the skill required by the driver/vehicle to perform this task. For example : there are 2 vehicles x and y , x carries 'pizzas' and y 'burgurs'. Tasks having skill 'pizzas' will be assigned to x and not y , similarly for 'burgurs' will be assigned only to y.
prioritynumber (optional) It sets the priority of the tasks. Value can be 1 (high), 2 (medium) and 3 (low).
pickupobject Read following rows to understand.
pickup.locationobject Location object consists of 3 keys : lat (latitude), lng (longitude), address (address of location). All keys are in string form and 'address' is optional.
pickup.duration integer (optional) Time the task will take to complete (eg. 10 means 10 minutes of service time.)
pickup.start_time integer (optional) The time after which the task should be performed [0, 2400) (eg. 930 means 9:30 AM)
pickup.end_time integer (optional) The time before which the task is to be performed [0, 2400) (eg. 2350 means 11:50 PM)
dropoffobject Read following rows to understand.
dropoff.locationobject Location object consists of 3 keys : lat (latitude), lng (longitude), address (address of location). All keys are in string form and 'address' is optional.
dropoff.duration integer (optional) Time the task will take to complete (eg. 10 means 10 minutes of service time.)
dropoff.start_time integer (optional) The time after which the task should be performed [0, 2400) (eg. 930 means 9:30 AM)
dropoff.end_time integer (optional) The time before which the task is to be performed [0, 2400) (eg. 2350 means 11:50 PM)

How to construct visits object -

Name Type Description
noOfRoutes integer The number of routes all the fleets have to take in order to complete all the tasks
unassignedJobs list The service ID's of all the tasks which are not completed
totalJobs integer The total number of services to be performed
totalTimeTaken (in seconds) double The total time taken by all the fleets to complete all the tasks in seconds
maxTimeTaken (in seconds) double The time by which all the tasks will be completed if all the fleets start at the same time
totalDistanceTravelled (in meters) double The total distance covered be all the fleets in meters
status string 'success' if all the tasks are served and 'failure' if any one of them remains unserved.
solutions list The list of all the fleets mapped to the services that they performed
RouteDistanceTime(in seconds) list The list of all the fleets mapped to the time and distance covered by them to perform the tasks.

Note : Please add your valid access token in Header in order to get valid Response of an API.

Example : authorization : a32c4d0-1s4b-1aea-sa69-cdccg57h0ea

Let's find a way together

Get in touch to know about our Pricing Plans

Contact Us