Skip to main content

POST /async_matrix/create_task/get_dist_matrix

OpenAPI Specification

2GIS Navigation API (6.0.0)

Algorithms

Creating a task to get information about travel distance and time between points

Creating a task to get information about travel distance and time between points

query Parameters
key
required
string

Developer API key

version
required
string
Default: "2.0"

API version

response_format
string
Default: "json"
Enum: "protobuf" "json"

Response format:

Request Body schema: */*
required

Request parameters

required
Array of objects (RequestPoint) non-empty

An array of points.

sources
required
Array of integers non-empty [ items >= 0 ]

Which points from the points array are starting points (array of indexes).

targets
required
Array of integers non-empty [ items >= 0 ]

Which points from the points array are end points (array of indexes).

string or null

Date and time to use instead of the current date and time. Specified in RFC 3339 format (e.g., 2020-05-15T15:52:01Z).

transport
string
Default: "driving"
Enum: "driving" "truck" "bicycle" "scooter" "walking"

Routing type:

  • driving - car route,
  • truck - сargo transport,
  • bicycle - bicycle route,
  • scooter - scooter route,
  • walking - walking route,

type
string
Default: "jam"
Enum: "jam" "statistics" "shortest"

Route type:

  • jam - shortest route in time using current traffic data,
  • statistics - shortest route in time using statistical traffic data,
  • shortest - shortest route in distance,

Array of RequestFilter (strings) or RequestFilter (string) or null
boolean or null

If true, the route may include driving on closed roads.

Array of objects (ExcludeObject)

An array of areas to avoid when building a route. Not more than 25 areas.

TruckParams (object) or null
number or null

Average speed limit, km/h

pass_zone_pass_ids
Array of integers
Default: []

Identifier of a pass for a zone (array of numbers).

boolean or null

If true, altitude information will be included in the response.

Responses

Response Schema: application/json
string or null

Task ID

string or null

Additional information about the task status

TaskStatus (string) or null

Response samples

Content type
application/json
{
  • "task_id": "string",
  • "message": "string",
  • "status": "TASK_CREATED"
}