---
title: "Fetch Routes Path"
method: POST
path: "/routes/path"
tags: ["routes"]
---

# Fetch Routes Path

`POST /routes/path`

Fetch and cache route paths from a hotel to a POI, storing in conversation cache.
Returns encoded polylines with travel time and distance metadata.

Direction: hotel → POI (user is staying at hotel, traveling to POI)

Args:
    request: Route path request with conversation ID, tool call ID, result index, origin (hotel), and destination (POI)
    db: Database session
    current_user: Validated user info

Returns:
    RoutesPathResponse with routes for each travel mode

Raises:
    HTTPException: 403 if unauthorized, 404 if not found

## Request body

- RoutesPathRequest
  - `conversation_id` string, required — UUID of the conversation
  - `tool_call_id` string, required — Tool call ID that generated this hotel
  - `result_index` integer, required — Result index of the hotel in the tool result
  - `poi_name` string, nullable — Optional POI name for organizing routes
  - `origin` Coordinate, required — Geographic coordinate with latitude and longitude. Used for locations like hotels, anchor points, and route waypoints.
    - `latitude` number, required — Latitude in decimal degrees
    - `longitude` number, required — Longitude in decimal degrees
  - `destination` Coordinate, required — Geographic coordinate with latitude and longitude. Used for locations like hotels, anchor points, and route waypoints.
    - `latitude` number, required — Latitude in decimal degrees
    - `longitude` number, required — Longitude in decimal degrees

## Response `200`

Successful Response

- RoutesPathResponse
  - `routes` object, required — Map of Google travel mode to route info: {WALK, BICYCLE, DRIVE, TRANSIT}

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/stardrift/apis/fastapi.md) · [All operations](https://skmtc.dev/stardrift/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/stardrift/fastapi/revisions/00746572572a/schema)
