/v1/bookings (GET)
GET
/v1/bookings
const url = 'http://localhost:8787/v1/bookings?state=pending';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://localhost:8787/v1/bookings?state=pending' \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”state
string
from
string format: date-time
to
string format: date-time
resourceId
string format: uuid
cursor
string
limit
integer
Responses
Section titled “Responses”The tenant’s bookings, newest-first (created_at desc, id desc), cursor-paginated, including PII (guestEmail) — sk_ only.
Media typeapplication/json
object
data
required
Array<object>
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
nextCursor
required
string | null
Example
{ "data": [ { "state": "pending" } ]}The cursor query param is malformed, tampered, or foreign to 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"}Unreachable in practice (requireApiKey/requirePrincipal always run first) — declared only for the defensive !principal fallback’s type, same shape as the sibling routes below.
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"}