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

# POST /v1/direction/location

`POST /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

- `option` 'flexible', required

## Headers

- `X-Request-Id` string

## Request body

- object

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