> 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/route_google.md).

# Route with Google

Build a driving route with the Google Directions API, and read back Google's own failure codes.

This is [`route/get`](/docs/navixy-api/user-api/resources/tracking/route.md#post-route-get) with the provider pinned to the [Google Directions API](https://developers.google.com/maps/documentation/directions/intro). Use it when the route must come from Google regardless of the account's default provider.

What differs from the generic operation is the failure detail. Google's own status strings arrive in an `errors` array alongside the Navixy platform error code, so a caller can tell a quota problem from an unroutable request.

## API actions

API base path: `/route/google`.

***

## Get route with Google

> Return a route calculated by the Google Directions API. Identical to \`route/get\` with \`provider\_type\` pinned to \`google\`; a \`provider\_type\` sent here is ignored.\
> \
> Google allows at most 8 waypoints besides the origin and destination, or 23 for Maps API for Business customers. Exceeding that is reported as error 218 with \`MAX\_WAYPOINTS\_EXCEEDED\`.\
> \
> 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/google/get":{"post":{"tags":["Routes"],"summary":"Get route with Google","description":"Return a route calculated by the Google Directions API. Identical to `route/get` with `provider_type` pinned to `google`; a `provider_type` sent here is ignored.\n\nGoogle allows at most 8 waypoints besides the origin and destination, or 23 for Maps API for Business customers. Exceeding that is reported as error 218 with `MAX_WAYPOINTS_EXCEEDED`.\n\nRequires the `routing` tariff feature on **every** tracker on the account. Without it the call returns error 236.","operationId":"routeGoogleGet","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}},"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, both 0 for the start point itself.","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 Google service failed. The `errors` array holds one of `OVER_QUERY_LIMIT`, `REQUEST_DENIED` or `UNKNOWN_ERROR`. Error 218: Google rejected the parameters. The `errors` array holds one of `NOT_FOUND`, `ZERO_RESULTS`, `MAX_WAYPOINTS_EXCEEDED` or `INVALID_REQUEST`.","$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. The `errors` array holds one of `OVER_QUERY_LIMIT`, when the service has received too many requests from the application within the allowed time period, `REQUEST_DENIED`, when the service denied the application use of the directions service, or `UNKNOWN_ERROR`, a server error that may succeed on retry.
* 218 - Malformed external service parameters. The `errors` array holds one of `NOT_FOUND`, when at least one of the origin, destination, or waypoint locations could not be geocoded, `ZERO_RESULTS`, when no route could be found, `MAX_WAYPOINTS_EXCEEDED`, when the request carries too many waypoints, at most 8 plus the origin and destination, or 23 for Google Maps API for Business customers, or `INVALID_REQUEST`, for an invalid parameter or parameter value.
* 236 - Feature unavailable due to tariff restrictions, when at least one tracker in the request has no `routing` tariff feature.

An error response looks like this:

```json
{
  "success": false,
  "status": {
    "code": 215,
    "description": "External service error"
  },
  "errors": ["OVER_QUERY_LIMIT"]
}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
