Booking writes

Create, change and cancel FleetBold rental bookings with `bookings:write`.

Draft

With bookings:write your app creates, changes and cancels rental bookings the same way the FleetBold app does: the guest and host flows run and deposit holds are released on cancel. Every write answers 202 with a command resource (kind booking_create, booking_update or booking_cancel), polled with GET /v1/commands/{command_id} like vehicle commands.

  • POST /v1/bookings (Idempotency-Key required): vehicle, starts_at / ends_at with a timezone, status draft or booked, guest, provider, amounts.
  • PATCH /v1/bookings/{booking_id}: dates, guest, amounts or status. Only the user who created the booking can change it (403 booking_not_modifiable).
  • POST /v1/bookings/{booking_id}/cancel (Idempotency-Key required).
  • In an organization context the member also needs FleetBold's bookings.manage permission.
  • Overlapping bookings of the same vehicle are refused with 409 booking_overlap unless you send allow_overlap: true. The check is best effort (no lock).
  • Guest data, amounts and cancel reasons are never part of the command resource: read the booking with GET /v1/bookings/{booking_id}.

A failed update or cancel with outcome unknown (for example booking_partially_applied) may have changed the booking already: read the booking before retrying.