POST /logistics/vrp/1.1.0/create
OpenAPI Specification
2GIS Navigation API (6.0.0)
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: */*
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: "2024-11-20T11:42:08.514983" 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" Clarifying route duration:
|
RoutingOptions (object) or null | |
Options (object) or null TSP/VRP options |
Responses
Response Schema: application/json
task_id required | string |
status required | string (schemas) Enum: "Run" "Partial" "Fail" "Done" "Not Found" Task status:
|
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 Schema: application/json
string or null Error description |
Response Schema: application/json
required | object (schemas) Detailed error description |
http://routing.api.2gis.com/logistics/vrp/1.1.0/create
https://routing.api.2gis.com/logistics/vrp/1.1.0/create
Response samples
- 201
- 400
- 422
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
}