List the bookings of the Connection Scope
/api/v1/bookingsbookings.readBookings of the Properties in the Connection Scope, cancelled ones included, ordered by id and paged with next_cursor. A page never repeats nor skips a booking, even while bookings change.
Without more Permissions a booking carries no guest name, email or phone and no amount: guests.read adds the guest block, prices.read adds the amounts block.
Incremental sync: read every page, keep next_updated_since, and pass it as updated_since next time. A change to a booking, its status, its amounts or its guest details brings it back. Poll without from/to, or a booking whose dates leave the range is never reported. A booking removed from ZenHost (for instance when a Sales Channel is disconnected from a Property, or a Property is deleted) is not reported, and sends no App Event: list the stay range again to reconcile. The booking.created, booking.updated and booking.cancelled App Events announce a change to what this endpoint returns, only to the connections that see it (a guest change needs guests.read, an amount change prices.read). A booking that arrives already cancelled sends only booking.created.
Parameters
Query parameters
property_id[]string (uuid)[]Only these Properties (repeat the parameter, at most 100). Each must be in the Connection Scope. Leave it out to list the whole Connection Scope, page by page.
at most 100 items
fromstring (date)Only stays with a night on or after this day (
departure_date>from).tostring (date)Only stays with a night on or before this day (
arrival_date<=to).updated_sincestring (date-time)Only bookings created or changed at or after this instant, cancellations included. Use
next_updated_sinceof your previous listing.cursorstringnext_cursorof the previous page.limitintegerPage size.
min 1 · max 500 · default 100
Responses
200One page of bookings.
application/jsonBookingList
dataBooking[]requiredShow 12 child attributesHide child attributes
idstring (uuid)requiredproperty_idstring (uuid)requiredstatusstringrequiredA cancelled booking stays listed with this status. Version 1 may add values.
One of:
confirmedcancelledarrival_datestring (date)requiredFirst night,
YYYY-MM-DDin the property time zone.departure_datestring (date)requiredCheck-out day (not a night),
YYYY-MM-DD.sales_channelobjectrequiredWhere the booking was made.
Show 2 child attributesHide child attributes
codestringrequireddirect(entered by the host),website(direct website),other, or the Sales Channel shortcode (e.g.ABBfor Airbnb,BDCfor Booking.com).namestringrequired
channel_referencestring | nullrequiredConfirmation code of the booking on its Sales Channel.
occupancyobjectrequiredShow 3 child attributesHide child attributes
adultsinteger | nullrequiredchildreninteger | nullrequiredinfantsinteger | nullrequired
created_atstring (date-time)requiredupdated_atstring (date-time)requiredLast change of the booking, its status, amounts or guest details.
guestBookingGuest | nullShow 4 child attributesHide child attributes
first_namestring | nullrequiredlast_namestring | nullrequiredemailstring | nullrequiredphonestring | nullrequired
amountsBookingAmountsBooking amounts. Present only with the
prices.readPermission.Show 4 child attributesHide child attributes
currencystringrequiredISO 4217 code of the amounts below.
totalnumber | nullrequiredTotal paid by the guest, in decimal units of
currency.commissionnumberrequiredCommission kept by the Sales Channel (0 when none is known).
netnumber | nullrequiredtotalminuscommission: the host payout.
next_cursorstring | nullrequiredPass it as
cursor, with the same filters, to read the next page;nullon the last page.next_updated_sincestring (date-time)requiredOnce the last page is read, pass it as
updated_sinceto receive every booking changed since this listing began. Some bookings may come again: upsert them byid.
401Error code: unauthorized, connection_revoked.
Error codes
unauthorizedThe access token is missing, unknown, expired or revoked, or was issued before the account connected the App again. Refresh it; if refreshing fails, ask the owner to connect again.connection_revokedThe owner revoked the App Connection (or your App revoked its own refresh token). Stop calling for this account and drop its tokens.
402Error code: subscription_blocked.
Error codes
subscription_blockedThe ZenHost subscription of the account is blocked (unpaid, cancelled…). The connection is kept: tell your customer, calls work again once the subscription is restored.
403Error code: app_suspended, forbidden_permission.
Error codes
app_suspendedZenHost suspended your App, or no longer allows it on this account. Stop calling and contact ZenHost.forbidden_permissionYour App was not granted the Permission this endpoint requires.
422Error code: property_out_of_scope, validation_failed.
Error codes
property_out_of_scopeA requested Property is outside the Connection Scope;details.property_idslists them.validation_failedThe query, headers or body are invalid;details.issuespoints at each problem (path,message, andmaximumwhen a value or list is too big).
429Error code: rate_limited.
Header Retry-After — Seconds to wait before the next call is allowed. Limits per App Connection: 60 reads (GET), 10 writes (other POST) and 30 messages sent to guests per minute.
Error codes
rate_limitedToo many calls on this App Connection. Wait for the number of seconds inRetry-After.
500Error code: internal_error.
Error codes
internal_errorZenHost failed to answer. Retry later with a back-off.