Associate an existing booking with the trip, or atomically move it from its current trip. This endpoint does not create a booking; it only links an already-persisted booking row (created via POST /v1/{vertical}/bookings or reconciliation) to the trip via trip_segment_bookings.
Move semantics (MER-765): if the booking is already linked to a different trip, it is atomically detached and re-attached within a single DB transaction; empty segments on the old trip are removed.
Idempotent on retry: a re-attach of a booking that is already linked to this trip succeeds and returns the existing stage — no duplicate rows are created.
Stub reconciler note (MER-449 → MER-451): every booking currently lands in its own freshly-created stage; role is derived from the vertical alone. Once MER-451 ships, multiple bookings sharing a destination + date window will collapse into a single stage and round-trip flights will pick up a paired egress role.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
404Trip or booking not found
422Booking vertical not supported, or destination city could not be extracted from booking detail.
503Database unavailable