@otaip/adapter-hotelbeds
v0.6.4
Published
OTAIP distribution adapter for the Hotelbeds APItude (Hotels) bedbank API
Downloads
104
Readme
@otaip/adapter-hotelbeds
OTAIP distribution adapter for the Hotelbeds APItude bedbank (Hotels API).
Part of OTAIP — the Open Travel AI Platform.
Installation
pnpm add @otaip/adapter-hotelbedsQuick Demo
See it work end-to-end in ~10 seconds against the real Hotelbeds sandbox:
HOTELBEDS_API_KEY=xxx HOTELBEDS_SECRET=yyy npx tsx demo/index.tsSearches Orlando hotels → books the cheapest room → confirms → cancels. Full lifecycle, sandbox cleaned up at the end. See demo/README.md.
Scope
This package wraps the Hotelbeds Hotels API (/hotel-api/1.0):
availability— search bookable ratescheckRate— re-verify aRECHECKrate before bookingbook— confirm a bookinggetBooking/listBookings— retrieve booked reservationscancelBooking— simulate or execute a cancellation
The Transfers and Activities APIs are explicitly not in scope here — they are tracked as a follow-up so this adapter stays focused on the bedbank content path that unblocks the lodging pipeline.
Configuration
Either pass credentials to the constructor or set environment variables:
| Env var | Description |
| ------------------- | --------------------------------- |
| HOTELBEDS_API_KEY | Hotelbeds APItude API key |
| HOTELBEDS_SECRET | Hotelbeds APItude shared secret |
| HOTELBEDS_ENV | test (default) or production |
The Hotelbeds test environment is rate-limited to 50 requests/day. The adapter does not enforce this client-side; callers are expected to throttle.
Authentication
Every request carries:
Api-key: <apiKey>
X-Signature: SHA256(apiKey + secret + floor(Date.now() / 1000)).hexThe signature is regenerated per request because it embeds the current Unix timestamp.
License
Apache-2.0
