Skip to main content
PATCH
Change the dates of a resource booking
Moves a resource booking of the customer to new dates. Keebai checks the new dates with the same rules as a new booking, without counting the booking itself, and recomputes the price.
  • Stay: send check_in, check_out or both, and optionally the times. A new check_in alone keeps the number of nights; a new check_out alone keeps the check-in.
  • Block: send date, start_time or both. The duration stays the same.
  • Older resource appointment (kind: "appointment"): send date and start_time. It moves through the appointment flow.
The number of guests and the resource cannot be changed here. A cancelled booking is booked again. New dates on a cancelled booking do not reopen it: they create a new booking with the same resource, customer, guests and notes, and the answer carries the new booking’s id. Send an Idempotency-Key so a retry does not book twice.

Endpoint

Required scope

scheduling:appointments:update

Path params

  • id: booking id, or the id of an older resource appointment.

Query params

  • customer_phone: required. The booking must belong to this phone; if it does not, the answer is 404.

Headers

  • Authorization: Bearer kbai_pk_<token>. Required.
  • Content-Type: application/json. Required.
  • Idempotency-Key: optional, recommended. 1 to 128 letters, digits, - or _.

Body

At least one field. Stay:
Block, or older resource appointment:
A body without any of these fields returns 400. party_size, resource_id and any other field are rejected with 400.

Example request

curl

Response

200 OK

The booking with its new dates and price, shaped like an item of the search:

400 Bad Request

The same date codes as creating a booking: STAY_INVALID_RANGE, STAY_MIN_NIGHTS, STAY_MAX_NIGHTS, STAY_CLOSED_DAY, STAY_OUTSIDE_WINDOW, STAY_TOO_SOON, STAY_TOO_FAR, BLOCK_SLOT_INVALID, RESOURCE_BOOKING_UNIT_MISMATCH. Also BAD_REQUEST when the body has no date or time.

404 Not Found

RESOURCE_BOOKING_NOT_FOUND: it does not exist, belongs to another company, or is not the customer’s.

409 Conflict

Other 409 codes:
RESOURCE_BOOKING_LOCKED_BY_PAYMENT means the move would change the price of a booking that is awaiting its payment or already has a sale. A move that keeps the price is always allowed. On RESOURCE_PROFESSIONAL_BUSY, don’t retry that block: check GET resources/availability again for that day and offer another time or day.

503 Service Unavailable

RESOURCE_LOCK_UNAVAILABLE with retryable: true: Keebai couldn’t lock the resource to write the change. The booking stays as it was. Retry after a short pause.

401 Unauthorized · 403 Forbidden

Same semantics as the rest of the public API.

Authorizations

Authorization
string
header
required

Personal Access Token con prefijo kbai_pk_. Generar desde el portal con permiso developer.manage_tokens.

Headers

idempotency-key
string
required
Idempotency-Key
string

Path Parameters

id
string
required

Body

application/json
check_in
string
Example:

"2026-12-03"

check_out
string
Example:

"2026-12-06"

check_in_time
string | null
check_out_time
string | null
date
string
Example:

"2026-12-04"

start_time
string
Example:

"20:00"

Response

200