Skip to content
ajar.Book a demo

Connection

The GB read-only pilot is available with a provisioned connector API credential. Guest search needs no Booking.com login; trip history requires email sign-in.

POST an empty body to /v1/connections/booking/guest with Authorization: Bearer YOUR_API_KEY. Save the returned access_token on your device and send x-booking-token for the three guest search operations.

Call booking.place.predict and use an items[].place_ref in booking.hotel.search with future checkin and checkout dates. Choose filter_id values from the returned filter catalog. Use that response’s search_ref and an items[].property_ref in booking.hotel.get.

To view trips, POST {"email":"you@example.com"} to /v1/connections/booking/sign-in with your ajar Authorization bearer. Booking.com emails a one-time code. POST the returned continuation_ref and that code to /v1/connections/booking/verify. Keep the returned account access and refresh tokens on your device.

Send the account access_token as x-booking-token to booking.reservation.list with {"stage":"active"} or {"stage":"past"}. Explicitly POST the refresh_token to /v1/connections/booking/account-refresh when renewal is needed; replace your saved tokens with the response.

POST to the guest endpoint again after expiry, then predict and search again with the new token. Discard tokens locally to sign out. Earlier copies remain valid for that caller until expiry; ajar cannot recover a lost token.

Place and search references last 15 minutes and belong to the same caller and guest session token. The pilot returns the initial search page; hotel room availability uses the original dates, currency and guests. ajar saves no provider session credentials. Booking, payments, cancellations, details and messages are not available through this pilot.

Authentication guide