---
title: "Route Path"
method: GET
path: "/api/v1/routes/path"
tags: ["grandline"]
---

# Route Path

`GET /api/v1/routes/path`

## Request

- Base URL: `https://grandline.luzomi.com`
- URL: `https://grandline.luzomi.com/api/v1/routes/path`
- Auth: none declared

A plottable, **land-avoiding** sea track between two ports as a GeoJSON
LineString — for drawing on a map.

This is computed geometrically (shortest path over an ocean grid that the
track may never leave), NOT from the AIS lane data. The empirical *distance*
still comes from `/routes/compare`; this endpoint only supplies illustrative
geometry. Forcing `via` a choke makes the drawn line agree with the
empirical route's canal transit.

## Query parameters

- `origin` union, required: Origin port ID (int) or name (str)
  - string
  - integer
- `destination` union, required: Destination port ID (int) or name (str)
  - string
  - integer
- `via` string, nullable: Optional choke to force the track through, matching a canal_transits[].name from /routes/compare (e.g. 'Suez Canal'). Keeps the drawn track faithful to the empirical routing decision.

## Response `200`

Successful Response

- RoutePathResponse
  - `origin_port_id` integer, required
  - `destination_port_id` integer, required
  - `origin_port_name` string, required
  - `destination_port_name` string, required
  - `geojson` object, nullable
  - `point_count` integer
  - `via` string, nullable
  - `note` string
  - `approach_origin` object, nullable
  - `approach_dest` object, nullable
  - `origin_approach_kind` string, nullable
  - `dest_approach_kind` string, nullable
  - `origin_inland` boolean
  - `dest_inland` boolean

## Other responses

- `400`: Validation error with extra context
- `404`: Resource not found
- `422`: Validation Error
- `429`: Rate-limit exceeded — see X-RateLimit-* headers

---

[API](https://skmtc.dev/luzomi/apis/grandline-api.md) · [All operations](https://skmtc.dev/luzomi/apis/grandline-api/llms.txt) · [OpenAPI document](https://skmtc.dev/luzomi/apis/grandline-api/revisions/4ce06aea012b?raw)
