> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unifystays.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Integrate once with a unified hotel API, then enable and manage suppliers from the Unifystays portal.

Unifystays is a single, unified API for all your hotel suppliers. Your application integrates with one consistent API while Unifystays handles supplier connections, static hotel content, mappings, and normalized responses behind the scenes.

Once your Unifystays integration is live, adding another supported supplier is a portal configuration change, not a new integration project.

<Info>
  Enabling another supplier does not require new supplier API code, static
  inventory tables, synchronization jobs, or mapping logic in your system.
</Info>

## Why Unifystays

A direct supplier integration usually requires much more than connecting to a booking endpoint. For every supplier, your team must:

* Import and store the supplier's static hotel inventory in your own database.
* Build scheduled jobs to keep hotel content and mappings up to date.
* Map supplier-specific hotel, room, rate, meal plan, and destination data to your own model.
* Build and maintain separate search, availability, prebook, booking, and cancellation integrations.
* Update your system whenever a supplier changes its API or data format.

The same work starts again when you add another supplier, often turning supplier onboarding into a project that takes weeks or months.

Unifystays replaces those separate integrations with one stable contract:

| Direct supplier integrations                             | Unifystays                                                                        |
| -------------------------------------------------------- | --------------------------------------------------------------------------------- |
| Build and maintain an API integration for each supplier. | Integrate with one API and one normalized data model.                             |
| Store each supplier's static hotel inventory.            | Access unified hotel content without maintaining supplier inventory tables.       |
| Run jobs to refresh supplier content.                    | Unifystays manages supplier content synchronization.                              |
| Build and maintain supplier mappings.                    | Unifystays handles supplier-specific mappings and normalization.                  |
| Update your integration when a supplier changes its API. | Unifystays absorbs supplier-specific changes behind the same stable API contract. |
| Change your application to add a supplier.               | Enable the supplier and add its credentials in the portal.                        |

## How It Works

<Steps>
  <Step title="Sign in to the portal">
    Go to [unifystays.com](https://unifystays.com) and sign in to your
    Unifystays account.
  </Step>

  <Step title="Choose an environment">
    Use **Sandbox** while building and testing. Switch to **Production** when
    you are ready for live traffic.
  </Step>

  <Step title="Configure your suppliers">
    Select a supported supplier, enter the credentials issued by that supplier,
    and enable it for the selected environment.
  </Step>

  <Step title="Create an API key">
    Create and manage your own API key in the portal for the selected
    environment. You do not need to request a key from support.
  </Step>

  <Step title="Integrate once">
    Connect your backend to the Unifystays API using the environment's base URL
    and send the API key in the `x-api-key` header.
  </Step>

  <Step title="Enable more suppliers">
    Add another supported supplier from the portal whenever you need it. Your
    API endpoints and integration flow remain the same.
  </Step>
</Steps>

## Environments

Unifystays provides separate environments for testing and live bookings.

| Environment | Base URL                             | Use it for                                                      |
| ----------- | ------------------------------------ | --------------------------------------------------------------- |
| Sandbox     | `https://api-sandbox.unifystays.com` | Development, integration testing, and validation before launch. |
| Production  | `https://api.unifystays.com`         | Live searches, rates, bookings, and cancellations.              |

<Warning>
  Create and use the API key for the same environment as the base URL. Keep
  sandbox and production keys separate, and never expose either key in browser
  or mobile application code.
</Warning>

## What Your Integration Covers

The unified API provides a consistent workflow across your enabled suppliers:

* Destination and hotel discovery.
* Normalized hotel content without supplier-specific static inventory storage.
* Hotel search and live supplier pricing.
* Room availability and bookable room options.
* Prebooking to verify availability and price.
* Idempotent booking to protect against duplicate reservations.
* Booking retrieval, status tracking, and cancellation.

## Booking Flow

<Steps>
  <Step title="Resolve the destination">
    Use [Destination Autocomplete](/api-reference/destination-autocomplete) to
    get a city, hotel, or place identifier.
  </Step>

  <Step title="Search hotels">
    Use [Search Hotels](/api-reference/search-hotels) with the destination, stay
    dates, rooms, and guest nationality.
  </Step>

  <Step title="Fetch rooms">
    Use [Get Room Options](/api-reference/hotel-rooms) to get live room options
    and a `booking_token`.
  </Step>

  <Step title="Prebook">
    Use [Prebook a Room](/api-reference/prebook) with the `booking_token` to
    confirm price and availability.
  </Step>

  <Step title="Book">
    Use [Create Booking](/api-reference/create-booking) with an
    `Idempotency-Key` and the `unifystays_prebooking_id`.
  </Step>

  <Step title="Track or cancel the booking">
    Retrieve the booking until it reaches its final state, or send a
    cancellation request when required.
  </Step>
</Steps>

## Response Shape

Most successful responses follow this envelope:

```json theme={null}
{
  "success": true,
  "message": "Request completed",
  "data": {}
}
```

Every response includes an `X-Request-Id` header. Include that value when contacting support.

[Make your first sandbox request](/quickstart)
