Skip to main content

POST /truck/6.0.0/global

OpenAPI Specification

2GIS Navigation API (6.0.0)

Route by truck

Building a route for a truck

Truck Directions API allows you to build a truck route.

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

TruckRequestType (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.

TruckParams (object) or null
Array of integers or null

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

Responses

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

Response type:

  • result - Success result,
  • error - Error,

required
object (DirectionsTruckRequestModel)

Truck DirectionsAPI query.

string or null

Error message

required
Array of objects (TruckResultItem)

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": [
    • {
      }
    ]
}