> For the complete documentation index, see [llms.txt](https://navixy.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://navixy.com/docs/navixy-api/user-api/resources/tracking/route.md).

# Route

Driving routes between points, built by an external routing provider.

A route is a driving path from a start point to an end point, optionally through waypoints, built by an external routing provider rather than by the Navixy platform itself.

`route/get` uses the account's configured default provider when the request omits `provider_type`. The three provider-specific pages, [Route with Google](/docs/navixy-api/user-api/resources/tracking/route/route_google.md), [Route with OSRM](/docs/navixy-api/user-api/resources/tracking/route/route_osrm.md), and [Route with Progorod](/docs/navixy-api/user-api/resources/tracking/route/route_progorod.md), document the same operation with the provider pinned, and each reports that provider's own failures differently.

Routing is a tariff feature. A request naming a tracker whose plan lacks `routing` returns error 236.

## Route point object

## The RoutePoint object

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"components":{"schemas":{"RoutePoint":{"type":"object","description":"A geographic point on a route.","properties":{"lat":{"type":"number","description":"Latitude."},"lng":{"type":"number","description":"Longitude."}},"required":["lat","lng"]}}}}
```

## Key point object

## The RouteKeyPoint object

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"components":{"schemas":{"RouteKeyPoint":{"type":"object","description":"One of the points the caller asked for, located within the returned route.","properties":{"id":{"type":"integer","description":"Index of this point within the route's `list`."},"lat":{"type":"number","description":"Latitude."},"lng":{"type":"number","description":"Longitude."},"distance":{"type":"integer","description":"Length of the route from the start up to this point, in metres. 0 at the start."},"time":{"type":"integer","description":"Duration of the route from the start up to this point, in seconds. 0 at the start."}}}}}}
```

## API actions

API base path: `/route`.

***

## Get route

> Return a driving route from \`start\` to \`end\`, through any \`waypoints\`, using a routing provider.\
> \
> \*\*Omit \`provider\_type\` to use the account's configured default provider.\*\* The three provider-specific paths are the same operation with the provider pinned.\
> \
> Requires the \`routing\` tariff feature on \*\*every\*\* tracker on the account. Without it the call returns error 236.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Routes","description":"Routing between points, using the account's default provider or a named one. All resources under the /route/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Either a user session hash or an API key, with the \"NVX \" prefix, for example \"NVX 22eac1c27af4be7b9d04da2ce1af111b\". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.","name":"Authorization","in":"header"}},"schemas":{"RoutePoint":{"type":"object","description":"A geographic point on a route.","properties":{"lat":{"type":"number","description":"Latitude."},"lng":{"type":"number","description":"Longitude."}},"required":["lat","lng"]},"RouteKeyPoint":{"type":"object","description":"One of the points the caller asked for, located within the returned route.","properties":{"id":{"type":"integer","description":"Index of this point within the route's `list`."},"lat":{"type":"number","description":"Latitude."},"lng":{"type":"number","description":"Longitude."},"distance":{"type":"integer","description":"Length of the route from the start up to this point, in metres. 0 at the start."},"time":{"type":"integer","description":"Duration of the route from the start up to this point, in seconds. 0 at the start."}}}},"responses":{"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/route/get":{"post":{"tags":["Routes"],"summary":"Get route","description":"Return a driving route from `start` to `end`, through any `waypoints`, using a routing provider.\n\n**Omit `provider_type` to use the account's configured default provider.** The three provider-specific paths are the same operation with the provider pinned.\n\nRequires the `routing` tariff feature on **every** tracker on the account. Without it the call returns error 236.","operationId":"routeGet","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"start":{"$ref":"#/components/schemas/RoutePoint"},"end":{"$ref":"#/components/schemas/RoutePoint"},"waypoints":{"type":"array","description":"Optional. Intermediate points, visited in the order given unless the provider reorders them. **At most 98**, since start and end count towards the provider's hundred-point limit.","items":{"$ref":"#/components/schemas/RoutePoint"},"maxItems":98},"point_limit":{"type":"integer","description":"Optional. Simplify the returned route to at most this many points.","minimum":2},"provider_type":{"type":"string","description":"Optional. Routing provider to use. Omit to use the account's configured default.","enum":["progorod","google","osrm","valhalla"]},"minsize":{"type":"number","description":"Optional. Default 5. Smoothing threshold in metres. Setting it below the distance between two neighbouring pixels at the current zoom is not recommended."},"use_traffic":{"type":"boolean","description":"Optional. Default `false`. When `false` the router runs in `optimal` mode ignoring traffic; when `true` it runs in `comfort` mode using it."}},"required":["start","end"]}}}},"responses":{"200":{"description":"The route","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"distance":{"type":"integer","description":"Total length in metres."},"time":{"type":"integer","description":"Total duration in seconds."},"list":{"type":"array","description":"The route as an ordered list of points.","items":{"$ref":"#/components/schemas/RoutePoint"}},"key_points":{"type":"array","description":"The start, each waypoint and the end, in that order, located within `list`. Each entry carries the cumulative `distance` and `time` from the start.","items":{"$ref":"#/components/schemas/RouteKeyPoint"}}}}}}},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"402":{"description":"Error 236: at least one tracker on the account lacks the `routing` tariff feature.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Error 215: the routing provider returned an error. Error 218: the routing provider rejected the parameters, most often because a point could not be matched to a road or no route exists between them. Both carry an `errors` array in the response body describing what the provider said.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 215 - External service error.
* 218 - Malformed external service parameters.
* 236 - Feature unavailable due to tariff restrictions, when at least one tracker in the request has no `routing` tariff feature.

## More in this section

#### Route with Google

| Endpoint                                                                                                        | Method | What it does          |
| --------------------------------------------------------------------------------------------------------------- | ------ | --------------------- |
| [`/route/google/get`](/docs/navixy-api/user-api/resources/tracking/route/route_google.md#post-route-google-get) | POST   | Get route with Google |

#### Route with OSRM

| Endpoint                                                                                                  | Method | What it does        |
| --------------------------------------------------------------------------------------------------------- | ------ | ------------------- |
| [`/route/osrm/get`](/docs/navixy-api/user-api/resources/tracking/route/route_osrm.md#post-route-osrm-get) | POST   | Get route with OSRM |

#### Route with Progorod

| Endpoint                                                                                                              | Method | What it does            |
| --------------------------------------------------------------------------------------------------------------------- | ------ | ----------------------- |
| [`/route/progorod/get`](/docs/navixy-api/user-api/resources/tracking/route/route_progorod.md#post-route-progorod-get) | POST   | Get route with Progorod |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://navixy.com/docs/navixy-api/user-api/resources/tracking/route.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
