ChatBedsDevelopers
API reference

API reference

The ChatBeds partner API, version 1. Twenty operations that let your app read a hotel's rooms and prices, book stays, and work with the guest's bill.

The partner API lets an app or a partner act for one hotel property: read its rooms, rates and policies, search what can be booked, create and change reservations, and post charges and payments to the guest's folio. Bookings made through it are priced, checked and alerted exactly like bookings made at the front desk.

Base URL

Base URL
https://api.chatbeds.app/partner/v1

Every path in this reference is relative to that address. All requests and responses are JSON over HTTPS.

Authentication

Send a credential in the Authorization header on every request.

CredentialLooks likeWhere it comes fromHeader
Partner keycbk_...Made by the hotel on Settings, Partner API, or the key of your sandboxAuthorization: Bearer cbk_•••• or X-Api-Key: cbk_••••
App access tokencbat_...The OAuth flow when a hotel connects your app (1 hour; refresh it)Authorization: Bearer cbat_••••
Every request
curl https://api.chatbeds.app/partner/v1/me \
  -H "Authorization: Bearer cbk_••••"

See Authentication for how to get each one, and OAuth for the app flow.

One property per credential

A key or token belongs to exactly one property. Anything outside it (another property's ID, a reservation or payment of another hotel) answers 404, never 403, so you cannot learn that it exists. Within its property a credential sees every booking, whoever made it: the front desk, WhatsApp, or another partner.

An app token can only do what the hotel allowed when it connected the app: each operation checks one scope, and a missing scope answers 403. Keys made by hand on Settings, Partner API have every scope.

Operations

The operation names are stable identifiers; GET /capabilities lists them.

OperationMethodPathScope
identity.probeGET/menone
property.listGET/propertiesproperty:read
capability.describeGET/capabilitiesnone
roomType.listGET/properties/{property_id}/room-typesrooms:read
ratePlan.listGET/properties/{property_id}/rate-plansrooms:read
unit.listGET/properties/{property_id}/unitsrooms:read
extra.listGET/properties/{property_id}/extrasrooms:read
policy.getGET/properties/{property_id}/policiesproperty:read
offer.searchGET/properties/{property_id}/offersavailability:read
reservation.createPOST/properties/{property_id}/reservationsreservations:write
reservation.getGET/reservations/{reservation_id}reservations:read
reservation.searchGET/properties/{property_id}/reservationsreservations:read
reservation.modifyPATCH/reservations/{reservation_id}reservations:write
reservation.cancelPOST/reservations/{reservation_id}/cancelreservations:write
reservation.addExtraPOST/reservations/{reservation_id}/extrasreservations:write
folio.getGET/reservations/{reservation_id}/foliofolios:read
folio.addChargePOST/reservations/{reservation_id}/folio/chargesfolios:write
folio.addPaymentPOST/reservations/{reservation_id}/folio/paymentsfolios:write
payment.createLinkPOST/reservations/{reservation_id}/payment-linkpayments:write
payment.getStatusGET/payments/{payment_id}folios:read

Conventions

WhatFormat
IDsUUIDs, for example 19306340-c7cf-465a-93d3-0b7873a7e85d
DatesThe hotel's local dates, YYYY-MM-DD. arrival is the first night, departure the day the guest leaves
TimesISO 8601 with an offset
MoneyA number in the property's currency, to two places (180.0). The currency is on every priced object
Reservation statusconfirmed, checked_in, checked_out, cancelled, no_show

More on dates, money and headers in Conventions.

Writes and retries

Every POST and PATCH accepts an Idempotency-Key header (1 to 255 characters). The first answer to a key is kept for 24 hours; sending the same request again with the same key returns that answer, with Idempotent-Replayed: true, and changes nothing. Send one on every write, and always on reservation.create. See Idempotency.

Errors

Errors are JSON with a detail field: a sentence for most errors, a list of field problems for 422.

404 Not Found
{
  "detail": "Reservation not found"
}

These can come from any operation:

StatusWhen
401No credential, or one that is wrong, revoked or expired
403The app token lacks the operation's scope, or the hotel's ChatBeds account is not active
404Not found, or not this credential's property
422A field is missing or of the wrong shape (also: an Idempotency-Key reused for a different request)
429More than 120 calls a minute for this credential. Wait for Retry-After seconds
503The partner API is paused for this hotel. Retry after Retry-After seconds

Each operation below lists the errors specific to it. The full list is in Errors; limits are in Rate limits.

In this section

Building something?

On this page