---
title: "A trip's costs, itemised and totalled"
method: GET
path: "/api/trips/{id}/costs"
tags: ["Costs"]
---

# A trip's costs, itemised and totalled

`GET /api/trips/{id}/costs`

## Request

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

Every priced segment, stay, activity and expense, grouped by category and converted into the requested currency with daily rates. Planned and cancelled items are left out.

## Path parameters

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

## Query parameters

- `currency` string: ISO currency to total in (default USD).

## Response `200`

The rollup.

- TripCosts
  - `currency` string, required
  - `total` number, required
  - `unconverted` integer, required
  - `categories` object[], required
    - `label` string, required
    - `total` number, required
    - `items` CostItem[], required
      - `id` string, required
      - `kind` 'segment' | 'stay' | 'activity' | 'expense', required
      - `deletable` boolean, required: true for a lump expense; bookings are edited on their own routes.
      - `title` string, required
      - `date` string, nullable, required
      - `raw` string, required
      - `amount` number, nullable, required: In the requested currency; null when it could not be converted.
      - `payment_status` string, nullable
      - `payment_method` string, nullable
  - `to_pay` object
    - `total` number, required: What is still owed, converted; unconverted items are left out.
    - `cash` number, required: The part of total marked cash.
    - `items` CostItem[], required: Bookings marked due or on_arrival, by date.
      - `id` string, required
      - `kind` 'segment' | 'stay' | 'activity' | 'expense', required
      - `deletable` boolean, required: true for a lump expense; bookings are edited on their own routes.
      - `title` string, required
      - `date` string, nullable, required
      - `raw` string, required
      - `amount` number, nullable, required: In the requested currency; null when it could not be converted.
      - `payment_status` string, nullable
      - `payment_method` string, nullable
  - `budget` object, nullable
    - `raw` string, required
    - `amount` number, nullable, required: In the requested currency; null when it could not be converted.

## 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)
