---
title: "GET /v1/matrix/location"
method: GET
path: "/v1/matrix/location"
tags: ["Travel Matrix Api"]
---

# GET /v1/matrix/location

`GET /v1/matrix/location`

## Request

- Base URL: `https://api.cloud.precisely.com`
- URL: `https://api.cloud.precisely.com/v1/matrix/location`
- Auth: one of:
  - HTTP bearer
  - API key in header `Authorization`

The Travel Matrix Flexible API provides ETAs and distances using truck-specific routes, departure times, traffic, and route preferences by setting the option parameter to flexible. It supports both HTTPS GET and POST, with POST allowing larger origin-destination sets.

## Query parameters

- `coordOrder` 'LatLon' | 'LonLat'
- `origins` string, required
- `destinations` string, required
- `mode` 'car' | 'truck'
- `avoid` 'toll' | 'highway' | 'ferry' | 'sharp_turn' | 'uturn' | 'service_road' | 'left_turn' | 'right_turn' | 'bbox' | 'geofence_id' | 'tunnel' | 'none'
- `exclude` 'toll' | 'ferry' | 'highway' | 'service_road' | 'uturn' | 'sharp_turn' | 'left_turn' | 'right_turn' | 'none'
- `approaches` 'unrestricted' | 'curb'
- `departure_time` integer
- `local_departure_time` string
- `truck_size` string
- `truck_weight` integer
- `route_type` 'fastest' | 'shortest'
- `cross_border` boolean
- `truck_axle_load` number
- `hazmat_type` 'explosives' | 'gas' | 'flammable_liquid' | 'flammable_gas' | 'organic' | 'toxic' | 'radioactive' | 'corrosive' | 'other'
- `turn_angle_range` integer
- `route_failed_prompt` boolean
- `bearings` string
- `emission_class` 'euro0' | 'euro1' | 'euro2' | 'euro3' | 'euro4' | 'euro5' | 'euro6' | 'euro7' | 'euro8' | 'euro9'
- `option` 'flexible', required

## Headers

- `X-Request-Id` string

## Response `200`

OK

- FlexibleMatrixResponseModel
  - `status` string
  - `warning` string[]
  - `rows` Row[]
    - `elements` Element[]
      - `duration` Duration
        - `value` integer
      - `distance` Distance
        - `value` integer

## Other responses

- `400`: Invalid request
- `401`: Unauthorized: Invalid token
- `403`: Forbidden
- `429`: Too many requests
- `500`: Internal Server Error
- `503`: Service Unavailable

---

[API](https://skmtc.dev/precisely/apis/routing-apis.md) · [All operations](https://skmtc.dev/precisely/apis/routing-apis/llms.txt) · [OpenAPI document](https://skmtc.dev/precisely/apis/routing-apis/revisions/b0c264d3c699?raw)
