/v1/bookings/{reservationId} (PATCH)
PATCH
/v1/bookings/{reservationId}
const url = 'http://localhost:8787/v1/bookings/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"state":"checked_in"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url http://localhost:8787/v1/bookings/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "state": "checked_in" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”reservationId
required
string format: uuid
Request Body
Section titled “Request Body”Media typeapplication/json
object
state
required
string
Responses
Section titled “Responses”The booking after the requested transition.
Media typeapplication/json
object
createdAt
required
string
currency
required
string
endsAt
required
string
guestEmail
required
string | null
holdExpiresAt
required
string | null
id
required
string format: uuid
occupancyAdults
required
integer | null
occupancyChildren
required
integer
quantity
required
integer
ratePlanId
required
string | null format: uuid
resourceId
required
string format: uuid
roomTypeId
required
string | null format: uuid
source
required
string
startsAt
required
string
state
required
string
totalMinorUnits
required
string
updatedAt
required
string
Example
{ "state": "pending"}No such booking for this tenant.
Media typeapplication/problem+json
object
code
required
string
detail
required
string
status
required
number
title
required
string
type
required
string
Example
{ "code": "booking_not_found"}The requested state is not a legal transition from the booking’s current state.
Media typeapplication/problem+json
object
code
required
string
detail
required
string
status
required
number
title
required
string
type
required
string
Example
{ "code": "booking_not_found"}