Multi-Stop API

INTRODUCTION

Companies usually begin with a single distribution depot from which vehicles are dispatched to perform their delivery operations. There is a wide array of variations for this problem such as the existence of multiple depots and a variety of vehicle types that need to be dispatched from each depot. The aim is to select the best routes for the fleet according to business-conscious planning criteria. AHOY’s Multi-Stop Routing API is designed to dispatch the best fleet combinations to serve multiple points with maximum routing efficiency for your operations.

This problem is often known by other names such as a Vehicle Routing Problem with Pick-Up and Delivery. This is an NP-hard optimization problem that solves many business problems by proactively modeling strategic changes toward satisfying customers’ demands for reliable delivery scheduling among a set of catered constraints.

Use Cases

AHOY’s Multi-Stop Routing API caters to a wide variety of routing problems that are sure to fit your business needs. You can mix and match with all the below variations to solve any routing problem that your business faces. Below are a set of variations that the Multi-Stop Routing API can solve:

  1. Vehicle Routing Problem
  2. Capacitated Vehicle Routing Problem
    • Homogeneous Vehicle Routing Problem
    • Heterogeneous Vehicle Routing Problem
  3. Vehicle Routing Problem with Pickup and Delivery (VRP-PD)
  4. Vehicle Routing Problem with Multiple Pickups and Multiple Deliveries (VRP-MPMD)
  5. Vehicle Routing Problem with Time Windows (VRP-TW)
  6. Vehicle Routing Problem with Multiple Trips (VRP-MT)
  7. Multi-Depot Vehicle Routing Problem (MD-VRP)
  8. Open Vehicle Routing Problem (O-VRP)

GET STARTED

Get an API Key

To authenticate to the API you need to add api-key header to your requests with an active subscription key supporting the multi-stop API, you can get your keys from the subscriptions page under your AMS account.

Send a Request

POST https://ahoydev.azure-api.net/routing/multi-routes
Content-Type: application/json

Request Body

{
    "points": [
        {
            "id": "Stop1",
            "lat": 25.5192,
            "lng": 55.2132,
            "isOffloading": true,
            "serviceTimeInMinutes": 20,
            "parentPointId": "Stop2",
            "numberOfUnits": 4
        },
        {
            "id": "Stop2",
            "lat": 24.895,
            "lng": 55.157,
            "isOffloading": false,
            "isHardRelationship": true,
            "serviceTimeInMinutes": 25,
            "parentPointId": "",
            "numberOfUnits": 4
        }
    ],
    "vehicles": [
        {
            "id": "vehicle1",
            "type": "car",
            "number": 3,
            "unitCapacity": 5
        }
    ],
    "startLocation": {
        "lat": 24.895,
        "lng": 55.157

    },
    "startDateTime": 1652731200000,
    "optimization": "time"
}

Response

{
    "planId": "51da4638-2a83-40ae-82c3-112734fa89bd",
    "datetime": 1666343637157,
    "totalTripsDurationInMinutes": 45.0,
    "totalTripsDistanceInKm": 0.0,
    "serviceCostAED": 0,
    "costPerDeliveryAED": 0,
    "recommendedNoOfVehicles": [
        {
            "typeId": "vehicle1",
            "NoOfVehicles": 1
        }
    ],
    "trips": [
        {
            "tripId": "68d93066-5792-4e5a-b257-1f72d44faa3a",
            "vehicleId": "vehicle1",
            "vehicleType": "car",
            "vehicleunitCapacity": 5,
            "summary": {
                "travelTimeInSeconds": 2700,
                "distanceInMeter": 0,
                "routeCostAED": 0,
                "costPerDeliveryAED": 0.0,
                "startTime": 1652731200000,
                "endTime": 1652733900000
            },
            "trip": [
                {
                    "pointId": "Start",
                    "lat": 24.895,
                    "lng": 55.157,
                    "parentPointId": "",
                    "serviceTimeInMinutes": 0,
                    "numberOfUnits": 0,
                    "isOffloading": false,
                    "timeSlot": {
                        "start": 0,
                        "end": 0
                    },
                    "vehicleCurrentCapacityAfter": 0,
                    "waitingTimeInMinutes": 0,
                    "estimatedArrivalTime": 1652731200000,
                    "estimatedDepartureTime": 1652731200000,
                    "isTimeWindowSatisfied": true
                },
                {
                    "pointId": "Stop2",
                    "lat": 24.895,
                    "lng": 55.157,
                    "parentPointId": "",
                    "serviceTimeInMinutes": 25,
                    "numberOfUnits": 4,
                    "isOffloading": false,
                    "timeSlot": {
                        "start": 0,
                        "end": 0
                    },
                    "isHardRelationship": true,
                    "vehicleCurrentCapacityAfter": 4,
                    "waitingTimeInMinutes": 0,
                    "estimatedArrivalTime": 1652731200000,
                    "estimatedDepartureTime": 1652732700000,
                    "isTimeWindowSatisfied": true
                },
                {
                    "pointId": "Stop1",
                    "lat": 25.5192,
                    "lng": 55.2132,
                    "parentPointId": "Stop2",
                    "serviceTimeInMinutes": 20,
                    "numberOfUnits": 4,
                    "isOffloading": true,
                    "timeSlot": {
                        "start": 0,
                        "end": 0
                    },
                    "vehicleCurrentCapacityAfter": 0,
                    "waitingTimeInMinutes": 0,
                    "estimatedArrivalTime": 1652732700000,
                    "estimatedDepartureTime": 1652733900000,
                    "isTimeWindowSatisfied": false
                }
            ],
            "violations": []
        }
    ],
    "unservedNodes": []
}

For the detailed explanation of request and response, see Concepts

CONCEPTS

INPUT

Input to the MS-API is a json request, which represents a vehicle routing problem. It consists of a few required and optional fields.

points (Required)

A list of dictionaries where each represents a location to be visited. Not two locations have the same id.

  • id(string) Id or name to represent the location
  • lat(float) Latitude of the location
  • lng(float) Longitude of the location
  • parentPointId(string) Id of the parent location, that is to be visited before visiting the point. If there is no such parent for a point, parentPointId can be set to an empty string(’’). special characters are not allowed. - For Eg:- In the case of VRP with Pickup and Delivery, prior to visiting a delivery location, the item to be delivered should be picked up from the corresponding pickup location. Say, you have to deliver an item at location A, which has to be picked from location B, then parentPointId of ‘A’ should be set as ‘B’ and that of the point ‘A’ should be an empty string (’’).
  • serviceTimeInMinutes(int) Time needed to finish the service (Eg:- pickup or delivery) at the location in minutes.
  • numberOfUnits(int) The number of units required to be serviced from/at a location. - *Eg:- Number of pallets to be picked up or to be delivered, or Kilograms to be picked up or to be delivered, or the number of persons to be picked up or dropped, etc.
  • isOffloading:(binary) If the vehicle has to be loaded from the location, isOffloading should be set to ‘False’, and if the vehicle is offloaded, then it should be set to ‘True’.
  • isHardRelationship(binary) (refer confluence)
  • timeSlot(double) Time window of the location. This field has two subfields, start and stop which are the earliest time window and the latest time window respectively.
  • vehiclesAvailable(Optional), (list) List of the ids of the vehicles, that are accessible by the location.

vehicles (Required)

A list of dictionaries, where each dictionary represents a specific category of vehicle.

  • id(string) Id or name to represent the vehicle, no two vehicles have the same id
  • type(string) Type of the vehicle (truck, car).
  • number(int) Number of the vehicles available for service. Don’t count reserved vehicles here.
  • unitCapacity(int) Capacity of the vehicle, in the unit same as numberOfUnits in the points field
  • maxNumberOfVehicles(int) Maximum number of vehicles that you can afford, vehicles you suppose to use for service, and the reserved number of vehicles, that can be used, in case of necessity.
  • maxTravelTimeMinutes(int) Maximum allowed travel time for the vehicles
  • maxTravelDistanceKm(int) Maximum allowed travel distance for the vehicles.
  • monthlyFixedCost(Optional), (int) Monthly fixed cost to be spent for the vehicle
  • variableCostKmAED: (Optional), (float) Variable cost in AED for the vehicle, per Kilo Meters
  • maxSpeedInKmph: (Optional), (float) Maximum speed limit allowed for the vehicle, in Kilometer per hour.

start location (Required)

Coordinates the starting location, from where the vehicles are supposed to start their journey.

  • lat: Latitude of the start location
  • lng: Longitude of the start location

endLocation (Optional)

Coordinates of the end location, where the vehicles are supposed to end their journey after finishing the jobs

  • lat: Latitude of the start location
  • lng: Longitude of the start location

startDateTime (Required)

Epoch time at which the service is to be started

adjustStartDateTime(Optional)

(binary) True if you want to adjust the job starting time according to the service starting time of each route.

optimization (Required)

(string)

  • Optimization objective (distance or time)
  • If you need to finish the jobs within a short time, optimization should be set as ’time’
  • If you need to finish the jobs by traveling a minimum distance, optimization should be set as ‘distance’

avoidToll (Optional)

(binary) True to avoid the Tolls, False otherwise

RESPONSE

Plan Details

  • planId(string) Id of the created plan, this can be used to identify the plan, in case you want to revisit the same plan
  • dateTime: (int) Date and time in Epoch
  • totalTripsDurationInMinutes: Summation of the durations of all trips in minutes
  • totalTripsDistanceInKm: Total distances traveled during all of the trips
  • serviceCostAED: Cost for the entire service, in AED
  • costPerDeliveryAED: Cost per delivery for the entire service
  • avoidToll: Indicates whether the user asked to avoid toll or not
  • recommendedNoOfVehicles: Vehicle recommendations to get better results.
  • additionalNoOfVehicles: Additional vehicles required to satisfy recommended vehicle condition

trips

  • tripId: Id to identify the trip

  • vehicleId: Id of the used vehicle

  • vehicleType: Type of the vehicle used

  • vehicleunitCapacity: Unit capacity of the vehicle used

  • summary: A brief of the trip. travelTimeInSeconds is the travel time taken in seconds to complete the trip. The distance traveled by the vehicle to finish the trip is indicated by distanceInMeter. Cost per delivery and the total cost for the route is given by costPerDeliveryAED and routeCostAED respectively. startTime and endTime of the trip are also mentioned in the summary

  • trip: A list of points is given. Few fields are the same as those in the request. Others are listed below.

  • vehicleCurrentCapacityAfter: Capacity of the vehicle after visiting that point

  • waitingTimeInMinutes: If the vehicle is reached the location earlier than its earliest time window, the vehicle has to wait there. The time that vehicle waited at the particular location (or point) is given in minutes.

  • estimatedArrivalTime: Estimated time of arrival of the vehicle at the location, in the epoch

  • isTimeWindowSatisfied: Whether the vehicle can respect the time window constraint, which means, whether the vehicle reached the location earlier than the start time window, or in between the time window, and finish the job within time.

  • violations: In case there are no other practical options possible, some of the conditions are violated. The details of the such route are given in the field violations. Multi-Stop API considers the road bans automatically if the vehicle type is set to ’truck’. In case there are no other possible options, the route may violate such conditions.

unservedNodes

List of the points which remain unserved.

EXAMPLE

Routine delivery from distribution centers is essential for public services like garbage collection. Garbage collection has a tight timeline to be fulfilled before residents are active. Moreover, trucks are used for the collection and thus need special road restrictions in place.

Sample request and response for a scenario with 19 stores, and 1 distribution center, are given below.

Request

{
  "points": [
     {
        "id": "Store1",
        "lat": 25.18027,
        "lng": 55.26763,
        "isOffloading": true,
        "serviceTimeInMinutes": 15,
        "parentPointId": "DC1",
        "numberOfUnits": 1,
        "timeSlot": {
           "start": 1652796000000,
           "end": 1652805000000
        },
        "vehiclesAvailable": [
           "truck2",
           "truck1",
           "truck3"
        ]
     },
     {
        "id": "Store2",
        "lat": 25.17206,
        "lng": 55.40778,
        "isOffloading": true,
        "serviceTimeInMinutes": 15,
        "parentPointId": "DC2",
        "numberOfUnits": 2,
        "timeSlot": {
           "start": 1652774400000,
           "end": 1652783400000
        }
     },
     {
        "id": "Store3",
        "lat": 25.16936,
        "lng": 55.41419,
        "isOffloading": true,
        "serviceTimeInMinutes": 15,
        "parentPointId": "DC1",
        "numberOfUnits": 2,
        "timeSlot": {
           "start": 1652803200000,
           "end": 1652812200000
        }
     },
     {
        "id": "Store4",
        "lat": 25.09927,
        "lng": 55.17811,
        "isOffloading": true,
        "serviceTimeInMinutes": 20,
        "parentPointId": "DC2",
        "numberOfUnits": 2,
        "timeSlot": {
           "start": 1652803200000,
           "end": 1652815200000
        }
     },
     {
        "id": "Store5",
        "lat": 25.0066,
        "lng": 55.1151,
        "isOffloading": true,
        "serviceTimeInMinutes": 15,
        "parentPointId": "DC1",
        "numberOfUnits": 1,
        "timeSlot": {
           "start": 1652803200000,
           "end": 1652812200000
        }
     },
     {
        "id": "Store6",
        "lat": 25.17469,
        "lng": 55.41553,
        "isOffloading": true,
        "serviceTimeInMinutes": 10,
        "parentPointId": "DC2",
        "numberOfUnits": 1,
        "timeSlot": {
           "start": 1652788800000,
           "end": 1652794800000
        }
     },
     {
        "id": "Store7",
        "lat": 24.98923,
        "lng": 55.15682,
        "isOffloading": true,
        "serviceTimeInMinutes": 20,
        "parentPointId": "DC1",
        "numberOfUnits": 2,
        "timeSlot": {
           "start": 1652788800000,
           "end": 1652800800000
        }
     },
     {
        "id": "Store8",
        "lat": 25.04614,
        "lng": 55.11837,
        "isOffloading": true,
        "serviceTimeInMinutes": 15,
        "parentPointId": "DC2",
        "numberOfUnits": 2,
        "timeSlot": {
           "start": 1652774400000,
           "end": 1652783400000
        }
     },
     {
        "id": "Store9",
        "lat": 25.22798,
        "lng": 55.27358,
        "isOffloading": true,
        "serviceTimeInMinutes": 10,
        "parentPointId": "DC1",
        "numberOfUnits": 1,
        "timeSlot": {
           "start": 1652788800000,
           "end": 1652794800000
        }
     },
     {
        "id": "Store10",
        "lat": 25.22841,
        "lng": 55.27493,
        "isOffloading": true,
        "serviceTimeInMinutes": 20,
        "parentPointId": "DC2",
        "numberOfUnits": 2,
        "timeSlot": {
           "start": 1652774400000,
           "end": 1652786400000
        }
     },
     {
        "id": "Store11",
        "lat": 25.08003,
        "lng": 55.1455,
        "isOffloading": true,
        "serviceTimeInMinutes": 15,
        "parentPointId": "DC1",
        "numberOfUnits": 1,
        "timeSlot": {
           "start": 1652774400000,
           "end": 1652783400000
        }
     },
     {
        "id": "Store12",
        "lat": 25.16091,
        "lng": 55.23487,
        "isOffloading": true,
        "serviceTimeInMinutes": 20,
        "parentPointId": "DC2",
        "numberOfUnits": 1,
        "timeSlot": {
           "start": 1652788800000,
           "end": 1652800800000
        },
        "vehiclesAvailable": [
           "truck1",
           "truck3"
        ]
     },
     {
        "id": "Store13",
        "lat": 25.06545,
        "lng": 55.24596,
        "isOffloading": true,
        "serviceTimeInMinutes": 15,
        "parentPointId": "DC1",
        "numberOfUnits": 1,
        "timeSlot": {
           "start": 1652781600000,
           "end": 1652790600000
        },
        "vehiclesAvailable": [
           "truck2"
        ]
     },
     {
        "id": "Store14",
        "lat": 25.21607,
        "lng": 55.27775,
        "isOffloading": true,
        "serviceTimeInMinutes": 15,
        "parentPointId": "DC2",
        "numberOfUnits": 1,
        "timeSlot": {
           "start": 1652767200000,
           "end": 1652776200000
        },
        "vehiclesAvailable": [
           "truck1",
           "truck2"
        ]
     },
     {
        "id": "Store15",
        "lat": 24.99721,
        "lng": 55.17182,
        "isOffloading": true,
        "serviceTimeInMinutes": 15,
        "parentPointId": "DC1",
        "numberOfUnits": 2,
        "timeSlot": {
           "start": 1652796000000,
           "end": 1652805000000
        }
     },
     {
        "id": "Store16",
        "lat": 25.19882,
        "lng": 55.28009,
        "isOffloading": true,
        "serviceTimeInMinutes": 10,
        "parentPointId": "DC2",
        "numberOfUnits": 2,
        "timeSlot": {
           "start": 1652767200000,
           "end": 1652773200000
        }
     },
     {
        "id": "Store17",
        "lat": 25.15673,
        "lng": 55.24967,
        "isOffloading": true,
        "serviceTimeInMinutes": 10,
        "parentPointId": "DC1",
        "numberOfUnits": 2,
        "timeSlot": {
           "start": 1652781600000,
           "end": 1652787600000
        },
        "vehiclesAvailable": [
           "truck2",
           "truck1"
        ]
     },
     {
        "id": "Store18",
        "lat": 25.16141,
        "lng": 55.40795,
        "isOffloading": true,
        "serviceTimeInMinutes": 10,
        "parentPointId": "DC2",
        "numberOfUnits": 1,
        "timeSlot": {
           "start": 1652781600000,
           "end": 1652787600000
        }
     },
     {
        "id": "Store19",
        "lat": 25.0462,
        "lng": 55.11843,
        "isOffloading": true,
        "serviceTimeInMinutes": 10,
        "parentPointId": "DC1",
        "numberOfUnits": 1,
        "timeSlot": {
           "start": 1652767200000,
           "end": 1652773200000
        }
     },
     {
        "id": "DC1",
        "lat": 25.1986,
        "lng": 55.28022,
        "isOffloading": false,
        "isHardRelationship": false,
        "serviceTimeInMinutes": 15,
        "parentPointId": "",
        "numberOfUnits": 14,
        "timeSlot": {
           "start": 1652752800000,
           "end": 1652757300000
        },
        "vehiclesAvailable": [
           "truck2",
           "truck3",
           "truck1"
        ]
     },
     {
        "id": "DC2",
        "lat": 24.98797,
        "lng": 55.08656,
        "isOffloading": false,
        "isHardRelationship": true,
        "serviceTimeInMinutes": 10,
        "parentPointId": "",
        "numberOfUnits": 14,
        "timeSlot": {
           "start": 1652763600000,
           "end": 1652766600000
        },
        "vehiclesAvailable": [
           "truck2",
           "truck3",
           "truck1"
        ]
     }
  ],
  "vehicles": [
     {
        "id": "truck1",
        "type": "truck",
        "number": 1,
        "maxNumberOfVehicles": 2,
        "unitCapacity": 20,
        "maxTravelTimeMinutes": 1054,
        "maxTravelDistanceKm": 265
     },
     {
        "id": "truck2",
        "type": "truck",
        "number": 3,
        "maxNumberOfVehicles": 6,
        "unitCapacity": 18,
        "maxTravelTimeMinutes": 959,
        "maxTravelDistanceKm": 252
     },
     {
        "id": "truck3",
        "type": "truck",
        "number": 3,
        "maxNumberOfVehicles": 6,
        "unitCapacity": 16,
        "maxTravelTimeMinutes": 1234,
        "maxTravelDistanceKm": 291
     }
  ],
  "startLocation": {
     "lat": 25.101162341927317,
     "lng": 55.46645099344764
  },
  "customeMapId": 1,
  "startDateTime": 1652731200000,
  "adjustStartDateTime": true,
  "optimization": "time"
}
Response

{
   "planId": "d4709f5d-7f08-4c4c-b86f-60e5a68b11e0",
   "datetime": 1666347657799,
   "totalTripsDurationInMinutes": 2727.5,
   "totalTripsDistanceInKm": 766.4,
   "serviceCostAED": 0,
   "costPerDeliveryAED": 0,
   "trips": [
       {
           "tripId": "91d9e899-3c12-4984-bbdc-29d3a1bed5d3",
           "vehicleId": "truck2",
           "vehicleType": "truck",
           "vehicleunitCapacity": 18,
           "summary": {
               "travelTimeInSeconds": 28609,
               "distanceInMeter": 235975,
               "routeCostAED": 0,
               "costPerDeliveryAED": 0.0,
               "startTime": 1652760791000,
               "endTime": 1652789400000
           },
           "trip": [
               {
                   "pointId": "Start",
                   "lat": 25.101162341927317,
                   "lng": 55.46645099344764,
                   "parentPointId": "",
                   "serviceTimeInMinutes": 0,
                   "numberOfUnits": 0,
                   "isOffloading": false,
                   "timeSlot": {
                       "start": 0,
                       "end": 0
                   },
                   "vehicleCurrentCapacityAfter": 0,
                   "waitingTimeInMinutes": 0,
                   "estimatedArrivalTime": 1652760791000,
                   "estimatedDepartureTime": 1652760791000,
                   "isTimeWindowSatisfied": true
               },
               {
                   "pointId": "DC2",
                   "lat": 24.98797,
                   "lng": 55.08656,
                   "parentPointId": "",
                   "serviceTimeInMinutes": 10,
                   "numberOfUnits": 11,
                   "isOffloading": false,
                   "timeSlot": {
                       "start": 1652763600000,
                       "end": 1652766600000
                   },
                   "isHardRelationship": true,
                   "vehicleCurrentCapacityAfter": 11,
                   "waitingTimeInMinutes": 0,
                   "estimatedArrivalTime": 1652766000000,
                   "estimatedDepartureTime": 1652766600000,
                   "isTimeWindowSatisfied": true
               },
               {
                   "pointId": "Store14",
                   "lat": 25.21607,
                   "lng": 55.27775,
                   "parentPointId": "DC2",
                   "serviceTimeInMinutes": 15,
                   "numberOfUnits": 1,
                   "isOffloading": true,
                   "timeSlot": {
                       "start": 1652767200000,
                       "end": 1652776200000
                   },
                   "vehicleCurrentCapacityAfter": 10,
                   "waitingTimeInMinutes": 0,
                   "estimatedArrivalTime": 1652768637000,
                   "estimatedDepartureTime": 1652769537000,
                   "isTimeWindowSatisfied": true
               },
               {
                   "pointId": "Store16",
                   "lat": 25.19882,
                   "lng": 55.28009,
                   "parentPointId": "DC2",
                   "serviceTimeInMinutes": 10,
                   "numberOfUnits": 2,
                   "isOffloading": true,
                   "timeSlot": {
                       "start": 1652767200000,
                       "end": 1652773200000
                   },
                   "vehicleCurrentCapacityAfter": 8,
                   "waitingTimeInMinutes": 0,
                   "estimatedArrivalTime": 1652769790000,
                   "estimatedDepartureTime": 1652770390000,
                   "isTimeWindowSatisfied": true
               },
               {
                   "pointId": "Store2",
                   "lat": 25.17206,
                   "lng": 55.40778,
                   "parentPointId": "DC2",
                   "serviceTimeInMinutes": 15,
                   "numberOfUnits": 2,
                   "isOffloading": true,
                   "timeSlot": {
                       "start": 1652774400000,
                       "end": 1652783400000
                   },
                   "vehicleCurrentCapacityAfter": 6,
                   "waitingTimeInMinutes": 50.849999999999994,
                   "estimatedArrivalTime": 1652774400000,
                   "estimatedDepartureTime": 1652775300000,
                   "isTimeWindowSatisfied": true
               },
               {
                   "pointId": "Store10",
                   "lat": 25.22841,
                   "lng": 55.27493,
                   "parentPointId": "DC2",
                   "serviceTimeInMinutes": 20,
                   "numberOfUnits": 2,
                   "isOffloading": true,
                   "timeSlot": {
                       "start": 1652774400000,
                       "end": 1652786400000
                   },
                   "vehicleCurrentCapacityAfter": 4,
                   "waitingTimeInMinutes": 0,
                   "estimatedArrivalTime": 1652776810000,
                   "estimatedDepartureTime": 1652778010000,
                   "isTimeWindowSatisfied": true
               },
               {
                   "pointId": "Store8",
                   "lat": 25.04614,
                   "lng": 55.11837,
                   "parentPointId": "DC2",
                   "serviceTimeInMinutes": 15,
                   "numberOfUnits": 2,
                   "isOffloading": true,
                   "timeSlot": {
                       "start": 1652774400000,
                       "end": 1652783400000
                   },
                   "vehicleCurrentCapacityAfter": 2,
                   "waitingTimeInMinutes": 0,
                   "estimatedArrivalTime": 1652779620000,
                   "estimatedDepartureTime": 1652780520000,
                   "isTimeWindowSatisfied": true
               },
               {
                   "pointId": "Store18",
                   "lat": 25.16141,
                   "lng": 55.40795,
                   "parentPointId": "DC2",
                   "serviceTimeInMinutes": 10,
                   "numberOfUnits": 1,
                   "isOffloading": true,
                   "timeSlot": {
                       "start": 1652781600000,
                       "end": 1652787600000
                   },
                   "vehicleCurrentCapacityAfter": 1,
                   "waitingTimeInMinutes": 0,
                   "estimatedArrivalTime": 1652782709000,
                   "estimatedDepartureTime": 1652783309000,
                   "isTimeWindowSatisfied": true
               },
               {
                   "pointId": "Store6",
                   "lat": 25.17469,
                   "lng": 55.41553,
                   "parentPointId": "DC2",
                   "serviceTimeInMinutes": 10,
                   "numberOfUnits": 1,
                   "isOffloading": true,
                   "timeSlot": {
                       "start": 1652788800000,
                       "end": 1652794800000
                   },
                   "vehicleCurrentCapacityAfter": 0,
                   "waitingTimeInMinutes": 83.69999999999999,
                   "estimatedArrivalTime": 1652788800000,
                   "estimatedDepartureTime": 1652789400000,
                   "isTimeWindowSatisfied": true
               }
           ],
           "violations": [
               "Violated avoid difficult turns."
           ]
       },
       {
           "tripId": "1f32ae8a-ba6b-4c37-bb2f-f4d2e9f8489d",
           "vehicleId": "truck2",
           "vehicleType": "truck",
           "vehicleunitCapacity": 18,
           "summary": {
               "travelTimeInSeconds": 54627,
               "distanceInMeter": 181686,
               "routeCostAED": 0,
               "costPerDeliveryAED": 0.0,
               "startTime": 1652752898000,
               "endTime": 1652807525000
           },
           "trip": [
               {
                   "pointId": "Start",
                   "lat": 25.101162341927317,
                   "lng": 55.46645099344764,
                   "parentPointId": "",
                   "serviceTimeInMinutes": 0,
                   "numberOfUnits": 0,
                   "isOffloading": false,
                   "timeSlot": {
                       "start": 0,
                       "end": 0
                   },
                   "vehicleCurrentCapacityAfter": 0,
                   "waitingTimeInMinutes": 0,
                   "estimatedArrivalTime": 1652752898000,
                   "estimatedDepartureTime": 1652752898000,
                   "isTimeWindowSatisfied": true
               },
               {
                   "pointId": "DC1",
                   "lat": 25.1986,
                   "lng": 55.28022,
                   "parentPointId": "",
                   "serviceTimeInMinutes": 15,
                   "numberOfUnits": 3,
                   "isOffloading": false,
                   "timeSlot": {
                       "start": 1652752800000,
                       "end": 1652757300000
                   },
                   "isHardRelationship": false,
                   "vehicleCurrentCapacityAfter": 3,
                   "waitingTimeInMinutes": 0,
                   "estimatedArrivalTime": 1652756400000,
                   "estimatedDepartureTime": 1652757300000,
                   "isTimeWindowSatisfied": true
               },
               {
                   "pointId": "DC2",
                   "lat": 24.98797,
                   "lng": 55.08656,
                   "parentPointId": "",
                   "serviceTimeInMinutes": 10,
                   "numberOfUnits": 2,
                   "isOffloading": false,
                   "timeSlot": {
                       "start": 1652763600000,
                       "end": 1652766600000
                   },
                   "isHardRelationship": true,
                   "vehicleCurrentCapacityAfter": 5,
                   "waitingTimeInMinutes": 64.86666666670001,
                   "estimatedArrivalTime": 1652763600000,
                   "estimatedDepartureTime": 1652764200000,
                   "isTimeWindowSatisfied": true
               },
               {
                   "pointId": "Store13",
                   "lat": 25.06545,
                   "lng": 55.24596,
                   "parentPointId": "DC1",
                   "serviceTimeInMinutes": 15,
                   "numberOfUnits": 1,
                   "isOffloading": true,
                   "timeSlot": {
                       "start": 1652781600000,
                       "end": 1652790600000
                   },
                   "vehicleCurrentCapacityAfter": 4,
                   "waitingTimeInMinutes": 264.8166666667,
                   "estimatedArrivalTime": 1652781600000,
                   "estimatedDepartureTime": 1652782500000,
                   "isTimeWindowSatisfied": true
               },
               {
                   "pointId": "Store3",
                   "lat": 25.16936,
                   "lng": 55.41419,
                   "parentPointId": "DC1",
                   "serviceTimeInMinutes": 15,
                   "numberOfUnits": 2,
                   "isOffloading": true,
                   "timeSlot": {
                       "start": 1652803200000,
                       "end": 1652812200000
                   },
                   "vehicleCurrentCapacityAfter": 2,
                   "waitingTimeInMinutes": 313.9166666666,
                   "estimatedArrivalTime": 1652803200000,
                   "estimatedDepartureTime": 1652804100000,
                   "isTimeWindowSatisfied": true
               },
               {
                   "pointId": "Store4",
                   "lat": 25.09927,
                   "lng": 55.17811,
                   "parentPointId": "DC2",
                   "serviceTimeInMinutes": 20,
                   "numberOfUnits": 2,
                   "isOffloading": true,
                   "timeSlot": {
                       "start": 1652803200000,
                       "end": 1652815200000
                   },
                   "vehicleCurrentCapacityAfter": 0,
                   "waitingTimeInMinutes": 0,
                   "estimatedArrivalTime": 1652806325000,
                   "estimatedDepartureTime": 1652807525000,
                   "isTimeWindowSatisfied": true
               }
           ],
           "violations": [
               "Violated avoid difficult turns."
           ]
       },
       {
           "tripId": "fe90fc46-74b6-4c1e-b7d3-579068ee8ad7",
           "vehicleId": "truck2",
           "vehicleType": "truck",
           "vehicleunitCapacity": 18,
           "summary": {
               "travelTimeInSeconds": 51202,
               "distanceInMeter": 241179,
               "routeCostAED": 0,
               "costPerDeliveryAED": 0.0,
               "startTime": 1652752898000,
               "endTime": 1652804100000
           },
           "trip": [
               {
                   "pointId": "Start",
                   "lat": 25.101162341927317,
                   "lng": 55.46645099344764,
                   "parentPointId": "",
                   "serviceTimeInMinutes": 0,
                   "numberOfUnits": 0,
                   "isOffloading": false,
                   "timeSlot": {
                       "start": 0,
                       "end": 0
                   },
                   "vehicleCurrentCapacityAfter": 0,
                   "waitingTimeInMinutes": 0,
                   "estimatedArrivalTime": 1652752898000,
                   "estimatedDepartureTime": 1652752898000,
                   "isTimeWindowSatisfied": true
               },
               {
                   "pointId": "DC1",
                   "lat": 25.1986,
                   "lng": 55.28022,
                   "parentPointId": "",
                   "serviceTimeInMinutes": 15,
                   "numberOfUnits": 11,
                   "isOffloading": false,
                   "timeSlot": {
                       "start": 1652752800000,
                       "end": 1652757300000
                   },
                   "isHardRelationship": false,
                   "vehicleCurrentCapacityAfter": 11,
                   "waitingTimeInMinutes": 0,
                   "estimatedArrivalTime": 1652756400000,
                   "estimatedDepartureTime": 1652757300000,
                   "isTimeWindowSatisfied": true
               },
               {
                   "pointId": "Store19",
                   "lat": 25.0462,
                   "lng": 55.11843,
                   "parentPointId": "DC1",
                   "serviceTimeInMinutes": 10,
                   "numberOfUnits": 1,
                   "isOffloading": true,
                   "timeSlot": {
                       "start": 1652767200000,
                       "end": 1652773200000
                   },
                   "vehicleCurrentCapacityAfter": 10,
                   "waitingTimeInMinutes": 139.6666666667,
                   "estimatedArrivalTime": 1652767200000,
                   "estimatedDepartureTime": 1652767800000,
                   "isTimeWindowSatisfied": true
               },
               {
                   "pointId": "Store11",
                   "lat": 25.08003,
                   "lng": 55.1455,
                   "parentPointId": "DC1",
                   "serviceTimeInMinutes": 15,
                   "numberOfUnits": 1,
                   "isOffloading": true,
                   "timeSlot": {
                       "start": 1652774400000,
                       "end": 1652783400000
                   },
                   "vehicleCurrentCapacityAfter": 9,
                   "waitingTimeInMinutes": 95.71666666670001,
                   "estimatedArrivalTime": 1652774400000,
                   "estimatedDepartureTime": 1652775300000,
                   "isTimeWindowSatisfied": true
               },
               {
                   "pointId": "Store17",
                   "lat": 25.15673,
                   "lng": 55.24967,
                   "parentPointId": "DC1",
                   "serviceTimeInMinutes": 10,
                   "numberOfUnits": 2,
                   "isOffloading": true,
                   "timeSlot": {
                       "start": 1652781600000,
                       "end": 1652787600000
                   },
                   "vehicleCurrentCapacityAfter": 7,
                   "waitingTimeInMinutes": 84.16666666660001,
                   "estimatedArrivalTime": 1652781600000,
                   "estimatedDepartureTime": 1652782200000,
                   "isTimeWindowSatisfied": true
               },
               {
                   "pointId": "Store9",
                   "lat": 25.22798,
                   "lng": 55.27358,
                   "parentPointId": "DC1",
                   "serviceTimeInMinutes": 10,
                   "numberOfUnits": 1,
                   "isOffloading": true,
                   "timeSlot": {
                       "start": 1652788800000,
                       "end": 1652794800000
                   },
                   "vehicleCurrentCapacityAfter": 6,
                   "waitingTimeInMinutes": 88.86666666669998,
                   "estimatedArrivalTime": 1652788800000,
                   "estimatedDepartureTime": 1652789400000,
                   "isTimeWindowSatisfied": true
               },
               {
                   "pointId": "Store7",
                   "lat": 24.98923,
                   "lng": 55.15682,
                   "parentPointId": "DC1",
                   "serviceTimeInMinutes": 20,
                   "numberOfUnits": 2,
                   "isOffloading": true,
                   "timeSlot": {
                       "start": 1652788800000,
                       "end": 1652800800000
                   },
                   "vehicleCurrentCapacityAfter": 4,
                   "waitingTimeInMinutes": 0,
                   "estimatedArrivalTime": 1652791751000,
                   "estimatedDepartureTime": 1652792951000,
                   "isTimeWindowSatisfied": true
               },
               {
                   "pointId": "Store1",
                   "lat": 25.18027,
                   "lng": 55.26763,
                   "parentPointId": "DC1",
                   "serviceTimeInMinutes": 15,
                   "numberOfUnits": 1,
                   "isOffloading": true,
                   "timeSlot": {
                       "start": 1652796000000,
                       "end": 1652805000000
                   },
                   "vehicleCurrentCapacityAfter": 3,
                   "waitingTimeInMinutes": 18.799999999999955,
                   "estimatedArrivalTime": 1652796000000,
                   "estimatedDepartureTime": 1652796900000,
                   "isTimeWindowSatisfied": true
               },
               {
                   "pointId": "Store15",
                   "lat": 24.99721,
                   "lng": 55.17182,
                   "parentPointId": "DC1",
                   "serviceTimeInMinutes": 15,
                   "numberOfUnits": 2,
                   "isOffloading": true,
                   "timeSlot": {
                       "start": 1652796000000,
                       "end": 1652805000000
                   },
                   "vehicleCurrentCapacityAfter": 1,
                   "waitingTimeInMinutes": 0,
                   "estimatedArrivalTime": 1652798628000,
                   "estimatedDepartureTime": 1652799528000,
                   "isTimeWindowSatisfied": true
               },
               {
                   "pointId": "Store5",
                   "lat": 25.0066,
                   "lng": 55.1151,
                   "parentPointId": "DC1",
                   "serviceTimeInMinutes": 15,
                   "numberOfUnits": 1,
                   "isOffloading": true,
                   "timeSlot": {
                       "start": 1652803200000,
                       "end": 1652812200000
                   },
                   "vehicleCurrentCapacityAfter": 0,
                   "waitingTimeInMinutes": 43.85000000000002,
                   "estimatedArrivalTime": 1652803200000,
                   "estimatedDepartureTime": 1652804100000,
                   "isTimeWindowSatisfied": true
               }
           ],
           "violations": [
               "Violated avoid difficult turns.",
               "Violated vehicle restriction."
           ]
       },
       {
           "tripId": "47ca93ca-f6b6-46a8-b4fd-6d4f33dacd9d",
           "vehicleId": "truck3",
           "vehicleType": "truck",
           "vehicleunitCapacity": 16,
           "summary": {
               "travelTimeInSeconds": 29209,
               "distanceInMeter": 107540,
               "routeCostAED": 0,
               "costPerDeliveryAED": 0.0,
               "startTime": 1652760791000,
               "endTime": 1652790000000
           },
           "trip": [
               {
                   "pointId": "Start",
                   "lat": 25.101162341927317,
                   "lng": 55.46645099344764,
                   "parentPointId": "",
                   "serviceTimeInMinutes": 0,
                   "numberOfUnits": 0,
                   "isOffloading": false,
                   "timeSlot": {
                       "start": 0,
                       "end": 0
                   },
                   "vehicleCurrentCapacityAfter": 0,
                   "waitingTimeInMinutes": 0,
                   "estimatedArrivalTime": 1652760791000,
                   "estimatedDepartureTime": 1652760791000,
                   "isTimeWindowSatisfied": true
               },
               {
                   "pointId": "DC2",
                   "lat": 24.98797,
                   "lng": 55.08656,
                   "parentPointId": "",
                   "serviceTimeInMinutes": 10,
                   "numberOfUnits": 1,
                   "isOffloading": false,
                   "timeSlot": {
                       "start": 1652763600000,
                       "end": 1652766600000
                   },
                   "isHardRelationship": true,
                   "vehicleCurrentCapacityAfter": 1,
                   "waitingTimeInMinutes": 0,
                   "estimatedArrivalTime": 1652766000000,
                   "estimatedDepartureTime": 1652766600000,
                   "isTimeWindowSatisfied": true
               },
               {
                   "pointId": "Store12",
                   "lat": 25.16091,
                   "lng": 55.23487,
                   "parentPointId": "DC2",
                   "serviceTimeInMinutes": 20,
                   "numberOfUnits": 1,
                   "isOffloading": true,
                   "timeSlot": {
                       "start": 1652788800000,
                       "end": 1652800800000
                   },
                   "vehicleCurrentCapacityAfter": 0,
                   "waitingTimeInMinutes": 343.3333333334,
                   "estimatedArrivalTime": 1652788800000,
                   "estimatedDepartureTime": 1652790000000,
                   "isTimeWindowSatisfied": true
               }
           ],
           "violations": [
               "Violated avoid difficult turns."
           ]
       }
   ],
   "unservedNodes": [],
   "additionalNoOfVehicles": []
}

Validation Reference

Info! If the API response is showing any error message, you should modify the request for the corresponding error and call the API again. The perfect request should satisfy all the above conditions.

IDError in codeMessage
611EmptyNumberOfUnitsErrorPoint has an empty numberOfUnits
612idSpecialCharacterErrorid must be a string without special characters
613parentIdSpecialCharacterErrorparentPointId must be a string without special characters
614startLocationUnknownErrorstartLocation not specified in request
621parentIdNotEmptyErrorPickup parentPointId is not an empty string
622parentIdEmptyErrorDrop-off parentPointId is an empty string
623MinimumPointsErrorRequest does not have the minimum pair of points
624parentIdInvalidErrorInvalid parentPointID point not in request
631UnitCapacityExceededErrornumberOfUnits is larger than the maximum UnitCapacity of vehicles
632UnequalnumberOfUnitsErrorPickups sum(numberOfUnits) not equal Drop-offs sum(numberOfUnits)
633numberOfUnitsZeroErrorPickup numberOfUnits must be larger than 0
634AtLeastOneUnequalNumberOfUnitsErrorAt least one pick-ups numberOfUnits is not equal to the sum(numberOfUnits) of its Drop-offs
641startLargerThanendErrorPoint start time larger than end time in timeSlot
642startDateTimeExceededErrorstart or end time in timeSlot smaller than startDateTime
643startSameAsEndErrorstart and end time in timeSlot are same
651UnitCapacityOrderErrorUnitCapacity of vehicles not in descending order
661isHardRelationshipErrorMissing isHardRelationship
671NonUniquePointIdErrorNon unique point ids.
672NonUniqueVehicleIdErrorNon unique vehicle ids.

API Documentation

To view the Open API documentation for the API click here