# @revolugo/booking-api-client

> Javascript Revolugo Booking API Client (browser + server)

Latest version **7.25.0** (published 2026-09-16) · 0 weekly downloads

## Install

```sh
npm install @revolugo/booking-api-client
pnpm add @revolugo/booking-api-client
yarn add @revolugo/booking-api-client
bun add @revolugo/booking-api-client
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 7.25.0 |
| Published | 2026-09-16 |
| First published | 2022-04-27 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=26.8.2 <27 |
| Dependencies | 1 |
| Unpacked size | 786.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Revolugo |
| Maintainers | davidrevolugo, julientechdev |
| Keywords | API, Client, Javascript, Revolugo |

## Links

- npm: https://www.npmjs.com/package/@revolugo/booking-api-client
- npm.io page: https://npm.io/package/@revolugo/booking-api-client

## Dependencies (1)

- [cross-fetch](https://npm.io/package/cross-fetch.md) 4.1.0

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 7.25.0 (latest) — 2026-09-16
- 7.25.0-alpha.28 (alpha) — 2026-09-21
- 7.26.0-rc.0 (rc) — 2026-09-21
- 6.15.0-beta.7 (beta) — 2025-12-23
- 7.25.0-alpha.27 — 2026-09-21
- 7.25.0-alpha.26 — 2026-09-21
- 7.25.0-alpha.25 — 2026-09-21
- 7.25.0-alpha.24 — 2026-09-21
- 7.25.0-alpha.23 — 2026-09-21
- 7.25.0-alpha.22 — 2026-09-21
- 7.25.0-alpha.21 — 2026-09-21
- 7.25.0-alpha.20 — 2026-09-21
- 7.25.0-alpha.19 — 2026-09-21
- 7.25.0-alpha.18 — 2026-09-21
- 7.25.0-alpha.17 — 2026-09-21
- … 5308 more at https://npm.io/package/@revolugo/booking-api-client/versions

## README

# Revolugo Booking API Client

The Revolugo Booking API Client provides convenient access to the Revolugo Booking API from
applications written in server-side JavaScript or for browser based applications. This client exposes Typescript types.

See the [Revolugo Booking API documentation](https://booking-api.revolugo.com/v1/documentation).

````

## Getting Started

### Import & Configure

```js
import { ApiClient, CountryIso2Code } from '@revolugo/booking-api-client'

const revolugoApiClient = new ApiClient({
  apiEnvironment: Revolugo.Environment.Production,
  apiKey: '<public-or-private-api-key-here>',
  apiVersion: 'v1',
})
````

#### Configuration

| Option | Default | Description |
| ---------------- | -------- | ------------------------------------------------------------ | -------------------- | -------- | -------- | ---------------------------------------------- |
| `apiEnvironment` | Required | Target environment for the client (Environment.Production \ | Environment.Sandbox) | `apiKey` | Required | Public or Private Api Key provided by Revolugo |
| `apiVersion` | Required | Api version |

## Usage

See the [Revolugo Booking API documentation](https://booking-api.revolugo.com/v1/documentation) for details about request/reponse data.

```js
const hotelOfferRequest = await revolugoApiClient.hotelOfferRequests.create({
  adult_count: 5,
  check_in_date: '2021-05-30',
  check_out_date: '2021-06-02',
  children: '2,8',
  latitude: 45.76405021831942,
  longitude: 4.835700988769532,
  room_count: 3,
  source_market: CountryIso2Code.FR,
})
```

### Polling

Some endpoints require polling to get the complete result. Polling is already handled by the library:

```js
revolugoApiClient.hotelOffers.list(
  {
    currency: HotelOffersCurrencyEnum.Eur,
    hotelOfferRequestId: 'xxxx-xxxx-xxxx-xxxx-xxxx',
  },
  (err, result) => {
    if (err) {
      console.log('Error while Polling')
      handleError(err)
      return
    }

    if (result.meta.status === 'in-progress') {
      console.log('Still Polling')

      doSomething(result)
    } else {
      console.log('Done Polling')

      doSomethingElse(result)
    }
  },
)
```

---
_Source: https://npm.io/package/@revolugo/booking-api-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
