Skip to main content

POST /logistics/vrp/1.1.0/create

OpenAPI Specification

2GIS Navigation API (6.0.0)

Algorithms

Solving the traveling salesman problem

Calculation of passing all specified points for one or more couriers

query Parameters
key
required
string

Developer API key

Request Body schema: */*
required

Request parameters

required
Array of objects (Agent) [ 1 .. 200 ] items

List of couriers

required
Array of objects (WayPoint) [ 1 .. 4000 ] items

List of points to traverse

start_time
string <date-time>
Default: "2025-08-28T10:09:16.334896"

The start time of the movement in RFC-3339 format. For example: 2016-11-15T15:52:01+04:00;if the string is empty, the current time value is used

travel_time_calculation
string
Default: "from_start_point"
Enum: "from_start_point" "from_each_point"

Method of calculating travel time:

  • from_start_point - consider traffic jams data only for the time of the route start,
  • from_each_point - calculate when a courier starts moving from each point on the route and consider traffic jams data for each courier movement,

RoutingOptions (object) or null
Options (object) or null

Global settings for time windows

Responses

Response Schema: application/json
task_id
required
string
status
required
string (PublicTaskStatus)
Enum: "Run" "Partial" "Fail" "Done" "Not Found"

Task status:

  • Run - the task is processing,
  • Partial - the route was built, but some points were excluded,
  • Fail - an error occurred while building the route,
  • Done - the route was successfully built,
  • Not Found - the task was not found,

PublicResultUrls (object) or null
integer or null

Queue time for reachability matrix calculation (in seconds)

integer or null

Reachability matrix calculation duration (in seconds)

integer or null

Traveling salesman task calculation duration (in seconds)

integer or null

Queue time for traveling salesman task calculation (in seconds)

Response samples

Content type
application/json
{
  • "task_id": "string",
  • "status": "Run",
  • "urls": {
    • "url_vrp_solution": "string",
    • "url_excluded": "string"
    },
  • "dm_queue": 0,
  • "dm": 0,
  • "vrp": 0,
  • "vrp_queue": 0
}