Fleet Management API (1.1.3)

The Fleet Management REST API is a powerful and flexible solution for optimizing and managing your fleet operations. This API is designed to streamline route planning, order fulfillment, and vehicle assignments by leveraging Vehicle Routing Problem (VRP) optimization. Whether you are managing deliveries, service operations, or logistics, our API provides all the tools you need to maximize efficiency and minimize costs.

customer

Operations on Customer

Add a list of customers.

Saves a list of new customers in the database.

Authorizations:
ApiKey
Request Body schema: application/json
required

The list with customers that has to be added.

Array of objects (AddCustomer)
Array
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string

Responses

Response Schema: application/json
Array of objects (Customer)
Array
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
{
  • "customers": [
    • {
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "alias": "Ana",
      • "firstName": "Ana",
      • "lastName": "Lyn",
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "email": "email@yahoo.com",
      • "phoneNumber": "+1234567",
      • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
      }
    ]
}

Response samples

Content type
application/json
{
  • "customers": [
    • {
      • "id": 123456,
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "alias": "Ana",
      • "firstName": "Ana",
      • "lastName": "Lyn",
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "email": "email@yahoo.com",
      • "phoneNumber": "+1234567",
      • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
      }
    ]
}

Get all customers

Get customers

Authorizations:
ApiKey
query Parameters
search
string

The search parameter for general search across customers.

id
string

Id parameter used to filter customers by id. The id parameter can be formatted as id=value:exact if you want to perform an exact search.

alias
string

Alias parameter used to filter customers by alias. The alias parameter can be formatted as alias=value:exact if you want to perform an exact search.

firstName
string

FirstName parameter used to filter customers by first name. The firstName parameter can be formatted as firstName=value:exact if you want to perform an exact search.

lastName
string

LastName parameter used to filter customers by last name. The lastName parameter can be formatted as lastName=value:exact if you want to perform an exact search.

location
string
Example: location=(latitude, logitude)

Location parameter used to filter customers by location. The location parameter can be formatted as location=value:exact if you want to perform an exact search.

country
string

Country parameter used to filter customers by country. The country parameter can be formatted as country=value:exact if you want to perform an exact search.

state
string

State parameter used to filter customers by state. The state parameter can be formatted as state=value:exact if you want to perform an exact search.

county
string

County parameter used to filter customers by county. The county parameter can be formatted as county=value:exact if you want to perform an exact search.

city
string

City parameter used to filter customers by city. The city parameter can be formatted as city=value:exact if you want to perform an exact search.

postalCode
string

PostalCode parameter used to filter customers by postal code. The postalCode parameter can be formatted as postalCode=value:exact if you want to perform an exact search.

streetName
string

StreetName parameter used to filter customers by street name. The streetName parameter can be formatted as streetName=value:exact if you want to perform an exact search.

streetNumber
string

StreetNumber parameter used to filter customers by street number. The streetNumber parameter can be formatted as streetNumber=value:exact if you want to perform an exact search.

extra
string

Extra parameter used to filter customers by extra value from address. The extra parameter can be formatted as extra=value:exact if you want to perform an exact search.

email
string

Email parameter used to filter customers by email. The email parameter can be formatted as email=value:exact if you want to perform an exact search.

phoneNumber
string

PhoneNumber parameter used to filter customers by phone number. The phoneNumber parameter can be formatted as phoneNumber=value:exact if you want to perform an exact search.

customData
string

CustomData parameter used to filter customers by custom data. The customData parameter can be formatted as customData=value:exact if you want to perform an exact search.

sort
string
Example: sort=firstName:asc,lastName:desc,alias:asc

The sort parameter will have this format sort = column1:asc/desc,column2:asc/desc,column3:asc/desc. Columns will be chosen from this list(id, alias, firstName, lastName, latitude, longitude, country, state, county, city, postalCode, streetName, streetNumber,extra, email, phoneNumber, customData)

includeColumns
string
Example: includeColumns=firstName,lastName,alias

The includeColumns parameter will have this format includeColumns = column1,column2,column3. Columns will be chosen from this list(id, alias, idAddress, firstName, lastName, latitude, longitude, country, state, county, city, postalCode, streetName, streetNumber,extra, email, phoneNumber, customData)

page
integer <int32>

The page parameter indicates the page number.

per_page
integer <int32>

The per_page parameter indicates the number of items on each page.

Responses

Response Schema: application/json
Array
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
[
  • {
    • "id": 123456,
    • "location": [
      • 45.652871,
      • 25.585588
      ],
    • "alias": "Ana",
    • "firstName": "Ana",
    • "lastName": "Lyn",
    • "address": {
      • "country": "France",
      • "state": "Aquitaine",
      • "county": "Aquitaine",
      • "city": "Bordeaux",
      • "postalCode": "33300",
      • "streetName": "Jean Jaures",
      • "streetNumber": "82",
      • "extra": "94301"
      },
    • "email": "email@yahoo.com",
    • "phoneNumber": "+1234567",
    • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
    }
]

Deletes customers

Authorizations:
ApiKey
Request Body schema: application/json
required

The list of ids of the customers that have to be deleted.

Array
integer <int64>

Responses

Response Schema: application/json
result
string

Operation done successfully

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
[
  • 123456,
  • 123457,
  • 123458
]

Response samples

Content type
application/json
{
  • "result": "Operation done successfully."
}

Get a customer by id

Get an existing customer by Id

Authorizations:
ApiKey
path Parameters
id
required
integer <int64>

ID of the customer to return

Responses

Response Schema: application/json
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
{
  • "id": 123456,
  • "location": [
    • 45.652871,
    • 25.585588
    ],
  • "alias": "Ana",
  • "firstName": "Ana",
  • "lastName": "Lyn",
  • "address": {
    • "country": "France",
    • "state": "Aquitaine",
    • "county": "Aquitaine",
    • "city": "Bordeaux",
    • "postalCode": "33300",
    • "streetName": "Jean Jaures",
    • "streetNumber": "82",
    • "extra": "94301"
    },
  • "email": "email@yahoo.com",
  • "phoneNumber": "+1234567",
  • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
}

Update a customer

Update an existing customer by Id

Authorizations:
ApiKey
path Parameters
id
required
integer <int64>

ID of the customer to update

Request Body schema: application/json
required

Updated data

id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string

Responses

Response Schema: application/json
result
string

Operation done successfully

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
{
  • "id": 123456,
  • "location": [
    • 45.652871,
    • 25.585588
    ],
  • "alias": "Ana",
  • "firstName": "Ana",
  • "lastName": "Lyn",
  • "address": {
    • "country": "France",
    • "state": "Aquitaine",
    • "county": "Aquitaine",
    • "city": "Bordeaux",
    • "postalCode": "33300",
    • "streetName": "Jean Jaures",
    • "streetNumber": "82",
    • "extra": "94301"
    },
  • "email": "email@yahoo.com",
  • "phoneNumber": "+1234567",
  • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
}

Response samples

Content type
application/json
{
  • "result": "Operation done successfully."
}

Returns all the orders a customer has created and the optimizations and routes where they are used

Authorizations:
ApiKey
path Parameters
id
required
integer <int64>

ID of customer

Responses

Response Schema: application/json
Array of objects (CustomerHistoryObj)
Array
object (Order)
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
object
object (Optimization)
id
required
integer <int64>
required
Array of objects (ConfigurationParameters)
Array
name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

allowDroppingOrders
boolean

Specifies whether the algorithm is allowed to drop orders if no solution is found by visiting all of them. Default is false.

groupingOrders
boolean

Specify if the orders will be grouped. If the distance between any two orders is less than 10 meters, those orders will be considered part of the same group. Default is false.

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
distanceUnit
integer
Default: 0
Enum: 0 1

The unit of measure used for distances throughout the optimization. Distance Unit :

  • 0 - eKilometers
  • 1 - eMiles
Array of objects (OrdersSequenceOptions)

These options are used to specify the association between different orders that should be visited in a certain order.

Array
sequenceOptions
integer
Enum: 0 1 2 3

Vehicle type:

  • 0 - eInSameRoute
  • 1 - eInSequence
  • 2 - eInFixedSequence
  • 3 - eInPairs
ordersSequence
Array of integers (Matrix2DI64) [ items <int64 >[ items <int64 > ] ]

A list of lists, where each inner list is a sequence of order ids.

required
Array of objects (Order)
Array
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
required
Array of objects (Departure)
Array
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
depotId
integer <int64>
Default: -1
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

numberOfPackages
integer <int64>
Default: 0
weight
number <double>
Default: 0
cube
number <double>
Default: 0
departureTime
integer <int64>
timeToNext
integer <int32>
Default: 0

The time that will be traveled to arrive at the next order. (in seconds)

distanceToNext
number <float>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

required
Array of objects (Destination)
Array
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

arrivalTime
integer <int64>

The vehicle arrival time at the order's location.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this destination in the distance unit set in the ConfigurationParameters.

required
Array of objects (Vehicle)
Array
id
required
integer <int64>
type
required
integer
Default: 0
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
name
string

Vehicle's name

maxLoadWeight
number <double>
Default: 99999999

The maximum weight that the vehicle can carry

maxLoadCube
number <double>
Default: 99999999

The maximum cubic volume that the vehicle can carry

startTime
integer <int64>
Default: 0

The start time of the working program, in minutes from midnight (time of day).

endTime
integer <int64>
Default: 1439

The end time of the working program, in minutes from midnight (time of day).

licensePlate
string

Vehicle's registration plate (only for cars and trucks)

status
integer
Default: 0
Enum: -1 0 1

Vehicle's status:

  • -1 - eUnAvailable
  • 0 - eAvailable
  • 1 - eEnRoute
lastPosition
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

make
string

Vehicle's make (only for cars, trucks, bikes and e-bikes)

model
string

Vehicle's model (only for cars, trucks, bikes and e-bikes)

fuelType
integer
Default: 2
Enum: 0 1 2 3 4 5 6

Fuel type (only for cars and trucks):

  • -1 - eNone
  • 0 - eDieselStandard
  • 1 - eDieselPremium
  • 2 - eGasolineStandard
  • 3 - eGasolinePremium
  • 4 - eElectric
  • 5 - eLPG
consumption
number <double>
Default: 0

Vehicle's consumption (only for cars and trucks)

bikerWeight
number <double>
Default: 0

Biker + bike weight (only for e-bikes)

bikePower
number <double>
Default: 0

The power of the bicycle in watts (only for e-bikes)

height
number <double>
Default: 0

The height of the vehicle.

width
number <double>
Default: 0

The width of the vehicle.

weight
number <double>
Default: 0

The weight of the vehicle.

length
number <double>
Default: 0

The length of the vehicle.

axleLoad
number <double>
Default: 0

The maximum axle load that the vehicle can carry.

required
Array of objects (VehicleConstraints)
Array
fuelPrice
number <double>
Default: 0

The fuel cost (filled when the vehicle is used in a route).

startDate
required
integer <int64>

The date the vehicle begins its route, provided as a timestamp with the time set to midnight.

maxNumberOfPackages
integer <int64>
Default: 99999999

The maximum number of packages that the vehicle can carry.

minNumberOfOrders
integer <int64>
Default: 0

The minimum number of orders that the vehicle must visit

maxNumberOfOrders
integer <int64>
Default: 99999999

The maximum number of orders that the vehicle can visit.

minDistance
number <double>
Default: 0

The minimum distance that the vehicle must travel.

maxDistance
number <double>
Default: 99999999

The maximum distance that the vehicle can travel.

maxRevenue
number <double>
Default: 99999999

The maximum revenue that the vehicle can receive in total.

creationTimestamp
required
integer <int64>
Array of objects (Route)
Array
id
required
integer <int64>
optimizationId
required
integer <int64>
idVehicle
required
integer <int64>
matrixBuiltType
integer
Default: 1
Enum: 0 1

What distance formula should be used to build the matrix. Matrix Built Type:

  • 0 - eSet = Set by the user using "matrices" field
  • 1 - eReal = Road map distances and times
Array of objects (MatricesObj)

Is set only if matrixBuildType = eSet. For each type of vehicle used in the optimization/route, a distance and a time matrix should be set

Array
vehicleType
integer
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
distMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
timeMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
rideStatus
integer
Default: 1
Enum: 0 1 2 3 4

The status of the route's ride. Ride Status:

  • 0 - eFinished = The ride is finished
  • 1 - eNew = The ride is new and ready to start
  • 2 - eStarted = The ride was started by a vehicle
  • 3 - eCanceledByDriver = The ride was canceled by a vehicle's driver
  • 4 - eCanceledByFleet = The ride was canceled by the fleet manager
required
object (ConfigurationParameters)
name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

allowDroppingOrders
boolean

Specifies whether the algorithm is allowed to drop orders if no solution is found by visiting all of them. Default is false.

groupingOrders
boolean

Specify if the orders will be grouped. If the distance between any two orders is less than 10 meters, those orders will be considered part of the same group. Default is false.

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
distanceUnit
integer
Default: 0
Enum: 0 1

The unit of measure used for distances throughout the optimization. Distance Unit :

  • 0 - eKilometers
  • 1 - eMiles
Array of objects (OrdersSequenceOptions)

These options are used to specify the association between different orders that should be visited in a certain order.

Array
sequenceOptions
integer
Enum: 0 1 2 3

Vehicle type:

  • 0 - eInSameRoute
  • 1 - eInSequence
  • 2 - eInFixedSequence
  • 3 - eInPairs
ordersSequence
Array of integers (Matrix2DI64) [ items <int64 >[ items <int64 > ] ]

A list of lists, where each inner list is a sequence of order ids.

required
object (Departure)
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
depotId
integer <int64>
Default: -1
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

numberOfPackages
integer <int64>
Default: 0
weight
number <double>
Default: 0
cube
number <double>
Default: 0
departureTime
integer <int64>
timeToNext
integer <int32>
Default: 0

The time that will be traveled to arrive at the next order. (in seconds)

distanceToNext
number <float>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

required
object (Destination)
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

arrivalTime
integer <int64>

The vehicle arrival time at the order's location.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this destination in the distance unit set in the ConfigurationParameters.

required
Array of objects (VehicleConstraints)
Array
fuelPrice
number <double>
Default: 0

The fuel cost (filled when the vehicle is used in a route).

startDate
required
integer <int64>

The date the vehicle begins its route, provided as a timestamp with the time set to midnight.

maxNumberOfPackages
integer <int64>
Default: 99999999

The maximum number of packages that the vehicle can carry.

minNumberOfOrders
integer <int64>
Default: 0

The minimum number of orders that the vehicle must visit

maxNumberOfOrders
integer <int64>
Default: 99999999

The maximum number of orders that the vehicle can visit.

minDistance
number <double>
Default: 0

The minimum distance that the vehicle must travel.

maxDistance
number <double>
Default: 99999999

The maximum distance that the vehicle can travel.

maxRevenue
number <double>
Default: 99999999

The maximum revenue that the vehicle can receive in total.

required
Array of objects (RouteOrder)
Array
indexInRoute
integer <int32>
Default: 0

The index of the order in the orders list of the route (the order of visit).

indexInOptimization
integer <int32>
Default: 0

The index of the order in the optimization orders list.

object (Order)
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

actualLocation
Array of numbers <double> (ActualLocation) [ items <double > ]

The actual geographical coordinates in [latitude, longitude] format where the order was serviced, if it was serviced, otherwise this field will not be present.

arrivalTime
integer <int64>
Default: 0

The vehicle arrival time at the order's location.

timeToNextOrder
integer <int32>
Default: 0

The duration between the current order and the next order ( seconds ).

waitTime
integer <int32>
Default: 0

The amount of time that the vehicle has to wait at the current order's location, in order to arrive between the time window to the next order ( seconds ).

numberOfPackagesAtArrival
integer <int32>
Default: 0

The amount of the collected number of packages until this order.

collectedNumberOfPackages
integer <int32>
Default: 0

The number of packages collected from this order.

deliveredNumberOfPackages
integer <int32>
Default: 0

The number of packages delivered at this order.

weightAtArrival
number <double>
Default: 0

The amount of the collected weight until this order.

collectedWeight
number <double>
Default: 0

The weight collected from this order.

deliveredWeight
number <double>
Default: 0

The weight delivered at this order.

cubeAtArrival
number <double>
Default: 0

The total cubic volume collected until this order.

collectedCube
number <double>
Default: 0

The cubic volume collected from this order.

deliveredCube
number <double>
Default: 0

The cubic volume delivered at this order.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this order in the distance unit set in the ConfigurationParameters.

distanceToNextOrder
number <double>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

revenueAtArrival
number <double>
Default: 0

The collected revenue until this order.

visitTimestamp
integer <int64>
Default: 0

The time when the route order was visited.

totalDistance
required
number <float>

The unit of measure for the distance is kilometers or miles, it depends on what the user has chosen in the configuration parameters.

totalTime
required
integer <int32>

Total duration of the route in seconds.

totalServiceTime
required
integer <int32>

Total service time of all the orders of the route in seconds.

totalWaitTime
required
integer <int32>

Total wait time of the route in seconds.

neededFuel
required
number <float>

Total amount of fuel used during the route. The unit of measure for consumption is liter or kw/h depending on the fuel type.

price
required
number <float>

Cost of the route (the price for the total fuel that will be consumed). The price is calculated depending on the vehicle's consumption, the price of the vehicle's fuel type and the total distance.

required
string or Array of Location (numbers)
Any of
string
creationTimestamp
required
integer <int64>
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
{
  • "history": [
    • {
      • "order": {
        • "id": 123456,
        • "creationTimestamp": 1689942672,
        • "customerInfo": {
          • "id": 123456,
          • "location": [
            • 45.652871,
            • 25.585588
            ],
          • "alias": "Ana",
          • "firstName": "Ana",
          • "lastName": "Lyn",
          • "address": {
            • "country": "France",
            • "state": "Aquitaine",
            • "county": "Aquitaine",
            • "city": "Bordeaux",
            • "postalCode": "33300",
            • "streetName": "Jean Jaures",
            • "streetNumber": "82",
            • "extra": "94301"
            },
          • "email": "email@yahoo.com",
          • "phoneNumber": "+1234567",
          • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
          },
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "alias": "Ana",
        • "type": 0,
        • "priority": 0,
        • "numberOfPackages": 10,
        • "weight": 5.5,
        • "cube": 5.5,
        • "timeWindow": [
          • 750,
          • 1020
          ],
        • "serviceTime": 400,
        • "revenue": 5.5,
        • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
        • "firstName": "Ana",
        • "lastName": "Lyn",
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "phoneNumber": "+1234567",
        • "status": 0,
        • "state": 0,
        • "depotId": 123456
        },
      • "optimizationAndRoute": {
        • "optimization": {
          • "id": 10,
          • "configurationParameters": [
            • {
              • "name": "Optimization 50 vehicles in Berlin",
              • "ignoreTimeWindow": true,
              • "allowDroppingOrders": false,
              • "groupingOrders": false,
              • "balancedRoutes": false,
              • "arrangeCriterion": 0,
              • "optimizationCriterion": 0,
              • "optimizationQuality": 0,
              • "maxTimeToOptimize": 600,
              • "maxWaitTime": 600,
              • "routeType": 0,
              • "restrictions": 0,
              • "distanceUnit": 0,
              • "orderSequenceOptions": [
                • {
                  • "sequenceOptions": 0,
                  • "ordersSequence": [
                    • [
                      • 123456,
                      • 234567,
                      • 345678,
                      • 456789
                      ],
                    • [
                      • 712345,
                      • 612345,
                      • 102345,
                      • 912345
                      ]
                    ]
                  }
                ]
              }
            ],
          • "orders": [
            • {
              • "id": 123456,
              • "creationTimestamp": 1689942672,
              • "customerInfo": {
                • "id": 123456,
                • "location": [
                  • 45.652871,
                  • 25.585588
                  ],
                • "alias": "Ana",
                • "firstName": "Ana",
                • "lastName": "Lyn",
                • "address": {
                  • "country": "France",
                  • "state": "Aquitaine",
                  • "county": "Aquitaine",
                  • "city": "Bordeaux",
                  • "postalCode": "33300",
                  • "streetName": "Jean Jaures",
                  • "streetNumber": "82",
                  • "extra": "94301"
                  },
                • "email": "email@yahoo.com",
                • "phoneNumber": "+1234567",
                • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
                },
              • "location": [
                • 45.652871,
                • 25.585588
                ],
              • "alias": "Ana",
              • "type": 0,
              • "priority": 0,
              • "numberOfPackages": 10,
              • "weight": 5.5,
              • "cube": 5.5,
              • "timeWindow": [
                • 750,
                • 1020
                ],
              • "serviceTime": 400,
              • "revenue": 5.5,
              • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
              • "firstName": "Ana",
              • "lastName": "Lyn",
              • "address": {
                • "country": "France",
                • "state": "Aquitaine",
                • "county": "Aquitaine",
                • "city": "Bordeaux",
                • "postalCode": "33300",
                • "streetName": "Jean Jaures",
                • "streetNumber": "82",
                • "extra": "94301"
                },
              • "phoneNumber": "+1234567",
              • "status": 0,
              • "state": 0,
              • "depotId": 123456
              }
            ],
          • "departures": [
            • {
              • "alias": "Ana",
              • "location": [
                • 45.652871,
                • 25.585588
                ],
              • "address": {
                • "country": "France",
                • "state": "Aquitaine",
                • "county": "Aquitaine",
                • "city": "Bordeaux",
                • "postalCode": "33300",
                • "streetName": "Jean Jaures",
                • "streetNumber": "82",
                • "extra": "94301"
                },
              • "depotId": 123456,
              • "matchedLocation": [
                • 45.652871,
                • 25.585588
                ],
              • "numberOfPackages": 10,
              • "weight": 5.5,
              • "cube": 5.5,
              • "departureTime": 1602684618476,
              • "timeToNext": 5000,
              • "distanceToNext": 99.5
              }
            ],
          • "destinations": [
            • {
              • "alias": "Ana",
              • "location": [
                • 45.652871,
                • 25.585588
                ],
              • "address": {
                • "country": "France",
                • "state": "Aquitaine",
                • "county": "Aquitaine",
                • "city": "Bordeaux",
                • "postalCode": "33300",
                • "streetName": "Jean Jaures",
                • "streetNumber": "82",
                • "extra": "94301"
                },
              • "matchedLocation": [
                • 45.652871,
                • 25.585588
                ],
              • "arrivalTime": 1602684618476,
              • "traveledDistance": 99.5
              }
            ],
          • "vehicles": [
            • {
              • "id": 123456,
              • "type": 0,
              • "name": "string",
              • "maxLoadWeight": 99.5,
              • "maxLoadCube": 99.5,
              • "startTime": 540,
              • "endTime": 1000,
              • "licensePlate": "string",
              • "status": -1,
              • "lastPosition": [
                • 45.652871,
                • 25.585588
                ],
              • "make": "string",
              • "model": "string",
              • "fuelType": 0,
              • "consumption": 99.5,
              • "bikerWeight": 99.5,
              • "bikePower": 99.5,
              • "height": 99.5,
              • "width": 99.5,
              • "weight": 99.5,
              • "length": 99.5,
              • "axleLoad": 99.5
              }
            ],
          • "vehiclesConstraints": [
            • {
              • "fuelPrice": 1.5,
              • "startDate": 1730332800000,
              • "maxNumberOfPackages": 9999,
              • "minNumberOfOrders": 0,
              • "maxNumberOfOrders": 9999,
              • "minDistance": 1.5,
              • "maxDistance": 999.5,
              • "maxRevenue": 999.5
              }
            ],
          • "creationTimestamp": 1689942672
          },
        • "route": [
          • {
            • "id": 123456,
            • "optimizationId": 123456,
            • "idVehicle": 123456,
            • "matrixBuiltType": 0,
            • "matrices": [
              • {
                • "vehicleType": 0,
                • "distMatrix": [
                  • [
                    • 1,
                    • 2,
                    • 3,
                    • 4
                    ],
                  • [
                    • 7,
                    • 6,
                    • 10,
                    • 9
                    ]
                  ],
                • "timeMatrix": [
                  • [
                    • 1,
                    • 2,
                    • 3,
                    • 4
                    ],
                  • [
                    • 7,
                    • 6,
                    • 10,
                    • 9
                    ]
                  ]
                }
              ],
            • "rideStatus": 0,
            • "configurationParameters": {
              • "name": "Optimization 50 vehicles in Berlin",
              • "ignoreTimeWindow": true,
              • "allowDroppingOrders": false,
              • "groupingOrders": false,
              • "balancedRoutes": false,
              • "arrangeCriterion": 0,
              • "optimizationCriterion": 0,
              • "optimizationQuality": 0,
              • "maxTimeToOptimize": 600,
              • "maxWaitTime": 600,
              • "routeType": 0,
              • "restrictions": 0,
              • "distanceUnit": 0,
              • "orderSequenceOptions": [
                • {
                  • "sequenceOptions": 0,
                  • "ordersSequence": [
                    • [
                      • 123456,
                      • 234567,
                      • 345678,
                      • 456789
                      ],
                    • [
                      • 712345,
                      • 612345,
                      • 102345,
                      • 912345
                      ]
                    ]
                  }
                ]
              },
            • "departure": {
              • "alias": "Ana",
              • "location": [
                • 45.652871,
                • 25.585588
                ],
              • "address": {
                • "country": "France",
                • "state": "Aquitaine",
                • "county": "Aquitaine",
                • "city": "Bordeaux",
                • "postalCode": "33300",
                • "streetName": "Jean Jaures",
                • "streetNumber": "82",
                • "extra": "94301"
                },
              • "depotId": 123456,
              • "matchedLocation": [
                • 45.652871,
                • 25.585588
                ],
              • "numberOfPackages": 10,
              • "weight": 5.5,
              • "cube": 5.5,
              • "departureTime": 1602684618476,
              • "timeToNext": 5000,
              • "distanceToNext": 99.5
              },
            • "destination": {
              • "alias": "Ana",
              • "location": [
                • 45.652871,
                • 25.585588
                ],
              • "address": {
                • "country": "France",
                • "state": "Aquitaine",
                • "county": "Aquitaine",
                • "city": "Bordeaux",
                • "postalCode": "33300",
                • "streetName": "Jean Jaures",
                • "streetNumber": "82",
                • "extra": "94301"
                },
              • "matchedLocation": [
                • 45.652871,
                • 25.585588
                ],
              • "arrivalTime": 1602684618476,
              • "traveledDistance": 99.5
              },
            • "vehicleConstraints": [
              • {
                • "fuelPrice": 1.5,
                • "startDate": 1730332800000,
                • "maxNumberOfPackages": 9999,
                • "minNumberOfOrders": 0,
                • "maxNumberOfOrders": 9999,
                • "minDistance": 1.5,
                • "maxDistance": 999.5,
                • "maxRevenue": 999.5
                }
              ],
            • "orders": [
              • {
                • "indexInRoute": 10,
                • "indexInOptimization": 10,
                • "orderInfo": {
                  • "id": 123456,
                  • "creationTimestamp": 1689942672,
                  • "customerInfo": {
                    • "id": null,
                    • "location": null,
                    • "alias": null,
                    • "firstName": null,
                    • "lastName": null,
                    • "address": null,
                    • "email": null,
                    • "phoneNumber": null,
                    • "customData": null
                    },
                  • "location": [
                    • 45.652871,
                    • 25.585588
                    ],
                  • "alias": "Ana",
                  • "type": 0,
                  • "priority": 0,
                  • "numberOfPackages": 10,
                  • "weight": 5.5,
                  • "cube": 5.5,
                  • "timeWindow": [
                    • 750,
                    • 1020
                    ],
                  • "serviceTime": 400,
                  • "revenue": 5.5,
                  • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
                  • "firstName": "Ana",
                  • "lastName": "Lyn",
                  • "address": {
                    • "country": null,
                    • "state": null,
                    • "county": null,
                    • "city": null,
                    • "postalCode": null,
                    • "streetName": null,
                    • "streetNumber": null,
                    • "extra": null
                    },
                  • "phoneNumber": "+1234567",
                  • "status": 0,
                  • "state": 0,
                  • "depotId": 123456
                  },
                • "matchedLocation": [
                  • 45.652871,
                  • 25.585588
                  ],
                • "actualLocation": [
                  • 45.652871,
                  • 25.585588
                  ],
                • "arrivalTime": 10,
                • "timeToNextOrder": 10,
                • "waitTime": 10,
                • "numberOfPackagesAtArrival": 10,
                • "collectedNumberOfPackages": 10,
                • "deliveredNumberOfPackages": 10,
                • "weightAtArrival": 5.5,
                • "collectedWeight": 5.5,
                • "deliveredWeight": 5.5,
                • "cubeAtArrival": 5.5,
                • "collectedCube": 5.5,
                • "deliveredCube": 5.5,
                • "traveledDistance": 5.5,
                • "distanceToNextOrder": 5.5,
                • "revenueAtArrival": 5.5,
                • "visitTimestamp": 10
                }
              ],
            • "totalDistance": 250.5,
            • "totalTime": 25000,
            • "totalServiceTime": 6000,
            • "totalWaitTime": 500,
            • "neededFuel": 250.5,
            • "price": 430.5,
            • "shape": "string",
            • "creationTimestamp": 1602684618476
            }
          ]
        }
      }
    ]
}

order

Operations on Orders

Add a list of orders.

Saves a list of new orders in the database.

Authorizations:
ApiKey
Request Body schema: application/json
required

The list with orders that has to be added.

Array of objects (ImportOrder)
Array
email
string

The email address that will be used to create a new customer if no customer ID is set.

customerId
integer <int64>

The id of an exiting customer. If there is no customer, we can create a new one by filling in the email field.

location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>

Responses

Response Schema: application/json
Array of objects (Order)
Array
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
{
  • "orders": [
    • {
      • "email": "email@mail.com",
      • "customerId": 123456,
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "alias": "Ana",
      • "type": 0,
      • "priority": 0,
      • "numberOfPackages": 10,
      • "weight": 5.5,
      • "cube": 5.5,
      • "timeWindow": [
        • 750,
        • 1020
        ],
      • "serviceTime": 400,
      • "revenue": 5.5,
      • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
      • "firstName": "Ana",
      • "lastName": "Lyn",
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "phoneNumber": "+1234567",
      • "status": 0,
      • "state": 0,
      • "depotId": 123456
      }
    ]
}

Response samples

Content type
application/json
{
  • "orders": [
    • {
      • "id": 123456,
      • "creationTimestamp": 1689942672,
      • "customerInfo": {
        • "id": 123456,
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "alias": "Ana",
        • "firstName": "Ana",
        • "lastName": "Lyn",
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "email": "email@yahoo.com",
        • "phoneNumber": "+1234567",
        • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
        },
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "alias": "Ana",
      • "type": 0,
      • "priority": 0,
      • "numberOfPackages": 10,
      • "weight": 5.5,
      • "cube": 5.5,
      • "timeWindow": [
        • 750,
        • 1020
        ],
      • "serviceTime": 400,
      • "revenue": 5.5,
      • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
      • "firstName": "Ana",
      • "lastName": "Lyn",
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "phoneNumber": "+1234567",
      • "status": 0,
      • "state": 0,
      • "depotId": 123456
      }
    ]
}

Get all orders

Get orders

Authorizations:
ApiKey
query Parameters
search
string

The search parameter for general search across orders.

id
string

Id parameter used to filter orders by id. The id parameter can be formatted as id=value:exact if you want to perform an exact search.

alias
string

Alias parameter used to filter orders by alias. The alias parameter can be formatted as alias=value:exact if you want to perform an exact search.

firstName
string

FirstName parameter used to filter orders by first name. The firstName parameter can be formatted as firstName=value:exact if you want to perform an exact search.

lastName
string

LastName parameter used to filter orders by last name. The lastName parameter can be formatted as lastName=value:exact if you want to perform an exact search.

location
string
Example: location=(latitude, logitude)

Location parameter used to filter orders by location. The location parameter can be formatted as location=value:exact if you want to perform an exact search.

country
string

Country parameter used to filter orders by country. The country parameter can be formatted as country=value:exact if you want to perform an exact search.

state
string

State parameter used to filter orders by state. The state parameter can be formatted as state=value:exact if you want to perform an exact search.

county
string

County parameter used to filter orders by county. The county parameter can be formatted as county=value:exact if you want to perform an exact search.

city
string

City parameter used to filter orders by city. The city parameter can be formatted as city=value:exact if you want to perform an exact search.

postalCode
string

PostalCode parameter used to filter orders by postal code. The postalCode parameter can be formatted as postalCode=value:exact if you want to perform an exact search.

streetName
string

StreetName parameter used to filter orders by street name. The streetName parameter can be formatted as streetName=value:exact if you want to perform an exact search.

streetNumber
string

StreetNumber parameter used to filter orders by street number. The streetNumber parameter can be formatted as streetNumber=value:exact if you want to perform an exact search.

extra
string

Extra parameter used to filter orders by extra value from address. The extra parameter can be formatted as extra=value:exact if you want to perform an exact search.

phoneNumber
string

PhoneNumber parameter used to filter orders by phone number. The phoneNumber parameter can be formatted as phoneNumber=value:exact if you want to perform an exact search.

type
string

Type parameter used to filter orders by type. The type parameter can be formatted as type=value.

status
string

Status parameter used to filter orders by status. The status parameter can be formatted as status=value.

orderState
string

OrderState parameter used to filter orders by state. The orderState parameter can be formatted as orderState=value.

timeWindowStart
string

TimeWindowStart parameter used to filter orders by time window start. The timeWindowStart parameter can be formatted as timeWindowStart=value:exact if you want to perform an exact search.

timeWindowEnd
string

TimeWindowEnd parameter used to filter orders by time window end. The timeWindowEnd parameter can be formatted as timeWindowEnd=value:exact if you want to perform an exact search.

creationTime
string

CreationTime parameter used to filter orders by creation time. The creationTime parameter can be formatted as creationTime=value:exact if you want to perform an exact search.

priority
string

Priority parameter used to filter orders by priority. The priority parameter can be formatted as priority=value.

customData
string

CustomData parameter used to filter orders by custom data. The customData parameter can be formatted as customData=value:exact if you want to perform an exact search.

customerId
string

CustomerId parameter used to filter orders by id of the customer. The customerId parameter can be formatted as customerId=value:exact if you want to perform an exact search.

depotId
string

DepotId parameter used to filter orders by id of the miscLocation. The depotId parameter can be formatted as depotId=value:exact if you want to perform an exact search.

sort
string
Example: sort=firstName:asc,lastName:desc,alias:asc

The sort parameter will have this format sort = column1:asc/desc,column2:asc/desc,column3:asc/desc. Columns will be chosen from this list(id, alias, firstName, lastName, latitude, longitude, country, state, county, city, postalCode, streetName, streetNumber,extra phoneNumber, type, timeWindowStart, timeWindowEnd, creationTime, serviceTime, priority, customData, customerId, depotId)

includeColumns
string
Example: includeColumns=firstName,lastName,alias

The includeColumns parameter will have this format includeColumns = column1,column2,column3. Columns will be chosen from this list(id,alias,firstName,lastName,phoneNumber,type,timeWindowStart,timeWindowEnd,serviceTime,creationtime,packages,revenue,cube,weight,priority,status,orderState,idCustomer,idDepot,idAddress,customData latitude, longitude, country, state, county, city, postalCode, streetName, streetNumber,extra)

page
integer <int32>

The page parameter indicates the page number.

per_page
integer <int32>

The per_page parameter indicates the number of items on each page.

Responses

Response Schema: application/json
Array
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
[
  • {
    • "id": 123456,
    • "creationTimestamp": 1689942672,
    • "customerInfo": {
      • "id": 123456,
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "alias": "Ana",
      • "firstName": "Ana",
      • "lastName": "Lyn",
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "email": "email@yahoo.com",
      • "phoneNumber": "+1234567",
      • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
      },
    • "location": [
      • 45.652871,
      • 25.585588
      ],
    • "alias": "Ana",
    • "type": 0,
    • "priority": 0,
    • "numberOfPackages": 10,
    • "weight": 5.5,
    • "cube": 5.5,
    • "timeWindow": [
      • 750,
      • 1020
      ],
    • "serviceTime": 400,
    • "revenue": 5.5,
    • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
    • "firstName": "Ana",
    • "lastName": "Lyn",
    • "address": {
      • "country": "France",
      • "state": "Aquitaine",
      • "county": "Aquitaine",
      • "city": "Bordeaux",
      • "postalCode": "33300",
      • "streetName": "Jean Jaures",
      • "streetNumber": "82",
      • "extra": "94301"
      },
    • "phoneNumber": "+1234567",
    • "status": 0,
    • "state": 0,
    • "depotId": 123456
    }
]

Deletes orders

Authorizations:
ApiKey
Request Body schema: application/json
required

The list of ids of the orders that have to be deleted.

Array
integer <int64>

Responses

Response Schema: application/json
result
string

Operation done successfully

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
[
  • 123456,
  • 123457,
  • 123458
]

Response samples

Content type
application/json
{
  • "result": "Operation done successfully."
}

Get an order by id

Get an existing order by Id

Authorizations:
ApiKey
path Parameters
id
required
integer <int64>

ID of the order to return

Responses

Response Schema: application/json
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
{
  • "id": 123456,
  • "creationTimestamp": 1689942672,
  • "customerInfo": {
    • "id": 123456,
    • "location": [
      • 45.652871,
      • 25.585588
      ],
    • "alias": "Ana",
    • "firstName": "Ana",
    • "lastName": "Lyn",
    • "address": {
      • "country": "France",
      • "state": "Aquitaine",
      • "county": "Aquitaine",
      • "city": "Bordeaux",
      • "postalCode": "33300",
      • "streetName": "Jean Jaures",
      • "streetNumber": "82",
      • "extra": "94301"
      },
    • "email": "email@yahoo.com",
    • "phoneNumber": "+1234567",
    • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
    },
  • "location": [
    • 45.652871,
    • 25.585588
    ],
  • "alias": "Ana",
  • "type": 0,
  • "priority": 0,
  • "numberOfPackages": 10,
  • "weight": 5.5,
  • "cube": 5.5,
  • "timeWindow": [
    • 750,
    • 1020
    ],
  • "serviceTime": 400,
  • "revenue": 5.5,
  • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
  • "firstName": "Ana",
  • "lastName": "Lyn",
  • "address": {
    • "country": "France",
    • "state": "Aquitaine",
    • "county": "Aquitaine",
    • "city": "Bordeaux",
    • "postalCode": "33300",
    • "streetName": "Jean Jaures",
    • "streetNumber": "82",
    • "extra": "94301"
    },
  • "phoneNumber": "+1234567",
  • "status": 0,
  • "state": 0,
  • "depotId": 123456
}

Update an order

Update an existing order by Id. Returns the updated order.

Authorizations:
ApiKey
path Parameters
id
required
integer <int64>

ID of the order to update

query Parameters
autoAssignDepot
integer <int16>

0: (default) - No depot will be auto assigned to the current order.
1: The closest depot (depending on time) will be assigned to the current order.

Request Body schema: application/json
required

Updated order

customerId
required
integer <int64>

The customer of an order cannot be changed once the order is saved in the database, or is used in an optimization.

location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>

Responses

Response Schema: application/json
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
{
  • "customerId": 123456,
  • "location": [
    • 45.652871,
    • 25.585588
    ],
  • "alias": "Ana",
  • "type": 0,
  • "priority": 0,
  • "numberOfPackages": 10,
  • "weight": 5.5,
  • "cube": 5.5,
  • "timeWindow": [
    • 750,
    • 1020
    ],
  • "serviceTime": 400,
  • "revenue": 5.5,
  • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
  • "firstName": "Ana",
  • "lastName": "Lyn",
  • "address": {
    • "country": "France",
    • "state": "Aquitaine",
    • "county": "Aquitaine",
    • "city": "Bordeaux",
    • "postalCode": "33300",
    • "streetName": "Jean Jaures",
    • "streetNumber": "82",
    • "extra": "94301"
    },
  • "phoneNumber": "+1234567",
  • "status": 0,
  • "state": 0,
  • "depotId": 123456
}

Response samples

Content type
application/json
{
  • "id": 123456,
  • "creationTimestamp": 1689942672,
  • "customerInfo": {
    • "id": 123456,
    • "location": [
      • 45.652871,
      • 25.585588
      ],
    • "alias": "Ana",
    • "firstName": "Ana",
    • "lastName": "Lyn",
    • "address": {
      • "country": "France",
      • "state": "Aquitaine",
      • "county": "Aquitaine",
      • "city": "Bordeaux",
      • "postalCode": "33300",
      • "streetName": "Jean Jaures",
      • "streetNumber": "82",
      • "extra": "94301"
      },
    • "email": "email@yahoo.com",
    • "phoneNumber": "+1234567",
    • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
    },
  • "location": [
    • 45.652871,
    • 25.585588
    ],
  • "alias": "Ana",
  • "type": 0,
  • "priority": 0,
  • "numberOfPackages": 10,
  • "weight": 5.5,
  • "cube": 5.5,
  • "timeWindow": [
    • 750,
    • 1020
    ],
  • "serviceTime": 400,
  • "revenue": 5.5,
  • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
  • "firstName": "Ana",
  • "lastName": "Lyn",
  • "address": {
    • "country": "France",
    • "state": "Aquitaine",
    • "county": "Aquitaine",
    • "city": "Bordeaux",
    • "postalCode": "33300",
    • "streetName": "Jean Jaures",
    • "streetNumber": "82",
    • "extra": "94301"
    },
  • "phoneNumber": "+1234567",
  • "status": 0,
  • "state": 0,
  • "depotId": 123456
}

miscLocation

Operations on MiscLocation

Add a list of miscLocation

Saves a list of new miscellaneous locations in the database.

Authorizations:
ApiKey
Request Body schema: application/json
required

The list with miscellaneous locations that has to be added.

Array of objects (AddMiscLocation)
Array
isDepot
boolean

If the location is depot or not.

alias
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
location
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

Responses

Response Schema: application/json
depots
Array of objects (MiscLocations)
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
{
  • "depots": [
    • {
      • "isDepot": false,
      • "alias": "Depot 1",
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "location": [
        • 45.652871,
        • 25.585588
        ]
      }
    ]
}

Response samples

Content type
application/json
{
  • "depots": [
    • { }
    ]
}

Get all miscLocations

Get miscLocations

Authorizations:
ApiKey
query Parameters
search
string

The search parameter for general search across miscLocations.

id
string

Id parameter used to filter miscLocations by id. The id parameter can be formatted as id=value:exact if you want to perform an exact search.

alias
string

Alias parameter used to filter miscLocations by alias. The alias parameter can be formatted as alias=value:exact if you want to perform an exact search.

location
string
Example: location=(latitude, logitude)

Location parameter used to filter miscLocations by location. The location parameter can be formatted as location=value:exact if you want to perform an exact search.

country
string

Country parameter used to filter miscLocations by country. The country parameter can be formatted as country=value:exact if you want to perform an exact search.

state
string

State parameter used to filter miscLocations by state. The state parameter can be formatted as state=value:exact if you want to perform an exact search.

county
string

County parameter used to filter miscLocations by county. The county parameter can be formatted as county=value:exact if you want to perform an exact search.

city
string

City parameter used to filter miscLocations by city. The city parameter can be formatted as city=value:exact if you want to perform an exact search.

postalCode
string

PostalCode parameter used to filter miscLocations by postal code. The postalCode parameter can be formatted as postalCode=value:exact if you want to perform an exact search.

streetName
string

StreetName parameter used to filter miscLocations by street name. The streetName parameter can be formatted as streetName=value:exact if you want to perform an exact search.

streetNumber
string

StreetNumber parameter used to filter miscLocations by street number. The streetNumber parameter can be formatted as streetNumber=value:exact if you want to perform an exact search.

extra
string

Extra parameter used to filter miscLocations by extra value from address. The extra parameter can be formatted as extra=value:exact if you want to perform an exact search.

sort
string
Example: sort=firstName:asc,lastName:desc,alias:asc

The sort parameter will have this format sort = column1:asc/desc,column2:asc/desc,column3:asc/desc. Columns will be chosen from this list(id, isDepot, alias, latitude, longitude, country, state, county, city, postalCode, streetName, streetNumber,extra)

includeColumns
string
Example: includeColumns=firstName,lastName,alias

The includeColumns parameter will have this format includeColumns = column1,column2,column3. Columns will be chosen from this list(id, isDepot, alias, latitude, longitude, country, state, county, city, postalCode, streetName, streetNumber,extra)

page
integer <int32>

The page parameter indicates the page number.

per_page
integer <int32>

The per_page parameter indicates the number of items on each page.

Responses

Response Schema: application/json
Array
id
integer <int64>
isDepot
boolean

If the location is depot or not.

alias
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
location
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
[
  • {
    • "id": 123456,
    • "isDepot": false,
    • "alias": "Depot 1",
    • "address": {
      • "country": "France",
      • "state": "Aquitaine",
      • "county": "Aquitaine",
      • "city": "Bordeaux",
      • "postalCode": "33300",
      • "streetName": "Jean Jaures",
      • "streetNumber": "82",
      • "extra": "94301"
      },
    • "location": [
      • 45.652871,
      • 25.585588
      ]
    }
]

Deletes miscLocations

Authorizations:
ApiKey
Request Body schema: application/json
required

The list of ids of the misc locations that have to be deleted.

Array
integer <int64>

Responses

Response Schema: application/json
result
string

Operation done successfully

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
[
  • 123456,
  • 123457,
  • 123458
]

Response samples

Content type
application/json
{
  • "result": "Operation done successfully."
}

Get a miscLocation by id

Get an existing miscLocation by Id

Authorizations:
ApiKey
path Parameters
id
required
integer <int64>

ID of the miscLocation to return

Responses

Response Schema: application/json
id
integer <int64>
isDepot
boolean

If the location is depot or not.

alias
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
location
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
{
  • "id": 123456,
  • "isDepot": false,
  • "alias": "Depot 1",
  • "address": {
    • "country": "France",
    • "state": "Aquitaine",
    • "county": "Aquitaine",
    • "city": "Bordeaux",
    • "postalCode": "33300",
    • "streetName": "Jean Jaures",
    • "streetNumber": "82",
    • "extra": "94301"
    },
  • "location": [
    • 45.652871,
    • 25.585588
    ]
}

Update a miscLocation

Update an existing miscLocation by Id

Authorizations:
ApiKey
path Parameters
id
required
integer <int64>

ID of the miscellaneous location to update

Request Body schema: application/json
required

Updated data

id
integer <int64>
isDepot
boolean

If the location is depot or not.

alias
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
location
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

Responses

Response Schema: application/json
result
string

Operation done successfully

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
{
  • "id": 123456,
  • "isDepot": false,
  • "alias": "Depot 1",
  • "address": {
    • "country": "France",
    • "state": "Aquitaine",
    • "county": "Aquitaine",
    • "city": "Bordeaux",
    • "postalCode": "33300",
    • "streetName": "Jean Jaures",
    • "streetNumber": "82",
    • "extra": "94301"
    },
  • "location": [
    • 45.652871,
    • 25.585588
    ]
}

Response samples

Content type
application/json
{
  • "result": "Operation done successfully."
}

vehicle

Operations on Vehicle

Add a list of vehicles.

Saves a list of new vehicles in the database.

Authorizations:
ApiKey
Request Body schema: application/json
required

The list with vehicles that has to be added.

Array of objects (AddVehicle)
Array
type
required
integer
Default: 0
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
name
string

Vehicle's name

maxLoadWeight
number <double>
Default: 99999999

The maximum weight that the vehicle can carry

maxLoadCube
number <double>
Default: 99999999

The maximum cubic volume that the vehicle can carry

startTime
integer <int64>
Default: 0

The start time of the working program, in minutes from midnight (time of day).

endTime
integer <int64>
Default: 1439

The end time of the working program, in minutes from midnight (time of day).

licensePlate
string

Vehicle's registration plate (only for cars and trucks)

status
integer
Default: 0
Enum: -1 0 1

Vehicle's status:

  • -1 - eUnAvailable
  • 0 - eAvailable
  • 1 - eEnRoute
lastPosition
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

make
string

Vehicle's make (only for cars, trucks, bikes and e-bikes)

model
string

Vehicle's model (only for cars, trucks, bikes and e-bikes)

fuelType
integer
Default: 2
Enum: 0 1 2 3 4 5 6

Fuel type (only for cars and trucks):

  • -1 - eNone
  • 0 - eDieselStandard
  • 1 - eDieselPremium
  • 2 - eGasolineStandard
  • 3 - eGasolinePremium
  • 4 - eElectric
  • 5 - eLPG
consumption
number <double>
Default: 0

Vehicle's consumption (only for cars and trucks)

bikerWeight
number <double>
Default: 0

Biker + bike weight (only for e-bikes)

bikePower
number <double>
Default: 0

The power of the bicycle in watts (only for e-bikes)

height
number <double>
Default: 0

The height of the vehicle.

width
number <double>
Default: 0

The width of the vehicle.

weight
number <double>
Default: 0

The weight of the vehicle.

length
number <double>
Default: 0

The length of the vehicle.

axleLoad
number <double>
Default: 0

The maximum axle load that the vehicle can carry.

Responses

Response Schema: application/json
Array of objects (Vehicle)
Array
id
required
integer <int64>
type
required
integer
Default: 0
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
name
string

Vehicle's name

maxLoadWeight
number <double>
Default: 99999999

The maximum weight that the vehicle can carry

maxLoadCube
number <double>
Default: 99999999

The maximum cubic volume that the vehicle can carry

startTime
integer <int64>
Default: 0

The start time of the working program, in minutes from midnight (time of day).

endTime
integer <int64>
Default: 1439

The end time of the working program, in minutes from midnight (time of day).

licensePlate
string

Vehicle's registration plate (only for cars and trucks)

status
integer
Default: 0
Enum: -1 0 1

Vehicle's status:

  • -1 - eUnAvailable
  • 0 - eAvailable
  • 1 - eEnRoute
lastPosition
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

make
string

Vehicle's make (only for cars, trucks, bikes and e-bikes)

model
string

Vehicle's model (only for cars, trucks, bikes and e-bikes)

fuelType
integer
Default: 2
Enum: 0 1 2 3 4 5 6

Fuel type (only for cars and trucks):

  • -1 - eNone
  • 0 - eDieselStandard
  • 1 - eDieselPremium
  • 2 - eGasolineStandard
  • 3 - eGasolinePremium
  • 4 - eElectric
  • 5 - eLPG
consumption
number <double>
Default: 0

Vehicle's consumption (only for cars and trucks)

bikerWeight
number <double>
Default: 0

Biker + bike weight (only for e-bikes)

bikePower
number <double>
Default: 0

The power of the bicycle in watts (only for e-bikes)

height
number <double>
Default: 0

The height of the vehicle.

width
number <double>
Default: 0

The width of the vehicle.

weight
number <double>
Default: 0

The weight of the vehicle.

length
number <double>
Default: 0

The length of the vehicle.

axleLoad
number <double>
Default: 0

The maximum axle load that the vehicle can carry.

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
{
  • "vehicles": [
    • {
      • "type": 0,
      • "name": "string",
      • "maxLoadWeight": 99.5,
      • "maxLoadCube": 99.5,
      • "startTime": 540,
      • "endTime": 1000,
      • "licensePlate": "string",
      • "status": -1,
      • "lastPosition": [
        • 45.652871,
        • 25.585588
        ],
      • "make": "string",
      • "model": "string",
      • "fuelType": 0,
      • "consumption": 99.5,
      • "bikerWeight": 99.5,
      • "bikePower": 99.5,
      • "height": 99.5,
      • "width": 99.5,
      • "weight": 99.5,
      • "length": 99.5,
      • "axleLoad": 99.5
      }
    ]
}

Response samples

Content type
application/json
{
  • "vehicles": [
    • {
      • "id": 123456,
      • "type": 0,
      • "name": "string",
      • "maxLoadWeight": 99.5,
      • "maxLoadCube": 99.5,
      • "startTime": 540,
      • "endTime": 1000,
      • "licensePlate": "string",
      • "status": -1,
      • "lastPosition": [
        • 45.652871,
        • 25.585588
        ],
      • "make": "string",
      • "model": "string",
      • "fuelType": 0,
      • "consumption": 99.5,
      • "bikerWeight": 99.5,
      • "bikePower": 99.5,
      • "height": 99.5,
      • "width": 99.5,
      • "weight": 99.5,
      • "length": 99.5,
      • "axleLoad": 99.5
      }
    ]
}

Get all vehicles

Get vehicles

Authorizations:
ApiKey
query Parameters
search
string

Search parameter for general search across vehicles.

id
string

Id parameter used to filter vehicles by id. The id parameter can be formatted as id=value:exact if you want to perform an exact search.

name
string

Name parameter used to filter vehicles by name. The name parameter can be formatted as name=value:exact if you want to perform an exact search.

make
string

Make parameter used to filter vehicles by make. The make parameter can be formatted as make=value:exact if you want to perform an exact search.

model
string

Model parameter used to filter vehicles by model. The model parameter can be formatted as model=value:exact if you want to perform an exact search.

type
string

Type parameter used to filter vehicles by type. The type parameter can be formatted as type=value.

status
string

Status parameter used to filter vehicles by status. The status parameter can be formatted as status=value.

lastPosition
string

LastPosition parameter used to filter vehicles by last position. The lastPosition parameter can be formatted as lastPosition=value:exact if you want to perform an exact search.

fuelType
string

FuelType parameter used to filter vehicles by fuel type. The fuelType parameter can be formatted as fuelType=value.

licensePlate
string

LicensePlate parameter used to filter vehicles by license plate. The licensePlate parameter can be formatted as licensePlate=value:exact if you want to perform an exact search.

bikePower
string

BikePower parameter used to filter vehicles by bike power. The bikePower parameter can be formatted as bikePower=value:exact if you want to perform an exact search.

sort
string
Example: sort=firstName:asc,lastName:desc,alias:asc

The sort parameter will have this format sort = column1:asc/desc,column2:asc/desc,column3:asc/desc. Columns will be chosen from this list(id, name, make, model, fuelType, consumption, licensePlate, type, maxWeight, maxCube, bikerWeight, bikePower, status, latitude, longitude)

includeColumns
string
Example: includeColumns=id,name,make

The includeColumns parameter will have this format includeColumns = column1,column2,column3. Columns will be chosen from this list(id, name, make, model, fuelType, consumption, licensePlate, type, maxWeight, maxCube, bikerWeight, bikePower, status, latitude, longitude)

page
integer <int32>

The page parameter indicates the page number.

per_page
integer <int32>

The per_page parameter indicates the number of items on each page.

Responses

Response Schema: application/json
Array
id
required
integer <int64>
type
required
integer
Default: 0
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
name
string

Vehicle's name

maxLoadWeight
number <double>
Default: 99999999

The maximum weight that the vehicle can carry

maxLoadCube
number <double>
Default: 99999999

The maximum cubic volume that the vehicle can carry

startTime
integer <int64>
Default: 0

The start time of the working program, in minutes from midnight (time of day).

endTime
integer <int64>
Default: 1439

The end time of the working program, in minutes from midnight (time of day).

licensePlate
string

Vehicle's registration plate (only for cars and trucks)

status
integer
Default: 0
Enum: -1 0 1

Vehicle's status:

  • -1 - eUnAvailable
  • 0 - eAvailable
  • 1 - eEnRoute
lastPosition
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

make
string

Vehicle's make (only for cars, trucks, bikes and e-bikes)

model
string

Vehicle's model (only for cars, trucks, bikes and e-bikes)

fuelType
integer
Default: 2
Enum: 0 1 2 3 4 5 6

Fuel type (only for cars and trucks):

  • -1 - eNone
  • 0 - eDieselStandard
  • 1 - eDieselPremium
  • 2 - eGasolineStandard
  • 3 - eGasolinePremium
  • 4 - eElectric
  • 5 - eLPG
consumption
number <double>
Default: 0

Vehicle's consumption (only for cars and trucks)

bikerWeight
number <double>
Default: 0

Biker + bike weight (only for e-bikes)

bikePower
number <double>
Default: 0

The power of the bicycle in watts (only for e-bikes)

height
number <double>
Default: 0

The height of the vehicle.

width
number <double>
Default: 0

The width of the vehicle.

weight
number <double>
Default: 0

The weight of the vehicle.

length
number <double>
Default: 0

The length of the vehicle.

axleLoad
number <double>
Default: 0

The maximum axle load that the vehicle can carry.

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
[
  • {
    • "id": 123456,
    • "type": 0,
    • "name": "string",
    • "maxLoadWeight": 99.5,
    • "maxLoadCube": 99.5,
    • "startTime": 540,
    • "endTime": 1000,
    • "licensePlate": "string",
    • "status": -1,
    • "lastPosition": [
      • 45.652871,
      • 25.585588
      ],
    • "make": "string",
    • "model": "string",
    • "fuelType": 0,
    • "consumption": 99.5,
    • "bikerWeight": 99.5,
    • "bikePower": 99.5,
    • "height": 99.5,
    • "width": 99.5,
    • "weight": 99.5,
    • "length": 99.5,
    • "axleLoad": 99.5
    }
]

Deletes vehicles

Authorizations:
ApiKey
Request Body schema: application/json
required

The list of ids of the vehicles that have to be deleted.

Array
integer <int64>

Responses

Response Schema: application/json
result
string

Operation done successfully

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
[
  • 123456,
  • 123457,
  • 123458
]

Response samples

Content type
application/json
{
  • "result": "Operation done successfully."
}

Get a vehicle by id

Get an existing vehicle by Id

Authorizations:
ApiKey
path Parameters
id
required
integer <int64>

ID of the vehicle to return

Responses

Response Schema: application/json
id
required
integer <int64>
type
required
integer
Default: 0
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
name
string

Vehicle's name

maxLoadWeight
number <double>
Default: 99999999

The maximum weight that the vehicle can carry

maxLoadCube
number <double>
Default: 99999999

The maximum cubic volume that the vehicle can carry

startTime
integer <int64>
Default: 0

The start time of the working program, in minutes from midnight (time of day).

endTime
integer <int64>
Default: 1439

The end time of the working program, in minutes from midnight (time of day).

licensePlate
string

Vehicle's registration plate (only for cars and trucks)

status
integer
Default: 0
Enum: -1 0 1

Vehicle's status:

  • -1 - eUnAvailable
  • 0 - eAvailable
  • 1 - eEnRoute
lastPosition
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

make
string

Vehicle's make (only for cars, trucks, bikes and e-bikes)

model
string

Vehicle's model (only for cars, trucks, bikes and e-bikes)

fuelType
integer
Default: 2
Enum: 0 1 2 3 4 5 6

Fuel type (only for cars and trucks):

  • -1 - eNone
  • 0 - eDieselStandard
  • 1 - eDieselPremium
  • 2 - eGasolineStandard
  • 3 - eGasolinePremium
  • 4 - eElectric
  • 5 - eLPG
consumption
number <double>
Default: 0

Vehicle's consumption (only for cars and trucks)

bikerWeight
number <double>
Default: 0

Biker + bike weight (only for e-bikes)

bikePower
number <double>
Default: 0

The power of the bicycle in watts (only for e-bikes)

height
number <double>
Default: 0

The height of the vehicle.

width
number <double>
Default: 0

The width of the vehicle.

weight
number <double>
Default: 0

The weight of the vehicle.

length
number <double>
Default: 0

The length of the vehicle.

axleLoad
number <double>
Default: 0

The maximum axle load that the vehicle can carry.

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
{
  • "id": 123456,
  • "type": 0,
  • "name": "string",
  • "maxLoadWeight": 99.5,
  • "maxLoadCube": 99.5,
  • "startTime": 540,
  • "endTime": 1000,
  • "licensePlate": "string",
  • "status": -1,
  • "lastPosition": [
    • 45.652871,
    • 25.585588
    ],
  • "make": "string",
  • "model": "string",
  • "fuelType": 0,
  • "consumption": 99.5,
  • "bikerWeight": 99.5,
  • "bikePower": 99.5,
  • "height": 99.5,
  • "width": 99.5,
  • "weight": 99.5,
  • "length": 99.5,
  • "axleLoad": 99.5
}

Update a vehicle

Update an existing vehicle by Id

Authorizations:
ApiKey
path Parameters
id
required
integer <int64>

ID of the vehicle to update

Request Body schema: application/json
required

Updated data

id
required
integer <int64>
type
required
integer
Default: 0
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
name
string

Vehicle's name

maxLoadWeight
number <double>
Default: 99999999

The maximum weight that the vehicle can carry

maxLoadCube
number <double>
Default: 99999999

The maximum cubic volume that the vehicle can carry

startTime
integer <int64>
Default: 0

The start time of the working program, in minutes from midnight (time of day).

endTime
integer <int64>
Default: 1439

The end time of the working program, in minutes from midnight (time of day).

licensePlate
string

Vehicle's registration plate (only for cars and trucks)

status
integer
Default: 0
Enum: -1 0 1

Vehicle's status:

  • -1 - eUnAvailable
  • 0 - eAvailable
  • 1 - eEnRoute
lastPosition
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

make
string

Vehicle's make (only for cars, trucks, bikes and e-bikes)

model
string

Vehicle's model (only for cars, trucks, bikes and e-bikes)

fuelType
integer
Default: 2
Enum: 0 1 2 3 4 5 6

Fuel type (only for cars and trucks):

  • -1 - eNone
  • 0 - eDieselStandard
  • 1 - eDieselPremium
  • 2 - eGasolineStandard
  • 3 - eGasolinePremium
  • 4 - eElectric
  • 5 - eLPG
consumption
number <double>
Default: 0

Vehicle's consumption (only for cars and trucks)

bikerWeight
number <double>
Default: 0

Biker + bike weight (only for e-bikes)

bikePower
number <double>
Default: 0

The power of the bicycle in watts (only for e-bikes)

height
number <double>
Default: 0

The height of the vehicle.

width
number <double>
Default: 0

The width of the vehicle.

weight
number <double>
Default: 0

The weight of the vehicle.

length
number <double>
Default: 0

The length of the vehicle.

axleLoad
number <double>
Default: 0

The maximum axle load that the vehicle can carry.

Responses

Response Schema: application/json
result
string

Operation done successfully

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
{
  • "id": 123456,
  • "type": 0,
  • "name": "string",
  • "maxLoadWeight": 99.5,
  • "maxLoadCube": 99.5,
  • "startTime": 540,
  • "endTime": 1000,
  • "licensePlate": "string",
  • "status": -1,
  • "lastPosition": [
    • 45.652871,
    • 25.585588
    ],
  • "make": "string",
  • "model": "string",
  • "fuelType": 0,
  • "consumption": 99.5,
  • "bikerWeight": 99.5,
  • "bikePower": 99.5,
  • "height": 99.5,
  • "width": 99.5,
  • "weight": 99.5,
  • "length": 99.5,
  • "axleLoad": 99.5
}

Response samples

Content type
application/json
{
  • "result": "Operation done successfully."
}

optimization

Operations on Optimization

Add a optimization

Adding a new optimization.

Authorizations:
ApiKey
query Parameters
encodeShape
integer <int16>

0: The route's shape will not be encoded.
1:(default) - The route's shape will be encoded.

Request Body schema: application/json
required

The optimization's properties

required
Array of objects (ConfigurationParameters)
Array
name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

allowDroppingOrders
boolean

Specifies whether the algorithm is allowed to drop orders if no solution is found by visiting all of them. Default is false.

groupingOrders
boolean

Specify if the orders will be grouped. If the distance between any two orders is less than 10 meters, those orders will be considered part of the same group. Default is false.

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
distanceUnit
integer
Default: 0
Enum: 0 1

The unit of measure used for distances throughout the optimization. Distance Unit :

  • 0 - eKilometers
  • 1 - eMiles
Array of objects (OrdersSequenceOptions)

These options are used to specify the association between different orders that should be visited in a certain order.

Array
sequenceOptions
integer
Enum: 0 1 2 3

Vehicle type:

  • 0 - eInSameRoute
  • 1 - eInSequence
  • 2 - eInFixedSequence
  • 3 - eInPairs
ordersSequence
Array of integers (Matrix2DI64) [ items <int64 >[ items <int64 > ] ]

A list of lists, where each inner list is a sequence of order ids.

orders
required
Array of integers <int64> [ items <int64 > ]
matrixBuiltType
integer
Default: 1
Enum: 0 1

What distance formula should be used to build the matrix. Matrix Built Type:

  • 0 - eSet = Set by the user using "matrices" field
  • 1 - eReal = Road map distances and times
Array of objects (MatricesObj)

Is set only if matrixBuildType = eSet. For each type of vehicle used in the optimization/route, a distance and a time matrix should be set

Array
vehicleType
integer
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
distMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
timeMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
required
Array of objects (AddDeparture)
Array
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
depotId
integer <int64>
Default: -1
required
Array of objects (AddDestination)
Array
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
vehicles
required
Array of integers <int64> [ items <int64 > ]
required
Array of objects (AddVehicleConstraints)
Array
startDate
required
integer <int64>

The date the vehicle begins its route, provided as a timestamp with the time set to midnight.

maxNumberOfPackages
integer <int64>
Default: 99999999

The maximum number of packages that the vehicle can carry.

minNumberOfOrders
integer <int64>
Default: 0

The minimum number of orders that the vehicle must visit

maxNumberOfOrders
integer <int64>
Default: 99999999

The maximum number of orders that the vehicle can visit.

minDistance
number <double>
Default: 0

The minimum distance that the vehicle must travel.

maxDistance
number <double>
Default: 99999999

The maximum distance that the vehicle can travel.

maxRevenue
number <double>
Default: 99999999

The maximum revenue that the vehicle can receive in total.

Responses

Response Schema: application/json
object (Optimization)
id
required
integer <int64>
required
Array of objects (ConfigurationParameters)
Array
name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

allowDroppingOrders
boolean

Specifies whether the algorithm is allowed to drop orders if no solution is found by visiting all of them. Default is false.

groupingOrders
boolean

Specify if the orders will be grouped. If the distance between any two orders is less than 10 meters, those orders will be considered part of the same group. Default is false.

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
distanceUnit
integer
Default: 0
Enum: 0 1

The unit of measure used for distances throughout the optimization. Distance Unit :

  • 0 - eKilometers
  • 1 - eMiles
Array of objects (OrdersSequenceOptions)

These options are used to specify the association between different orders that should be visited in a certain order.

Array
sequenceOptions
integer
Enum: 0 1 2 3

Vehicle type:

  • 0 - eInSameRoute
  • 1 - eInSequence
  • 2 - eInFixedSequence
  • 3 - eInPairs
ordersSequence
Array of integers (Matrix2DI64) [ items <int64 >[ items <int64 > ] ]

A list of lists, where each inner list is a sequence of order ids.

required
Array of objects (Order)
Array
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
required
Array of objects (Departure)
Array
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
depotId
integer <int64>
Default: -1
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

numberOfPackages
integer <int64>
Default: 0
weight
number <double>
Default: 0
cube
number <double>
Default: 0
departureTime
integer <int64>
timeToNext
integer <int32>
Default: 0

The time that will be traveled to arrive at the next order. (in seconds)

distanceToNext
number <float>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

required
Array of objects (Destination)
Array
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

arrivalTime
integer <int64>

The vehicle arrival time at the order's location.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this destination in the distance unit set in the ConfigurationParameters.

required
Array of objects (Vehicle)
Array
id
required
integer <int64>
type
required
integer
Default: 0
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
name
string

Vehicle's name

maxLoadWeight
number <double>
Default: 99999999

The maximum weight that the vehicle can carry

maxLoadCube
number <double>
Default: 99999999

The maximum cubic volume that the vehicle can carry

startTime
integer <int64>
Default: 0

The start time of the working program, in minutes from midnight (time of day).

endTime
integer <int64>
Default: 1439

The end time of the working program, in minutes from midnight (time of day).

licensePlate
string

Vehicle's registration plate (only for cars and trucks)

status
integer
Default: 0
Enum: -1 0 1

Vehicle's status:

  • -1 - eUnAvailable
  • 0 - eAvailable
  • 1 - eEnRoute
lastPosition
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

make
string

Vehicle's make (only for cars, trucks, bikes and e-bikes)

model
string

Vehicle's model (only for cars, trucks, bikes and e-bikes)

fuelType
integer
Default: 2
Enum: 0 1 2 3 4 5 6

Fuel type (only for cars and trucks):

  • -1 - eNone
  • 0 - eDieselStandard
  • 1 - eDieselPremium
  • 2 - eGasolineStandard
  • 3 - eGasolinePremium
  • 4 - eElectric
  • 5 - eLPG
consumption
number <double>
Default: 0

Vehicle's consumption (only for cars and trucks)

bikerWeight
number <double>
Default: 0

Biker + bike weight (only for e-bikes)

bikePower
number <double>
Default: 0

The power of the bicycle in watts (only for e-bikes)

height
number <double>
Default: 0

The height of the vehicle.

width
number <double>
Default: 0

The width of the vehicle.

weight
number <double>
Default: 0

The weight of the vehicle.

length
number <double>
Default: 0

The length of the vehicle.

axleLoad
number <double>
Default: 0

The maximum axle load that the vehicle can carry.

required
Array of objects (VehicleConstraints)
Array
fuelPrice
number <double>
Default: 0

The fuel cost (filled when the vehicle is used in a route).

startDate
required
integer <int64>

The date the vehicle begins its route, provided as a timestamp with the time set to midnight.

maxNumberOfPackages
integer <int64>
Default: 99999999

The maximum number of packages that the vehicle can carry.

minNumberOfOrders
integer <int64>
Default: 0

The minimum number of orders that the vehicle must visit

maxNumberOfOrders
integer <int64>
Default: 99999999

The maximum number of orders that the vehicle can visit.

minDistance
number <double>
Default: 0

The minimum distance that the vehicle must travel.

maxDistance
number <double>
Default: 99999999

The maximum distance that the vehicle can travel.

maxRevenue
number <double>
Default: 99999999

The maximum revenue that the vehicle can receive in total.

creationTimestamp
required
integer <int64>
object (Request)
id
required
integer <int64>
Default: 0
optimizationId
integer <int64>
Default: 0
routeId
integer <int64>
Default: 0
status
required
integer
Default: 0
Enum: 0 1 2 3

Request's status:

  • 0 - eCreated
  • 1 - ePending
  • 2 - eFinished
  • 3 - eCanceled
message
required
string
creationTimestamp
required
integer <int64>
Default: 0
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
{
  • "configurationParameters": [
    • {
      • "name": "Optimization 50 vehicles in Berlin",
      • "ignoreTimeWindow": true,
      • "allowDroppingOrders": false,
      • "groupingOrders": false,
      • "balancedRoutes": false,
      • "arrangeCriterion": 0,
      • "optimizationCriterion": 0,
      • "optimizationQuality": 0,
      • "maxTimeToOptimize": 600,
      • "maxWaitTime": 600,
      • "routeType": 0,
      • "restrictions": 0,
      • "distanceUnit": 0,
      • "orderSequenceOptions": [
        • {
          • "sequenceOptions": 0,
          • "ordersSequence": [
            • [
              • 123456,
              • 234567,
              • 345678,
              • 456789
              ],
            • [
              • 712345,
              • 612345,
              • 102345,
              • 912345
              ]
            ]
          }
        ]
      }
    ],
  • "orders": [
    • 10001,
    • 12547,
    • 14859
    ],
  • "matrixBuiltType": 0,
  • "matrices": [
    • {
      • "vehicleType": 0,
      • "distMatrix": [
        • [
          • 1,
          • 2,
          • 3,
          • 4
          ],
        • [
          • 7,
          • 6,
          • 10,
          • 9
          ]
        ],
      • "timeMatrix": [
        • [
          • 1,
          • 2,
          • 3,
          • 4
          ],
        • [
          • 7,
          • 6,
          • 10,
          • 9
          ]
        ]
      }
    ],
  • "departures": [
    • {
      • "alias": "Ana",
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "depotId": 123456
      }
    ],
  • "destinations": [
    • {
      • "alias": "Ana",
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        }
      }
    ],
  • "vehicles": [
    • 12345,
    • 12346
    ],
  • "vehiclesConstraints": [
    • {
      • "startDate": 1730332800000,
      • "maxNumberOfPackages": 9999,
      • "minNumberOfOrders": 0,
      • "maxNumberOfOrders": 9999,
      • "minDistance": 1.5,
      • "maxDistance": 999.5,
      • "maxRevenue": 999.5
      }
    ]
}

Response samples

Content type
application/json
{
  • "optimization": {
    • "id": 10,
    • "configurationParameters": [
      • {
        • "name": "Optimization 50 vehicles in Berlin",
        • "ignoreTimeWindow": true,
        • "allowDroppingOrders": false,
        • "groupingOrders": false,
        • "balancedRoutes": false,
        • "arrangeCriterion": 0,
        • "optimizationCriterion": 0,
        • "optimizationQuality": 0,
        • "maxTimeToOptimize": 600,
        • "maxWaitTime": 600,
        • "routeType": 0,
        • "restrictions": 0,
        • "distanceUnit": 0,
        • "orderSequenceOptions": [
          • {
            • "sequenceOptions": 0,
            • "ordersSequence": [
              • [
                • 123456,
                • 234567,
                • 345678,
                • 456789
                ],
              • [
                • 712345,
                • 612345,
                • 102345,
                • 912345
                ]
              ]
            }
          ]
        }
      ],
    • "orders": [
      • {
        • "id": 123456,
        • "creationTimestamp": 1689942672,
        • "customerInfo": {
          • "id": 123456,
          • "location": [
            • 45.652871,
            • 25.585588
            ],
          • "alias": "Ana",
          • "firstName": "Ana",
          • "lastName": "Lyn",
          • "address": {
            • "country": "France",
            • "state": "Aquitaine",
            • "county": "Aquitaine",
            • "city": "Bordeaux",
            • "postalCode": "33300",
            • "streetName": "Jean Jaures",
            • "streetNumber": "82",
            • "extra": "94301"
            },
          • "email": "email@yahoo.com",
          • "phoneNumber": "+1234567",
          • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
          },
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "alias": "Ana",
        • "type": 0,
        • "priority": 0,
        • "numberOfPackages": 10,
        • "weight": 5.5,
        • "cube": 5.5,
        • "timeWindow": [
          • 750,
          • 1020
          ],
        • "serviceTime": 400,
        • "revenue": 5.5,
        • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
        • "firstName": "Ana",
        • "lastName": "Lyn",
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "phoneNumber": "+1234567",
        • "status": 0,
        • "state": 0,
        • "depotId": 123456
        }
      ],
    • "departures": [
      • {
        • "alias": "Ana",
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "depotId": 123456,
        • "matchedLocation": [
          • 45.652871,
          • 25.585588
          ],
        • "numberOfPackages": 10,
        • "weight": 5.5,
        • "cube": 5.5,
        • "departureTime": 1602684618476,
        • "timeToNext": 5000,
        • "distanceToNext": 99.5
        }
      ],
    • "destinations": [
      • {
        • "alias": "Ana",
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "matchedLocation": [
          • 45.652871,
          • 25.585588
          ],
        • "arrivalTime": 1602684618476,
        • "traveledDistance": 99.5
        }
      ],
    • "vehicles": [
      • {
        • "id": 123456,
        • "type": 0,
        • "name": "string",
        • "maxLoadWeight": 99.5,
        • "maxLoadCube": 99.5,
        • "startTime": 540,
        • "endTime": 1000,
        • "licensePlate": "string",
        • "status": -1,
        • "lastPosition": [
          • 45.652871,
          • 25.585588
          ],
        • "make": "string",
        • "model": "string",
        • "fuelType": 0,
        • "consumption": 99.5,
        • "bikerWeight": 99.5,
        • "bikePower": 99.5,
        • "height": 99.5,
        • "width": 99.5,
        • "weight": 99.5,
        • "length": 99.5,
        • "axleLoad": 99.5
        }
      ],
    • "vehiclesConstraints": [
      • {
        • "fuelPrice": 1.5,
        • "startDate": 1730332800000,
        • "maxNumberOfPackages": 9999,
        • "minNumberOfOrders": 0,
        • "maxNumberOfOrders": 9999,
        • "minDistance": 1.5,
        • "maxDistance": 999.5,
        • "maxRevenue": 999.5
        }
      ],
    • "creationTimestamp": 1689942672
    },
  • "request": {
    • "id": 123456,
    • "optimizationId": 123456,
    • "routeId": 123456,
    • "status": 0,
    • "message": "Operation done successfully!",
    • "creationTimestamp": 123456
    }
}

Get all available optimizations

Get optimizations

Authorizations:
ApiKey
query Parameters
search
string

General search parameter for optimizations.

id
string

ID parameter used to filter optimizations by id. The id parameter can be formatted as id=value:exact if you want to perform an exact search.

name
string

Name parameter used to filter optimizations by name. The name parameter can be formatted as name=value:exact if you want to perform an exact search.

creationTime
string

CreationTime parameter used to filter optimizations by creation time. The creationTime parameter can be formatted as creationTime=value:exact if you want to perform an exact search.

ignoreTimeWindow
string

IgnoreTimeWindow parameter used to filter optimizations by optimization that ignore time windows. The ignoreTimeWindow parameter can be formatted as ignoreTimeWindow=value:exact if you want to perform an exact search.

routeType
string

RouteType parameter used to filter optimizations by route type. The routeType parameter can be formatted as routeType=value.

sort
string
Example: sort=firstName:asc,lastName:desc, alias:asc

The sort parameter will have this format sort = column1:asc/desc,column2:asc/desc,column3:asc/desc. Columns will be chosen from this list(id, name, creationTime, ignoreTimewindow, optimizeBy, optimizationQuality, maxOptimizeTime, routeType, matricesBuildType, restrictions, maxWaitTimeOrders, distanceUnit, arrangeCriterion, balancedRoutes)

includeColumns
string
Example: includeColumns=id, name, creationTime

The includeColumns parameter will have this format includeColumns = column1,column2,column3. Columns will be chosen from this list(id, parentId, name, parentTime, creationTime, childTime, ignoreTimewindow, balancedRoutes, optimizeBy, arrangeCriterion, optimizationQuality, maxOptimizeTime, routeType, matricesBuildType, restrictions, distanceUnit, idVehicles, maxWaitTimeOrders)

page
integer <int32>

The page parameter indicates the page number.

per_page
integer <int32>

The per_page parameter indicates the number of items on each page.

Responses

Response Schema: application/json
Array
id
required
integer <int64>
required
Array of objects (ConfigurationParameters)
Array
name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

allowDroppingOrders
boolean

Specifies whether the algorithm is allowed to drop orders if no solution is found by visiting all of them. Default is false.

groupingOrders
boolean

Specify if the orders will be grouped. If the distance between any two orders is less than 10 meters, those orders will be considered part of the same group. Default is false.

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
distanceUnit
integer
Default: 0
Enum: 0 1

The unit of measure used for distances throughout the optimization. Distance Unit :

  • 0 - eKilometers
  • 1 - eMiles
Array of objects (OrdersSequenceOptions)

These options are used to specify the association between different orders that should be visited in a certain order.

Array
sequenceOptions
integer
Enum: 0 1 2 3

Vehicle type:

  • 0 - eInSameRoute
  • 1 - eInSequence
  • 2 - eInFixedSequence
  • 3 - eInPairs
ordersSequence
Array of integers (Matrix2DI64) [ items <int64 >[ items <int64 > ] ]

A list of lists, where each inner list is a sequence of order ids.

required
Array of objects (Order)
Array
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
required
Array of objects (Departure)
Array
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
depotId
integer <int64>
Default: -1
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

numberOfPackages
integer <int64>
Default: 0
weight
number <double>
Default: 0
cube
number <double>
Default: 0
departureTime
integer <int64>
timeToNext
integer <int32>
Default: 0

The time that will be traveled to arrive at the next order. (in seconds)

distanceToNext
number <float>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

required
Array of objects (Destination)
Array
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

arrivalTime
integer <int64>

The vehicle arrival time at the order's location.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this destination in the distance unit set in the ConfigurationParameters.

required
Array of objects (Vehicle)
Array
id
required
integer <int64>
type
required
integer
Default: 0
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
name
string

Vehicle's name

maxLoadWeight
number <double>
Default: 99999999

The maximum weight that the vehicle can carry

maxLoadCube
number <double>
Default: 99999999

The maximum cubic volume that the vehicle can carry

startTime
integer <int64>
Default: 0

The start time of the working program, in minutes from midnight (time of day).

endTime
integer <int64>
Default: 1439

The end time of the working program, in minutes from midnight (time of day).

licensePlate
string

Vehicle's registration plate (only for cars and trucks)

status
integer
Default: 0
Enum: -1 0 1

Vehicle's status:

  • -1 - eUnAvailable
  • 0 - eAvailable
  • 1 - eEnRoute
lastPosition
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

make
string

Vehicle's make (only for cars, trucks, bikes and e-bikes)

model
string

Vehicle's model (only for cars, trucks, bikes and e-bikes)

fuelType
integer
Default: 2
Enum: 0 1 2 3 4 5 6

Fuel type (only for cars and trucks):

  • -1 - eNone
  • 0 - eDieselStandard
  • 1 - eDieselPremium
  • 2 - eGasolineStandard
  • 3 - eGasolinePremium
  • 4 - eElectric
  • 5 - eLPG
consumption
number <double>
Default: 0

Vehicle's consumption (only for cars and trucks)

bikerWeight
number <double>
Default: 0

Biker + bike weight (only for e-bikes)

bikePower
number <double>
Default: 0

The power of the bicycle in watts (only for e-bikes)

height
number <double>
Default: 0

The height of the vehicle.

width
number <double>
Default: 0

The width of the vehicle.

weight
number <double>
Default: 0

The weight of the vehicle.

length
number <double>
Default: 0

The length of the vehicle.

axleLoad
number <double>
Default: 0

The maximum axle load that the vehicle can carry.

required
Array of objects (VehicleConstraints)
Array
fuelPrice
number <double>
Default: 0

The fuel cost (filled when the vehicle is used in a route).

startDate
required
integer <int64>

The date the vehicle begins its route, provided as a timestamp with the time set to midnight.

maxNumberOfPackages
integer <int64>
Default: 99999999

The maximum number of packages that the vehicle can carry.

minNumberOfOrders
integer <int64>
Default: 0

The minimum number of orders that the vehicle must visit

maxNumberOfOrders
integer <int64>
Default: 99999999

The maximum number of orders that the vehicle can visit.

minDistance
number <double>
Default: 0

The minimum distance that the vehicle must travel.

maxDistance
number <double>
Default: 99999999

The maximum distance that the vehicle can travel.

maxRevenue
number <double>
Default: 99999999

The maximum revenue that the vehicle can receive in total.

creationTimestamp
required
integer <int64>
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
[
  • {
    • "id": 10,
    • "configurationParameters": [
      • {
        • "name": "Optimization 50 vehicles in Berlin",
        • "ignoreTimeWindow": true,
        • "allowDroppingOrders": false,
        • "groupingOrders": false,
        • "balancedRoutes": false,
        • "arrangeCriterion": 0,
        • "optimizationCriterion": 0,
        • "optimizationQuality": 0,
        • "maxTimeToOptimize": 600,
        • "maxWaitTime": 600,
        • "routeType": 0,
        • "restrictions": 0,
        • "distanceUnit": 0,
        • "orderSequenceOptions": [
          • {
            • "sequenceOptions": 0,
            • "ordersSequence": [
              • [
                • 123456,
                • 234567,
                • 345678,
                • 456789
                ],
              • [
                • 712345,
                • 612345,
                • 102345,
                • 912345
                ]
              ]
            }
          ]
        }
      ],
    • "orders": [
      • {
        • "id": 123456,
        • "creationTimestamp": 1689942672,
        • "customerInfo": {
          • "id": 123456,
          • "location": [
            • 45.652871,
            • 25.585588
            ],
          • "alias": "Ana",
          • "firstName": "Ana",
          • "lastName": "Lyn",
          • "address": {
            • "country": "France",
            • "state": "Aquitaine",
            • "county": "Aquitaine",
            • "city": "Bordeaux",
            • "postalCode": "33300",
            • "streetName": "Jean Jaures",
            • "streetNumber": "82",
            • "extra": "94301"
            },
          • "email": "email@yahoo.com",
          • "phoneNumber": "+1234567",
          • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
          },
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "alias": "Ana",
        • "type": 0,
        • "priority": 0,
        • "numberOfPackages": 10,
        • "weight": 5.5,
        • "cube": 5.5,
        • "timeWindow": [
          • 750,
          • 1020
          ],
        • "serviceTime": 400,
        • "revenue": 5.5,
        • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
        • "firstName": "Ana",
        • "lastName": "Lyn",
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "phoneNumber": "+1234567",
        • "status": 0,
        • "state": 0,
        • "depotId": 123456
        }
      ],
    • "departures": [
      • {
        • "alias": "Ana",
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "depotId": 123456,
        • "matchedLocation": [
          • 45.652871,
          • 25.585588
          ],
        • "numberOfPackages": 10,
        • "weight": 5.5,
        • "cube": 5.5,
        • "departureTime": 1602684618476,
        • "timeToNext": 5000,
        • "distanceToNext": 99.5
        }
      ],
    • "destinations": [
      • {
        • "alias": "Ana",
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "matchedLocation": [
          • 45.652871,
          • 25.585588
          ],
        • "arrivalTime": 1602684618476,
        • "traveledDistance": 99.5
        }
      ],
    • "vehicles": [
      • {
        • "id": 123456,
        • "type": 0,
        • "name": "string",
        • "maxLoadWeight": 99.5,
        • "maxLoadCube": 99.5,
        • "startTime": 540,
        • "endTime": 1000,
        • "licensePlate": "string",
        • "status": -1,
        • "lastPosition": [
          • 45.652871,
          • 25.585588
          ],
        • "make": "string",
        • "model": "string",
        • "fuelType": 0,
        • "consumption": 99.5,
        • "bikerWeight": 99.5,
        • "bikePower": 99.5,
        • "height": 99.5,
        • "width": 99.5,
        • "weight": 99.5,
        • "length": 99.5,
        • "axleLoad": 99.5
        }
      ],
    • "vehiclesConstraints": [
      • {
        • "fuelPrice": 1.5,
        • "startDate": 1730332800000,
        • "maxNumberOfPackages": 9999,
        • "minNumberOfOrders": 0,
        • "maxNumberOfOrders": 9999,
        • "minDistance": 1.5,
        • "maxDistance": 999.5,
        • "maxRevenue": 999.5
        }
      ],
    • "creationTimestamp": 1689942672
    }
]

Deletes optimizations and their solutions

Authorizations:
ApiKey
Request Body schema: application/json
required

The list of ids of the optimizations that have to be deleted.

Array
integer <int64>

Responses

Response Schema: application/json
result
string

Operation done successfully

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
[
  • 123456,
  • 123457,
  • 123458
]

Response samples

Content type
application/json
{
  • "result": "Operation done successfully."
}

Get an optimization by id

Get an existing optimization by Id

Authorizations:
ApiKey
path Parameters
id
required
integer <int64>

ID of the optimization to return

Responses

Response Schema: application/json
id
required
integer <int64>
required
Array of objects (ConfigurationParameters)
Array
name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

allowDroppingOrders
boolean

Specifies whether the algorithm is allowed to drop orders if no solution is found by visiting all of them. Default is false.

groupingOrders
boolean

Specify if the orders will be grouped. If the distance between any two orders is less than 10 meters, those orders will be considered part of the same group. Default is false.

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
distanceUnit
integer
Default: 0
Enum: 0 1

The unit of measure used for distances throughout the optimization. Distance Unit :

  • 0 - eKilometers
  • 1 - eMiles
Array of objects (OrdersSequenceOptions)

These options are used to specify the association between different orders that should be visited in a certain order.

Array
sequenceOptions
integer
Enum: 0 1 2 3

Vehicle type:

  • 0 - eInSameRoute
  • 1 - eInSequence
  • 2 - eInFixedSequence
  • 3 - eInPairs
ordersSequence
Array of integers (Matrix2DI64) [ items <int64 >[ items <int64 > ] ]

A list of lists, where each inner list is a sequence of order ids.

required
Array of objects (Order)
Array
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
required
Array of objects (Departure)
Array
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
depotId
integer <int64>
Default: -1
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

numberOfPackages
integer <int64>
Default: 0
weight
number <double>
Default: 0
cube
number <double>
Default: 0
departureTime
integer <int64>
timeToNext
integer <int32>
Default: 0

The time that will be traveled to arrive at the next order. (in seconds)

distanceToNext
number <float>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

required
Array of objects (Destination)
Array
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

arrivalTime
integer <int64>

The vehicle arrival time at the order's location.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this destination in the distance unit set in the ConfigurationParameters.

required
Array of objects (Vehicle)
Array
id
required
integer <int64>
type
required
integer
Default: 0
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
name
string

Vehicle's name

maxLoadWeight
number <double>
Default: 99999999

The maximum weight that the vehicle can carry

maxLoadCube
number <double>
Default: 99999999

The maximum cubic volume that the vehicle can carry

startTime
integer <int64>
Default: 0

The start time of the working program, in minutes from midnight (time of day).

endTime
integer <int64>
Default: 1439

The end time of the working program, in minutes from midnight (time of day).

licensePlate
string

Vehicle's registration plate (only for cars and trucks)

status
integer
Default: 0
Enum: -1 0 1

Vehicle's status:

  • -1 - eUnAvailable
  • 0 - eAvailable
  • 1 - eEnRoute
lastPosition
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

make
string

Vehicle's make (only for cars, trucks, bikes and e-bikes)

model
string

Vehicle's model (only for cars, trucks, bikes and e-bikes)

fuelType
integer
Default: 2
Enum: 0 1 2 3 4 5 6

Fuel type (only for cars and trucks):

  • -1 - eNone
  • 0 - eDieselStandard
  • 1 - eDieselPremium
  • 2 - eGasolineStandard
  • 3 - eGasolinePremium
  • 4 - eElectric
  • 5 - eLPG
consumption
number <double>
Default: 0

Vehicle's consumption (only for cars and trucks)

bikerWeight
number <double>
Default: 0

Biker + bike weight (only for e-bikes)

bikePower
number <double>
Default: 0

The power of the bicycle in watts (only for e-bikes)

height
number <double>
Default: 0

The height of the vehicle.

width
number <double>
Default: 0

The width of the vehicle.

weight
number <double>
Default: 0

The weight of the vehicle.

length
number <double>
Default: 0

The length of the vehicle.

axleLoad
number <double>
Default: 0

The maximum axle load that the vehicle can carry.

required
Array of objects (VehicleConstraints)
Array
fuelPrice
number <double>
Default: 0

The fuel cost (filled when the vehicle is used in a route).

startDate
required
integer <int64>

The date the vehicle begins its route, provided as a timestamp with the time set to midnight.

maxNumberOfPackages
integer <int64>
Default: 99999999

The maximum number of packages that the vehicle can carry.

minNumberOfOrders
integer <int64>
Default: 0

The minimum number of orders that the vehicle must visit

maxNumberOfOrders
integer <int64>
Default: 99999999

The maximum number of orders that the vehicle can visit.

minDistance
number <double>
Default: 0

The minimum distance that the vehicle must travel.

maxDistance
number <double>
Default: 99999999

The maximum distance that the vehicle can travel.

maxRevenue
number <double>
Default: 99999999

The maximum revenue that the vehicle can receive in total.

creationTimestamp
required
integer <int64>
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
{
  • "id": 10,
  • "configurationParameters": [
    • {
      • "name": "Optimization 50 vehicles in Berlin",
      • "ignoreTimeWindow": true,
      • "allowDroppingOrders": false,
      • "groupingOrders": false,
      • "balancedRoutes": false,
      • "arrangeCriterion": 0,
      • "optimizationCriterion": 0,
      • "optimizationQuality": 0,
      • "maxTimeToOptimize": 600,
      • "maxWaitTime": 600,
      • "routeType": 0,
      • "restrictions": 0,
      • "distanceUnit": 0,
      • "orderSequenceOptions": [
        • {
          • "sequenceOptions": 0,
          • "ordersSequence": [
            • [
              • 123456,
              • 234567,
              • 345678,
              • 456789
              ],
            • [
              • 712345,
              • 612345,
              • 102345,
              • 912345
              ]
            ]
          }
        ]
      }
    ],
  • "orders": [
    • {
      • "id": 123456,
      • "creationTimestamp": 1689942672,
      • "customerInfo": {
        • "id": 123456,
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "alias": "Ana",
        • "firstName": "Ana",
        • "lastName": "Lyn",
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "email": "email@yahoo.com",
        • "phoneNumber": "+1234567",
        • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
        },
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "alias": "Ana",
      • "type": 0,
      • "priority": 0,
      • "numberOfPackages": 10,
      • "weight": 5.5,
      • "cube": 5.5,
      • "timeWindow": [
        • 750,
        • 1020
        ],
      • "serviceTime": 400,
      • "revenue": 5.5,
      • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
      • "firstName": "Ana",
      • "lastName": "Lyn",
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "phoneNumber": "+1234567",
      • "status": 0,
      • "state": 0,
      • "depotId": 123456
      }
    ],
  • "departures": [
    • {
      • "alias": "Ana",
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "depotId": 123456,
      • "matchedLocation": [
        • 45.652871,
        • 25.585588
        ],
      • "numberOfPackages": 10,
      • "weight": 5.5,
      • "cube": 5.5,
      • "departureTime": 1602684618476,
      • "timeToNext": 5000,
      • "distanceToNext": 99.5
      }
    ],
  • "destinations": [
    • {
      • "alias": "Ana",
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "matchedLocation": [
        • 45.652871,
        • 25.585588
        ],
      • "arrivalTime": 1602684618476,
      • "traveledDistance": 99.5
      }
    ],
  • "vehicles": [
    • {
      • "id": 123456,
      • "type": 0,
      • "name": "string",
      • "maxLoadWeight": 99.5,
      • "maxLoadCube": 99.5,
      • "startTime": 540,
      • "endTime": 1000,
      • "licensePlate": "string",
      • "status": -1,
      • "lastPosition": [
        • 45.652871,
        • 25.585588
        ],
      • "make": "string",
      • "model": "string",
      • "fuelType": 0,
      • "consumption": 99.5,
      • "bikerWeight": 99.5,
      • "bikePower": 99.5,
      • "height": 99.5,
      • "width": 99.5,
      • "weight": 99.5,
      • "length": 99.5,
      • "axleLoad": 99.5
      }
    ],
  • "vehiclesConstraints": [
    • {
      • "fuelPrice": 1.5,
      • "startDate": 1730332800000,
      • "maxNumberOfPackages": 9999,
      • "minNumberOfOrders": 0,
      • "maxNumberOfOrders": 9999,
      • "minDistance": 1.5,
      • "maxDistance": 999.5,
      • "maxRevenue": 999.5
      }
    ],
  • "creationTimestamp": 1689942672
}

Update an optimization

Applies the changes over the optimization and searches for a new solution

Authorizations:
ApiKey
path Parameters
id
required
integer <int64>

ID of optimization to update

query Parameters
encodeShape
integer <int16>

0: The route's shape will not be encoded.
1:(default) - The route's shape will be encoded.

Request Body schema: application/json
required

The optimization's properties. The orders object will not be taken into consideration. If changes on orders are wanted, use the request which add/update/delete order from optimization

required
Array of objects (ConfigurationParameters)
Array
name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

allowDroppingOrders
boolean

Specifies whether the algorithm is allowed to drop orders if no solution is found by visiting all of them. Default is false.

groupingOrders
boolean

Specify if the orders will be grouped. If the distance between any two orders is less than 10 meters, those orders will be considered part of the same group. Default is false.

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
distanceUnit
integer
Default: 0
Enum: 0 1

The unit of measure used for distances throughout the optimization. Distance Unit :

  • 0 - eKilometers
  • 1 - eMiles
Array of objects (OrdersSequenceOptions)

These options are used to specify the association between different orders that should be visited in a certain order.

Array
sequenceOptions
integer
Enum: 0 1 2 3

Vehicle type:

  • 0 - eInSameRoute
  • 1 - eInSequence
  • 2 - eInFixedSequence
  • 3 - eInPairs
ordersSequence
Array of integers (Matrix2DI64) [ items <int64 >[ items <int64 > ] ]

A list of lists, where each inner list is a sequence of order ids.

orders
required
Array of integers <int64> [ items <int64 > ]
matrixBuiltType
integer
Default: 1
Enum: 0 1

What distance formula should be used to build the matrix. Matrix Built Type:

  • 0 - eSet = Set by the user using "matrices" field
  • 1 - eReal = Road map distances and times
Array of objects (MatricesObj)

Is set only if matrixBuildType = eSet. For each type of vehicle used in the optimization/route, a distance and a time matrix should be set

Array
vehicleType
integer
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
distMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
timeMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
required
Array of objects (AddDeparture)
Array
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
depotId
integer <int64>
Default: -1
required
Array of objects (AddDestination)
Array
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
vehicles
required
Array of integers <int64> [ items <int64 > ]
required
Array of objects (AddVehicleConstraints)
Array
startDate
required
integer <int64>

The date the vehicle begins its route, provided as a timestamp with the time set to midnight.

maxNumberOfPackages
integer <int64>
Default: 99999999

The maximum number of packages that the vehicle can carry.

minNumberOfOrders
integer <int64>
Default: 0

The minimum number of orders that the vehicle must visit

maxNumberOfOrders
integer <int64>
Default: 99999999

The maximum number of orders that the vehicle can visit.

minDistance
number <double>
Default: 0

The minimum distance that the vehicle must travel.

maxDistance
number <double>
Default: 99999999

The maximum distance that the vehicle can travel.

maxRevenue
number <double>
Default: 99999999

The maximum revenue that the vehicle can receive in total.

Responses

Response Schema: application/json
object (Optimization)
id
required
integer <int64>
required
Array of objects (ConfigurationParameters)
Array
name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

allowDroppingOrders
boolean

Specifies whether the algorithm is allowed to drop orders if no solution is found by visiting all of them. Default is false.

groupingOrders
boolean

Specify if the orders will be grouped. If the distance between any two orders is less than 10 meters, those orders will be considered part of the same group. Default is false.

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
distanceUnit
integer
Default: 0
Enum: 0 1

The unit of measure used for distances throughout the optimization. Distance Unit :

  • 0 - eKilometers
  • 1 - eMiles
Array of objects (OrdersSequenceOptions)

These options are used to specify the association between different orders that should be visited in a certain order.

Array
sequenceOptions
integer
Enum: 0 1 2 3

Vehicle type:

  • 0 - eInSameRoute
  • 1 - eInSequence
  • 2 - eInFixedSequence
  • 3 - eInPairs
ordersSequence
Array of integers (Matrix2DI64) [ items <int64 >[ items <int64 > ] ]

A list of lists, where each inner list is a sequence of order ids.

required
Array of objects (Order)
Array
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
required
Array of objects (Departure)
Array
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
depotId
integer <int64>
Default: -1
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

numberOfPackages
integer <int64>
Default: 0
weight
number <double>
Default: 0
cube
number <double>
Default: 0
departureTime
integer <int64>
timeToNext
integer <int32>
Default: 0

The time that will be traveled to arrive at the next order. (in seconds)

distanceToNext
number <float>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

required
Array of objects (Destination)
Array
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

arrivalTime
integer <int64>

The vehicle arrival time at the order's location.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this destination in the distance unit set in the ConfigurationParameters.

required
Array of objects (Vehicle)
Array
id
required
integer <int64>
type
required
integer
Default: 0
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
name
string

Vehicle's name

maxLoadWeight
number <double>
Default: 99999999

The maximum weight that the vehicle can carry

maxLoadCube
number <double>
Default: 99999999

The maximum cubic volume that the vehicle can carry

startTime
integer <int64>
Default: 0

The start time of the working program, in minutes from midnight (time of day).

endTime
integer <int64>
Default: 1439

The end time of the working program, in minutes from midnight (time of day).

licensePlate
string

Vehicle's registration plate (only for cars and trucks)

status
integer
Default: 0
Enum: -1 0 1

Vehicle's status:

  • -1 - eUnAvailable
  • 0 - eAvailable
  • 1 - eEnRoute
lastPosition
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

make
string

Vehicle's make (only for cars, trucks, bikes and e-bikes)

model
string

Vehicle's model (only for cars, trucks, bikes and e-bikes)

fuelType
integer
Default: 2
Enum: 0 1 2 3 4 5 6

Fuel type (only for cars and trucks):

  • -1 - eNone
  • 0 - eDieselStandard
  • 1 - eDieselPremium
  • 2 - eGasolineStandard
  • 3 - eGasolinePremium
  • 4 - eElectric
  • 5 - eLPG
consumption
number <double>
Default: 0

Vehicle's consumption (only for cars and trucks)

bikerWeight
number <double>
Default: 0

Biker + bike weight (only for e-bikes)

bikePower
number <double>
Default: 0

The power of the bicycle in watts (only for e-bikes)

height
number <double>
Default: 0

The height of the vehicle.

width
number <double>
Default: 0

The width of the vehicle.

weight
number <double>
Default: 0

The weight of the vehicle.

length
number <double>
Default: 0

The length of the vehicle.

axleLoad
number <double>
Default: 0

The maximum axle load that the vehicle can carry.

required
Array of objects (VehicleConstraints)
Array
fuelPrice
number <double>
Default: 0

The fuel cost (filled when the vehicle is used in a route).

startDate
required
integer <int64>

The date the vehicle begins its route, provided as a timestamp with the time set to midnight.

maxNumberOfPackages
integer <int64>
Default: 99999999

The maximum number of packages that the vehicle can carry.

minNumberOfOrders
integer <int64>
Default: 0

The minimum number of orders that the vehicle must visit

maxNumberOfOrders
integer <int64>
Default: 99999999

The maximum number of orders that the vehicle can visit.

minDistance
number <double>
Default: 0

The minimum distance that the vehicle must travel.

maxDistance
number <double>
Default: 99999999

The maximum distance that the vehicle can travel.

maxRevenue
number <double>
Default: 99999999

The maximum revenue that the vehicle can receive in total.

creationTimestamp
required
integer <int64>
object (Request)
id
required
integer <int64>
Default: 0
optimizationId
integer <int64>
Default: 0
routeId
integer <int64>
Default: 0
status
required
integer
Default: 0
Enum: 0 1 2 3

Request's status:

  • 0 - eCreated
  • 1 - ePending
  • 2 - eFinished
  • 3 - eCanceled
message
required
string
creationTimestamp
required
integer <int64>
Default: 0
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
{
  • "configurationParameters": [
    • {
      • "name": "Optimization 50 vehicles in Berlin",
      • "ignoreTimeWindow": true,
      • "allowDroppingOrders": false,
      • "groupingOrders": false,
      • "balancedRoutes": false,
      • "arrangeCriterion": 0,
      • "optimizationCriterion": 0,
      • "optimizationQuality": 0,
      • "maxTimeToOptimize": 600,
      • "maxWaitTime": 600,
      • "routeType": 0,
      • "restrictions": 0,
      • "distanceUnit": 0,
      • "orderSequenceOptions": [
        • {
          • "sequenceOptions": 0,
          • "ordersSequence": [
            • [
              • 123456,
              • 234567,
              • 345678,
              • 456789
              ],
            • [
              • 712345,
              • 612345,
              • 102345,
              • 912345
              ]
            ]
          }
        ]
      }
    ],
  • "orders": [
    • 10001,
    • 12547,
    • 14859
    ],
  • "matrixBuiltType": 0,
  • "matrices": [
    • {
      • "vehicleType": 0,
      • "distMatrix": [
        • [
          • 1,
          • 2,
          • 3,
          • 4
          ],
        • [
          • 7,
          • 6,
          • 10,
          • 9
          ]
        ],
      • "timeMatrix": [
        • [
          • 1,
          • 2,
          • 3,
          • 4
          ],
        • [
          • 7,
          • 6,
          • 10,
          • 9
          ]
        ]
      }
    ],
  • "departures": [
    • {
      • "alias": "Ana",
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "depotId": 123456
      }
    ],
  • "destinations": [
    • {
      • "alias": "Ana",
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        }
      }
    ],
  • "vehicles": [
    • 12345,
    • 12346
    ],
  • "vehiclesConstraints": [
    • {
      • "startDate": 1730332800000,
      • "maxNumberOfPackages": 9999,
      • "minNumberOfOrders": 0,
      • "maxNumberOfOrders": 9999,
      • "minDistance": 1.5,
      • "maxDistance": 999.5,
      • "maxRevenue": 999.5
      }
    ]
}

Response samples

Content type
application/json
{
  • "optimization": {
    • "id": 10,
    • "configurationParameters": [
      • {
        • "name": "Optimization 50 vehicles in Berlin",
        • "ignoreTimeWindow": true,
        • "allowDroppingOrders": false,
        • "groupingOrders": false,
        • "balancedRoutes": false,
        • "arrangeCriterion": 0,
        • "optimizationCriterion": 0,
        • "optimizationQuality": 0,
        • "maxTimeToOptimize": 600,
        • "maxWaitTime": 600,
        • "routeType": 0,
        • "restrictions": 0,
        • "distanceUnit": 0,
        • "orderSequenceOptions": [
          • {
            • "sequenceOptions": 0,
            • "ordersSequence": [
              • [
                • 123456,
                • 234567,
                • 345678,
                • 456789
                ],
              • [
                • 712345,
                • 612345,
                • 102345,
                • 912345
                ]
              ]
            }
          ]
        }
      ],
    • "orders": [
      • {
        • "id": 123456,
        • "creationTimestamp": 1689942672,
        • "customerInfo": {
          • "id": 123456,
          • "location": [
            • 45.652871,
            • 25.585588
            ],
          • "alias": "Ana",
          • "firstName": "Ana",
          • "lastName": "Lyn",
          • "address": {
            • "country": "France",
            • "state": "Aquitaine",
            • "county": "Aquitaine",
            • "city": "Bordeaux",
            • "postalCode": "33300",
            • "streetName": "Jean Jaures",
            • "streetNumber": "82",
            • "extra": "94301"
            },
          • "email": "email@yahoo.com",
          • "phoneNumber": "+1234567",
          • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
          },
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "alias": "Ana",
        • "type": 0,
        • "priority": 0,
        • "numberOfPackages": 10,
        • "weight": 5.5,
        • "cube": 5.5,
        • "timeWindow": [
          • 750,
          • 1020
          ],
        • "serviceTime": 400,
        • "revenue": 5.5,
        • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
        • "firstName": "Ana",
        • "lastName": "Lyn",
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "phoneNumber": "+1234567",
        • "status": 0,
        • "state": 0,
        • "depotId": 123456
        }
      ],
    • "departures": [
      • {
        • "alias": "Ana",
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "depotId": 123456,
        • "matchedLocation": [
          • 45.652871,
          • 25.585588
          ],
        • "numberOfPackages": 10,
        • "weight": 5.5,
        • "cube": 5.5,
        • "departureTime": 1602684618476,
        • "timeToNext": 5000,
        • "distanceToNext": 99.5
        }
      ],
    • "destinations": [
      • {
        • "alias": "Ana",
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "matchedLocation": [
          • 45.652871,
          • 25.585588
          ],
        • "arrivalTime": 1602684618476,
        • "traveledDistance": 99.5
        }
      ],
    • "vehicles": [
      • {
        • "id": 123456,
        • "type": 0,
        • "name": "string",
        • "maxLoadWeight": 99.5,
        • "maxLoadCube": 99.5,
        • "startTime": 540,
        • "endTime": 1000,
        • "licensePlate": "string",
        • "status": -1,
        • "lastPosition": [
          • 45.652871,
          • 25.585588
          ],
        • "make": "string",
        • "model": "string",
        • "fuelType": 0,
        • "consumption": 99.5,
        • "bikerWeight": 99.5,
        • "bikePower": 99.5,
        • "height": 99.5,
        • "width": 99.5,
        • "weight": 99.5,
        • "length": 99.5,
        • "axleLoad": 99.5
        }
      ],
    • "vehiclesConstraints": [
      • {
        • "fuelPrice": 1.5,
        • "startDate": 1730332800000,
        • "maxNumberOfPackages": 9999,
        • "minNumberOfOrders": 0,
        • "maxNumberOfOrders": 9999,
        • "minDistance": 1.5,
        • "maxDistance": 999.5,
        • "maxRevenue": 999.5
        }
      ],
    • "creationTimestamp": 1689942672
    },
  • "request": {
    • "id": 123456,
    • "optimizationId": 123456,
    • "routeId": 123456,
    • "status": 0,
    • "message": "Operation done successfully!",
    • "creationTimestamp": 123456
    }
}

Get solution for multiple optimizations

Get the list of routes for multiple optimizations and the dropped orders (if there are)

Authorizations:
ApiKey
query Parameters
ids
required
Array of integers <int64> [ items <int64 > ]
Example: ids=123456&ids=123457&ids=123458

A list with ids of the optimizations of which the solution that has to be retrieved.

encodeShape
integer <int16>

0: The route's shape will not be encoded.
1:(default) - The route's shape will be encoded.

Responses

Response Schema: application/json
object (Route)
id
required
integer <int64>
optimizationId
required
integer <int64>
idVehicle
required
integer <int64>
matrixBuiltType
integer
Default: 1
Enum: 0 1

What distance formula should be used to build the matrix. Matrix Built Type:

  • 0 - eSet = Set by the user using "matrices" field
  • 1 - eReal = Road map distances and times
Array of objects (MatricesObj)

Is set only if matrixBuildType = eSet. For each type of vehicle used in the optimization/route, a distance and a time matrix should be set

Array
vehicleType
integer
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
distMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
timeMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
rideStatus
integer
Default: 1
Enum: 0 1 2 3 4

The status of the route's ride. Ride Status:

  • 0 - eFinished = The ride is finished
  • 1 - eNew = The ride is new and ready to start
  • 2 - eStarted = The ride was started by a vehicle
  • 3 - eCanceledByDriver = The ride was canceled by a vehicle's driver
  • 4 - eCanceledByFleet = The ride was canceled by the fleet manager
required
object (ConfigurationParameters)
name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

allowDroppingOrders
boolean

Specifies whether the algorithm is allowed to drop orders if no solution is found by visiting all of them. Default is false.

groupingOrders
boolean

Specify if the orders will be grouped. If the distance between any two orders is less than 10 meters, those orders will be considered part of the same group. Default is false.

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
distanceUnit
integer
Default: 0
Enum: 0 1

The unit of measure used for distances throughout the optimization. Distance Unit :

  • 0 - eKilometers
  • 1 - eMiles
Array of objects (OrdersSequenceOptions)

These options are used to specify the association between different orders that should be visited in a certain order.

Array
sequenceOptions
integer
Enum: 0 1 2 3

Vehicle type:

  • 0 - eInSameRoute
  • 1 - eInSequence
  • 2 - eInFixedSequence
  • 3 - eInPairs
ordersSequence
Array of integers (Matrix2DI64) [ items <int64 >[ items <int64 > ] ]

A list of lists, where each inner list is a sequence of order ids.

required
object (Departure)
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
depotId
integer <int64>
Default: -1
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

numberOfPackages
integer <int64>
Default: 0
weight
number <double>
Default: 0
cube
number <double>
Default: 0
departureTime
integer <int64>
timeToNext
integer <int32>
Default: 0

The time that will be traveled to arrive at the next order. (in seconds)

distanceToNext
number <float>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

required
object (Destination)
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

arrivalTime
integer <int64>

The vehicle arrival time at the order's location.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this destination in the distance unit set in the ConfigurationParameters.

required
Array of objects (VehicleConstraints)
Array
fuelPrice
number <double>
Default: 0

The fuel cost (filled when the vehicle is used in a route).

startDate
required
integer <int64>

The date the vehicle begins its route, provided as a timestamp with the time set to midnight.

maxNumberOfPackages
integer <int64>
Default: 99999999

The maximum number of packages that the vehicle can carry.

minNumberOfOrders
integer <int64>
Default: 0

The minimum number of orders that the vehicle must visit

maxNumberOfOrders
integer <int64>
Default: 99999999

The maximum number of orders that the vehicle can visit.

minDistance
number <double>
Default: 0

The minimum distance that the vehicle must travel.

maxDistance
number <double>
Default: 99999999

The maximum distance that the vehicle can travel.

maxRevenue
number <double>
Default: 99999999

The maximum revenue that the vehicle can receive in total.

required
Array of objects (RouteOrder)
Array
indexInRoute
integer <int32>
Default: 0

The index of the order in the orders list of the route (the order of visit).

indexInOptimization
integer <int32>
Default: 0

The index of the order in the optimization orders list.

object (Order)
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

actualLocation
Array of numbers <double> (ActualLocation) [ items <double > ]

The actual geographical coordinates in [latitude, longitude] format where the order was serviced, if it was serviced, otherwise this field will not be present.

arrivalTime
integer <int64>
Default: 0

The vehicle arrival time at the order's location.

timeToNextOrder
integer <int32>
Default: 0

The duration between the current order and the next order ( seconds ).

waitTime
integer <int32>
Default: 0

The amount of time that the vehicle has to wait at the current order's location, in order to arrive between the time window to the next order ( seconds ).

numberOfPackagesAtArrival
integer <int32>
Default: 0

The amount of the collected number of packages until this order.

collectedNumberOfPackages
integer <int32>
Default: 0

The number of packages collected from this order.

deliveredNumberOfPackages
integer <int32>
Default: 0

The number of packages delivered at this order.

weightAtArrival
number <double>
Default: 0

The amount of the collected weight until this order.

collectedWeight
number <double>
Default: 0

The weight collected from this order.

deliveredWeight
number <double>
Default: 0

The weight delivered at this order.

cubeAtArrival
number <double>
Default: 0

The total cubic volume collected until this order.

collectedCube
number <double>
Default: 0

The cubic volume collected from this order.

deliveredCube
number <double>
Default: 0

The cubic volume delivered at this order.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this order in the distance unit set in the ConfigurationParameters.

distanceToNextOrder
number <double>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

revenueAtArrival
number <double>
Default: 0

The collected revenue until this order.

visitTimestamp
integer <int64>
Default: 0

The time when the route order was visited.

totalDistance
required
number <float>

The unit of measure for the distance is kilometers or miles, it depends on what the user has chosen in the configuration parameters.

totalTime
required
integer <int32>

Total duration of the route in seconds.

totalServiceTime
required
integer <int32>

Total service time of all the orders of the route in seconds.

totalWaitTime
required
integer <int32>

Total wait time of the route in seconds.

neededFuel
required
number <float>

Total amount of fuel used during the route. The unit of measure for consumption is liter or kw/h depending on the fuel type.

price
required
number <float>

Cost of the route (the price for the total fuel that will be consumed). The price is calculated depending on the vehicle's consumption, the price of the vehicle's fuel type and the total distance.

required
string or Array of Location (numbers)
Any of
string
creationTimestamp
required
integer <int64>
Array of objects (Order)
Array
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
{
  • "route": {
    • "id": 123456,
    • "optimizationId": 123456,
    • "idVehicle": 123456,
    • "matrixBuiltType": 0,
    • "matrices": [
      • {
        • "vehicleType": 0,
        • "distMatrix": [
          • [
            • 1,
            • 2,
            • 3,
            • 4
            ],
          • [
            • 7,
            • 6,
            • 10,
            • 9
            ]
          ],
        • "timeMatrix": [
          • [
            • 1,
            • 2,
            • 3,
            • 4
            ],
          • [
            • 7,
            • 6,
            • 10,
            • 9
            ]
          ]
        }
      ],
    • "rideStatus": 0,
    • "configurationParameters": {
      • "name": "Optimization 50 vehicles in Berlin",
      • "ignoreTimeWindow": true,
      • "allowDroppingOrders": false,
      • "groupingOrders": false,
      • "balancedRoutes": false,
      • "arrangeCriterion": 0,
      • "optimizationCriterion": 0,
      • "optimizationQuality": 0,
      • "maxTimeToOptimize": 600,
      • "maxWaitTime": 600,
      • "routeType": 0,
      • "restrictions": 0,
      • "distanceUnit": 0,
      • "orderSequenceOptions": [
        • {
          • "sequenceOptions": 0,
          • "ordersSequence": [
            • [
              • 123456,
              • 234567,
              • 345678,
              • 456789
              ],
            • [
              • 712345,
              • 612345,
              • 102345,
              • 912345
              ]
            ]
          }
        ]
      },
    • "departure": {
      • "alias": "Ana",
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "depotId": 123456,
      • "matchedLocation": [
        • 45.652871,
        • 25.585588
        ],
      • "numberOfPackages": 10,
      • "weight": 5.5,
      • "cube": 5.5,
      • "departureTime": 1602684618476,
      • "timeToNext": 5000,
      • "distanceToNext": 99.5
      },
    • "destination": {
      • "alias": "Ana",
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "matchedLocation": [
        • 45.652871,
        • 25.585588
        ],
      • "arrivalTime": 1602684618476,
      • "traveledDistance": 99.5
      },
    • "vehicleConstraints": [
      • {
        • "fuelPrice": 1.5,
        • "startDate": 1730332800000,
        • "maxNumberOfPackages": 9999,
        • "minNumberOfOrders": 0,
        • "maxNumberOfOrders": 9999,
        • "minDistance": 1.5,
        • "maxDistance": 999.5,
        • "maxRevenue": 999.5
        }
      ],
    • "orders": [
      • {
        • "indexInRoute": 10,
        • "indexInOptimization": 10,
        • "orderInfo": {
          • "id": 123456,
          • "creationTimestamp": 1689942672,
          • "customerInfo": {
            • "id": 123456,
            • "location": [
              • 45.652871,
              • 25.585588
              ],
            • "alias": "Ana",
            • "firstName": "Ana",
            • "lastName": "Lyn",
            • "address": {
              • "country": "France",
              • "state": "Aquitaine",
              • "county": "Aquitaine",
              • "city": "Bordeaux",
              • "postalCode": "33300",
              • "streetName": "Jean Jaures",
              • "streetNumber": "82",
              • "extra": "94301"
              },
            • "email": "email@yahoo.com",
            • "phoneNumber": "+1234567",
            • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
            },
          • "location": [
            • 45.652871,
            • 25.585588
            ],
          • "alias": "Ana",
          • "type": 0,
          • "priority": 0,
          • "numberOfPackages": 10,
          • "weight": 5.5,
          • "cube": 5.5,
          • "timeWindow": [
            • 750,
            • 1020
            ],
          • "serviceTime": 400,
          • "revenue": 5.5,
          • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
          • "firstName": "Ana",
          • "lastName": "Lyn",
          • "address": {
            • "country": "France",
            • "state": "Aquitaine",
            • "county": "Aquitaine",
            • "city": "Bordeaux",
            • "postalCode": "33300",
            • "streetName": "Jean Jaures",
            • "streetNumber": "82",
            • "extra": "94301"
            },
          • "phoneNumber": "+1234567",
          • "status": 0,
          • "state": 0,
          • "depotId": 123456
          },
        • "matchedLocation": [
          • 45.652871,
          • 25.585588
          ],
        • "actualLocation": [
          • 45.652871,
          • 25.585588
          ],
        • "arrivalTime": 10,
        • "timeToNextOrder": 10,
        • "waitTime": 10,
        • "numberOfPackagesAtArrival": 10,
        • "collectedNumberOfPackages": 10,
        • "deliveredNumberOfPackages": 10,
        • "weightAtArrival": 5.5,
        • "collectedWeight": 5.5,
        • "deliveredWeight": 5.5,
        • "cubeAtArrival": 5.5,
        • "collectedCube": 5.5,
        • "deliveredCube": 5.5,
        • "traveledDistance": 5.5,
        • "distanceToNextOrder": 5.5,
        • "revenueAtArrival": 5.5,
        • "visitTimestamp": 10
        }
      ],
    • "totalDistance": 250.5,
    • "totalTime": 25000,
    • "totalServiceTime": 6000,
    • "totalWaitTime": 500,
    • "neededFuel": 250.5,
    • "price": 430.5,
    • "shape": "string",
    • "creationTimestamp": 1602684618476
    },
  • "droppedOrders": [
    • {
      • "id": 123456,
      • "creationTimestamp": 1689942672,
      • "customerInfo": {
        • "id": 123456,
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "alias": "Ana",
        • "firstName": "Ana",
        • "lastName": "Lyn",
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "email": "email@yahoo.com",
        • "phoneNumber": "+1234567",
        • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
        },
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "alias": "Ana",
      • "type": 0,
      • "priority": 0,
      • "numberOfPackages": 10,
      • "weight": 5.5,
      • "cube": 5.5,
      • "timeWindow": [
        • 750,
        • 1020
        ],
      • "serviceTime": 400,
      • "revenue": 5.5,
      • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
      • "firstName": "Ana",
      • "lastName": "Lyn",
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "phoneNumber": "+1234567",
      • "status": 0,
      • "state": 0,
      • "depotId": 123456
      }
    ]
}

Get an optimization's solution

Get the list of routes of an optimization and the dropped orders (if there are)

Authorizations:
ApiKey
path Parameters
id
required
integer <int64>

ID of the optimization

query Parameters
encodeShape
integer <int16>

0: The route's shape will not be encoded.
1:(default) - The route's shape will be encoded.

Responses

Response Schema: application/json
Array
object (Route)
id
required
integer <int64>
optimizationId
required
integer <int64>
idVehicle
required
integer <int64>
matrixBuiltType
integer
Default: 1
Enum: 0 1

What distance formula should be used to build the matrix. Matrix Built Type:

  • 0 - eSet = Set by the user using "matrices" field
  • 1 - eReal = Road map distances and times
Array of objects (MatricesObj)

Is set only if matrixBuildType = eSet. For each type of vehicle used in the optimization/route, a distance and a time matrix should be set

Array
vehicleType
integer
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
distMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
timeMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
rideStatus
integer
Default: 1
Enum: 0 1 2 3 4

The status of the route's ride. Ride Status:

  • 0 - eFinished = The ride is finished
  • 1 - eNew = The ride is new and ready to start
  • 2 - eStarted = The ride was started by a vehicle
  • 3 - eCanceledByDriver = The ride was canceled by a vehicle's driver
  • 4 - eCanceledByFleet = The ride was canceled by the fleet manager
required
object (ConfigurationParameters)
name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

allowDroppingOrders
boolean

Specifies whether the algorithm is allowed to drop orders if no solution is found by visiting all of them. Default is false.

groupingOrders
boolean

Specify if the orders will be grouped. If the distance between any two orders is less than 10 meters, those orders will be considered part of the same group. Default is false.

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
distanceUnit
integer
Default: 0
Enum: 0 1

The unit of measure used for distances throughout the optimization. Distance Unit :

  • 0 - eKilometers
  • 1 - eMiles
Array of objects (OrdersSequenceOptions)

These options are used to specify the association between different orders that should be visited in a certain order.

Array
sequenceOptions
integer
Enum: 0 1 2 3

Vehicle type:

  • 0 - eInSameRoute
  • 1 - eInSequence
  • 2 - eInFixedSequence
  • 3 - eInPairs
ordersSequence
Array of integers (Matrix2DI64) [ items <int64 >[ items <int64 > ] ]

A list of lists, where each inner list is a sequence of order ids.

required
object (Departure)
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
depotId
integer <int64>
Default: -1
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

numberOfPackages
integer <int64>
Default: 0
weight
number <double>
Default: 0
cube
number <double>
Default: 0
departureTime
integer <int64>
timeToNext
integer <int32>
Default: 0

The time that will be traveled to arrive at the next order. (in seconds)

distanceToNext
number <float>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

required
object (Destination)
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

arrivalTime
integer <int64>

The vehicle arrival time at the order's location.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this destination in the distance unit set in the ConfigurationParameters.

required
Array of objects (VehicleConstraints)
Array
fuelPrice
number <double>
Default: 0

The fuel cost (filled when the vehicle is used in a route).

startDate
required
integer <int64>

The date the vehicle begins its route, provided as a timestamp with the time set to midnight.

maxNumberOfPackages
integer <int64>
Default: 99999999

The maximum number of packages that the vehicle can carry.

minNumberOfOrders
integer <int64>
Default: 0

The minimum number of orders that the vehicle must visit

maxNumberOfOrders
integer <int64>
Default: 99999999

The maximum number of orders that the vehicle can visit.

minDistance
number <double>
Default: 0

The minimum distance that the vehicle must travel.

maxDistance
number <double>
Default: 99999999

The maximum distance that the vehicle can travel.

maxRevenue
number <double>
Default: 99999999

The maximum revenue that the vehicle can receive in total.

required
Array of objects (RouteOrder)
Array
indexInRoute
integer <int32>
Default: 0

The index of the order in the orders list of the route (the order of visit).

indexInOptimization
integer <int32>
Default: 0

The index of the order in the optimization orders list.

object (Order)
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

actualLocation
Array of numbers <double> (ActualLocation) [ items <double > ]

The actual geographical coordinates in [latitude, longitude] format where the order was serviced, if it was serviced, otherwise this field will not be present.

arrivalTime
integer <int64>
Default: 0

The vehicle arrival time at the order's location.

timeToNextOrder
integer <int32>
Default: 0

The duration between the current order and the next order ( seconds ).

waitTime
integer <int32>
Default: 0

The amount of time that the vehicle has to wait at the current order's location, in order to arrive between the time window to the next order ( seconds ).

numberOfPackagesAtArrival
integer <int32>
Default: 0

The amount of the collected number of packages until this order.

collectedNumberOfPackages
integer <int32>
Default: 0

The number of packages collected from this order.

deliveredNumberOfPackages
integer <int32>
Default: 0

The number of packages delivered at this order.

weightAtArrival
number <double>
Default: 0

The amount of the collected weight until this order.

collectedWeight
number <double>
Default: 0

The weight collected from this order.

deliveredWeight
number <double>
Default: 0

The weight delivered at this order.

cubeAtArrival
number <double>
Default: 0

The total cubic volume collected until this order.

collectedCube
number <double>
Default: 0

The cubic volume collected from this order.

deliveredCube
number <double>
Default: 0

The cubic volume delivered at this order.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this order in the distance unit set in the ConfigurationParameters.

distanceToNextOrder
number <double>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

revenueAtArrival
number <double>
Default: 0

The collected revenue until this order.

visitTimestamp
integer <int64>
Default: 0

The time when the route order was visited.

totalDistance
required
number <float>

The unit of measure for the distance is kilometers or miles, it depends on what the user has chosen in the configuration parameters.

totalTime
required
integer <int32>

Total duration of the route in seconds.

totalServiceTime
required
integer <int32>

Total service time of all the orders of the route in seconds.

totalWaitTime
required
integer <int32>

Total wait time of the route in seconds.

neededFuel
required
number <float>

Total amount of fuel used during the route. The unit of measure for consumption is liter or kw/h depending on the fuel type.

price
required
number <float>

Cost of the route (the price for the total fuel that will be consumed). The price is calculated depending on the vehicle's consumption, the price of the vehicle's fuel type and the total distance.

required
string or Array of Location (numbers)
Any of
string
creationTimestamp
required
integer <int64>
Array of objects (Order)
Array
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

The request of the operation is not finished yet

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
[
  • {
    • "route": {
      • "id": 123456,
      • "optimizationId": 123456,
      • "idVehicle": 123456,
      • "matrixBuiltType": 0,
      • "matrices": [
        • {
          • "vehicleType": 0,
          • "distMatrix": [
            • [
              • 1,
              • 2,
              • 3,
              • 4
              ],
            • [
              • 7,
              • 6,
              • 10,
              • 9
              ]
            ],
          • "timeMatrix": [
            • [
              • 1,
              • 2,
              • 3,
              • 4
              ],
            • [
              • 7,
              • 6,
              • 10,
              • 9
              ]
            ]
          }
        ],
      • "rideStatus": 0,
      • "configurationParameters": {
        • "name": "Optimization 50 vehicles in Berlin",
        • "ignoreTimeWindow": true,
        • "allowDroppingOrders": false,
        • "groupingOrders": false,
        • "balancedRoutes": false,
        • "arrangeCriterion": 0,
        • "optimizationCriterion": 0,
        • "optimizationQuality": 0,
        • "maxTimeToOptimize": 600,
        • "maxWaitTime": 600,
        • "routeType": 0,
        • "restrictions": 0,
        • "distanceUnit": 0,
        • "orderSequenceOptions": [
          • {
            • "sequenceOptions": 0,
            • "ordersSequence": [
              • [
                • 123456,
                • 234567,
                • 345678,
                • 456789
                ],
              • [
                • 712345,
                • 612345,
                • 102345,
                • 912345
                ]
              ]
            }
          ]
        },
      • "departure": {
        • "alias": "Ana",
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "depotId": 123456,
        • "matchedLocation": [
          • 45.652871,
          • 25.585588
          ],
        • "numberOfPackages": 10,
        • "weight": 5.5,
        • "cube": 5.5,
        • "departureTime": 1602684618476,
        • "timeToNext": 5000,
        • "distanceToNext": 99.5
        },
      • "destination": {
        • "alias": "Ana",
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "matchedLocation": [
          • 45.652871,
          • 25.585588
          ],
        • "arrivalTime": 1602684618476,
        • "traveledDistance": 99.5
        },
      • "vehicleConstraints": [
        • {
          • "fuelPrice": 1.5,
          • "startDate": 1730332800000,
          • "maxNumberOfPackages": 9999,
          • "minNumberOfOrders": 0,
          • "maxNumberOfOrders": 9999,
          • "minDistance": 1.5,
          • "maxDistance": 999.5,
          • "maxRevenue": 999.5
          }
        ],
      • "orders": [
        • {
          • "indexInRoute": 10,
          • "indexInOptimization": 10,
          • "orderInfo": {
            • "id": 123456,
            • "creationTimestamp": 1689942672,
            • "customerInfo": {
              • "id": 123456,
              • "location": [
                • 45.652871,
                • 25.585588
                ],
              • "alias": "Ana",
              • "firstName": "Ana",
              • "lastName": "Lyn",
              • "address": {
                • "country": "France",
                • "state": "Aquitaine",
                • "county": "Aquitaine",
                • "city": "Bordeaux",
                • "postalCode": "33300",
                • "streetName": "Jean Jaures",
                • "streetNumber": "82",
                • "extra": "94301"
                },
              • "email": "email@yahoo.com",
              • "phoneNumber": "+1234567",
              • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
              },
            • "location": [
              • 45.652871,
              • 25.585588
              ],
            • "alias": "Ana",
            • "type": 0,
            • "priority": 0,
            • "numberOfPackages": 10,
            • "weight": 5.5,
            • "cube": 5.5,
            • "timeWindow": [
              • 750,
              • 1020
              ],
            • "serviceTime": 400,
            • "revenue": 5.5,
            • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
            • "firstName": "Ana",
            • "lastName": "Lyn",
            • "address": {
              • "country": "France",
              • "state": "Aquitaine",
              • "county": "Aquitaine",
              • "city": "Bordeaux",
              • "postalCode": "33300",
              • "streetName": "Jean Jaures",
              • "streetNumber": "82",
              • "extra": "94301"
              },
            • "phoneNumber": "+1234567",
            • "status": 0,
            • "state": 0,
            • "depotId": 123456
            },
          • "matchedLocation": [
            • 45.652871,
            • 25.585588
            ],
          • "actualLocation": [
            • 45.652871,
            • 25.585588
            ],
          • "arrivalTime": 10,
          • "timeToNextOrder": 10,
          • "waitTime": 10,
          • "numberOfPackagesAtArrival": 10,
          • "collectedNumberOfPackages": 10,
          • "deliveredNumberOfPackages": 10,
          • "weightAtArrival": 5.5,
          • "collectedWeight": 5.5,
          • "deliveredWeight": 5.5,
          • "cubeAtArrival": 5.5,
          • "collectedCube": 5.5,
          • "deliveredCube": 5.5,
          • "traveledDistance": 5.5,
          • "distanceToNextOrder": 5.5,
          • "revenueAtArrival": 5.5,
          • "visitTimestamp": 10
          }
        ],
      • "totalDistance": 250.5,
      • "totalTime": 25000,
      • "totalServiceTime": 6000,
      • "totalWaitTime": 500,
      • "neededFuel": 250.5,
      • "price": 430.5,
      • "shape": "string",
      • "creationTimestamp": 1602684618476
      },
    • "droppedOrders": [
      • {
        • "id": 123456,
        • "creationTimestamp": 1689942672,
        • "customerInfo": {
          • "id": 123456,
          • "location": [
            • 45.652871,
            • 25.585588
            ],
          • "alias": "Ana",
          • "firstName": "Ana",
          • "lastName": "Lyn",
          • "address": {
            • "country": "France",
            • "state": "Aquitaine",
            • "county": "Aquitaine",
            • "city": "Bordeaux",
            • "postalCode": "33300",
            • "streetName": "Jean Jaures",
            • "streetNumber": "82",
            • "extra": "94301"
            },
          • "email": "email@yahoo.com",
          • "phoneNumber": "+1234567",
          • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
          },
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "alias": "Ana",
        • "type": 0,
        • "priority": 0,
        • "numberOfPackages": 10,
        • "weight": 5.5,
        • "cube": 5.5,
        • "timeWindow": [
          • 750,
          • 1020
          ],
        • "serviceTime": 400,
        • "revenue": 5.5,
        • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
        • "firstName": "Ana",
        • "lastName": "Lyn",
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "phoneNumber": "+1234567",
        • "status": 0,
        • "state": 0,
        • "depotId": 123456
        }
      ]
    }
]

Reoptimizes an optimization.

Reoptimizes an optimization and returns the new solution. The old solution will no longer be accesible

Authorizations:
ApiKey
path Parameters
id
required
integer

ID of optimization to which the order belongs

query Parameters
encodeShape
integer <int16>

0: The route's shape will not be encoded.
1:(default) - The route's shape will be encoded.

Responses

Response Schema: application/json
Array
id
required
integer <int64>
Default: 0
optimizationId
integer <int64>
Default: 0
routeId
integer <int64>
Default: 0
status
required
integer
Default: 0
Enum: 0 1 2 3

Request's status:

  • 0 - eCreated
  • 1 - ePending
  • 2 - eFinished
  • 3 - eCanceled
message
required
string
creationTimestamp
required
integer <int64>
Default: 0
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

The request of the operation is not finished yet

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
[
  • {
    • "id": 123456,
    • "optimizationId": 123456,
    • "routeId": 123456,
    • "status": 0,
    • "message": "Operation done successfully!",
    • "creationTimestamp": 123456
    }
]

Adds a list of orders into the optimization's existing list of orders. The orders will be set as "scheduled".

Applies the changes over the optimization and searches for a new solution if reoptimize parameter is 1

Authorizations:
ApiKey
path Parameters
id
required
integer

ID of optimization to update

query Parameters
reoptimize
integer <int16>

0: (default) - If the optimization will not be re-optimized, the orders will be added to the optimization's order list, but will not be in a route, so they won't be visited by any vehicle.
1: If the optimization will be re-optimized

Request Body schema: application/json
required

The optimization's properties

orders
Array of integers <int64> [ items <int64 > ]
Array of objects (MatricesObj)
Array
vehicleType
integer
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
distMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
timeMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]

Responses

Response Schema: application/json
object (Optimization)
id
required
integer <int64>
required
Array of objects (ConfigurationParameters)
Array
name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

allowDroppingOrders
boolean

Specifies whether the algorithm is allowed to drop orders if no solution is found by visiting all of them. Default is false.

groupingOrders
boolean

Specify if the orders will be grouped. If the distance between any two orders is less than 10 meters, those orders will be considered part of the same group. Default is false.

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
distanceUnit
integer
Default: 0
Enum: 0 1

The unit of measure used for distances throughout the optimization. Distance Unit :

  • 0 - eKilometers
  • 1 - eMiles
Array of objects (OrdersSequenceOptions)

These options are used to specify the association between different orders that should be visited in a certain order.

Array
sequenceOptions
integer
Enum: 0 1 2 3

Vehicle type:

  • 0 - eInSameRoute
  • 1 - eInSequence
  • 2 - eInFixedSequence
  • 3 - eInPairs
ordersSequence
Array of integers (Matrix2DI64) [ items <int64 >[ items <int64 > ] ]

A list of lists, where each inner list is a sequence of order ids.

required
Array of objects (Order)
Array
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
required
Array of objects (Departure)
Array
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
depotId
integer <int64>
Default: -1
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

numberOfPackages
integer <int64>
Default: 0
weight
number <double>
Default: 0
cube
number <double>
Default: 0
departureTime
integer <int64>
timeToNext
integer <int32>
Default: 0

The time that will be traveled to arrive at the next order. (in seconds)

distanceToNext
number <float>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

required
Array of objects (Destination)
Array
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

arrivalTime
integer <int64>

The vehicle arrival time at the order's location.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this destination in the distance unit set in the ConfigurationParameters.

required
Array of objects (Vehicle)
Array
id
required
integer <int64>
type
required
integer
Default: 0
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
name
string

Vehicle's name

maxLoadWeight
number <double>
Default: 99999999

The maximum weight that the vehicle can carry

maxLoadCube
number <double>
Default: 99999999

The maximum cubic volume that the vehicle can carry

startTime
integer <int64>
Default: 0

The start time of the working program, in minutes from midnight (time of day).

endTime
integer <int64>
Default: 1439

The end time of the working program, in minutes from midnight (time of day).

licensePlate
string

Vehicle's registration plate (only for cars and trucks)

status
integer
Default: 0
Enum: -1 0 1

Vehicle's status:

  • -1 - eUnAvailable
  • 0 - eAvailable
  • 1 - eEnRoute
lastPosition
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

make
string

Vehicle's make (only for cars, trucks, bikes and e-bikes)

model
string

Vehicle's model (only for cars, trucks, bikes and e-bikes)

fuelType
integer
Default: 2
Enum: 0 1 2 3 4 5 6

Fuel type (only for cars and trucks):

  • -1 - eNone
  • 0 - eDieselStandard
  • 1 - eDieselPremium
  • 2 - eGasolineStandard
  • 3 - eGasolinePremium
  • 4 - eElectric
  • 5 - eLPG
consumption
number <double>
Default: 0

Vehicle's consumption (only for cars and trucks)

bikerWeight
number <double>
Default: 0

Biker + bike weight (only for e-bikes)

bikePower
number <double>
Default: 0

The power of the bicycle in watts (only for e-bikes)

height
number <double>
Default: 0

The height of the vehicle.

width
number <double>
Default: 0

The width of the vehicle.

weight
number <double>
Default: 0

The weight of the vehicle.

length
number <double>
Default: 0

The length of the vehicle.

axleLoad
number <double>
Default: 0

The maximum axle load that the vehicle can carry.

required
Array of objects (VehicleConstraints)
Array
fuelPrice
number <double>
Default: 0

The fuel cost (filled when the vehicle is used in a route).

startDate
required
integer <int64>

The date the vehicle begins its route, provided as a timestamp with the time set to midnight.

maxNumberOfPackages
integer <int64>
Default: 99999999

The maximum number of packages that the vehicle can carry.

minNumberOfOrders
integer <int64>
Default: 0

The minimum number of orders that the vehicle must visit

maxNumberOfOrders
integer <int64>
Default: 99999999

The maximum number of orders that the vehicle can visit.

minDistance
number <double>
Default: 0

The minimum distance that the vehicle must travel.

maxDistance
number <double>
Default: 99999999

The maximum distance that the vehicle can travel.

maxRevenue
number <double>
Default: 99999999

The maximum revenue that the vehicle can receive in total.

creationTimestamp
required
integer <int64>
object (Request)
id
required
integer <int64>
Default: 0
optimizationId
integer <int64>
Default: 0
routeId
integer <int64>
Default: 0
status
required
integer
Default: 0
Enum: 0 1 2 3

Request's status:

  • 0 - eCreated
  • 1 - ePending
  • 2 - eFinished
  • 3 - eCanceled
message
required
string
creationTimestamp
required
integer <int64>
Default: 0
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
{
  • "orders": [
    • 10001,
    • 12547,
    • 14859
    ],
  • "matricesToTheOtherLocations": [
    • {
      • "vehicleType": 0,
      • "distMatrix": [
        • [
          • 1,
          • 2,
          • 3,
          • 4
          ],
        • [
          • 7,
          • 6,
          • 10,
          • 9
          ]
        ],
      • "timeMatrix": [
        • [
          • 1,
          • 2,
          • 3,
          • 4
          ],
        • [
          • 7,
          • 6,
          • 10,
          • 9
          ]
        ]
      }
    ]
}

Response samples

Content type
application/json
{
  • "optimization": {
    • "id": 10,
    • "configurationParameters": [
      • {
        • "name": "Optimization 50 vehicles in Berlin",
        • "ignoreTimeWindow": true,
        • "allowDroppingOrders": false,
        • "groupingOrders": false,
        • "balancedRoutes": false,
        • "arrangeCriterion": 0,
        • "optimizationCriterion": 0,
        • "optimizationQuality": 0,
        • "maxTimeToOptimize": 600,
        • "maxWaitTime": 600,
        • "routeType": 0,
        • "restrictions": 0,
        • "distanceUnit": 0,
        • "orderSequenceOptions": [
          • {
            • "sequenceOptions": 0,
            • "ordersSequence": [
              • [
                • 123456,
                • 234567,
                • 345678,
                • 456789
                ],
              • [
                • 712345,
                • 612345,
                • 102345,
                • 912345
                ]
              ]
            }
          ]
        }
      ],
    • "orders": [
      • {
        • "id": 123456,
        • "creationTimestamp": 1689942672,
        • "customerInfo": {
          • "id": 123456,
          • "location": [
            • 45.652871,
            • 25.585588
            ],
          • "alias": "Ana",
          • "firstName": "Ana",
          • "lastName": "Lyn",
          • "address": {
            • "country": "France",
            • "state": "Aquitaine",
            • "county": "Aquitaine",
            • "city": "Bordeaux",
            • "postalCode": "33300",
            • "streetName": "Jean Jaures",
            • "streetNumber": "82",
            • "extra": "94301"
            },
          • "email": "email@yahoo.com",
          • "phoneNumber": "+1234567",
          • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
          },
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "alias": "Ana",
        • "type": 0,
        • "priority": 0,
        • "numberOfPackages": 10,
        • "weight": 5.5,
        • "cube": 5.5,
        • "timeWindow": [
          • 750,
          • 1020
          ],
        • "serviceTime": 400,
        • "revenue": 5.5,
        • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
        • "firstName": "Ana",
        • "lastName": "Lyn",
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "phoneNumber": "+1234567",
        • "status": 0,
        • "state": 0,
        • "depotId": 123456
        }
      ],
    • "departures": [
      • {
        • "alias": "Ana",
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "depotId": 123456,
        • "matchedLocation": [
          • 45.652871,
          • 25.585588
          ],
        • "numberOfPackages": 10,
        • "weight": 5.5,
        • "cube": 5.5,
        • "departureTime": 1602684618476,
        • "timeToNext": 5000,
        • "distanceToNext": 99.5
        }
      ],
    • "destinations": [
      • {
        • "alias": "Ana",
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "matchedLocation": [
          • 45.652871,
          • 25.585588
          ],
        • "arrivalTime": 1602684618476,
        • "traveledDistance": 99.5
        }
      ],
    • "vehicles": [
      • {
        • "id": 123456,
        • "type": 0,
        • "name": "string",
        • "maxLoadWeight": 99.5,
        • "maxLoadCube": 99.5,
        • "startTime": 540,
        • "endTime": 1000,
        • "licensePlate": "string",
        • "status": -1,
        • "lastPosition": [
          • 45.652871,
          • 25.585588
          ],
        • "make": "string",
        • "model": "string",
        • "fuelType": 0,
        • "consumption": 99.5,
        • "bikerWeight": 99.5,
        • "bikePower": 99.5,
        • "height": 99.5,
        • "width": 99.5,
        • "weight": 99.5,
        • "length": 99.5,
        • "axleLoad": 99.5
        }
      ],
    • "vehiclesConstraints": [
      • {
        • "fuelPrice": 1.5,
        • "startDate": 1730332800000,
        • "maxNumberOfPackages": 9999,
        • "minNumberOfOrders": 0,
        • "maxNumberOfOrders": 9999,
        • "minDistance": 1.5,
        • "maxDistance": 999.5,
        • "maxRevenue": 999.5
        }
      ],
    • "creationTimestamp": 1689942672
    },
  • "request": {
    • "id": 123456,
    • "optimizationId": 123456,
    • "routeId": 123456,
    • "status": 0,
    • "message": "Operation done successfully!",
    • "creationTimestamp": 123456
    }
}

Update an order from an optimization

Applies the changes over the optimization's order and returns the optimization.

Authorizations:
ApiKey
path Parameters
id
required
integer

ID of optimization to which the order belongs

orderId
required
integer

ID of the order

Request Body schema: application/json
required

The order's properties.

id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>

Responses

Response Schema: application/json
id
required
integer <int64>
required
Array of objects (ConfigurationParameters)
Array
name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

allowDroppingOrders
boolean

Specifies whether the algorithm is allowed to drop orders if no solution is found by visiting all of them. Default is false.

groupingOrders
boolean

Specify if the orders will be grouped. If the distance between any two orders is less than 10 meters, those orders will be considered part of the same group. Default is false.

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
distanceUnit
integer
Default: 0
Enum: 0 1

The unit of measure used for distances throughout the optimization. Distance Unit :

  • 0 - eKilometers
  • 1 - eMiles
Array of objects (OrdersSequenceOptions)

These options are used to specify the association between different orders that should be visited in a certain order.

Array
sequenceOptions
integer
Enum: 0 1 2 3

Vehicle type:

  • 0 - eInSameRoute
  • 1 - eInSequence
  • 2 - eInFixedSequence
  • 3 - eInPairs
ordersSequence
Array of integers (Matrix2DI64) [ items <int64 >[ items <int64 > ] ]

A list of lists, where each inner list is a sequence of order ids.

required
Array of objects (Order)
Array
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
required
Array of objects (Departure)
Array
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
depotId
integer <int64>
Default: -1
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

numberOfPackages
integer <int64>
Default: 0
weight
number <double>
Default: 0
cube
number <double>
Default: 0
departureTime
integer <int64>
timeToNext
integer <int32>
Default: 0

The time that will be traveled to arrive at the next order. (in seconds)

distanceToNext
number <float>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

required
Array of objects (Destination)
Array
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

arrivalTime
integer <int64>

The vehicle arrival time at the order's location.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this destination in the distance unit set in the ConfigurationParameters.

required
Array of objects (Vehicle)
Array
id
required
integer <int64>
type
required
integer
Default: 0
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
name
string

Vehicle's name

maxLoadWeight
number <double>
Default: 99999999

The maximum weight that the vehicle can carry

maxLoadCube
number <double>
Default: 99999999

The maximum cubic volume that the vehicle can carry

startTime
integer <int64>
Default: 0

The start time of the working program, in minutes from midnight (time of day).

endTime
integer <int64>
Default: 1439

The end time of the working program, in minutes from midnight (time of day).

licensePlate
string

Vehicle's registration plate (only for cars and trucks)

status
integer
Default: 0
Enum: -1 0 1

Vehicle's status:

  • -1 - eUnAvailable
  • 0 - eAvailable
  • 1 - eEnRoute
lastPosition
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

make
string

Vehicle's make (only for cars, trucks, bikes and e-bikes)

model
string

Vehicle's model (only for cars, trucks, bikes and e-bikes)

fuelType
integer
Default: 2
Enum: 0 1 2 3 4 5 6

Fuel type (only for cars and trucks):

  • -1 - eNone
  • 0 - eDieselStandard
  • 1 - eDieselPremium
  • 2 - eGasolineStandard
  • 3 - eGasolinePremium
  • 4 - eElectric
  • 5 - eLPG
consumption
number <double>
Default: 0

Vehicle's consumption (only for cars and trucks)

bikerWeight
number <double>
Default: 0

Biker + bike weight (only for e-bikes)

bikePower
number <double>
Default: 0

The power of the bicycle in watts (only for e-bikes)

height
number <double>
Default: 0

The height of the vehicle.

width
number <double>
Default: 0

The width of the vehicle.

weight
number <double>
Default: 0

The weight of the vehicle.

length
number <double>
Default: 0

The length of the vehicle.

axleLoad
number <double>
Default: 0

The maximum axle load that the vehicle can carry.

required
Array of objects (VehicleConstraints)
Array
fuelPrice
number <double>
Default: 0

The fuel cost (filled when the vehicle is used in a route).

startDate
required
integer <int64>

The date the vehicle begins its route, provided as a timestamp with the time set to midnight.

maxNumberOfPackages
integer <int64>
Default: 99999999

The maximum number of packages that the vehicle can carry.

minNumberOfOrders
integer <int64>
Default: 0

The minimum number of orders that the vehicle must visit

maxNumberOfOrders
integer <int64>
Default: 99999999

The maximum number of orders that the vehicle can visit.

minDistance
number <double>
Default: 0

The minimum distance that the vehicle must travel.

maxDistance
number <double>
Default: 99999999

The maximum distance that the vehicle can travel.

maxRevenue
number <double>
Default: 99999999

The maximum revenue that the vehicle can receive in total.

creationTimestamp
required
integer <int64>
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
{
  • "id": 123456,
  • "creationTimestamp": 1689942672,
  • "customerInfo": {
    • "id": 123456,
    • "location": [
      • 45.652871,
      • 25.585588
      ],
    • "alias": "Ana",
    • "firstName": "Ana",
    • "lastName": "Lyn",
    • "address": {
      • "country": "France",
      • "state": "Aquitaine",
      • "county": "Aquitaine",
      • "city": "Bordeaux",
      • "postalCode": "33300",
      • "streetName": "Jean Jaures",
      • "streetNumber": "82",
      • "extra": "94301"
      },
    • "email": "email@yahoo.com",
    • "phoneNumber": "+1234567",
    • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
    },
  • "location": [
    • 45.652871,
    • 25.585588
    ],
  • "alias": "Ana",
  • "type": 0,
  • "priority": 0,
  • "numberOfPackages": 10,
  • "weight": 5.5,
  • "cube": 5.5,
  • "timeWindow": [
    • 750,
    • 1020
    ],
  • "serviceTime": 400,
  • "revenue": 5.5,
  • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
  • "firstName": "Ana",
  • "lastName": "Lyn",
  • "address": {
    • "country": "France",
    • "state": "Aquitaine",
    • "county": "Aquitaine",
    • "city": "Bordeaux",
    • "postalCode": "33300",
    • "streetName": "Jean Jaures",
    • "streetNumber": "82",
    • "extra": "94301"
    },
  • "phoneNumber": "+1234567",
  • "status": 0,
  • "state": 0,
  • "depotId": 123456
}

Response samples

Content type
application/json
{
  • "id": 10,
  • "configurationParameters": [
    • {
      • "name": "Optimization 50 vehicles in Berlin",
      • "ignoreTimeWindow": true,
      • "allowDroppingOrders": false,
      • "groupingOrders": false,
      • "balancedRoutes": false,
      • "arrangeCriterion": 0,
      • "optimizationCriterion": 0,
      • "optimizationQuality": 0,
      • "maxTimeToOptimize": 600,
      • "maxWaitTime": 600,
      • "routeType": 0,
      • "restrictions": 0,
      • "distanceUnit": 0,
      • "orderSequenceOptions": [
        • {
          • "sequenceOptions": 0,
          • "ordersSequence": [
            • [
              • 123456,
              • 234567,
              • 345678,
              • 456789
              ],
            • [
              • 712345,
              • 612345,
              • 102345,
              • 912345
              ]
            ]
          }
        ]
      }
    ],
  • "orders": [
    • {
      • "id": 123456,
      • "creationTimestamp": 1689942672,
      • "customerInfo": {
        • "id": 123456,
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "alias": "Ana",
        • "firstName": "Ana",
        • "lastName": "Lyn",
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "email": "email@yahoo.com",
        • "phoneNumber": "+1234567",
        • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
        },
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "alias": "Ana",
      • "type": 0,
      • "priority": 0,
      • "numberOfPackages": 10,
      • "weight": 5.5,
      • "cube": 5.5,
      • "timeWindow": [
        • 750,
        • 1020
        ],
      • "serviceTime": 400,
      • "revenue": 5.5,
      • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
      • "firstName": "Ana",
      • "lastName": "Lyn",
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "phoneNumber": "+1234567",
      • "status": 0,
      • "state": 0,
      • "depotId": 123456
      }
    ],
  • "departures": [
    • {
      • "alias": "Ana",
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "depotId": 123456,
      • "matchedLocation": [
        • 45.652871,
        • 25.585588
        ],
      • "numberOfPackages": 10,
      • "weight": 5.5,
      • "cube": 5.5,
      • "departureTime": 1602684618476,
      • "timeToNext": 5000,
      • "distanceToNext": 99.5
      }
    ],
  • "destinations": [
    • {
      • "alias": "Ana",
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "matchedLocation": [
        • 45.652871,
        • 25.585588
        ],
      • "arrivalTime": 1602684618476,
      • "traveledDistance": 99.5
      }
    ],
  • "vehicles": [
    • {
      • "id": 123456,
      • "type": 0,
      • "name": "string",
      • "maxLoadWeight": 99.5,
      • "maxLoadCube": 99.5,
      • "startTime": 540,
      • "endTime": 1000,
      • "licensePlate": "string",
      • "status": -1,
      • "lastPosition": [
        • 45.652871,
        • 25.585588
        ],
      • "make": "string",
      • "model": "string",
      • "fuelType": 0,
      • "consumption": 99.5,
      • "bikerWeight": 99.5,
      • "bikePower": 99.5,
      • "height": 99.5,
      • "width": 99.5,
      • "weight": 99.5,
      • "length": 99.5,
      • "axleLoad": 99.5
      }
    ],
  • "vehiclesConstraints": [
    • {
      • "fuelPrice": 1.5,
      • "startDate": 1730332800000,
      • "maxNumberOfPackages": 9999,
      • "minNumberOfOrders": 0,
      • "maxNumberOfOrders": 9999,
      • "minDistance": 1.5,
      • "maxDistance": 999.5,
      • "maxRevenue": 999.5
      }
    ],
  • "creationTimestamp": 1689942672
}

Deletes an order from an optimization. The order will be unscheduled.

Deletes an order from an optimization and from the route to which it belongs. The new optimization is returned.
If the optimization or the coresponding route has only this order, the order cannot be deleted.

Authorizations:
ApiKey
path Parameters
id
required
integer

ID of optimization to which the order belongs

orderId
required
integer

ID of the order

Responses

Response Schema: application/json
id
required
integer <int64>
required
Array of objects (ConfigurationParameters)
Array
name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

allowDroppingOrders
boolean

Specifies whether the algorithm is allowed to drop orders if no solution is found by visiting all of them. Default is false.

groupingOrders
boolean

Specify if the orders will be grouped. If the distance between any two orders is less than 10 meters, those orders will be considered part of the same group. Default is false.

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
distanceUnit
integer
Default: 0
Enum: 0 1

The unit of measure used for distances throughout the optimization. Distance Unit :

  • 0 - eKilometers
  • 1 - eMiles
Array of objects (OrdersSequenceOptions)

These options are used to specify the association between different orders that should be visited in a certain order.

Array
sequenceOptions
integer
Enum: 0 1 2 3

Vehicle type:

  • 0 - eInSameRoute
  • 1 - eInSequence
  • 2 - eInFixedSequence
  • 3 - eInPairs
ordersSequence
Array of integers (Matrix2DI64) [ items <int64 >[ items <int64 > ] ]

A list of lists, where each inner list is a sequence of order ids.

required
Array of objects (Order)
Array
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
required
Array of objects (Departure)
Array
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
depotId
integer <int64>
Default: -1
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

numberOfPackages
integer <int64>
Default: 0
weight
number <double>
Default: 0
cube
number <double>
Default: 0
departureTime
integer <int64>
timeToNext
integer <int32>
Default: 0

The time that will be traveled to arrive at the next order. (in seconds)

distanceToNext
number <float>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

required
Array of objects (Destination)
Array
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

arrivalTime
integer <int64>

The vehicle arrival time at the order's location.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this destination in the distance unit set in the ConfigurationParameters.

required
Array of objects (Vehicle)
Array
id
required
integer <int64>
type
required
integer
Default: 0
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
name
string

Vehicle's name

maxLoadWeight
number <double>
Default: 99999999

The maximum weight that the vehicle can carry

maxLoadCube
number <double>
Default: 99999999

The maximum cubic volume that the vehicle can carry

startTime
integer <int64>
Default: 0

The start time of the working program, in minutes from midnight (time of day).

endTime
integer <int64>
Default: 1439

The end time of the working program, in minutes from midnight (time of day).

licensePlate
string

Vehicle's registration plate (only for cars and trucks)

status
integer
Default: 0
Enum: -1 0 1

Vehicle's status:

  • -1 - eUnAvailable
  • 0 - eAvailable
  • 1 - eEnRoute
lastPosition
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

make
string

Vehicle's make (only for cars, trucks, bikes and e-bikes)

model
string

Vehicle's model (only for cars, trucks, bikes and e-bikes)

fuelType
integer
Default: 2
Enum: 0 1 2 3 4 5 6

Fuel type (only for cars and trucks):

  • -1 - eNone
  • 0 - eDieselStandard
  • 1 - eDieselPremium
  • 2 - eGasolineStandard
  • 3 - eGasolinePremium
  • 4 - eElectric
  • 5 - eLPG
consumption
number <double>
Default: 0

Vehicle's consumption (only for cars and trucks)

bikerWeight
number <double>
Default: 0

Biker + bike weight (only for e-bikes)

bikePower
number <double>
Default: 0

The power of the bicycle in watts (only for e-bikes)

height
number <double>
Default: 0

The height of the vehicle.

width
number <double>
Default: 0

The width of the vehicle.

weight
number <double>
Default: 0

The weight of the vehicle.

length
number <double>
Default: 0

The length of the vehicle.

axleLoad
number <double>
Default: 0

The maximum axle load that the vehicle can carry.

required
Array of objects (VehicleConstraints)
Array
fuelPrice
number <double>
Default: 0

The fuel cost (filled when the vehicle is used in a route).

startDate
required
integer <int64>

The date the vehicle begins its route, provided as a timestamp with the time set to midnight.

maxNumberOfPackages
integer <int64>
Default: 99999999

The maximum number of packages that the vehicle can carry.

minNumberOfOrders
integer <int64>
Default: 0

The minimum number of orders that the vehicle must visit

maxNumberOfOrders
integer <int64>
Default: 99999999

The maximum number of orders that the vehicle can visit.

minDistance
number <double>
Default: 0

The minimum distance that the vehicle must travel.

maxDistance
number <double>
Default: 99999999

The maximum distance that the vehicle can travel.

maxRevenue
number <double>
Default: 99999999

The maximum revenue that the vehicle can receive in total.

creationTimestamp
required
integer <int64>
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
{
  • "id": 10,
  • "configurationParameters": [
    • {
      • "name": "Optimization 50 vehicles in Berlin",
      • "ignoreTimeWindow": true,
      • "allowDroppingOrders": false,
      • "groupingOrders": false,
      • "balancedRoutes": false,
      • "arrangeCriterion": 0,
      • "optimizationCriterion": 0,
      • "optimizationQuality": 0,
      • "maxTimeToOptimize": 600,
      • "maxWaitTime": 600,
      • "routeType": 0,
      • "restrictions": 0,
      • "distanceUnit": 0,
      • "orderSequenceOptions": [
        • {
          • "sequenceOptions": 0,
          • "ordersSequence": [
            • [
              • 123456,
              • 234567,
              • 345678,
              • 456789
              ],
            • [
              • 712345,
              • 612345,
              • 102345,
              • 912345
              ]
            ]
          }
        ]
      }
    ],
  • "orders": [
    • {
      • "id": 123456,
      • "creationTimestamp": 1689942672,
      • "customerInfo": {
        • "id": 123456,
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "alias": "Ana",
        • "firstName": "Ana",
        • "lastName": "Lyn",
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "email": "email@yahoo.com",
        • "phoneNumber": "+1234567",
        • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
        },
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "alias": "Ana",
      • "type": 0,
      • "priority": 0,
      • "numberOfPackages": 10,
      • "weight": 5.5,
      • "cube": 5.5,
      • "timeWindow": [
        • 750,
        • 1020
        ],
      • "serviceTime": 400,
      • "revenue": 5.5,
      • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
      • "firstName": "Ana",
      • "lastName": "Lyn",
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "phoneNumber": "+1234567",
      • "status": 0,
      • "state": 0,
      • "depotId": 123456
      }
    ],
  • "departures": [
    • {
      • "alias": "Ana",
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "depotId": 123456,
      • "matchedLocation": [
        • 45.652871,
        • 25.585588
        ],
      • "numberOfPackages": 10,
      • "weight": 5.5,
      • "cube": 5.5,
      • "departureTime": 1602684618476,
      • "timeToNext": 5000,
      • "distanceToNext": 99.5
      }
    ],
  • "destinations": [
    • {
      • "alias": "Ana",
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "matchedLocation": [
        • 45.652871,
        • 25.585588
        ],
      • "arrivalTime": 1602684618476,
      • "traveledDistance": 99.5
      }
    ],
  • "vehicles": [
    • {
      • "id": 123456,
      • "type": 0,
      • "name": "string",
      • "maxLoadWeight": 99.5,
      • "maxLoadCube": 99.5,
      • "startTime": 540,
      • "endTime": 1000,
      • "licensePlate": "string",
      • "status": -1,
      • "lastPosition": [
        • 45.652871,
        • 25.585588
        ],
      • "make": "string",
      • "model": "string",
      • "fuelType": 0,
      • "consumption": 99.5,
      • "bikerWeight": 99.5,
      • "bikePower": 99.5,
      • "height": 99.5,
      • "width": 99.5,
      • "weight": 99.5,
      • "length": 99.5,
      • "axleLoad": 99.5
      }
    ],
  • "vehiclesConstraints": [
    • {
      • "fuelPrice": 1.5,
      • "startDate": 1730332800000,
      • "maxNumberOfPackages": 9999,
      • "minNumberOfOrders": 0,
      • "maxNumberOfOrders": 9999,
      • "minDistance": 1.5,
      • "maxDistance": 999.5,
      • "maxRevenue": 999.5
      }
    ],
  • "creationTimestamp": 1689942672
}

route

Operations on Route

Get all routes.

Get routes

Authorizations:
ApiKey
query Parameters
encodeShape
integer <int16>

0: The route's shape will not be encoded.
1:(default) - The route's shape will be encoded.

search
string

General search parameter for routes.

id
string

Id parameter used to filter routes by id. The id parameter can be formatted as id=value:exact if you want to perform an exact search.

name
string

Name parameter used to filter routes by name. The name parameter can be formatted as name=value:exact if you want to perform an exact search.

creationTime
string

CreationTime parameter used to filter routes by creation time. The creationTime parameter can be formatted as creationTime=value:exact if you want to perform an exact search.

ignoreTimeWindow
string

IgnoreTimeWindow parameter used to filter optimizations by routes that ignore time windows. The ignoreTimeWindow parameter can be formatted as ignoreTimeWindow=value:exact if you want to perform an exact search.

routeType
string

RouteType parameter used to filter routes by type. The routeType parameter can be formatted as routeType=value.

idVehicle
string

IdVehicle parameter used to filter routes by id of the vehicle used. The idVehicle parameter can be formatted as idVehicle=value:exact if you want to perform an exact search.

sort
string
Example: sort=first_name:asc,last_name:desc,alias:asc

The sort parameter will have this format sort = column1:asc/desc,column2:asc/desc,column3:asc/desc. Columns will be chosen from this list(id, id_optimization, name, creationTime, ignoreTimeWindow, optimizeBy, optimizationQuality, maxOptimizeTime, routeType, matricesBuildType, restrictions, maxWaitTimeOrders, distanceUnit, arrangeCriterion, neededFuel, idVehicle, balancedRoutes)

includeColumns
string
Example: includeColumns=id, optimizationId, name

The includeColumns parameter will have this format includeColumns = column1,column2,column3. Columns will be chosen from this list(id, optimizationId, name, creationTime, ignoreTimeWindow, optimizeBy, optimizationQuality, maxOptimizeTime, routeType, matricesBuildType, restrictions, maxWaitTimeOrders, distanceUnit, arrangeCriterion, neededFuel, idVehicle, balancedRoutes)

page
integer <int32>

The page parameter indicates the page number.

per_page
integer <int32>

The per_page parameter indicates the number of items on each page.

Responses

Response Schema: application/json
Array
id
required
integer <int64>
optimizationId
required
integer <int64>
idVehicle
required
integer <int64>
matrixBuiltType
integer
Default: 1
Enum: 0 1

What distance formula should be used to build the matrix. Matrix Built Type:

  • 0 - eSet = Set by the user using "matrices" field
  • 1 - eReal = Road map distances and times
Array of objects (MatricesObj)

Is set only if matrixBuildType = eSet. For each type of vehicle used in the optimization/route, a distance and a time matrix should be set

Array
vehicleType
integer
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
distMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
timeMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
rideStatus
integer
Default: 1
Enum: 0 1 2 3 4

The status of the route's ride. Ride Status:

  • 0 - eFinished = The ride is finished
  • 1 - eNew = The ride is new and ready to start
  • 2 - eStarted = The ride was started by a vehicle
  • 3 - eCanceledByDriver = The ride was canceled by a vehicle's driver
  • 4 - eCanceledByFleet = The ride was canceled by the fleet manager
required
object (ConfigurationParameters)
name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

allowDroppingOrders
boolean

Specifies whether the algorithm is allowed to drop orders if no solution is found by visiting all of them. Default is false.

groupingOrders
boolean

Specify if the orders will be grouped. If the distance between any two orders is less than 10 meters, those orders will be considered part of the same group. Default is false.

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
distanceUnit
integer
Default: 0
Enum: 0 1

The unit of measure used for distances throughout the optimization. Distance Unit :

  • 0 - eKilometers
  • 1 - eMiles
Array of objects (OrdersSequenceOptions)

These options are used to specify the association between different orders that should be visited in a certain order.

Array
sequenceOptions
integer
Enum: 0 1 2 3

Vehicle type:

  • 0 - eInSameRoute
  • 1 - eInSequence
  • 2 - eInFixedSequence
  • 3 - eInPairs
ordersSequence
Array of integers (Matrix2DI64) [ items <int64 >[ items <int64 > ] ]

A list of lists, where each inner list is a sequence of order ids.

required
object (Departure)
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
depotId
integer <int64>
Default: -1
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

numberOfPackages
integer <int64>
Default: 0
weight
number <double>
Default: 0
cube
number <double>
Default: 0
departureTime
integer <int64>
timeToNext
integer <int32>
Default: 0

The time that will be traveled to arrive at the next order. (in seconds)

distanceToNext
number <float>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

required
object (Destination)
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

arrivalTime
integer <int64>

The vehicle arrival time at the order's location.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this destination in the distance unit set in the ConfigurationParameters.

required
Array of objects (VehicleConstraints)
Array
fuelPrice
number <double>
Default: 0

The fuel cost (filled when the vehicle is used in a route).

startDate
required
integer <int64>

The date the vehicle begins its route, provided as a timestamp with the time set to midnight.

maxNumberOfPackages
integer <int64>
Default: 99999999

The maximum number of packages that the vehicle can carry.

minNumberOfOrders
integer <int64>
Default: 0

The minimum number of orders that the vehicle must visit

maxNumberOfOrders
integer <int64>
Default: 99999999

The maximum number of orders that the vehicle can visit.

minDistance
number <double>
Default: 0

The minimum distance that the vehicle must travel.

maxDistance
number <double>
Default: 99999999

The maximum distance that the vehicle can travel.

maxRevenue
number <double>
Default: 99999999

The maximum revenue that the vehicle can receive in total.

required
Array of objects (RouteOrder)
Array
indexInRoute
integer <int32>
Default: 0

The index of the order in the orders list of the route (the order of visit).

indexInOptimization
integer <int32>
Default: 0

The index of the order in the optimization orders list.

object (Order)
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

actualLocation
Array of numbers <double> (ActualLocation) [ items <double > ]

The actual geographical coordinates in [latitude, longitude] format where the order was serviced, if it was serviced, otherwise this field will not be present.

arrivalTime
integer <int64>
Default: 0

The vehicle arrival time at the order's location.

timeToNextOrder
integer <int32>
Default: 0

The duration between the current order and the next order ( seconds ).

waitTime
integer <int32>
Default: 0

The amount of time that the vehicle has to wait at the current order's location, in order to arrive between the time window to the next order ( seconds ).

numberOfPackagesAtArrival
integer <int32>
Default: 0

The amount of the collected number of packages until this order.

collectedNumberOfPackages
integer <int32>
Default: 0

The number of packages collected from this order.

deliveredNumberOfPackages
integer <int32>
Default: 0

The number of packages delivered at this order.

weightAtArrival
number <double>
Default: 0

The amount of the collected weight until this order.

collectedWeight
number <double>
Default: 0

The weight collected from this order.

deliveredWeight
number <double>
Default: 0

The weight delivered at this order.

cubeAtArrival
number <double>
Default: 0

The total cubic volume collected until this order.

collectedCube
number <double>
Default: 0

The cubic volume collected from this order.

deliveredCube
number <double>
Default: 0

The cubic volume delivered at this order.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this order in the distance unit set in the ConfigurationParameters.

distanceToNextOrder
number <double>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

revenueAtArrival
number <double>
Default: 0

The collected revenue until this order.

visitTimestamp
integer <int64>
Default: 0

The time when the route order was visited.

totalDistance
required
number <float>

The unit of measure for the distance is kilometers or miles, it depends on what the user has chosen in the configuration parameters.

totalTime
required
integer <int32>

Total duration of the route in seconds.

totalServiceTime
required
integer <int32>

Total service time of all the orders of the route in seconds.

totalWaitTime
required
integer <int32>

Total wait time of the route in seconds.

neededFuel
required
number <float>

Total amount of fuel used during the route. The unit of measure for consumption is liter or kw/h depending on the fuel type.

price
required
number <float>

Cost of the route (the price for the total fuel that will be consumed). The price is calculated depending on the vehicle's consumption, the price of the vehicle's fuel type and the total distance.

required
string or Array of Location (numbers)
Any of
string
creationTimestamp
required
integer <int64>
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
[
  • {
    • "id": 123456,
    • "optimizationId": 123456,
    • "idVehicle": 123456,
    • "matrixBuiltType": 0,
    • "matrices": [
      • {
        • "vehicleType": 0,
        • "distMatrix": [
          • [
            • 1,
            • 2,
            • 3,
            • 4
            ],
          • [
            • 7,
            • 6,
            • 10,
            • 9
            ]
          ],
        • "timeMatrix": [
          • [
            • 1,
            • 2,
            • 3,
            • 4
            ],
          • [
            • 7,
            • 6,
            • 10,
            • 9
            ]
          ]
        }
      ],
    • "rideStatus": 0,
    • "configurationParameters": {
      • "name": "Optimization 50 vehicles in Berlin",
      • "ignoreTimeWindow": true,
      • "allowDroppingOrders": false,
      • "groupingOrders": false,
      • "balancedRoutes": false,
      • "arrangeCriterion": 0,
      • "optimizationCriterion": 0,
      • "optimizationQuality": 0,
      • "maxTimeToOptimize": 600,
      • "maxWaitTime": 600,
      • "routeType": 0,
      • "restrictions": 0,
      • "distanceUnit": 0,
      • "orderSequenceOptions": [
        • {
          • "sequenceOptions": 0,
          • "ordersSequence": [
            • [
              • 123456,
              • 234567,
              • 345678,
              • 456789
              ],
            • [
              • 712345,
              • 612345,
              • 102345,
              • 912345
              ]
            ]
          }
        ]
      },
    • "departure": {
      • "alias": "Ana",
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "depotId": 123456,
      • "matchedLocation": [
        • 45.652871,
        • 25.585588
        ],
      • "numberOfPackages": 10,
      • "weight": 5.5,
      • "cube": 5.5,
      • "departureTime": 1602684618476,
      • "timeToNext": 5000,
      • "distanceToNext": 99.5
      },
    • "destination": {
      • "alias": "Ana",
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "matchedLocation": [
        • 45.652871,
        • 25.585588
        ],
      • "arrivalTime": 1602684618476,
      • "traveledDistance": 99.5
      },
    • "vehicleConstraints": [
      • {
        • "fuelPrice": 1.5,
        • "startDate": 1730332800000,
        • "maxNumberOfPackages": 9999,
        • "minNumberOfOrders": 0,
        • "maxNumberOfOrders": 9999,
        • "minDistance": 1.5,
        • "maxDistance": 999.5,
        • "maxRevenue": 999.5
        }
      ],
    • "orders": [
      • {
        • "indexInRoute": 10,
        • "indexInOptimization": 10,
        • "orderInfo": {
          • "id": 123456,
          • "creationTimestamp": 1689942672,
          • "customerInfo": {
            • "id": 123456,
            • "location": [
              • 45.652871,
              • 25.585588
              ],
            • "alias": "Ana",
            • "firstName": "Ana",
            • "lastName": "Lyn",
            • "address": {
              • "country": "France",
              • "state": "Aquitaine",
              • "county": "Aquitaine",
              • "city": "Bordeaux",
              • "postalCode": "33300",
              • "streetName": "Jean Jaures",
              • "streetNumber": "82",
              • "extra": "94301"
              },
            • "email": "email@yahoo.com",
            • "phoneNumber": "+1234567",
            • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
            },
          • "location": [
            • 45.652871,
            • 25.585588
            ],
          • "alias": "Ana",
          • "type": 0,
          • "priority": 0,
          • "numberOfPackages": 10,
          • "weight": 5.5,
          • "cube": 5.5,
          • "timeWindow": [
            • 750,
            • 1020
            ],
          • "serviceTime": 400,
          • "revenue": 5.5,
          • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
          • "firstName": "Ana",
          • "lastName": "Lyn",
          • "address": {
            • "country": "France",
            • "state": "Aquitaine",
            • "county": "Aquitaine",
            • "city": "Bordeaux",
            • "postalCode": "33300",
            • "streetName": "Jean Jaures",
            • "streetNumber": "82",
            • "extra": "94301"
            },
          • "phoneNumber": "+1234567",
          • "status": 0,
          • "state": 0,
          • "depotId": 123456
          },
        • "matchedLocation": [
          • 45.652871,
          • 25.585588
          ],
        • "actualLocation": [
          • 45.652871,
          • 25.585588
          ],
        • "arrivalTime": 10,
        • "timeToNextOrder": 10,
        • "waitTime": 10,
        • "numberOfPackagesAtArrival": 10,
        • "collectedNumberOfPackages": 10,
        • "deliveredNumberOfPackages": 10,
        • "weightAtArrival": 5.5,
        • "collectedWeight": 5.5,
        • "deliveredWeight": 5.5,
        • "cubeAtArrival": 5.5,
        • "collectedCube": 5.5,
        • "deliveredCube": 5.5,
        • "traveledDistance": 5.5,
        • "distanceToNextOrder": 5.5,
        • "revenueAtArrival": 5.5,
        • "visitTimestamp": 10
        }
      ],
    • "totalDistance": 250.5,
    • "totalTime": 25000,
    • "totalServiceTime": 6000,
    • "totalWaitTime": 500,
    • "neededFuel": 250.5,
    • "price": 430.5,
    • "shape": "string",
    • "creationTimestamp": 1602684618476
    }
]

Deletes routes.

Delete a routes from optimizations. A route can be deleted from an optimization only if the optimization has multiple routes. The route's orders will also be deleted from its optimization.

Authorizations:
ApiKey
Request Body schema: application/json
required

The list of ids of the routes that have to be deleted.

Array
integer <int64>

Responses

Response Schema: application/json
result
string

Operation done successfully

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

The request of the operation is not finished yet

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
[
  • 123456,
  • 123457,
  • 123458
]

Response samples

Content type
application/json
{
  • "result": "Operation done successfully."
}

Get a route by id.

Get an existing route by id.

Authorizations:
ApiKey
path Parameters
id
required
integer <int64>

ID of the route to return

query Parameters
encodeShape
integer <int16>

0: The route's shape will not be encoded.
1:(default) - The route's shape will be encoded.

Responses

Response Schema: application/json
id
required
integer <int64>
optimizationId
required
integer <int64>
idVehicle
required
integer <int64>
matrixBuiltType
integer
Default: 1
Enum: 0 1

What distance formula should be used to build the matrix. Matrix Built Type:

  • 0 - eSet = Set by the user using "matrices" field
  • 1 - eReal = Road map distances and times
Array of objects (MatricesObj)

Is set only if matrixBuildType = eSet. For each type of vehicle used in the optimization/route, a distance and a time matrix should be set

Array
vehicleType
integer
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
distMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
timeMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
rideStatus
integer
Default: 1
Enum: 0 1 2 3 4

The status of the route's ride. Ride Status:

  • 0 - eFinished = The ride is finished
  • 1 - eNew = The ride is new and ready to start
  • 2 - eStarted = The ride was started by a vehicle
  • 3 - eCanceledByDriver = The ride was canceled by a vehicle's driver
  • 4 - eCanceledByFleet = The ride was canceled by the fleet manager
required
object (ConfigurationParameters)
name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

allowDroppingOrders
boolean

Specifies whether the algorithm is allowed to drop orders if no solution is found by visiting all of them. Default is false.

groupingOrders
boolean

Specify if the orders will be grouped. If the distance between any two orders is less than 10 meters, those orders will be considered part of the same group. Default is false.

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
distanceUnit
integer
Default: 0
Enum: 0 1

The unit of measure used for distances throughout the optimization. Distance Unit :

  • 0 - eKilometers
  • 1 - eMiles
Array of objects (OrdersSequenceOptions)

These options are used to specify the association between different orders that should be visited in a certain order.

Array
sequenceOptions
integer
Enum: 0 1 2 3

Vehicle type:

  • 0 - eInSameRoute
  • 1 - eInSequence
  • 2 - eInFixedSequence
  • 3 - eInPairs
ordersSequence
Array of integers (Matrix2DI64) [ items <int64 >[ items <int64 > ] ]

A list of lists, where each inner list is a sequence of order ids.

required
object (Departure)
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
depotId
integer <int64>
Default: -1
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

numberOfPackages
integer <int64>
Default: 0
weight
number <double>
Default: 0
cube
number <double>
Default: 0
departureTime
integer <int64>
timeToNext
integer <int32>
Default: 0

The time that will be traveled to arrive at the next order. (in seconds)

distanceToNext
number <float>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

required
object (Destination)
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

arrivalTime
integer <int64>

The vehicle arrival time at the order's location.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this destination in the distance unit set in the ConfigurationParameters.

required
Array of objects (VehicleConstraints)
Array
fuelPrice
number <double>
Default: 0

The fuel cost (filled when the vehicle is used in a route).

startDate
required
integer <int64>

The date the vehicle begins its route, provided as a timestamp with the time set to midnight.

maxNumberOfPackages
integer <int64>
Default: 99999999

The maximum number of packages that the vehicle can carry.

minNumberOfOrders
integer <int64>
Default: 0

The minimum number of orders that the vehicle must visit

maxNumberOfOrders
integer <int64>
Default: 99999999

The maximum number of orders that the vehicle can visit.

minDistance
number <double>
Default: 0

The minimum distance that the vehicle must travel.

maxDistance
number <double>
Default: 99999999

The maximum distance that the vehicle can travel.

maxRevenue
number <double>
Default: 99999999

The maximum revenue that the vehicle can receive in total.

required
Array of objects (RouteOrder)
Array
indexInRoute
integer <int32>
Default: 0

The index of the order in the orders list of the route (the order of visit).

indexInOptimization
integer <int32>
Default: 0

The index of the order in the optimization orders list.

object (Order)
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

actualLocation
Array of numbers <double> (ActualLocation) [ items <double > ]

The actual geographical coordinates in [latitude, longitude] format where the order was serviced, if it was serviced, otherwise this field will not be present.

arrivalTime
integer <int64>
Default: 0

The vehicle arrival time at the order's location.

timeToNextOrder
integer <int32>
Default: 0

The duration between the current order and the next order ( seconds ).

waitTime
integer <int32>
Default: 0

The amount of time that the vehicle has to wait at the current order's location, in order to arrive between the time window to the next order ( seconds ).

numberOfPackagesAtArrival
integer <int32>
Default: 0

The amount of the collected number of packages until this order.

collectedNumberOfPackages
integer <int32>
Default: 0

The number of packages collected from this order.

deliveredNumberOfPackages
integer <int32>
Default: 0

The number of packages delivered at this order.

weightAtArrival
number <double>
Default: 0

The amount of the collected weight until this order.

collectedWeight
number <double>
Default: 0

The weight collected from this order.

deliveredWeight
number <double>
Default: 0

The weight delivered at this order.

cubeAtArrival
number <double>
Default: 0

The total cubic volume collected until this order.

collectedCube
number <double>
Default: 0

The cubic volume collected from this order.

deliveredCube
number <double>
Default: 0

The cubic volume delivered at this order.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this order in the distance unit set in the ConfigurationParameters.

distanceToNextOrder
number <double>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

revenueAtArrival
number <double>
Default: 0

The collected revenue until this order.

visitTimestamp
integer <int64>
Default: 0

The time when the route order was visited.

totalDistance
required
number <float>

The unit of measure for the distance is kilometers or miles, it depends on what the user has chosen in the configuration parameters.

totalTime
required
integer <int32>

Total duration of the route in seconds.

totalServiceTime
required
integer <int32>

Total service time of all the orders of the route in seconds.

totalWaitTime
required
integer <int32>

Total wait time of the route in seconds.

neededFuel
required
number <float>

Total amount of fuel used during the route. The unit of measure for consumption is liter or kw/h depending on the fuel type.

price
required
number <float>

Cost of the route (the price for the total fuel that will be consumed). The price is calculated depending on the vehicle's consumption, the price of the vehicle's fuel type and the total distance.

required
string or Array of Location (numbers)
Any of
string
creationTimestamp
required
integer <int64>
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

The request of the operation is not finished yet

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
{
  • "id": 123456,
  • "optimizationId": 123456,
  • "idVehicle": 123456,
  • "matrixBuiltType": 0,
  • "matrices": [
    • {
      • "vehicleType": 0,
      • "distMatrix": [
        • [
          • 1,
          • 2,
          • 3,
          • 4
          ],
        • [
          • 7,
          • 6,
          • 10,
          • 9
          ]
        ],
      • "timeMatrix": [
        • [
          • 1,
          • 2,
          • 3,
          • 4
          ],
        • [
          • 7,
          • 6,
          • 10,
          • 9
          ]
        ]
      }
    ],
  • "rideStatus": 0,
  • "configurationParameters": {
    • "name": "Optimization 50 vehicles in Berlin",
    • "ignoreTimeWindow": true,
    • "allowDroppingOrders": false,
    • "groupingOrders": false,
    • "balancedRoutes": false,
    • "arrangeCriterion": 0,
    • "optimizationCriterion": 0,
    • "optimizationQuality": 0,
    • "maxTimeToOptimize": 600,
    • "maxWaitTime": 600,
    • "routeType": 0,
    • "restrictions": 0,
    • "distanceUnit": 0,
    • "orderSequenceOptions": [
      • {
        • "sequenceOptions": 0,
        • "ordersSequence": [
          • [
            • 123456,
            • 234567,
            • 345678,
            • 456789
            ],
          • [
            • 712345,
            • 612345,
            • 102345,
            • 912345
            ]
          ]
        }
      ]
    },
  • "departure": {
    • "alias": "Ana",
    • "location": [
      • 45.652871,
      • 25.585588
      ],
    • "address": {
      • "country": "France",
      • "state": "Aquitaine",
      • "county": "Aquitaine",
      • "city": "Bordeaux",
      • "postalCode": "33300",
      • "streetName": "Jean Jaures",
      • "streetNumber": "82",
      • "extra": "94301"
      },
    • "depotId": 123456,
    • "matchedLocation": [
      • 45.652871,
      • 25.585588
      ],
    • "numberOfPackages": 10,
    • "weight": 5.5,
    • "cube": 5.5,
    • "departureTime": 1602684618476,
    • "timeToNext": 5000,
    • "distanceToNext": 99.5
    },
  • "destination": {
    • "alias": "Ana",
    • "location": [
      • 45.652871,
      • 25.585588
      ],
    • "address": {
      • "country": "France",
      • "state": "Aquitaine",
      • "county": "Aquitaine",
      • "city": "Bordeaux",
      • "postalCode": "33300",
      • "streetName": "Jean Jaures",
      • "streetNumber": "82",
      • "extra": "94301"
      },
    • "matchedLocation": [
      • 45.652871,
      • 25.585588
      ],
    • "arrivalTime": 1602684618476,
    • "traveledDistance": 99.5
    },
  • "vehicleConstraints": [
    • {
      • "fuelPrice": 1.5,
      • "startDate": 1730332800000,
      • "maxNumberOfPackages": 9999,
      • "minNumberOfOrders": 0,
      • "maxNumberOfOrders": 9999,
      • "minDistance": 1.5,
      • "maxDistance": 999.5,
      • "maxRevenue": 999.5
      }
    ],
  • "orders": [
    • {
      • "indexInRoute": 10,
      • "indexInOptimization": 10,
      • "orderInfo": {
        • "id": 123456,
        • "creationTimestamp": 1689942672,
        • "customerInfo": {
          • "id": 123456,
          • "location": [
            • 45.652871,
            • 25.585588
            ],
          • "alias": "Ana",
          • "firstName": "Ana",
          • "lastName": "Lyn",
          • "address": {
            • "country": "France",
            • "state": "Aquitaine",
            • "county": "Aquitaine",
            • "city": "Bordeaux",
            • "postalCode": "33300",
            • "streetName": "Jean Jaures",
            • "streetNumber": "82",
            • "extra": "94301"
            },
          • "email": "email@yahoo.com",
          • "phoneNumber": "+1234567",
          • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
          },
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "alias": "Ana",
        • "type": 0,
        • "priority": 0,
        • "numberOfPackages": 10,
        • "weight": 5.5,
        • "cube": 5.5,
        • "timeWindow": [
          • 750,
          • 1020
          ],
        • "serviceTime": 400,
        • "revenue": 5.5,
        • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
        • "firstName": "Ana",
        • "lastName": "Lyn",
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "phoneNumber": "+1234567",
        • "status": 0,
        • "state": 0,
        • "depotId": 123456
        },
      • "matchedLocation": [
        • 45.652871,
        • 25.585588
        ],
      • "actualLocation": [
        • 45.652871,
        • 25.585588
        ],
      • "arrivalTime": 10,
      • "timeToNextOrder": 10,
      • "waitTime": 10,
      • "numberOfPackagesAtArrival": 10,
      • "collectedNumberOfPackages": 10,
      • "deliveredNumberOfPackages": 10,
      • "weightAtArrival": 5.5,
      • "collectedWeight": 5.5,
      • "deliveredWeight": 5.5,
      • "cubeAtArrival": 5.5,
      • "collectedCube": 5.5,
      • "deliveredCube": 5.5,
      • "traveledDistance": 5.5,
      • "distanceToNextOrder": 5.5,
      • "revenueAtArrival": 5.5,
      • "visitTimestamp": 10
      }
    ],
  • "totalDistance": 250.5,
  • "totalTime": 25000,
  • "totalServiceTime": 6000,
  • "totalWaitTime": 500,
  • "neededFuel": 250.5,
  • "price": 430.5,
  • "shape": "string",
  • "creationTimestamp": 1602684618476
}

Update a route.

Saves the updates made to a route. The updates will not be applied on the route's optimization as well.

Authorizations:
ApiKey
path Parameters
id
required
integer <int64>

ID of the route to update

query Parameters
encodeShape
integer <int16>

0: The route's shape will not be encoded.
1:(default) - The route's shape will be encoded.

Request Body schema: application/json
required

Updated data

id
required
integer <int64>
optimizationId
required
integer <int64>
idVehicle
required
integer <int64>
matrixBuiltType
integer
Default: 1
Enum: 0 1

What distance formula should be used to build the matrix. Matrix Built Type:

  • 0 - eSet = Set by the user using "matrices" field
  • 1 - eReal = Road map distances and times
Array of objects (MatricesObj)

Is set only if matrixBuildType = eSet. For each type of vehicle used in the optimization/route, a distance and a time matrix should be set

Array
vehicleType
integer
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
distMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
timeMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
required
object (ConfigurationParameters)
name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

allowDroppingOrders
boolean

Specifies whether the algorithm is allowed to drop orders if no solution is found by visiting all of them. Default is false.

groupingOrders
boolean

Specify if the orders will be grouped. If the distance between any two orders is less than 10 meters, those orders will be considered part of the same group. Default is false.

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
distanceUnit
integer
Default: 0
Enum: 0 1

The unit of measure used for distances throughout the optimization. Distance Unit :

  • 0 - eKilometers
  • 1 - eMiles
Array of objects (OrdersSequenceOptions)

These options are used to specify the association between different orders that should be visited in a certain order.

Array
sequenceOptions
integer
Enum: 0 1 2 3

Vehicle type:

  • 0 - eInSameRoute
  • 1 - eInSequence
  • 2 - eInFixedSequence
  • 3 - eInPairs
ordersSequence
Array of integers (Matrix2DI64) [ items <int64 >[ items <int64 > ] ]

A list of lists, where each inner list is a sequence of order ids.

required
object (AddDeparture)
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
depotId
integer <int64>
Default: -1
required
object (AddDestination)
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
required
Array of objects (AddVehicleConstraints)
Array
startDate
required
integer <int64>

The date the vehicle begins its route, provided as a timestamp with the time set to midnight.

maxNumberOfPackages
integer <int64>
Default: 99999999

The maximum number of packages that the vehicle can carry.

minNumberOfOrders
integer <int64>
Default: 0

The minimum number of orders that the vehicle must visit

maxNumberOfOrders
integer <int64>
Default: 99999999

The maximum number of orders that the vehicle can visit.

minDistance
number <double>
Default: 0

The minimum distance that the vehicle must travel.

maxDistance
number <double>
Default: 99999999

The maximum distance that the vehicle can travel.

maxRevenue
number <double>
Default: 99999999

The maximum revenue that the vehicle can receive in total.

Responses

Response Schema: application/json
id
required
integer <int64>
Default: 0
optimizationId
integer <int64>
Default: 0
routeId
integer <int64>
Default: 0
status
required
integer
Default: 0
Enum: 0 1 2 3

Request's status:

  • 0 - eCreated
  • 1 - ePending
  • 2 - eFinished
  • 3 - eCanceled
message
required
string
creationTimestamp
required
integer <int64>
Default: 0
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
{
  • "id": 123456,
  • "optimizationId": 123456,
  • "idVehicle": 123456,
  • "matrixBuiltType": 0,
  • "matrices": [
    • {
      • "vehicleType": 0,
      • "distMatrix": [
        • [
          • 1,
          • 2,
          • 3,
          • 4
          ],
        • [
          • 7,
          • 6,
          • 10,
          • 9
          ]
        ],
      • "timeMatrix": [
        • [
          • 1,
          • 2,
          • 3,
          • 4
          ],
        • [
          • 7,
          • 6,
          • 10,
          • 9
          ]
        ]
      }
    ],
  • "configurationParameters": {
    • "name": "Optimization 50 vehicles in Berlin",
    • "ignoreTimeWindow": true,
    • "allowDroppingOrders": false,
    • "groupingOrders": false,
    • "balancedRoutes": false,
    • "arrangeCriterion": 0,
    • "optimizationCriterion": 0,
    • "optimizationQuality": 0,
    • "maxTimeToOptimize": 600,
    • "maxWaitTime": 600,
    • "routeType": 0,
    • "restrictions": 0,
    • "distanceUnit": 0,
    • "orderSequenceOptions": [
      • {
        • "sequenceOptions": 0,
        • "ordersSequence": [
          • [
            • 123456,
            • 234567,
            • 345678,
            • 456789
            ],
          • [
            • 712345,
            • 612345,
            • 102345,
            • 912345
            ]
          ]
        }
      ]
    },
  • "departure": {
    • "alias": "Ana",
    • "location": [
      • 45.652871,
      • 25.585588
      ],
    • "address": {
      • "country": "France",
      • "state": "Aquitaine",
      • "county": "Aquitaine",
      • "city": "Bordeaux",
      • "postalCode": "33300",
      • "streetName": "Jean Jaures",
      • "streetNumber": "82",
      • "extra": "94301"
      },
    • "depotId": 123456
    },
  • "destination": {
    • "alias": "Ana",
    • "location": [
      • 45.652871,
      • 25.585588
      ],
    • "address": {
      • "country": "France",
      • "state": "Aquitaine",
      • "county": "Aquitaine",
      • "city": "Bordeaux",
      • "postalCode": "33300",
      • "streetName": "Jean Jaures",
      • "streetNumber": "82",
      • "extra": "94301"
      }
    },
  • "vehicleConstraints": [
    • {
      • "startDate": 1730332800000,
      • "maxNumberOfPackages": 9999,
      • "minNumberOfOrders": 0,
      • "maxNumberOfOrders": 9999,
      • "minDistance": 1.5,
      • "maxDistance": 999.5,
      • "maxRevenue": 999.5
      }
    ]
}

Response samples

Content type
application/json
{
  • "id": 123456,
  • "optimizationId": 123456,
  • "routeId": 123456,
  • "status": 0,
  • "message": "Operation done successfully!",
  • "creationTimestamp": 123456
}

Reoptimize a route by id.

A new solution is calculated taking into account the changes made to the route.

Authorizations:
ApiKey
path Parameters
id
required
integer <int64>

ID of the route to reoptimize

query Parameters
encodeShape
integer <int16>

0: The route's shape will not be encoded.
1:(default) - The route's shape will be encoded.

Responses

Response Schema: application/json
id
required
integer <int64>
Default: 0
optimizationId
integer <int64>
Default: 0
routeId
integer <int64>
Default: 0
status
required
integer
Default: 0
Enum: 0 1 2 3

Request's status:

  • 0 - eCreated
  • 1 - ePending
  • 2 - eFinished
  • 3 - eCanceled
message
required
string
creationTimestamp
required
integer <int64>
Default: 0
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
{
  • "id": 123456,
  • "optimizationId": 123456,
  • "routeId": 123456,
  • "status": 0,
  • "message": "Operation done successfully!",
  • "creationTimestamp": 123456
}

Add route orders.

Add orders to the route. The orders will also be added in the orders list of the route's optimization. If the route will not be re-optimized, the orders will be added to the end of the route.

Authorizations:
ApiKey
path Parameters
id
required
integer <int64>

ID of the route

query Parameters
reoptimize
integer <int16>

0: (default) - If the route will not be re-optimized, the orders will be added to the end of the route.
1: The route will be re-optimized.

encodeShape
integer <int16>

0: The route's shape will not be encoded.
1:(default) - The route's shape will be encoded.

Request Body schema: application/json
required

Updated data

Array of objects (AddRouteOrder)
Array
id
integer <int64>
position
integer <int64>
optimalPosition
boolean
Default: true
Array of objects (MatricesObj)
Array
vehicleType
integer
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
distMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
timeMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]

Responses

Response Schema: application/json
object (Route)
id
required
integer <int64>
optimizationId
required
integer <int64>
idVehicle
required
integer <int64>
matrixBuiltType
integer
Default: 1
Enum: 0 1

What distance formula should be used to build the matrix. Matrix Built Type:

  • 0 - eSet = Set by the user using "matrices" field
  • 1 - eReal = Road map distances and times
Array of objects (MatricesObj)

Is set only if matrixBuildType = eSet. For each type of vehicle used in the optimization/route, a distance and a time matrix should be set

Array
vehicleType
integer
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
distMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
timeMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
rideStatus
integer
Default: 1
Enum: 0 1 2 3 4

The status of the route's ride. Ride Status:

  • 0 - eFinished = The ride is finished
  • 1 - eNew = The ride is new and ready to start
  • 2 - eStarted = The ride was started by a vehicle
  • 3 - eCanceledByDriver = The ride was canceled by a vehicle's driver
  • 4 - eCanceledByFleet = The ride was canceled by the fleet manager
required
object (ConfigurationParameters)
name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

allowDroppingOrders
boolean

Specifies whether the algorithm is allowed to drop orders if no solution is found by visiting all of them. Default is false.

groupingOrders
boolean

Specify if the orders will be grouped. If the distance between any two orders is less than 10 meters, those orders will be considered part of the same group. Default is false.

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
distanceUnit
integer
Default: 0
Enum: 0 1

The unit of measure used for distances throughout the optimization. Distance Unit :

  • 0 - eKilometers
  • 1 - eMiles
Array of objects (OrdersSequenceOptions)

These options are used to specify the association between different orders that should be visited in a certain order.

Array
sequenceOptions
integer
Enum: 0 1 2 3

Vehicle type:

  • 0 - eInSameRoute
  • 1 - eInSequence
  • 2 - eInFixedSequence
  • 3 - eInPairs
ordersSequence
Array of integers (Matrix2DI64) [ items <int64 >[ items <int64 > ] ]

A list of lists, where each inner list is a sequence of order ids.

required
object (Departure)
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
depotId
integer <int64>
Default: -1
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

numberOfPackages
integer <int64>
Default: 0
weight
number <double>
Default: 0
cube
number <double>
Default: 0
departureTime
integer <int64>
timeToNext
integer <int32>
Default: 0

The time that will be traveled to arrive at the next order. (in seconds)

distanceToNext
number <float>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

required
object (Destination)
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

arrivalTime
integer <int64>

The vehicle arrival time at the order's location.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this destination in the distance unit set in the ConfigurationParameters.

required
Array of objects (VehicleConstraints)
Array
fuelPrice
number <double>
Default: 0

The fuel cost (filled when the vehicle is used in a route).

startDate
required
integer <int64>

The date the vehicle begins its route, provided as a timestamp with the time set to midnight.

maxNumberOfPackages
integer <int64>
Default: 99999999

The maximum number of packages that the vehicle can carry.

minNumberOfOrders
integer <int64>
Default: 0

The minimum number of orders that the vehicle must visit

maxNumberOfOrders
integer <int64>
Default: 99999999

The maximum number of orders that the vehicle can visit.

minDistance
number <double>
Default: 0

The minimum distance that the vehicle must travel.

maxDistance
number <double>
Default: 99999999

The maximum distance that the vehicle can travel.

maxRevenue
number <double>
Default: 99999999

The maximum revenue that the vehicle can receive in total.

required
Array of objects (RouteOrder)
Array
indexInRoute
integer <int32>
Default: 0

The index of the order in the orders list of the route (the order of visit).

indexInOptimization
integer <int32>
Default: 0

The index of the order in the optimization orders list.

object (Order)
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

actualLocation
Array of numbers <double> (ActualLocation) [ items <double > ]

The actual geographical coordinates in [latitude, longitude] format where the order was serviced, if it was serviced, otherwise this field will not be present.

arrivalTime
integer <int64>
Default: 0

The vehicle arrival time at the order's location.

timeToNextOrder
integer <int32>
Default: 0

The duration between the current order and the next order ( seconds ).

waitTime
integer <int32>
Default: 0

The amount of time that the vehicle has to wait at the current order's location, in order to arrive between the time window to the next order ( seconds ).

numberOfPackagesAtArrival
integer <int32>
Default: 0

The amount of the collected number of packages until this order.

collectedNumberOfPackages
integer <int32>
Default: 0

The number of packages collected from this order.

deliveredNumberOfPackages
integer <int32>
Default: 0

The number of packages delivered at this order.

weightAtArrival
number <double>
Default: 0

The amount of the collected weight until this order.

collectedWeight
number <double>
Default: 0

The weight collected from this order.

deliveredWeight
number <double>
Default: 0

The weight delivered at this order.

cubeAtArrival
number <double>
Default: 0

The total cubic volume collected until this order.

collectedCube
number <double>
Default: 0

The cubic volume collected from this order.

deliveredCube
number <double>
Default: 0

The cubic volume delivered at this order.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this order in the distance unit set in the ConfigurationParameters.

distanceToNextOrder
number <double>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

revenueAtArrival
number <double>
Default: 0

The collected revenue until this order.

visitTimestamp
integer <int64>
Default: 0

The time when the route order was visited.

totalDistance
required
number <float>

The unit of measure for the distance is kilometers or miles, it depends on what the user has chosen in the configuration parameters.

totalTime
required
integer <int32>

Total duration of the route in seconds.

totalServiceTime
required
integer <int32>

Total service time of all the orders of the route in seconds.

totalWaitTime
required
integer <int32>

Total wait time of the route in seconds.

neededFuel
required
number <float>

Total amount of fuel used during the route. The unit of measure for consumption is liter or kw/h depending on the fuel type.

price
required
number <float>

Cost of the route (the price for the total fuel that will be consumed). The price is calculated depending on the vehicle's consumption, the price of the vehicle's fuel type and the total distance.

required
string or Array of Location (numbers)
Any of
string
creationTimestamp
required
integer <int64>
object (Request)
id
required
integer <int64>
Default: 0
optimizationId
integer <int64>
Default: 0
routeId
integer <int64>
Default: 0
status
required
integer
Default: 0
Enum: 0 1 2 3

Request's status:

  • 0 - eCreated
  • 1 - ePending
  • 2 - eFinished
  • 3 - eCanceled
message
required
string
creationTimestamp
required
integer <int64>
Default: 0
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
{
  • "orders": [
    • {
      • "id": 123456,
      • "position": 2
      }
    ],
  • "optimalPosition": true,
  • "matricesToTheOtherLocations": [
    • {
      • "vehicleType": 0,
      • "distMatrix": [
        • [
          • 1,
          • 2,
          • 3,
          • 4
          ],
        • [
          • 7,
          • 6,
          • 10,
          • 9
          ]
        ],
      • "timeMatrix": [
        • [
          • 1,
          • 2,
          • 3,
          • 4
          ],
        • [
          • 7,
          • 6,
          • 10,
          • 9
          ]
        ]
      }
    ]
}

Response samples

Content type
application/json
{
  • "route": {
    • "id": 123456,
    • "optimizationId": 123456,
    • "idVehicle": 123456,
    • "matrixBuiltType": 0,
    • "matrices": [
      • {
        • "vehicleType": 0,
        • "distMatrix": [
          • [
            • 1,
            • 2,
            • 3,
            • 4
            ],
          • [
            • 7,
            • 6,
            • 10,
            • 9
            ]
          ],
        • "timeMatrix": [
          • [
            • 1,
            • 2,
            • 3,
            • 4
            ],
          • [
            • 7,
            • 6,
            • 10,
            • 9
            ]
          ]
        }
      ],
    • "rideStatus": 0,
    • "configurationParameters": {
      • "name": "Optimization 50 vehicles in Berlin",
      • "ignoreTimeWindow": true,
      • "allowDroppingOrders": false,
      • "groupingOrders": false,
      • "balancedRoutes": false,
      • "arrangeCriterion": 0,
      • "optimizationCriterion": 0,
      • "optimizationQuality": 0,
      • "maxTimeToOptimize": 600,
      • "maxWaitTime": 600,
      • "routeType": 0,
      • "restrictions": 0,
      • "distanceUnit": 0,
      • "orderSequenceOptions": [
        • {
          • "sequenceOptions": 0,
          • "ordersSequence": [
            • [
              • 123456,
              • 234567,
              • 345678,
              • 456789
              ],
            • [
              • 712345,
              • 612345,
              • 102345,
              • 912345
              ]
            ]
          }
        ]
      },
    • "departure": {
      • "alias": "Ana",
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "depotId": 123456,
      • "matchedLocation": [
        • 45.652871,
        • 25.585588
        ],
      • "numberOfPackages": 10,
      • "weight": 5.5,
      • "cube": 5.5,
      • "departureTime": 1602684618476,
      • "timeToNext": 5000,
      • "distanceToNext": 99.5
      },
    • "destination": {
      • "alias": "Ana",
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "matchedLocation": [
        • 45.652871,
        • 25.585588
        ],
      • "arrivalTime": 1602684618476,
      • "traveledDistance": 99.5
      },
    • "vehicleConstraints": [
      • {
        • "fuelPrice": 1.5,
        • "startDate": 1730332800000,
        • "maxNumberOfPackages": 9999,
        • "minNumberOfOrders": 0,
        • "maxNumberOfOrders": 9999,
        • "minDistance": 1.5,
        • "maxDistance": 999.5,
        • "maxRevenue": 999.5
        }
      ],
    • "orders": [
      • {
        • "indexInRoute": 10,
        • "indexInOptimization": 10,
        • "orderInfo": {
          • "id": 123456,
          • "creationTimestamp": 1689942672,
          • "customerInfo": {
            • "id": 123456,
            • "location": [
              • 45.652871,
              • 25.585588
              ],
            • "alias": "Ana",
            • "firstName": "Ana",
            • "lastName": "Lyn",
            • "address": {
              • "country": "France",
              • "state": "Aquitaine",
              • "county": "Aquitaine",
              • "city": "Bordeaux",
              • "postalCode": "33300",
              • "streetName": "Jean Jaures",
              • "streetNumber": "82",
              • "extra": "94301"
              },
            • "email": "email@yahoo.com",
            • "phoneNumber": "+1234567",
            • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
            },
          • "location": [
            • 45.652871,
            • 25.585588
            ],
          • "alias": "Ana",
          • "type": 0,
          • "priority": 0,
          • "numberOfPackages": 10,
          • "weight": 5.5,
          • "cube": 5.5,
          • "timeWindow": [
            • 750,
            • 1020
            ],
          • "serviceTime": 400,
          • "revenue": 5.5,
          • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
          • "firstName": "Ana",
          • "lastName": "Lyn",
          • "address": {
            • "country": "France",
            • "state": "Aquitaine",
            • "county": "Aquitaine",
            • "city": "Bordeaux",
            • "postalCode": "33300",
            • "streetName": "Jean Jaures",
            • "streetNumber": "82",
            • "extra": "94301"
            },
          • "phoneNumber": "+1234567",
          • "status": 0,
          • "state": 0,
          • "depotId": 123456
          },
        • "matchedLocation": [
          • 45.652871,
          • 25.585588
          ],
        • "actualLocation": [
          • 45.652871,
          • 25.585588
          ],
        • "arrivalTime": 10,
        • "timeToNextOrder": 10,
        • "waitTime": 10,
        • "numberOfPackagesAtArrival": 10,
        • "collectedNumberOfPackages": 10,
        • "deliveredNumberOfPackages": 10,
        • "weightAtArrival": 5.5,
        • "collectedWeight": 5.5,
        • "deliveredWeight": 5.5,
        • "cubeAtArrival": 5.5,
        • "collectedCube": 5.5,
        • "deliveredCube": 5.5,
        • "traveledDistance": 5.5,
        • "distanceToNextOrder": 5.5,
        • "revenueAtArrival": 5.5,
        • "visitTimestamp": 10
        }
      ],
    • "totalDistance": 250.5,
    • "totalTime": 25000,
    • "totalServiceTime": 6000,
    • "totalWaitTime": 500,
    • "neededFuel": 250.5,
    • "price": 430.5,
    • "shape": "string",
    • "creationTimestamp": 1602684618476
    },
  • "request": {
    • "id": 123456,
    • "optimizationId": 123456,
    • "routeId": 123456,
    • "status": 0,
    • "message": "Operation done successfully!",
    • "creationTimestamp": 123456
    }
}

Deletes an order from a route.

Deletes a order from a route. If the order is not used in another route, it will be deleted from the optimization as well.
The start order of the optimization and the routes cannot be delete.

Authorizations:
ApiKey
path Parameters
id
required
integer <int64>

The ID of the route to which the order belongs

orderId
required
integer <int64>

The ID of the order to be deleted

query Parameters
encodeShape
integer <int16>

0: The route's shape will not be encoded.
1:(default) - The route's shape will be encoded.

Responses

Response Schema: application/json
id
required
integer <int64>
optimizationId
required
integer <int64>
idVehicle
required
integer <int64>
matrixBuiltType
integer
Default: 1
Enum: 0 1

What distance formula should be used to build the matrix. Matrix Built Type:

  • 0 - eSet = Set by the user using "matrices" field
  • 1 - eReal = Road map distances and times
Array of objects (MatricesObj)

Is set only if matrixBuildType = eSet. For each type of vehicle used in the optimization/route, a distance and a time matrix should be set

Array
vehicleType
integer
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
distMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
timeMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
rideStatus
integer
Default: 1
Enum: 0 1 2 3 4

The status of the route's ride. Ride Status:

  • 0 - eFinished = The ride is finished
  • 1 - eNew = The ride is new and ready to start
  • 2 - eStarted = The ride was started by a vehicle
  • 3 - eCanceledByDriver = The ride was canceled by a vehicle's driver
  • 4 - eCanceledByFleet = The ride was canceled by the fleet manager
required
object (ConfigurationParameters)
name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

allowDroppingOrders
boolean

Specifies whether the algorithm is allowed to drop orders if no solution is found by visiting all of them. Default is false.

groupingOrders
boolean

Specify if the orders will be grouped. If the distance between any two orders is less than 10 meters, those orders will be considered part of the same group. Default is false.

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
distanceUnit
integer
Default: 0
Enum: 0 1

The unit of measure used for distances throughout the optimization. Distance Unit :

  • 0 - eKilometers
  • 1 - eMiles
Array of objects (OrdersSequenceOptions)

These options are used to specify the association between different orders that should be visited in a certain order.

Array
sequenceOptions
integer
Enum: 0 1 2 3

Vehicle type:

  • 0 - eInSameRoute
  • 1 - eInSequence
  • 2 - eInFixedSequence
  • 3 - eInPairs
ordersSequence
Array of integers (Matrix2DI64) [ items <int64 >[ items <int64 > ] ]

A list of lists, where each inner list is a sequence of order ids.

required
object (Departure)
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
depotId
integer <int64>
Default: -1
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

numberOfPackages
integer <int64>
Default: 0
weight
number <double>
Default: 0
cube
number <double>
Default: 0
departureTime
integer <int64>
timeToNext
integer <int32>
Default: 0

The time that will be traveled to arrive at the next order. (in seconds)

distanceToNext
number <float>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

required
object (Destination)
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

arrivalTime
integer <int64>

The vehicle arrival time at the order's location.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this destination in the distance unit set in the ConfigurationParameters.

required
Array of objects (VehicleConstraints)
Array
fuelPrice
number <double>
Default: 0

The fuel cost (filled when the vehicle is used in a route).

startDate
required
integer <int64>

The date the vehicle begins its route, provided as a timestamp with the time set to midnight.

maxNumberOfPackages
integer <int64>
Default: 99999999

The maximum number of packages that the vehicle can carry.

minNumberOfOrders
integer <int64>
Default: 0

The minimum number of orders that the vehicle must visit

maxNumberOfOrders
integer <int64>
Default: 99999999

The maximum number of orders that the vehicle can visit.

minDistance
number <double>
Default: 0

The minimum distance that the vehicle must travel.

maxDistance
number <double>
Default: 99999999

The maximum distance that the vehicle can travel.

maxRevenue
number <double>
Default: 99999999

The maximum revenue that the vehicle can receive in total.

required
Array of objects (RouteOrder)
Array
indexInRoute
integer <int32>
Default: 0

The index of the order in the orders list of the route (the order of visit).

indexInOptimization
integer <int32>
Default: 0

The index of the order in the optimization orders list.

object (Order)
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

actualLocation
Array of numbers <double> (ActualLocation) [ items <double > ]

The actual geographical coordinates in [latitude, longitude] format where the order was serviced, if it was serviced, otherwise this field will not be present.

arrivalTime
integer <int64>
Default: 0

The vehicle arrival time at the order's location.

timeToNextOrder
integer <int32>
Default: 0

The duration between the current order and the next order ( seconds ).

waitTime
integer <int32>
Default: 0

The amount of time that the vehicle has to wait at the current order's location, in order to arrive between the time window to the next order ( seconds ).

numberOfPackagesAtArrival
integer <int32>
Default: 0

The amount of the collected number of packages until this order.

collectedNumberOfPackages
integer <int32>
Default: 0

The number of packages collected from this order.

deliveredNumberOfPackages
integer <int32>
Default: 0

The number of packages delivered at this order.

weightAtArrival
number <double>
Default: 0

The amount of the collected weight until this order.

collectedWeight
number <double>
Default: 0

The weight collected from this order.

deliveredWeight
number <double>
Default: 0

The weight delivered at this order.

cubeAtArrival
number <double>
Default: 0

The total cubic volume collected until this order.

collectedCube
number <double>
Default: 0

The cubic volume collected from this order.

deliveredCube
number <double>
Default: 0

The cubic volume delivered at this order.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this order in the distance unit set in the ConfigurationParameters.

distanceToNextOrder
number <double>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

revenueAtArrival
number <double>
Default: 0

The collected revenue until this order.

visitTimestamp
integer <int64>
Default: 0

The time when the route order was visited.

totalDistance
required
number <float>

The unit of measure for the distance is kilometers or miles, it depends on what the user has chosen in the configuration parameters.

totalTime
required
integer <int32>

Total duration of the route in seconds.

totalServiceTime
required
integer <int32>

Total service time of all the orders of the route in seconds.

totalWaitTime
required
integer <int32>

Total wait time of the route in seconds.

neededFuel
required
number <float>

Total amount of fuel used during the route. The unit of measure for consumption is liter or kw/h depending on the fuel type.

price
required
number <float>

Cost of the route (the price for the total fuel that will be consumed). The price is calculated depending on the vehicle's consumption, the price of the vehicle's fuel type and the total distance.

required
string or Array of Location (numbers)
Any of
string
creationTimestamp
required
integer <int64>
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
{
  • "id": 123456,
  • "optimizationId": 123456,
  • "idVehicle": 123456,
  • "matrixBuiltType": 0,
  • "matrices": [
    • {
      • "vehicleType": 0,
      • "distMatrix": [
        • [
          • 1,
          • 2,
          • 3,
          • 4
          ],
        • [
          • 7,
          • 6,
          • 10,
          • 9
          ]
        ],
      • "timeMatrix": [
        • [
          • 1,
          • 2,
          • 3,
          • 4
          ],
        • [
          • 7,
          • 6,
          • 10,
          • 9
          ]
        ]
      }
    ],
  • "rideStatus": 0,
  • "configurationParameters": {
    • "name": "Optimization 50 vehicles in Berlin",
    • "ignoreTimeWindow": true,
    • "allowDroppingOrders": false,
    • "groupingOrders": false,
    • "balancedRoutes": false,
    • "arrangeCriterion": 0,
    • "optimizationCriterion": 0,
    • "optimizationQuality": 0,
    • "maxTimeToOptimize": 600,
    • "maxWaitTime": 600,
    • "routeType": 0,
    • "restrictions": 0,
    • "distanceUnit": 0,
    • "orderSequenceOptions": [
      • {
        • "sequenceOptions": 0,
        • "ordersSequence": [
          • [
            • 123456,
            • 234567,
            • 345678,
            • 456789
            ],
          • [
            • 712345,
            • 612345,
            • 102345,
            • 912345
            ]
          ]
        }
      ]
    },
  • "departure": {
    • "alias": "Ana",
    • "location": [
      • 45.652871,
      • 25.585588
      ],
    • "address": {
      • "country": "France",
      • "state": "Aquitaine",
      • "county": "Aquitaine",
      • "city": "Bordeaux",
      • "postalCode": "33300",
      • "streetName": "Jean Jaures",
      • "streetNumber": "82",
      • "extra": "94301"
      },
    • "depotId": 123456,
    • "matchedLocation": [
      • 45.652871,
      • 25.585588
      ],
    • "numberOfPackages": 10,
    • "weight": 5.5,
    • "cube": 5.5,
    • "departureTime": 1602684618476,
    • "timeToNext": 5000,
    • "distanceToNext": 99.5
    },
  • "destination": {
    • "alias": "Ana",
    • "location": [
      • 45.652871,
      • 25.585588
      ],
    • "address": {
      • "country": "France",
      • "state": "Aquitaine",
      • "county": "Aquitaine",
      • "city": "Bordeaux",
      • "postalCode": "33300",
      • "streetName": "Jean Jaures",
      • "streetNumber": "82",
      • "extra": "94301"
      },
    • "matchedLocation": [
      • 45.652871,
      • 25.585588
      ],
    • "arrivalTime": 1602684618476,
    • "traveledDistance": 99.5
    },
  • "vehicleConstraints": [
    • {
      • "fuelPrice": 1.5,
      • "startDate": 1730332800000,
      • "maxNumberOfPackages": 9999,
      • "minNumberOfOrders": 0,
      • "maxNumberOfOrders": 9999,
      • "minDistance": 1.5,
      • "maxDistance": 999.5,
      • "maxRevenue": 999.5
      }
    ],
  • "orders": [
    • {
      • "indexInRoute": 10,
      • "indexInOptimization": 10,
      • "orderInfo": {
        • "id": 123456,
        • "creationTimestamp": 1689942672,
        • "customerInfo": {
          • "id": 123456,
          • "location": [
            • 45.652871,
            • 25.585588
            ],
          • "alias": "Ana",
          • "firstName": "Ana",
          • "lastName": "Lyn",
          • "address": {
            • "country": "France",
            • "state": "Aquitaine",
            • "county": "Aquitaine",
            • "city": "Bordeaux",
            • "postalCode": "33300",
            • "streetName": "Jean Jaures",
            • "streetNumber": "82",
            • "extra": "94301"
            },
          • "email": "email@yahoo.com",
          • "phoneNumber": "+1234567",
          • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
          },
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "alias": "Ana",
        • "type": 0,
        • "priority": 0,
        • "numberOfPackages": 10,
        • "weight": 5.5,
        • "cube": 5.5,
        • "timeWindow": [
          • 750,
          • 1020
          ],
        • "serviceTime": 400,
        • "revenue": 5.5,
        • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
        • "firstName": "Ana",
        • "lastName": "Lyn",
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "phoneNumber": "+1234567",
        • "status": 0,
        • "state": 0,
        • "depotId": 123456
        },
      • "matchedLocation": [
        • 45.652871,
        • 25.585588
        ],
      • "actualLocation": [
        • 45.652871,
        • 25.585588
        ],
      • "arrivalTime": 10,
      • "timeToNextOrder": 10,
      • "waitTime": 10,
      • "numberOfPackagesAtArrival": 10,
      • "collectedNumberOfPackages": 10,
      • "deliveredNumberOfPackages": 10,
      • "weightAtArrival": 5.5,
      • "collectedWeight": 5.5,
      • "deliveredWeight": 5.5,
      • "cubeAtArrival": 5.5,
      • "collectedCube": 5.5,
      • "deliveredCube": 5.5,
      • "traveledDistance": 5.5,
      • "distanceToNextOrder": 5.5,
      • "revenueAtArrival": 5.5,
      • "visitTimestamp": 10
      }
    ],
  • "totalDistance": 250.5,
  • "totalTime": 25000,
  • "totalServiceTime": 6000,
  • "totalWaitTime": 500,
  • "neededFuel": 250.5,
  • "price": 430.5,
  • "shape": "string",
  • "creationTimestamp": 1602684618476
}

Merges a list of routes into one route. A new optimization is also made for this route.

A new optimization will be created for the merged route. The optimization will have the same fields as the first route in the routeIds list (exception: the field ignoreTimewindow will be true). Routes must not have matrices build type set to EMatrixBuildType ::MBT_Set

Authorizations:
ApiKey
query Parameters
encodeShape
integer <int16>

0: The route's shape will not be encoded.
1:(default) - The route's shape will be encoded.

Request Body schema: application/json

A list with ids of the routes that has to be merged.

Array
integer <int64>

Responses

Response Schema: application/json
id
required
integer <int64>
optimizationId
required
integer <int64>
idVehicle
required
integer <int64>
matrixBuiltType
integer
Default: 1
Enum: 0 1

What distance formula should be used to build the matrix. Matrix Built Type:

  • 0 - eSet = Set by the user using "matrices" field
  • 1 - eReal = Road map distances and times
Array of objects (MatricesObj)

Is set only if matrixBuildType = eSet. For each type of vehicle used in the optimization/route, a distance and a time matrix should be set

Array
vehicleType
integer
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
distMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
timeMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
rideStatus
integer
Default: 1
Enum: 0 1 2 3 4

The status of the route's ride. Ride Status:

  • 0 - eFinished = The ride is finished
  • 1 - eNew = The ride is new and ready to start
  • 2 - eStarted = The ride was started by a vehicle
  • 3 - eCanceledByDriver = The ride was canceled by a vehicle's driver
  • 4 - eCanceledByFleet = The ride was canceled by the fleet manager
required
object (ConfigurationParameters)
name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

allowDroppingOrders
boolean

Specifies whether the algorithm is allowed to drop orders if no solution is found by visiting all of them. Default is false.

groupingOrders
boolean

Specify if the orders will be grouped. If the distance between any two orders is less than 10 meters, those orders will be considered part of the same group. Default is false.

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
distanceUnit
integer
Default: 0
Enum: 0 1

The unit of measure used for distances throughout the optimization. Distance Unit :

  • 0 - eKilometers
  • 1 - eMiles
Array of objects (OrdersSequenceOptions)

These options are used to specify the association between different orders that should be visited in a certain order.

Array
sequenceOptions
integer
Enum: 0 1 2 3

Vehicle type:

  • 0 - eInSameRoute
  • 1 - eInSequence
  • 2 - eInFixedSequence
  • 3 - eInPairs
ordersSequence
Array of integers (Matrix2DI64) [ items <int64 >[ items <int64 > ] ]

A list of lists, where each inner list is a sequence of order ids.

required
object (Departure)
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
depotId
integer <int64>
Default: -1
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

numberOfPackages
integer <int64>
Default: 0
weight
number <double>
Default: 0
cube
number <double>
Default: 0
departureTime
integer <int64>
timeToNext
integer <int32>
Default: 0

The time that will be traveled to arrive at the next order. (in seconds)

distanceToNext
number <float>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

required
object (Destination)
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

arrivalTime
integer <int64>

The vehicle arrival time at the order's location.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this destination in the distance unit set in the ConfigurationParameters.

required
Array of objects (VehicleConstraints)
Array
fuelPrice
number <double>
Default: 0

The fuel cost (filled when the vehicle is used in a route).

startDate
required
integer <int64>

The date the vehicle begins its route, provided as a timestamp with the time set to midnight.

maxNumberOfPackages
integer <int64>
Default: 99999999

The maximum number of packages that the vehicle can carry.

minNumberOfOrders
integer <int64>
Default: 0

The minimum number of orders that the vehicle must visit

maxNumberOfOrders
integer <int64>
Default: 99999999

The maximum number of orders that the vehicle can visit.

minDistance
number <double>
Default: 0

The minimum distance that the vehicle must travel.

maxDistance
number <double>
Default: 99999999

The maximum distance that the vehicle can travel.

maxRevenue
number <double>
Default: 99999999

The maximum revenue that the vehicle can receive in total.

required
Array of objects (RouteOrder)
Array
indexInRoute
integer <int32>
Default: 0

The index of the order in the orders list of the route (the order of visit).

indexInOptimization
integer <int32>
Default: 0

The index of the order in the optimization orders list.

object (Order)
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

actualLocation
Array of numbers <double> (ActualLocation) [ items <double > ]

The actual geographical coordinates in [latitude, longitude] format where the order was serviced, if it was serviced, otherwise this field will not be present.

arrivalTime
integer <int64>
Default: 0

The vehicle arrival time at the order's location.

timeToNextOrder
integer <int32>
Default: 0

The duration between the current order and the next order ( seconds ).

waitTime
integer <int32>
Default: 0

The amount of time that the vehicle has to wait at the current order's location, in order to arrive between the time window to the next order ( seconds ).

numberOfPackagesAtArrival
integer <int32>
Default: 0

The amount of the collected number of packages until this order.

collectedNumberOfPackages
integer <int32>
Default: 0

The number of packages collected from this order.

deliveredNumberOfPackages
integer <int32>
Default: 0

The number of packages delivered at this order.

weightAtArrival
number <double>
Default: 0

The amount of the collected weight until this order.

collectedWeight
number <double>
Default: 0

The weight collected from this order.

deliveredWeight
number <double>
Default: 0

The weight delivered at this order.

cubeAtArrival
number <double>
Default: 0

The total cubic volume collected until this order.

collectedCube
number <double>
Default: 0

The cubic volume collected from this order.

deliveredCube
number <double>
Default: 0

The cubic volume delivered at this order.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this order in the distance unit set in the ConfigurationParameters.

distanceToNextOrder
number <double>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

revenueAtArrival
number <double>
Default: 0

The collected revenue until this order.

visitTimestamp
integer <int64>
Default: 0

The time when the route order was visited.

totalDistance
required
number <float>

The unit of measure for the distance is kilometers or miles, it depends on what the user has chosen in the configuration parameters.

totalTime
required
integer <int32>

Total duration of the route in seconds.

totalServiceTime
required
integer <int32>

Total service time of all the orders of the route in seconds.

totalWaitTime
required
integer <int32>

Total wait time of the route in seconds.

neededFuel
required
number <float>

Total amount of fuel used during the route. The unit of measure for consumption is liter or kw/h depending on the fuel type.

price
required
number <float>

Cost of the route (the price for the total fuel that will be consumed). The price is calculated depending on the vehicle's consumption, the price of the vehicle's fuel type and the total distance.

required
string or Array of Location (numbers)
Any of
string
creationTimestamp
required
integer <int64>
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
[
  • 123456,
  • 123457,
  • 123458
]

Response samples

Content type
application/json
{
  • "id": 123456,
  • "optimizationId": 123456,
  • "idVehicle": 123456,
  • "matrixBuiltType": 0,
  • "matrices": [
    • {
      • "vehicleType": 0,
      • "distMatrix": [
        • [
          • 1,
          • 2,
          • 3,
          • 4
          ],
        • [
          • 7,
          • 6,
          • 10,
          • 9
          ]
        ],
      • "timeMatrix": [
        • [
          • 1,
          • 2,
          • 3,
          • 4
          ],
        • [
          • 7,
          • 6,
          • 10,
          • 9
          ]
        ]
      }
    ],
  • "rideStatus": 0,
  • "configurationParameters": {
    • "name": "Optimization 50 vehicles in Berlin",
    • "ignoreTimeWindow": true,
    • "allowDroppingOrders": false,
    • "groupingOrders": false,
    • "balancedRoutes": false,
    • "arrangeCriterion": 0,
    • "optimizationCriterion": 0,
    • "optimizationQuality": 0,
    • "maxTimeToOptimize": 600,
    • "maxWaitTime": 600,
    • "routeType": 0,
    • "restrictions": 0,
    • "distanceUnit": 0,
    • "orderSequenceOptions": [
      • {
        • "sequenceOptions": 0,
        • "ordersSequence": [
          • [
            • 123456,
            • 234567,
            • 345678,
            • 456789
            ],
          • [
            • 712345,
            • 612345,
            • 102345,
            • 912345
            ]
          ]
        }
      ]
    },
  • "departure": {
    • "alias": "Ana",
    • "location": [
      • 45.652871,
      • 25.585588
      ],
    • "address": {
      • "country": "France",
      • "state": "Aquitaine",
      • "county": "Aquitaine",
      • "city": "Bordeaux",
      • "postalCode": "33300",
      • "streetName": "Jean Jaures",
      • "streetNumber": "82",
      • "extra": "94301"
      },
    • "depotId": 123456,
    • "matchedLocation": [
      • 45.652871,
      • 25.585588
      ],
    • "numberOfPackages": 10,
    • "weight": 5.5,
    • "cube": 5.5,
    • "departureTime": 1602684618476,
    • "timeToNext": 5000,
    • "distanceToNext": 99.5
    },
  • "destination": {
    • "alias": "Ana",
    • "location": [
      • 45.652871,
      • 25.585588
      ],
    • "address": {
      • "country": "France",
      • "state": "Aquitaine",
      • "county": "Aquitaine",
      • "city": "Bordeaux",
      • "postalCode": "33300",
      • "streetName": "Jean Jaures",
      • "streetNumber": "82",
      • "extra": "94301"
      },
    • "matchedLocation": [
      • 45.652871,
      • 25.585588
      ],
    • "arrivalTime": 1602684618476,
    • "traveledDistance": 99.5
    },
  • "vehicleConstraints": [
    • {
      • "fuelPrice": 1.5,
      • "startDate": 1730332800000,
      • "maxNumberOfPackages": 9999,
      • "minNumberOfOrders": 0,
      • "maxNumberOfOrders": 9999,
      • "minDistance": 1.5,
      • "maxDistance": 999.5,
      • "maxRevenue": 999.5
      }
    ],
  • "orders": [
    • {
      • "indexInRoute": 10,
      • "indexInOptimization": 10,
      • "orderInfo": {
        • "id": 123456,
        • "creationTimestamp": 1689942672,
        • "customerInfo": {
          • "id": 123456,
          • "location": [
            • 45.652871,
            • 25.585588
            ],
          • "alias": "Ana",
          • "firstName": "Ana",
          • "lastName": "Lyn",
          • "address": {
            • "country": "France",
            • "state": "Aquitaine",
            • "county": "Aquitaine",
            • "city": "Bordeaux",
            • "postalCode": "33300",
            • "streetName": "Jean Jaures",
            • "streetNumber": "82",
            • "extra": "94301"
            },
          • "email": "email@yahoo.com",
          • "phoneNumber": "+1234567",
          • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
          },
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "alias": "Ana",
        • "type": 0,
        • "priority": 0,
        • "numberOfPackages": 10,
        • "weight": 5.5,
        • "cube": 5.5,
        • "timeWindow": [
          • 750,
          • 1020
          ],
        • "serviceTime": 400,
        • "revenue": 5.5,
        • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
        • "firstName": "Ana",
        • "lastName": "Lyn",
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "phoneNumber": "+1234567",
        • "status": 0,
        • "state": 0,
        • "depotId": 123456
        },
      • "matchedLocation": [
        • 45.652871,
        • 25.585588
        ],
      • "actualLocation": [
        • 45.652871,
        • 25.585588
        ],
      • "arrivalTime": 10,
      • "timeToNextOrder": 10,
      • "waitTime": 10,
      • "numberOfPackagesAtArrival": 10,
      • "collectedNumberOfPackages": 10,
      • "deliveredNumberOfPackages": 10,
      • "weightAtArrival": 5.5,
      • "collectedWeight": 5.5,
      • "deliveredWeight": 5.5,
      • "cubeAtArrival": 5.5,
      • "collectedCube": 5.5,
      • "deliveredCube": 5.5,
      • "traveledDistance": 5.5,
      • "distanceToNextOrder": 5.5,
      • "revenueAtArrival": 5.5,
      • "visitTimestamp": 10
      }
    ],
  • "totalDistance": 250.5,
  • "totalTime": 25000,
  • "totalServiceTime": 6000,
  • "totalWaitTime": 500,
  • "neededFuel": 250.5,
  • "price": 430.5,
  • "shape": "string",
  • "creationTimestamp": 1602684618476
}

Unlinks the route from its optimization.

Unlinks the route from its optimization and a new Optimization is made for the route.

Authorizations:
ApiKey
path Parameters
id
required
integer <int64>

ID of the route to be unlinked

query Parameters
encodeShape
integer <int16>

0: The route's shape will not be encoded.
1:(default) - The route's shape will be encoded.

Responses

Response Schema: application/json
id
required
integer <int64>
optimizationId
required
integer <int64>
idVehicle
required
integer <int64>
matrixBuiltType
integer
Default: 1
Enum: 0 1

What distance formula should be used to build the matrix. Matrix Built Type:

  • 0 - eSet = Set by the user using "matrices" field
  • 1 - eReal = Road map distances and times
Array of objects (MatricesObj)

Is set only if matrixBuildType = eSet. For each type of vehicle used in the optimization/route, a distance and a time matrix should be set

Array
vehicleType
integer
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
distMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
timeMatrix
Array of integers (Matrix2DI32) [ items <int32 >[ items <int32 > ] ]
rideStatus
integer
Default: 1
Enum: 0 1 2 3 4

The status of the route's ride. Ride Status:

  • 0 - eFinished = The ride is finished
  • 1 - eNew = The ride is new and ready to start
  • 2 - eStarted = The ride was started by a vehicle
  • 3 - eCanceledByDriver = The ride was canceled by a vehicle's driver
  • 4 - eCanceledByFleet = The ride was canceled by the fleet manager
required
object (ConfigurationParameters)
name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

allowDroppingOrders
boolean

Specifies whether the algorithm is allowed to drop orders if no solution is found by visiting all of them. Default is false.

groupingOrders
boolean

Specify if the orders will be grouped. If the distance between any two orders is less than 10 meters, those orders will be considered part of the same group. Default is false.

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
distanceUnit
integer
Default: 0
Enum: 0 1

The unit of measure used for distances throughout the optimization. Distance Unit :

  • 0 - eKilometers
  • 1 - eMiles
Array of objects (OrdersSequenceOptions)

These options are used to specify the association between different orders that should be visited in a certain order.

Array
sequenceOptions
integer
Enum: 0 1 2 3

Vehicle type:

  • 0 - eInSameRoute
  • 1 - eInSequence
  • 2 - eInFixedSequence
  • 3 - eInPairs
ordersSequence
Array of integers (Matrix2DI64) [ items <int64 >[ items <int64 > ] ]

A list of lists, where each inner list is a sequence of order ids.

required
object (Departure)
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
depotId
integer <int64>
Default: -1
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

numberOfPackages
integer <int64>
Default: 0
weight
number <double>
Default: 0
cube
number <double>
Default: 0
departureTime
integer <int64>
timeToNext
integer <int32>
Default: 0

The time that will be traveled to arrive at the next order. (in seconds)

distanceToNext
number <float>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

required
object (Destination)
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

arrivalTime
integer <int64>

The vehicle arrival time at the order's location.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this destination in the distance unit set in the ConfigurationParameters.

required
Array of objects (VehicleConstraints)
Array
fuelPrice
number <double>
Default: 0

The fuel cost (filled when the vehicle is used in a route).

startDate
required
integer <int64>

The date the vehicle begins its route, provided as a timestamp with the time set to midnight.

maxNumberOfPackages
integer <int64>
Default: 99999999

The maximum number of packages that the vehicle can carry.

minNumberOfOrders
integer <int64>
Default: 0

The minimum number of orders that the vehicle must visit

maxNumberOfOrders
integer <int64>
Default: 99999999

The maximum number of orders that the vehicle can visit.

minDistance
number <double>
Default: 0

The minimum distance that the vehicle must travel.

maxDistance
number <double>
Default: 99999999

The maximum distance that the vehicle can travel.

maxRevenue
number <double>
Default: 99999999

The maximum revenue that the vehicle can receive in total.

required
Array of objects (RouteOrder)
Array
indexInRoute
integer <int32>
Default: 0

The index of the order in the orders list of the route (the order of visit).

indexInOptimization
integer <int32>
Default: 0

The index of the order in the optimization orders list.

object (Order)
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

actualLocation
Array of numbers <double> (ActualLocation) [ items <double > ]

The actual geographical coordinates in [latitude, longitude] format where the order was serviced, if it was serviced, otherwise this field will not be present.

arrivalTime
integer <int64>
Default: 0

The vehicle arrival time at the order's location.

timeToNextOrder
integer <int32>
Default: 0

The duration between the current order and the next order ( seconds ).

waitTime
integer <int32>
Default: 0

The amount of time that the vehicle has to wait at the current order's location, in order to arrive between the time window to the next order ( seconds ).

numberOfPackagesAtArrival
integer <int32>
Default: 0

The amount of the collected number of packages until this order.

collectedNumberOfPackages
integer <int32>
Default: 0

The number of packages collected from this order.

deliveredNumberOfPackages
integer <int32>
Default: 0

The number of packages delivered at this order.

weightAtArrival
number <double>
Default: 0

The amount of the collected weight until this order.

collectedWeight
number <double>
Default: 0

The weight collected from this order.

deliveredWeight
number <double>
Default: 0

The weight delivered at this order.

cubeAtArrival
number <double>
Default: 0

The total cubic volume collected until this order.

collectedCube
number <double>
Default: 0

The cubic volume collected from this order.

deliveredCube
number <double>
Default: 0

The cubic volume delivered at this order.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this order in the distance unit set in the ConfigurationParameters.

distanceToNextOrder
number <double>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

revenueAtArrival
number <double>
Default: 0

The collected revenue until this order.

visitTimestamp
integer <int64>
Default: 0

The time when the route order was visited.

totalDistance
required
number <float>

The unit of measure for the distance is kilometers or miles, it depends on what the user has chosen in the configuration parameters.

totalTime
required
integer <int32>

Total duration of the route in seconds.

totalServiceTime
required
integer <int32>

Total service time of all the orders of the route in seconds.

totalWaitTime
required
integer <int32>

Total wait time of the route in seconds.

neededFuel
required
number <float>

Total amount of fuel used during the route. The unit of measure for consumption is liter or kw/h depending on the fuel type.

price
required
number <float>

Cost of the route (the price for the total fuel that will be consumed). The price is calculated depending on the vehicle's consumption, the price of the vehicle's fuel type and the total distance.

required
string or Array of Location (numbers)
Any of
string
creationTimestamp
required
integer <int64>
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
{
  • "id": 123456,
  • "optimizationId": 123456,
  • "idVehicle": 123456,
  • "matrixBuiltType": 0,
  • "matrices": [
    • {
      • "vehicleType": 0,
      • "distMatrix": [
        • [
          • 1,
          • 2,
          • 3,
          • 4
          ],
        • [
          • 7,
          • 6,
          • 10,
          • 9
          ]
        ],
      • "timeMatrix": [
        • [
          • 1,
          • 2,
          • 3,
          • 4
          ],
        • [
          • 7,
          • 6,
          • 10,
          • 9
          ]
        ]
      }
    ],
  • "rideStatus": 0,
  • "configurationParameters": {
    • "name": "Optimization 50 vehicles in Berlin",
    • "ignoreTimeWindow": true,
    • "allowDroppingOrders": false,
    • "groupingOrders": false,
    • "balancedRoutes": false,
    • "arrangeCriterion": 0,
    • "optimizationCriterion": 0,
    • "optimizationQuality": 0,
    • "maxTimeToOptimize": 600,
    • "maxWaitTime": 600,
    • "routeType": 0,
    • "restrictions": 0,
    • "distanceUnit": 0,
    • "orderSequenceOptions": [
      • {
        • "sequenceOptions": 0,
        • "ordersSequence": [
          • [
            • 123456,
            • 234567,
            • 345678,
            • 456789
            ],
          • [
            • 712345,
            • 612345,
            • 102345,
            • 912345
            ]
          ]
        }
      ]
    },
  • "departure": {
    • "alias": "Ana",
    • "location": [
      • 45.652871,
      • 25.585588
      ],
    • "address": {
      • "country": "France",
      • "state": "Aquitaine",
      • "county": "Aquitaine",
      • "city": "Bordeaux",
      • "postalCode": "33300",
      • "streetName": "Jean Jaures",
      • "streetNumber": "82",
      • "extra": "94301"
      },
    • "depotId": 123456,
    • "matchedLocation": [
      • 45.652871,
      • 25.585588
      ],
    • "numberOfPackages": 10,
    • "weight": 5.5,
    • "cube": 5.5,
    • "departureTime": 1602684618476,
    • "timeToNext": 5000,
    • "distanceToNext": 99.5
    },
  • "destination": {
    • "alias": "Ana",
    • "location": [
      • 45.652871,
      • 25.585588
      ],
    • "address": {
      • "country": "France",
      • "state": "Aquitaine",
      • "county": "Aquitaine",
      • "city": "Bordeaux",
      • "postalCode": "33300",
      • "streetName": "Jean Jaures",
      • "streetNumber": "82",
      • "extra": "94301"
      },
    • "matchedLocation": [
      • 45.652871,
      • 25.585588
      ],
    • "arrivalTime": 1602684618476,
    • "traveledDistance": 99.5
    },
  • "vehicleConstraints": [
    • {
      • "fuelPrice": 1.5,
      • "startDate": 1730332800000,
      • "maxNumberOfPackages": 9999,
      • "minNumberOfOrders": 0,
      • "maxNumberOfOrders": 9999,
      • "minDistance": 1.5,
      • "maxDistance": 999.5,
      • "maxRevenue": 999.5
      }
    ],
  • "orders": [
    • {
      • "indexInRoute": 10,
      • "indexInOptimization": 10,
      • "orderInfo": {
        • "id": 123456,
        • "creationTimestamp": 1689942672,
        • "customerInfo": {
          • "id": 123456,
          • "location": [
            • 45.652871,
            • 25.585588
            ],
          • "alias": "Ana",
          • "firstName": "Ana",
          • "lastName": "Lyn",
          • "address": {
            • "country": "France",
            • "state": "Aquitaine",
            • "county": "Aquitaine",
            • "city": "Bordeaux",
            • "postalCode": "33300",
            • "streetName": "Jean Jaures",
            • "streetNumber": "82",
            • "extra": "94301"
            },
          • "email": "email@yahoo.com",
          • "phoneNumber": "+1234567",
          • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
          },
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "alias": "Ana",
        • "type": 0,
        • "priority": 0,
        • "numberOfPackages": 10,
        • "weight": 5.5,
        • "cube": 5.5,
        • "timeWindow": [
          • 750,
          • 1020
          ],
        • "serviceTime": 400,
        • "revenue": 5.5,
        • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
        • "firstName": "Ana",
        • "lastName": "Lyn",
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "phoneNumber": "+1234567",
        • "status": 0,
        • "state": 0,
        • "depotId": 123456
        },
      • "matchedLocation": [
        • 45.652871,
        • 25.585588
        ],
      • "actualLocation": [
        • 45.652871,
        • 25.585588
        ],
      • "arrivalTime": 10,
      • "timeToNextOrder": 10,
      • "waitTime": 10,
      • "numberOfPackagesAtArrival": 10,
      • "collectedNumberOfPackages": 10,
      • "deliveredNumberOfPackages": 10,
      • "weightAtArrival": 5.5,
      • "collectedWeight": 5.5,
      • "deliveredWeight": 5.5,
      • "cubeAtArrival": 5.5,
      • "collectedCube": 5.5,
      • "deliveredCube": 5.5,
      • "traveledDistance": 5.5,
      • "distanceToNextOrder": 5.5,
      • "revenueAtArrival": 5.5,
      • "visitTimestamp": 10
      }
    ],
  • "totalDistance": 250.5,
  • "totalTime": 25000,
  • "totalServiceTime": 6000,
  • "totalWaitTime": 500,
  • "neededFuel": 250.5,
  • "price": 430.5,
  • "shape": "string",
  • "creationTimestamp": 1602684618476
}

territory

Operations on Territory

Add a territory

Adding a new territory

Authorizations:
ApiKey
Request Body schema: application/json
required

The territory's properties

name
string

Territory's name

type
required
integer
Default: 0
Enum: 0 1 2

Territory's type:

  • 0 - ePoly
  • 1 - eCircle
  • 2 - eRect
data
required
Array of numbers[ items <double >[ items <double > ] ]

Depending on the territory type data array may contain:
Circle - contains the the center of the circle and the coordinates of a point from the circle
Rectangle - 2 diagonally opposite points
Polygon - a list of points.

color
string

Territory's color

Responses

Response Schema: application/json
id
required
integer <int64>
Array of objects (Order)
Array
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
Array of objects (Customer)
Array
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
name
string

Territory's name

type
required
integer
Default: 0
Enum: 0 1 2

Territory's type:

  • 0 - ePoly
  • 1 - eCircle
  • 2 - eRect
data
required
Array of numbers[ items <double >[ items <double > ] ]

Depending on the territory type data array may contain:
Circle - contains the the center of the circle and the coordinates of a point from the circle
Rectangle - 2 diagonally opposite points
Polygon - a list of points.

color
string

Territory's color

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
{
  • "name": "string",
  • "type": 0,
  • "data": [
    • [
      • 0.1
      ]
    ],
  • "color": "string"
}

Response samples

Content type
application/json
{
  • "id": 123456,
  • "orders": [
    • {
      • "id": 123456,
      • "creationTimestamp": 1689942672,
      • "customerInfo": {
        • "id": 123456,
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "alias": "Ana",
        • "firstName": "Ana",
        • "lastName": "Lyn",
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "email": "email@yahoo.com",
        • "phoneNumber": "+1234567",
        • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
        },
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "alias": "Ana",
      • "type": 0,
      • "priority": 0,
      • "numberOfPackages": 10,
      • "weight": 5.5,
      • "cube": 5.5,
      • "timeWindow": [
        • 750,
        • 1020
        ],
      • "serviceTime": 400,
      • "revenue": 5.5,
      • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
      • "firstName": "Ana",
      • "lastName": "Lyn",
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "phoneNumber": "+1234567",
      • "status": 0,
      • "state": 0,
      • "depotId": 123456
      }
    ],
  • "customers": [
    • {
      • "id": 123456,
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "alias": "Ana",
      • "firstName": "Ana",
      • "lastName": "Lyn",
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "email": "email@yahoo.com",
      • "phoneNumber": "+1234567",
      • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
      }
    ],
  • "name": "string",
  • "type": 0,
  • "data": [
    • [
      • 0.1
      ]
    ],
  • "color": "string"
}

Get all territories

Get territories

Authorizations:
ApiKey
query Parameters
search
string

The search parameter for general search across territories.

id
string

Id parameter used to filter territories by id. The id parameter can be formatted as id=value:exact if you want to perform an exact search.

name
string

Name parameter used to filter territories by name. The name parameter can be formatted as name=value:exact if you want to perform an exact search.

type
string

Type parameter used to filter territories by type. The type parameter can be formatted as type=value.

data
string

Data parameter used to filter territories by data. The data parameter can be formatted as data=value:exact if you want to perform an exact search.

color
string

Color parameter used to filter territories by color. The color parameter can be formatted as color=value:exact if you want to perform an exact search.

sort
string
Example: sort=firstName:asc,lastName:desc,alias:asc

The sort parameter will have this format sort = column1:asc/desc,column2:asc/desc,column3:asc/desc. Columns will be chosen from this list(id, name, type,data, color)

includeColumns
string
Example: includeColumns=id, name, type

The includeColumns parameter will have this format includeColumns = column1,column2,column3. Columns will be chosen from this list(id, name, type,data, color)

page
integer <int32>

The page parameter indicates the page number.

per_page
integer <int32>

The per_page parameter indicates the number of items on each page.

Responses

Response Schema: application/json
Array of objects (Territory)
Array
id
required
integer <int64>
Array of objects (Order)
Array
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
Array of objects (Customer)
Array
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
name
string

Territory's name

type
required
integer
Default: 0
Enum: 0 1 2

Territory's type:

  • 0 - ePoly
  • 1 - eCircle
  • 2 - eRect
data
required
Array of numbers[ items <double >[ items <double > ] ]

Depending on the territory type data array may contain:
Circle - contains the the center of the circle and the coordinates of a point from the circle
Rectangle - 2 diagonally opposite points
Polygon - a list of points.

color
string

Territory's color

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
{
  • "territories": [
    • {
      • "id": 123456,
      • "orders": [
        • {
          • "id": 123456,
          • "creationTimestamp": 1689942672,
          • "customerInfo": {
            • "id": 123456,
            • "location": [
              • 45.652871,
              • 25.585588
              ],
            • "alias": "Ana",
            • "firstName": "Ana",
            • "lastName": "Lyn",
            • "address": {
              • "country": "France",
              • "state": "Aquitaine",
              • "county": "Aquitaine",
              • "city": "Bordeaux",
              • "postalCode": "33300",
              • "streetName": "Jean Jaures",
              • "streetNumber": "82",
              • "extra": "94301"
              },
            • "email": "email@yahoo.com",
            • "phoneNumber": "+1234567",
            • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
            },
          • "location": [
            • 45.652871,
            • 25.585588
            ],
          • "alias": "Ana",
          • "type": 0,
          • "priority": 0,
          • "numberOfPackages": 10,
          • "weight": 5.5,
          • "cube": 5.5,
          • "timeWindow": [
            • 750,
            • 1020
            ],
          • "serviceTime": 400,
          • "revenue": 5.5,
          • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
          • "firstName": "Ana",
          • "lastName": "Lyn",
          • "address": {
            • "country": "France",
            • "state": "Aquitaine",
            • "county": "Aquitaine",
            • "city": "Bordeaux",
            • "postalCode": "33300",
            • "streetName": "Jean Jaures",
            • "streetNumber": "82",
            • "extra": "94301"
            },
          • "phoneNumber": "+1234567",
          • "status": 0,
          • "state": 0,
          • "depotId": 123456
          }
        ],
      • "customers": [
        • {
          • "id": 123456,
          • "location": [
            • 45.652871,
            • 25.585588
            ],
          • "alias": "Ana",
          • "firstName": "Ana",
          • "lastName": "Lyn",
          • "address": {
            • "country": "France",
            • "state": "Aquitaine",
            • "county": "Aquitaine",
            • "city": "Bordeaux",
            • "postalCode": "33300",
            • "streetName": "Jean Jaures",
            • "streetNumber": "82",
            • "extra": "94301"
            },
          • "email": "email@yahoo.com",
          • "phoneNumber": "+1234567",
          • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
          }
        ],
      • "name": "string",
      • "type": 0,
      • "data": [
        • [
          • 0.1
          ]
        ],
      • "color": "string"
      }
    ]
}

Deletes territories

Authorizations:
ApiKey
Request Body schema: application/json
required

The list of ids of the territories that have to be deleted.

Array
integer <int64>

Responses

Response Schema: application/json
result
string

Operation done successfully

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
[
  • 123456,
  • 123457,
  • 123458
]

Response samples

Content type
application/json
{
  • "result": "Operation done successfully."
}

Get a territory by id

Get an existing territory by Id

Authorizations:
ApiKey
path Parameters
id
required
integer <int64>

ID of the territory to return

Responses

Response Schema: application/json
id
required
integer <int64>
Array of objects (Order)
Array
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
Array of objects (Customer)
Array
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
name
string

Territory's name

type
required
integer
Default: 0
Enum: 0 1 2

Territory's type:

  • 0 - ePoly
  • 1 - eCircle
  • 2 - eRect
data
required
Array of numbers[ items <double >[ items <double > ] ]

Depending on the territory type data array may contain:
Circle - contains the the center of the circle and the coordinates of a point from the circle
Rectangle - 2 diagonally opposite points
Polygon - a list of points.

color
string

Territory's color

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
{
  • "id": 123456,
  • "orders": [
    • {
      • "id": 123456,
      • "creationTimestamp": 1689942672,
      • "customerInfo": {
        • "id": 123456,
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "alias": "Ana",
        • "firstName": "Ana",
        • "lastName": "Lyn",
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "email": "email@yahoo.com",
        • "phoneNumber": "+1234567",
        • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
        },
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "alias": "Ana",
      • "type": 0,
      • "priority": 0,
      • "numberOfPackages": 10,
      • "weight": 5.5,
      • "cube": 5.5,
      • "timeWindow": [
        • 750,
        • 1020
        ],
      • "serviceTime": 400,
      • "revenue": 5.5,
      • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
      • "firstName": "Ana",
      • "lastName": "Lyn",
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "phoneNumber": "+1234567",
      • "status": 0,
      • "state": 0,
      • "depotId": 123456
      }
    ],
  • "customers": [
    • {
      • "id": 123456,
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "alias": "Ana",
      • "firstName": "Ana",
      • "lastName": "Lyn",
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "email": "email@yahoo.com",
      • "phoneNumber": "+1234567",
      • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
      }
    ],
  • "name": "string",
  • "type": 0,
  • "data": [
    • [
      • 0.1
      ]
    ],
  • "color": "string"
}

Update a territory

Update an existing territory by Id

Authorizations:
ApiKey
path Parameters
id
required
integer <int64>

ID of the territory to update

Request Body schema: application/json
required

Updated data

id
required
integer <int64>
Array of objects (Order)
Array
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
Array of objects (Customer)
Array
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
name
string

Territory's name

type
required
integer
Default: 0
Enum: 0 1 2

Territory's type:

  • 0 - ePoly
  • 1 - eCircle
  • 2 - eRect
data
required
Array of numbers[ items <double >[ items <double > ] ]

Depending on the territory type data array may contain:
Circle - contains the the center of the circle and the coordinates of a point from the circle
Rectangle - 2 diagonally opposite points
Polygon - a list of points.

color
string

Territory's color

Responses

Response Schema: application/json
result
string

Operation done successfully

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
{
  • "id": 123456,
  • "orders": [
    • {
      • "id": 123456,
      • "creationTimestamp": 1689942672,
      • "customerInfo": {
        • "id": 123456,
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "alias": "Ana",
        • "firstName": "Ana",
        • "lastName": "Lyn",
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "email": "email@yahoo.com",
        • "phoneNumber": "+1234567",
        • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
        },
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "alias": "Ana",
      • "type": 0,
      • "priority": 0,
      • "numberOfPackages": 10,
      • "weight": 5.5,
      • "cube": 5.5,
      • "timeWindow": [
        • 750,
        • 1020
        ],
      • "serviceTime": 400,
      • "revenue": 5.5,
      • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
      • "firstName": "Ana",
      • "lastName": "Lyn",
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "phoneNumber": "+1234567",
      • "status": 0,
      • "state": 0,
      • "depotId": 123456
      }
    ],
  • "customers": [
    • {
      • "id": 123456,
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "alias": "Ana",
      • "firstName": "Ana",
      • "lastName": "Lyn",
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "email": "email@yahoo.com",
      • "phoneNumber": "+1234567",
      • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
      }
    ],
  • "name": "string",
  • "type": 0,
  • "data": [
    • [
      • 0.1
      ]
    ],
  • "color": "string"
}

Response samples

Content type
application/json
{
  • "result": "Operation done successfully."
}

Generates territories from a list of coordinates.

Creates a list of territories starting from a list of coordinates.

Authorizations:
ApiKey
Request Body schema: application/json
required

The list of coordinates should contain at least 3 coordinates to create 1 territory. NumberOfTerritories, how many territories should be created (if is is 0, then the algorithm will determinate how many should be created).

locations
Array of numbers (Location) [ items <double >[ items <double > ] ]

Coordinates from which the territories are generated (should contain at least 3 coordinates to create 1 territory).

territoriesNumber
integer <int32>

How many territories should be created (if is is 0, then the algorithm will determinate how many should be created).

Responses

Response Schema: application/json
Array of objects (Territory)
Array
id
required
integer <int64>
Array of objects (Order)
Array
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
Array of objects (Customer)
Array
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
name
string

Territory's name

type
required
integer
Default: 0
Enum: 0 1 2

Territory's type:

  • 0 - ePoly
  • 1 - eCircle
  • 2 - eRect
data
required
Array of numbers[ items <double >[ items <double > ] ]

Depending on the territory type data array may contain:
Circle - contains the the center of the circle and the coordinates of a point from the circle
Rectangle - 2 diagonally opposite points
Polygon - a list of points.

color
string

Territory's color

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
{
  • "locations": [
    • [
      • 45.652871,
      • 25.585588
      ]
    ],
  • "territoriesNumber": 3
}

Response samples

Content type
application/json
{
  • "territories": [
    • {
      • "id": 123456,
      • "orders": [
        • {
          • "id": 123456,
          • "creationTimestamp": 1689942672,
          • "customerInfo": {
            • "id": 123456,
            • "location": [
              • 45.652871,
              • 25.585588
              ],
            • "alias": "Ana",
            • "firstName": "Ana",
            • "lastName": "Lyn",
            • "address": {
              • "country": "France",
              • "state": "Aquitaine",
              • "county": "Aquitaine",
              • "city": "Bordeaux",
              • "postalCode": "33300",
              • "streetName": "Jean Jaures",
              • "streetNumber": "82",
              • "extra": "94301"
              },
            • "email": "email@yahoo.com",
            • "phoneNumber": "+1234567",
            • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
            },
          • "location": [
            • 45.652871,
            • 25.585588
            ],
          • "alias": "Ana",
          • "type": 0,
          • "priority": 0,
          • "numberOfPackages": 10,
          • "weight": 5.5,
          • "cube": 5.5,
          • "timeWindow": [
            • 750,
            • 1020
            ],
          • "serviceTime": 400,
          • "revenue": 5.5,
          • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
          • "firstName": "Ana",
          • "lastName": "Lyn",
          • "address": {
            • "country": "France",
            • "state": "Aquitaine",
            • "county": "Aquitaine",
            • "city": "Bordeaux",
            • "postalCode": "33300",
            • "streetName": "Jean Jaures",
            • "streetNumber": "82",
            • "extra": "94301"
            },
          • "phoneNumber": "+1234567",
          • "status": 0,
          • "state": 0,
          • "depotId": 123456
          }
        ],
      • "customers": [
        • {
          • "id": 123456,
          • "location": [
            • 45.652871,
            • 25.585588
            ],
          • "alias": "Ana",
          • "firstName": "Ana",
          • "lastName": "Lyn",
          • "address": {
            • "country": "France",
            • "state": "Aquitaine",
            • "county": "Aquitaine",
            • "city": "Bordeaux",
            • "postalCode": "33300",
            • "streetName": "Jean Jaures",
            • "streetNumber": "82",
            • "extra": "94301"
            },
          • "email": "email@yahoo.com",
          • "phoneNumber": "+1234567",
          • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
          }
        ],
      • "name": "string",
      • "type": 0,
      • "data": [
        • [
          • 0.1
          ]
        ],
      • "color": "string"
      }
    ]
}

Returns all orders within the specified territory by its provided ID.

Returns a list with all the orders within the specified territory.

Authorizations:
ApiKey
path Parameters
id
required
integer <int64>

ID of the territory

Responses

Response Schema: application/json
Array of objects (Order)
Array
id
required
integer <int64>
creationTimestamp
integer <int64>
required
object (Customer)
id
integer <int64>
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

alias
string
firstName
string
lastName
string
object (Address)
country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
email
required
string
phoneNumber
required
string
customData
string
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
{
  • "orders": [
    • {
      • "id": 123456,
      • "creationTimestamp": 1689942672,
      • "customerInfo": {
        • "id": 123456,
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "alias": "Ana",
        • "firstName": "Ana",
        • "lastName": "Lyn",
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "email": "email@yahoo.com",
        • "phoneNumber": "+1234567",
        • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"' \n"
        },
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "alias": "Ana",
      • "type": 0,
      • "priority": 0,
      • "numberOfPackages": 10,
      • "weight": 5.5,
      • "cube": 5.5,
      • "timeWindow": [
        • 750,
        • 1020
        ],
      • "serviceTime": 400,
      • "revenue": 5.5,
      • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
      • "firstName": "Ana",
      • "lastName": "Lyn",
      • "address": {
        • "country": "France",
        • "state": "Aquitaine",
        • "county": "Aquitaine",
        • "city": "Bordeaux",
        • "postalCode": "33300",
        • "streetName": "Jean Jaures",
        • "streetNumber": "82",
        • "extra": "94301"
        },
      • "phoneNumber": "+1234567",
      • "status": 0,
      • "state": 0,
      • "depotId": 123456
      }
    ]
}

fuelprices

Operations on Fuelprices

Update the fuel prices by adding a new entry.

Adding a new fuel prices entry. For each type of fuel type a velue needs to be set.

Authorizations:
ApiKey
Request Body schema: application/json
required

The fuel prices

creationTimestamp
integer <int64>
dieselStandard
required
number <float>
Default: 1.09
dieselPremium
required
number <float>
Default: 1.17
gasolineStandard
required
number <float>
Default: 1.07
gasolinePremium
required
number <float>
Default: 1.19
electric
required
number <float>
Default: 0.1
lpg
required
number <float>
Default: 0.55

Responses

Response Schema: application/json
creationTimestamp
integer <int64>
dieselStandard
required
number <float>
Default: 1.09
dieselPremium
required
number <float>
Default: 1.17
gasolineStandard
required
number <float>
Default: 1.07
gasolinePremium
required
number <float>
Default: 1.19
electric
required
number <float>
Default: 0.1
lpg
required
number <float>
Default: 0.55
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
{
  • "creationTimestamp": 1602684618476,
  • "dieselStandard": 1.5,
  • "dieselPremium": 2,
  • "gasolineStandard": 1.51,
  • "gasolinePremium": 1.48,
  • "electric": 0.18,
  • "lpg": 0.6
}

Response samples

Content type
application/json
{
  • "creationTimestamp": 1602684618476,
  • "dieselStandard": 1.5,
  • "dieselPremium": 2,
  • "gasolineStandard": 1.51,
  • "gasolinePremium": 1.48,
  • "electric": 0.18,
  • "lpg": 0.6
}

Get all fuel prices.

Get fuel prices. If no entry was previously added, the default values will be returned.

Authorizations:
ApiKey
query Parameters
page
integer <int32>

The page parameter indicates the page number.

per_page
integer <int32>

The per_page parameter indicates the number of items on each page.

Responses

Response Schema: application/json
Array
creationTimestamp
integer <int64>
dieselStandard
required
number <float>
Default: 1.09
dieselPremium
required
number <float>
Default: 1.17
gasolineStandard
required
number <float>
Default: 1.07
gasolinePremium
required
number <float>
Default: 1.19
electric
required
number <float>
Default: 0.1
lpg
required
number <float>
Default: 0.55
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
[
  • {
    • "creationTimestamp": 1602684618476,
    • "dieselStandard": 1.5,
    • "dieselPremium": 2,
    • "gasolineStandard": 1.51,
    • "gasolinePremium": 1.48,
    • "electric": 0.18,
    • "lpg": 0.6
    }
]

template

Operations on TemplateParameters

Add a template parameters

Adding a new template parameters

Authorizations:
ApiKey
Request Body schema: application/json
required

The template's properties

name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
matrixBuiltType
integer
Default: 1
Enum: 0 1

What distance formula should be used to build the matrix. Matrix Built Type:

  • 0 - eSet = Set by the user using "matrices" field
  • 1 - eReal = Road map distances and times
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
vehicleCategory
integer
Default: 0
Enum: 0 1

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNoneElectric
  • 1 - eElectric
sameDepartureForAll
boolean
Default: false

If only one departure will be used as startpoint for all routes.

sameDestinationForAll
boolean
Default: false

If only one destination will be used for all routes.

sameVehicleConstraintsForAll
boolean
Default: false

If only one vehicle constraints will be used for all vehicles.

Responses

Response Schema: application/json
id
integer <int64>
name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
matrixBuiltType
integer
Default: 1
Enum: 0 1

What distance formula should be used to build the matrix. Matrix Built Type:

  • 0 - eSet = Set by the user using "matrices" field
  • 1 - eReal = Road map distances and times
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
vehicleCategory
integer
Default: 0
Enum: 0 1

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNoneElectric
  • 1 - eElectric
sameDepartureForAll
boolean
Default: false

If only one departure will be used as startpoint for all routes.

sameDestinationForAll
boolean
Default: false

If only one destination will be used for all routes.

sameVehicleConstraintsForAll
boolean
Default: false

If only one vehicle constraints will be used for all vehicles.

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
{
  • "name": "Optimization 50 vehicles in Berlin",
  • "ignoreTimeWindow": true,
  • "balancedRoutes": false,
  • "optimizationCriterion": 0,
  • "arrangeCriterion": 0,
  • "optimizationQuality": 0,
  • "maxTimeToOptimize": 600,
  • "maxWaitTime": 600,
  • "routeType": 0,
  • "matrixBuiltType": 0,
  • "restrictions": 0,
  • "vehicleCategory": 0,
  • "sameDepartureForAll": false,
  • "sameDestinationForAll": false,
  • "sameVehicleConstraintsForAll": false
}

Response samples

Content type
application/json
{
  • "id": 123456,
  • "name": "Optimization 50 vehicles in Berlin",
  • "ignoreTimeWindow": true,
  • "balancedRoutes": false,
  • "optimizationCriterion": 0,
  • "arrangeCriterion": 0,
  • "optimizationQuality": 0,
  • "maxTimeToOptimize": 600,
  • "maxWaitTime": 600,
  • "routeType": 0,
  • "matrixBuiltType": 0,
  • "restrictions": 0,
  • "vehicleCategory": 0,
  • "sameDepartureForAll": false,
  • "sameDestinationForAll": false,
  • "sameVehicleConstraintsForAll": false
}

Get all templates parameters

Get all templates parameters

Authorizations:
ApiKey
query Parameters
search
string

General search parameter for optimizations.

id
string

ID parameter used to filter optimizations by id. The id parameter can be formatted as id=value:exact if you want to perform an exact search.

name
string

Name parameter used to filter optimizations by name. The name parameter can be formatted as name=value:exact if you want to perform an exact search.

creationTime
string

CreationTime parameter used to filter optimizations by creation time. The creationTime parameter can be formatted as creationTime=value:exact if you want to perform an exact search.

ignoreTimeWindow
string

IgnoreTimeWindow parameter used to filter optimizations by optimization that ignore time windows. The ignoreTimeWindow parameter can be formatted as ignoreTimeWindow=value:exact if you want to perform an exact search.

balancedRoutes
string

If the returned routes have a similar number of orders or not.

routeType
string

RouteType parameter used to filter optimizations by route type. The routeType parameter can be formatted as routeType=value.

vehicleCategory
string

VehicleCategory parameter used to filter vehicle used in optimization by electric or non electric vehicle.

sameVehicleConstraints
string

If only one vehicle constraints will be used for all vehicles.

sameDeparture
string

If only one departure will be used as startpoint for all routes.

sameDestination
string

If only one destination will be used for all routes.

sort
string
Example: sort=firstName:asc,lastName:desc, alias:asc

The sort parameter will have this format sort = column1:asc/desc,column2:asc/desc,column3:asc/desc. Columns will be chosen from this list(id, name, creationTime, ignoreTimewindow, optimizeBy, optimizationQuality, maxOptimizeTime, routeType, matricesBuildType, restrictions, maxWaitTimeOrders, arrangeCriterion, balancedRoutes)

page
integer <int32>

The page parameter indicates the page number.

per_page
integer <int32>

The per_page parameter indicates the number of items on each page.

Responses

Response Schema: application/json
Array
id
integer <int64>
name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
matrixBuiltType
integer
Default: 1
Enum: 0 1

What distance formula should be used to build the matrix. Matrix Built Type:

  • 0 - eSet = Set by the user using "matrices" field
  • 1 - eReal = Road map distances and times
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
vehicleCategory
integer
Default: 0
Enum: 0 1

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNoneElectric
  • 1 - eElectric
sameDepartureForAll
boolean
Default: false

If only one departure will be used as startpoint for all routes.

sameDestinationForAll
boolean
Default: false

If only one destination will be used for all routes.

sameVehicleConstraintsForAll
boolean
Default: false

If only one vehicle constraints will be used for all vehicles.

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
[
  • {
    • "id": 123456,
    • "name": "Optimization 50 vehicles in Berlin",
    • "ignoreTimeWindow": true,
    • "balancedRoutes": false,
    • "optimizationCriterion": 0,
    • "arrangeCriterion": 0,
    • "optimizationQuality": 0,
    • "maxTimeToOptimize": 600,
    • "maxWaitTime": 600,
    • "routeType": 0,
    • "matrixBuiltType": 0,
    • "restrictions": 0,
    • "vehicleCategory": 0,
    • "sameDepartureForAll": false,
    • "sameDestinationForAll": false,
    • "sameVehicleConstraintsForAll": false
    }
]

Deletes templates parameters

Authorizations:
ApiKey
Request Body schema: application/json
required

The list of ids of the templates that have to be deleted.

Array
integer <int64>

Responses

Response Schema: application/json
result
string

Operation done successfully

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
[
  • 123456,
  • 123457,
  • 123458
]

Response samples

Content type
application/json
{
  • "result": "Operation done successfully."
}

Get a template parameters by id

Get an existing template parameters by Id

Authorizations:
ApiKey
path Parameters
id
required
integer <int64>

ID of the template to return

Responses

Response Schema: application/json
id
integer <int64>
name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
matrixBuiltType
integer
Default: 1
Enum: 0 1

What distance formula should be used to build the matrix. Matrix Built Type:

  • 0 - eSet = Set by the user using "matrices" field
  • 1 - eReal = Road map distances and times
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
vehicleCategory
integer
Default: 0
Enum: 0 1

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNoneElectric
  • 1 - eElectric
sameDepartureForAll
boolean
Default: false

If only one departure will be used as startpoint for all routes.

sameDestinationForAll
boolean
Default: false

If only one destination will be used for all routes.

sameVehicleConstraintsForAll
boolean
Default: false

If only one vehicle constraints will be used for all vehicles.

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
{
  • "id": 123456,
  • "name": "Optimization 50 vehicles in Berlin",
  • "ignoreTimeWindow": true,
  • "balancedRoutes": false,
  • "optimizationCriterion": 0,
  • "arrangeCriterion": 0,
  • "optimizationQuality": 0,
  • "maxTimeToOptimize": 600,
  • "maxWaitTime": 600,
  • "routeType": 0,
  • "matrixBuiltType": 0,
  • "restrictions": 0,
  • "vehicleCategory": 0,
  • "sameDepartureForAll": false,
  • "sameDestinationForAll": false,
  • "sameVehicleConstraintsForAll": false
}

Update a template parameters

Update an existing template parameters by Id

Authorizations:
ApiKey
path Parameters
id
required
integer <int64>

ID of the template to update

Request Body schema: application/json
required

Updated data

name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
matrixBuiltType
integer
Default: 1
Enum: 0 1

What distance formula should be used to build the matrix. Matrix Built Type:

  • 0 - eSet = Set by the user using "matrices" field
  • 1 - eReal = Road map distances and times
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
vehicleCategory
integer
Default: 0
Enum: 0 1

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNoneElectric
  • 1 - eElectric
sameDepartureForAll
boolean
Default: false

If only one departure will be used as startpoint for all routes.

sameDestinationForAll
boolean
Default: false

If only one destination will be used for all routes.

sameVehicleConstraintsForAll
boolean
Default: false

If only one vehicle constraints will be used for all vehicles.

Responses

Response Schema: application/json
result
string

Operation done successfully

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
{
  • "name": "Optimization 50 vehicles in Berlin",
  • "ignoreTimeWindow": true,
  • "balancedRoutes": false,
  • "optimizationCriterion": 0,
  • "arrangeCriterion": 0,
  • "optimizationQuality": 0,
  • "maxTimeToOptimize": 600,
  • "maxWaitTime": 600,
  • "routeType": 0,
  • "matrixBuiltType": 0,
  • "restrictions": 0,
  • "vehicleCategory": 0,
  • "sameDepartureForAll": false,
  • "sameDestinationForAll": false,
  • "sameVehicleConstraintsForAll": false
}

Response samples

Content type
application/json
{
  • "result": "Operation done successfully."
}

request

Operations on Request

Get all requests.

Get requests.

Authorizations:
ApiKey

Responses

Response Schema: application/json
Array of objects (Request)
Array
id
required
integer <int64>
Default: 0
optimizationId
integer <int64>
Default: 0
routeId
integer <int64>
Default: 0
status
required
integer
Default: 0
Enum: 0 1 2 3

Request's status:

  • 0 - eCreated
  • 1 - ePending
  • 2 - eFinished
  • 3 - eCanceled
message
required
string
creationTimestamp
required
integer <int64>
Default: 0
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
{
  • "requests": [
    • {
      • "id": 123456,
      • "optimizationId": 123456,
      • "routeId": 123456,
      • "status": 0,
      • "message": "Operation done successfully!",
      • "creationTimestamp": 123456
      }
    ]
}

Get a request by id.

Get an existing request by Id.

Authorizations:
ApiKey
path Parameters
id
required
integer <int64>

ID of the request to return.

Responses

Response Schema: application/json
id
required
integer <int64>
Default: 0
optimizationId
integer <int64>
Default: 0
routeId
integer <int64>
Default: 0
status
required
integer
Default: 0
Enum: 0 1 2 3

Request's status:

  • 0 - eCreated
  • 1 - ePending
  • 2 - eFinished
  • 3 - eCanceled
message
required
string
creationTimestamp
required
integer <int64>
Default: 0
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
{
  • "id": 123456,
  • "optimizationId": 123456,
  • "routeId": 123456,
  • "status": 0,
  • "message": "Operation done successfully!",
  • "creationTimestamp": 123456
}

Cancel a request.

Authorizations:
ApiKey
path Parameters
id
required
integer <int64>

ID of the request to return.

Responses

Response Schema: application/json
result
string

Operation done successfully

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Response samples

Content type
application/json
{
  • "result": "Operation done successfully."
}

optimize

Operation on solving vrp in a stateless manner

Solves a vehicle routing problem (VRP) in a stateless manner, and returns the optimized routing solution.

Receives a set of locations, vehicles, vehicles constraints, and configuration parameters, solves the Vehicle Routing Problem (VRP) in a stateless manner, and returns the optimized routing solution.

Authorizations:
ApiKey
Request Body schema: application/json
required

The solution consists of one or more routes. A route is the trip that a vehicle travels to visit the orders, so the number of routes returned is maximum the number of vehicles set in the optimization.

Array of objects (ConfigurationParametersWithoutOrderSequenceOptions)
Array
name
string
ignoreTimeWindow
boolean

If the time-window should be ignored or not, by default it is not ignored (false)

allowDroppingOrders
boolean

Specifies whether the algorithm is allowed to drop orders if no solution is found by visiting all of them. Default is false.

groupingOrders
boolean

Specify if the orders will be grouped. If the distance between any two orders is less than 10 meters, those orders will be considered part of the same group. Default is false.

balancedRoutes
boolean
Default: false

If the returned routes should have a similar number of orders or not.

arrangeCriterion
integer
Default: 0
Enum: 0 1 2 3

The formula according to which orders are arranged. It is used only if the OptimizationCriterion is Distance. Arrange Criterion:

  • 0 - eMatrix
  • 1 - eEuclidian
  • 2 - eExactEuclidian
  • 3 - eManhattan
optimizationCriterion
integer
Default: 1
Enum: 0 1

The problem can be optimized by time or by distance. Optimization Criterion:

  • 0 - eDistance
  • 1 - eTime
optimizationQuality
integer
Default: 0
Enum: 0 1 2 3

Optimization Quality (solution accuracy):

  • 0 - eUnoptimized
  • 1 - eFast
  • 2 - eOptimized
  • 3 - eBest
maxTimeToOptimize
integer <int32>
Default: 300

Maximum amount of time (in seconds) to optimize the problem (how long the algorithm can search for the solution). It is used only if the optimization quality is Best

maxWaitTime
integer <int32>
Default: 99999999

Maximum amount of time (in seconds) that the vehicle can wait at an order, in order to arrive at the next order between its time window.

routeType
integer
Default: 0
Enum: 0 1 2

Round route (the vehicle returns to the start order at the end of the trip, so end order=start order), end anywhere (the algorithm will decide what order is the best to end the route) or the end orders are specified by the user. Route Type:

  • 0 - eRoundRoute
  • 1 - eEndAnywhere
  • 2 - eCustomEnd
restrictions
integer
Default: 0
Enum: 0 1 2

Road restrictions for the calculation of the distance and time matrices (use it if the matrix build type is Real) Route Type:

  • 0 - eNone
  • 1 - eTolls
  • 2 - eHighway
distanceUnit
integer
Default: 0
Enum: 0 1

The unit of measure used for distances throughout the optimization. Distance Unit :

  • 0 - eKilometers
  • 1 - eMiles
Array of objects (BaseDeparture)
Array
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

Array of objects (BaseDestination)
Array
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

Array of objects (SimpleOrder)
Array
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
Array of objects (BaseVehicle)
Array
type
required
integer
Default: 0
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
name
string

Vehicle's name

maxLoadWeight
number <double>
Default: 99999999

The maximum weight that the vehicle can carry

maxLoadCube
number <double>
Default: 99999999

The maximum cubic volume that the vehicle can carry

startTime
integer <int64>
Default: 0

The start time of the working program, in minutes from midnight (time of day).

endTime
integer <int64>
Default: 1439

The end time of the working program, in minutes from midnight (time of day).

licensePlate
string

Vehicle's registration plate (only for cars and trucks)

Array of objects (AddVehicleConstraints)
Array
startDate
required
integer <int64>

The date the vehicle begins its route, provided as a timestamp with the time set to midnight.

maxNumberOfPackages
integer <int64>
Default: 99999999

The maximum number of packages that the vehicle can carry.

minNumberOfOrders
integer <int64>
Default: 0

The minimum number of orders that the vehicle must visit

maxNumberOfOrders
integer <int64>
Default: 99999999

The maximum number of orders that the vehicle can visit.

minDistance
number <double>
Default: 0

The minimum distance that the vehicle must travel.

maxDistance
number <double>
Default: 99999999

The maximum distance that the vehicle can travel.

maxRevenue
number <double>
Default: 99999999

The maximum revenue that the vehicle can receive in total.

Responses

Response Schema: application/json
Array of objects (SimpleRoute)
Array
object (BaseOrder)
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
firstName
string
lastName
string
object (OrderAddress)

The address of an order cannot be changed once the order is saved in the database, or is used in an optimization.

country
string
state
string
county
string
city
string
postalCode
string
streetName
string
streetNumber
string
extra
string
phoneNumber
required
string
status
integer
Default: 0
Enum: 0 1

Order status:

  • 0 - OS_Unscheduled
  • 1 - OS_Scheduled
state
integer
Default: 0
Enum: 0 1 2 3 4 5

Order state:

  • 0 - OS_None
  • 1 - OS_OnRoute
  • 2 - OS_Servicing
  • 3 - OS_Rejected
  • 4 - OS_Completed
  • 5 - OS_Failed
depotId
required
integer <int64>
indexInRoute
integer <int32>
Default: 0

The index of the order in the orders list of the route (the order of visit).

indexInOptimization
integer <int32>
Default: 0

The index of the order in the optimization orders list.

matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

arrivalTime
integer <int64>
Default: 0

The vehicle arrival time at the order's location.

timeToNextOrder
integer <int32>
Default: 0

The duration between the current order and the next order ( seconds ).

waitTime
integer <int32>
Default: 0

The amount of time that the vehicle has to wait at the current order's location, in order to arrive between the time window to the next order ( seconds ).

numberOfPackagesAtArrival
integer <int32>
Default: 0

The amount of the collected number of packages until this order.

collectedNumberOfPackages
integer <int32>
Default: 0

The number of packages collected from this order.

deliveredNumberOfPackages
integer <int32>
Default: 0

The number of packages delivered at this order.

weightAtArrival
number <double>
Default: 0

The amount of the collected weight until this order.

collectedWeight
number <double>
Default: 0

The weight collected from this order.

deliveredWeight
number <double>
Default: 0

The weight delivered at this order.

cubeAtArrival
number <double>
Default: 0

The total cubic volume collected until this order.

collectedCube
number <double>
Default: 0

The cubic volume collected from this order.

deliveredCube
number <double>
Default: 0

The cubic volume delivered at this order.

traveledDistance
number <double>
Default: 0

The vehicle traveled distance until this order in the distance unit set in the ConfigurationParameters.

distanceToNextOrder
number <double>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

revenueAtArrival
number <double>
Default: 0

The collected revenue until this order.

object
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

numberOfPackages
integer <int64>
Default: 0
weight
number <double>
Default: 0
cube
number <double>
Default: 0
departureTime
integer <int64>
timeToNext
integer <int32>
Default: 0

The time that will be traveled to arrive at the next order. (in seconds)

distanceToNext
number <float>
Default: 0

The distance that will be traveled to arrive at the next order in the distance unit set in the ConfigurationParameters.

object
alias
string
location
required
Array of numbers <double> (Location) [ items <double > ]

Geographic coordinates in [latitude, longitude] format

matchedLocation
Array of numbers <double> (MatchedLocation) [ items <double > ]

The geographical coordinates matched on the road in [latitude, longitude] format.

arrivalTime
integer <int64>
object (BaseVehicle)
type
required
integer
Default: 0
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - eCar
  • 1 - ePedestrian
  • 2 - eEBike
  • 3 - eTruck
  • 4 - eBike
name
string

Vehicle's name

maxLoadWeight
number <double>
Default: 99999999

The maximum weight that the vehicle can carry

maxLoadCube
number <double>
Default: 99999999

The maximum cubic volume that the vehicle can carry

startTime
integer <int64>
Default: 0

The start time of the working program, in minutes from midnight (time of day).

endTime
integer <int64>
Default: 1439

The end time of the working program, in minutes from midnight (time of day).

licensePlate
string

Vehicle's registration plate (only for cars and trucks)

object (AddVehicleConstraints)
startDate
required
integer <int64>

The date the vehicle begins its route, provided as a timestamp with the time set to midnight.

maxNumberOfPackages
integer <int64>
Default: 99999999

The maximum number of packages that the vehicle can carry.

minNumberOfOrders
integer <int64>
Default: 0

The minimum number of orders that the vehicle must visit

maxNumberOfOrders
integer <int64>
Default: 99999999

The maximum number of orders that the vehicle can visit.

minDistance
number <double>
Default: 0

The minimum distance that the vehicle must travel.

maxDistance
number <double>
Default: 99999999

The maximum distance that the vehicle can travel.

maxRevenue
number <double>
Default: 99999999

The maximum revenue that the vehicle can receive in total.

Array of objects (SimpleOrder)
Array
location
required
Array of numbers <double> (OrderLocation) [ items <double > ]

The location of an in in [latitude, longitude] format. It cannot be changed once the order is saved in the database or is used in an optimization.

alias
string
type
integer
Default: 0
Enum: 0 1

Order type:

  • 0 - OT_PickUp
  • 1 - OT_Delivery
priority
integer
Default: 0
Enum: 0 1

Order priority:

  • 0 - eLow
  • 1 - eHigh
numberOfPackages
integer <int64>
Default: 0

The number of packages which has to be delivered or picked-up.

weight
number <double>
Default: 0

The weight which has to be delivered or picked-up.

cube
number <double>
Default: 0

The cubic volume which has to be delivered or picked-up.

timeWindow
Array of integers <int64> (TimeWindow) [ items <int64 > ]

The time window within which the vehicle must deliver the order. It is an array of two integers representing time of day in minutes from midnight.

  • First element: Start time (e.g., 750 = 12:30)
  • Second element: End time (e.g., 1020 = 17:00)
serviceTime
integer <int32>
Default: 0

The amount of time that the vehicle has to stay at the address to deliver the order (to load/unload the goods) in seconds.

revenue
number <double>
Default: 0

The revenue which has to be received.

customData
string
Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
{
  • "configurationParameters": [
    • {
      • "name": "Optimization 50 vehicles in Berlin",
      • "ignoreTimeWindow": true,
      • "allowDroppingOrders": false,
      • "groupingOrders": false,
      • "balancedRoutes": false,
      • "arrangeCriterion": 0,
      • "optimizationCriterion": 0,
      • "optimizationQuality": 0,
      • "maxTimeToOptimize": 600,
      • "maxWaitTime": 600,
      • "routeType": 0,
      • "restrictions": 0,
      • "distanceUnit": 0
      }
    ],
  • "departures": [
    • {
      • "alias": "Ana",
      • "location": [
        • 45.652871,
        • 25.585588
        ]
      }
    ],
  • "destinations": [
    • {
      • "alias": "Ana",
      • "location": [
        • 45.652871,
        • 25.585588
        ]
      }
    ],
  • "orders": [
    • {
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "alias": "Ana",
      • "type": 0,
      • "priority": 0,
      • "numberOfPackages": 10,
      • "weight": 5.5,
      • "cube": 5.5,
      • "timeWindow": [
        • 750,
        • 1020
        ],
      • "serviceTime": 400,
      • "revenue": 5.5,
      • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n"
      }
    ],
  • "vehicles": [
    • {
      • "type": 0,
      • "name": "string",
      • "maxLoadWeight": 99.5,
      • "maxLoadCube": 99.5,
      • "startTime": 540,
      • "endTime": 1000,
      • "licensePlate": "string"
      }
    ],
  • "vehiclesConstraints": [
    • {
      • "startDate": 1730332800000,
      • "maxNumberOfPackages": 9999,
      • "minNumberOfOrders": 0,
      • "maxNumberOfOrders": 9999,
      • "minDistance": 1.5,
      • "maxDistance": 999.5,
      • "maxRevenue": 999.5
      }
    ]
}

Response samples

Content type
application/json
{
  • "routes": [
    • {
      • "orders": {
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "alias": "Ana",
        • "type": 0,
        • "priority": 0,
        • "numberOfPackages": 10,
        • "weight": 5.5,
        • "cube": 5.5,
        • "timeWindow": [
          • 750,
          • 1020
          ],
        • "serviceTime": 400,
        • "revenue": 5.5,
        • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n",
        • "firstName": "Ana",
        • "lastName": "Lyn",
        • "address": {
          • "country": "France",
          • "state": "Aquitaine",
          • "county": "Aquitaine",
          • "city": "Bordeaux",
          • "postalCode": "33300",
          • "streetName": "Jean Jaures",
          • "streetNumber": "82",
          • "extra": "94301"
          },
        • "phoneNumber": "+1234567",
        • "status": 0,
        • "state": 0,
        • "depotId": 123456,
        • "indexInRoute": 10,
        • "indexInOptimization": 10,
        • "matchedLocation": [
          • 45.652871,
          • 25.585588
          ],
        • "arrivalTime": 10,
        • "timeToNextOrder": 10,
        • "waitTime": 10,
        • "numberOfPackagesAtArrival": 10,
        • "collectedNumberOfPackages": 10,
        • "deliveredNumberOfPackages": 10,
        • "weightAtArrival": 5.5,
        • "collectedWeight": 5.5,
        • "deliveredWeight": 5.5,
        • "cubeAtArrival": 5.5,
        • "collectedCube": 5.5,
        • "deliveredCube": 5.5,
        • "traveledDistance": 5.5,
        • "distanceToNextOrder": 5.5,
        • "revenueAtArrival": 5.5
        },
      • "departure": {
        • "alias": "Ana",
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "matchedLocation": [
          • 45.652871,
          • 25.585588
          ],
        • "numberOfPackages": 10,
        • "weight": 5.5,
        • "cube": 5.5,
        • "departureTime": 1602684618476,
        • "timeToNext": 5000,
        • "distanceToNext": 99.5
        },
      • "destination": {
        • "alias": "Ana",
        • "location": [
          • 45.652871,
          • 25.585588
          ],
        • "matchedLocation": [
          • 45.652871,
          • 25.585588
          ],
        • "arrivalTime": 1602684618476
        },
      • "vehicle": {
        • "type": 0,
        • "name": "string",
        • "maxLoadWeight": 99.5,
        • "maxLoadCube": 99.5,
        • "startTime": 540,
        • "endTime": 1000,
        • "licensePlate": "string"
        },
      • "vehicleConstraints": {
        • "startDate": 1730332800000,
        • "maxNumberOfPackages": 9999,
        • "minNumberOfOrders": 0,
        • "maxNumberOfOrders": 9999,
        • "minDistance": 1.5,
        • "maxDistance": 999.5,
        • "maxRevenue": 999.5
        }
      }
    ],
  • "droppedOrders": [
    • {
      • "location": [
        • 45.652871,
        • 25.585588
        ],
      • "alias": "Ana",
      • "type": 0,
      • "priority": 0,
      • "numberOfPackages": 10,
      • "weight": 5.5,
      • "cube": 5.5,
      • "timeWindow": [
        • 750,
        • 1020
        ],
      • "serviceTime": 400,
      • "revenue": 5.5,
      • "customData": "\"middle name, Maria; age,23\" or \"middle name,ana; age,18\" or \"this customer is a regular\"\n"
      }
    ]
}

Receives a list of coordinates and a vehicle type, then optimizes them by creating a route for the given coordinates.

Authorizations:
ApiKey
Request Body schema: application/json
required

Returns the list of coordinate's indexes in an optimized visit order.

vehicleType
integer
Enum: 0 1 2 3 4

Vehicle type:

  • 0 - Car
  • 1 - Pedestrian
  • 2 - E-bike
  • 3 - Truck
  • 4 - Bike
locations
Array of numbers (Location) [ items <double >[ items <double > ] ]

A minimum of 3 locations is needed.

Responses

Response Schema: application/json
locationIndexes
Array of integers <int32> [ items <int32 > ]

The visit order of the locations

droppedIndexes
Array of integers <int32> [ items <int32 > ]

The index of the locations that cannot be visited

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Incorrect method type

Response Schema: application/json
result
string

Database action failed

Request samples

Content type
application/json
{
  • "vehicleType": 0,
  • "locations": [
    • [
      • 45.652871,
      • 25.585588
      ]
    ]
}

Response samples

Content type
application/json
{
  • "locationIndexes": [
    • 0
    ],
  • "droppedIndexes": [
    • 0
    ]
}

clean

Operation on cleanup of data from the database

Clears all objects in the database for a user

Clears all objects in the database for a user

Authorizations:
ApiKey

Responses

Response Schema: application/json
result
string

Operation done successfully

Response Schema: application/json
result
string

Message explaining the error code

Response Schema: application/json
result
string

Unauthorized! Missing api key

Response Schema: application/json
result
string

Message explaining the error code

Response samples

Content type
application/json
{
  • "result": "Operation done successfully."
}