Skip to main content

POST /carrouting/6.0.0/global

OpenAPI Specification

2GIS Navigation API (6.0.0)

Route by car

Building a route by car and on foot

Building a route of multiple points for different types of transport.

query Parameters
key
required
string

Developer API key

Request Body schema: */*
required

Request parameters

required
Array of objects (RequestPoint)
integer or null <long>

Date and time to use instead of the current date and time. Specified as Unix time.

integer or null
Default: 1

Number of alternative routes to be built in addition to the main route

Locale (string) or null
string or null

Start point name

string or null

End point name

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

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

OutputType (string) or null
Array of objects (ExcludeObject)

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

boolean or null

If true, an indoor route will be included in the result (for pedestrian routes).

boolean or null

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

Array of HardFilter (strings) or HardFilter (string) or null
number or null

Average speed limit, km/h

boolean or null

Enrich the answer with information about edges coloring.

Responses

Response Schema: application/json
type
required
string (ResponseType)
Enum: "result" "error"

Response type:

  • result - Success result,
  • error - Error,

required
object (DirectionsRequestModel)

DirectionsAPI query.

string or null

Error message

required
Array of objects (ResultItem)

Response samples

Content type
application/json
{
  • "type": "result",
  • "query": {
    • "alternative": 0,
    • "exclude": [
      ],
    • "locale": "ru",
    • "need_altitudes": true,
    • "point_a_name": "Source",
    • "point_b_name": "Target",
    • "points": [
      ],
    • "type": "jam"
    },
  • "message": "string",
  • "result": [
    • {
      }
    ]
}