---
title: "Set Item Booked"
method: POST
path: "/trips/{trip_id}/itinerary/mark-booked"
tags: ["itinerary"]
---

# Set Item Booked

`POST /trips/{trip_id}/itinerary/mark-booked`

Set an itinerary item's booked state — the single "mark booked" write path.

Works for any item type (flight, hotel, activity, car rental). Addressing:
- ``item_id``: flip ``is_booked`` on an item already in the itinerary.
- ``(tool_call_id, result_index)``: a search-result / imported card. If it
  isn't in the itinerary yet it's added first (via ``target``), then marked
  — this is the hotel-confirm flow, now generalized.

Invariant guard: un-booking (``is_booked=False``) is only allowed for
search results (source "api"); it is rejected (400) for user_import and
user_manual items — imported and hand-entered bookings stay booked.

## Path parameters

- `trip_id` string, required

## Headers

- `x-client-id` string, nullable

## Request body

- MarkBookedRequest — Request model for setting an item's booked state. Two addressing modes: - ``item_id``: flip ``is_booked`` on an item already in the itinerary (any type). - ``(tool_call_id, result_index)``: a search-result / imported card. If it isn't in the itinerary yet it's added first (needs ``conversation_id``; ``target`` defaults to ``"stay"`` for the legacy hotel-confirm caller), then marked. ``is_booked`` defaults to True — the common "mark booked" case. Un-booking (``is_booked=False``) is only allowed for search results (source "api"); it is rejected (400) for user_import and user_manual items — imported and hand-entered bookings stay booked.
  - `item_id` string, nullable
  - `tool_call_id` string, nullable
  - `result_index` integer, nullable
  - `target` 'journey' | 'stay' | 'activity' | 'car_rental'
  - `is_booked` boolean
  - `conversation_id` string, nullable

## Response `200`

Successful Response

- MarkBookedResponse — Response model for setting an item's booked state.
  - `itinerary` object, required
  - `item_id` string, required
  - `added` boolean, required

## 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.dev/stardrift/apis/fastapi/revisions/5acadde833b2?raw)
