---
title: "Re-derive a trip's places"
method: POST
path: "/api/trips/{id}/places/derive"
tags: ["Places"]
---

# Re-derive a trip's places

`POST /api/trips/{id}/places/derive`

## Request

- Base URL: `https://trvlrr.app`
- URL: `https://trvlrr.app/api/trips/{id}/places/derive`
- Auth: HTTP bearer

Places are derived from where the trip went: stay cities, ground-leg endpoints, flight arrivals that are not layovers, activity cities. Idempotent — only new places are added.

## Path parameters

- `id` string, required: The trip id.

## Response `200`

What was added.

- TripPlacesDerived
  - `trip_id` string, required
  - `added_count` integer, required
  - `added` DerivedPlace[], required
    - `id` string, required
    - `name` string, required
    - `country` string, nullable, required
    - `locality` string, nullable, required
    - `locality_country` string, nullable, required
    - `kind` 'destination' | 'layover' | 'origin', required
    - `position` integer, required

## Other responses

- `401`: No usable credential: a Clerk session token, a device token or an OAuth access token is required.
- `403`: The caller may not do this to this account or trip.
- `404`: No such thing, or not one the caller can see.

---

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