> ## Documentation Index
> Fetch the complete documentation index at: https://developer.findity.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get route directions

> Returns turn-by-turn directions and total distance for a route between the supplied waypoints. Used to compute mileage expense distances.



## OpenAPI

````yaml /openapi/findity-expense-api.json post /route/directions
openapi: 3.0.3
info:
  title: Findity Expense API
  description: Findity Expense API
  version: 1.0.0
servers:
  - url: https://stage-api.findity.com/api/v1/expense
  - url: https://api.findity.com/api/v1/expense
security:
  - bearerAuth: []
paths:
  /route/directions:
    post:
      tags:
        - Route
      summary: Get route directions
      description: >-
        Returns turn-by-turn directions and total distance for a route between
        the supplied waypoints. Used to compute mileage expense distances.
      operationId: getRouteDirections
      parameters:
        - name: size
          in: query
          description: >-
            the max dimensions of the generated map, defaults to 480x480, with
            max of 640x640 and min 180x180
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DirectionsRequest'
            example:
              - place: Ludvika, Sverige
              - place: Östersund, Sverige
              - place: Sundsvall, Sverige
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectionsResponse'
              example:
                route:
                  - latitude: '60.1523510'
                    longitude: '15.1919879'
                    place: Ludvika, Sverige
                  - latitude: '63.1766616'
                    longitude: '14.6354230'
                    place: Östersund, Sverige
                  - latitude: '62.3904389'
                    longitude: '17.3067039'
                    place: Sundsvall, Sverige
                url: >-
                  https://expense.findity.com/api/resources/09ce03ef8f18417ea8ccc3839a3af4c4
                distance: 616
        '400':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400Error'
              examples:
                too few places:
                  value:
                    result: error
                    code: TOO_FEW_ROUTE_PLACES
                    description: Too few places, at least 2 places required
components:
  schemas:
    DirectionsRequest:
      type: array
      items:
        type: object
        properties:
          place:
            type: string
    DirectionsResponse:
      type: object
      properties:
        route:
          type: array
          items:
            $ref: '#/components/schemas/PlaceWithCoords'
        url:
          type: string
          example: >-
            https://expense.findity.com/api/resources/745c2c0f7d274b94b188dd5b158cb630
          description: Url to the map image
        distance:
          type: number
          format: integer
          example: 616
    400Error:
      type: object
      properties:
        result:
          type: string
        code:
          type: string
        description:
          type: string
    PlaceWithCoords:
      type: object
      properties:
        place:
          type: string
          example: Ludvika, Sverige
        latitude:
          type: string
          example: '60.1523510'
        longitude:
          type: string
          example: '15.1919879'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````