---
title: "GET /v1/direction/location"
method: GET
path: "/v1/direction/location"
tags: ["Route Api"]
---

# GET /v1/direction/location

`GET /v1/direction/location`

## Request

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

The Route Flexible API provides customizable routing with features like truck routing, time-based paths, and traffic-aware routes. It supports both GET and POST methods, with differences in waypoint limits.

## Query parameters

- `coordOrder` 'LatLon' | 'LonLat'
- `originAddress` string
- `originCountry` string
- `destinationAddress` string
- `destinationCountry` string
- `origin` string
- `destination` string
- `waypoints` string
- `mode` 'car' | 'truck'
- `geometry` 'polyline' | 'polyline6' | 'geojson'
- `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'
- `altcount` integer
- `alternatives` boolean
- `road_info` 'max_speed' | 'toll_distance' | 'toll_cost'
- `cross_border` boolean
- `truck_axle_load` number
- `hazmat_type` 'explosives' | 'gas' | 'flammable_liquid' | 'flammable_gas' | 'organic' | 'toxic' | 'radioactive' | 'corrosive' | 'other'
- `turn_angle_range` integer
- `drive_time_limits` string
- `rest_times` string
- `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

- FlexibleDirectionResponseModel
  - `status` string
  - `msg` string
  - `routes` Route[]
    - `geometry` string
    - `distance` number, double
    - `duration` number, double
    - `start_location` Location
      - `latitude` number, double
      - `longitude` number, double
    - `end_location` Location
      - `latitude` number, double
      - `longitude` number, double
    - `geojson` GeoJson
      - `type` string
      - `geometry` Geometry
        - `type` string
        - `coordinates` object
      - `properties` string
    - `legs` Leg[]
      - `distance` ValueWrapper
        - `value` number, double
      - `duration` ValueWrapper
        - `value` number, double
      - `start_location` Location
        - `latitude` number, double
        - `longitude` number, double
      - `end_location` Location
        - `latitude` number, double
        - `longitude` number, double
      - `steps` Step[]
        - `geometry` string
        - `geojson` GeoJson
          - `type` string
          - `geometry` Geometry
            - `type` string
            - `coordinates` object
          - `properties` string
        - `start_location` Location
          - `latitude` number, double
          - `longitude` number, double
        - `end_location` Location
          - `latitude` number, double
          - `longitude` number, double
        - `distance` ValueWrapper
          - `value` number, double
        - `duration` ValueWrapper
          - `value` number, double
      - `post_actions` PostAction[]
        - `action` string
        - `duration` string
      - `warnings` Warning[]
        - `title` string
    - `road_info` RoadInfo
      - `max_speed` MaxSpeed[]
        - `offset` number, double
        - `length` number, double
        - `value` number, double
      - `toll_distance` number, double
      - `toll_cost` TollCost
        - `minimum_toll_cost` number, double
        - `maximum_toll_cost` number, double
        - `currency` string
  - `warning` string[]

## 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)
