---
title: "Mapbox-compatible Optimization v1 (see module docs). Billed as the optimise units plus one route unit."
method: GET
path: "/optimized-trips/v1/{user}/{profile}/{coordinates}"
tags: ["mapbox-compat"]
---

# Mapbox-compatible Optimization v1 (see module docs). Billed as the optimise units plus one route unit.

`GET /optimized-trips/v1/{user}/{profile}/{coordinates}`

## Request

- Base URL: `https://api.mapmap.ai`
- URL: `https://api.mapmap.ai/optimized-trips/v1/{user}/{profile}/{coordinates}`
- Auth: one of:
  - HTTP bearer
  - API key in query parameter `api_key`

A one-vehicle optimisation of 2 to 12 stops, then the route of the ordered trip. Billed as the optimise units plus the route units: 11 units for a trip of up to 12 coordinates (10 for the solve, 1 for the route); when the order is forced no solve runs and only the route is billed.

## Path parameters

- `user` string, required
- `profile` string, required
- `coordinates` string, required

## Query parameters

- `access_token` string
- `roundtrip` boolean
- `source` string
- `destination` string
- `steps` boolean
- `geometries` string
- `overview` string
- `annotations` string

## Response `200`

`{code, waypoints: [{waypoint_index, trips_index, location, name}], trips: [<route>]}`. `NotImplemented` (an unsupported roundtrip/source/destination combination, not billed), `NoTrips` and `NoRoute` also answer 200 with that code

- object

## Other responses

- `400`: `{code, message}` for a malformed or unsupported option, not billed
- `401`: Missing or invalid key
- `404`: `ProfileNotFound`
- `429`: Quota or rate limit exceeded
- `503`: Optimisation is not enabled on this deployment

---

[API](https://skmtc.dev/mapmap/apis/sn-gateway.md) · [All operations](https://skmtc.dev/mapmap/apis/sn-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/mapmap/apis/sn-gateway/revisions/2293be8b4c38?raw)
