> ## 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.

# Quickstart

> Configure the sandbox and make your first Unifystays hotel search request.

This guide takes you from portal setup to your first hotel search. After this, continue through the booking flow guides.

## 1. Configure the Sandbox

Sign in at [unifystays.com](https://unifystays.com), select the **Sandbox** environment, then:

1. Add the credentials for a hotel supplier.
2. Enable the supplier.
3. Create a sandbox API key.

Supplier credentials and API keys are managed directly in the portal.

## 2. Set Your API Key

```bash theme={null}
export UNIFYSTAYS_API_KEY="your_sandbox_api_key"
export UNIFYSTAYS_BASE_URL="https://api-sandbox.unifystays.com"
```

Use the production base URL and a production API key only when you are ready to send live traffic.

## 3. Find a Destination

```bash theme={null}
curl "$UNIFYSTAYS_BASE_URL/destinations/autocomplete?q=dubai&types=place,city,hotel&limit=5" \
  -H "x-api-key: $UNIFYSTAYS_API_KEY" \
  -H "language: en"
```

Use the returned `type` and matching ID in the search request: `city_id` for a city, `hotel_id` for a hotel, or `place_id` for a place. See [Destination Autocomplete](/api-reference/destination-autocomplete) for complete fields, response details, and caching guidance.

## 4. Search Hotels

```bash theme={null}
curl "$UNIFYSTAYS_BASE_URL/hotels/search" \
  -X POST \
  -H "content-type: application/json" \
  -H "x-api-key: $UNIFYSTAYS_API_KEY" \
  -H "language: en" \
  -d '{
    "destination": {
      "type": "city",
      "id": 101
    },
    "check_in": "2026-09-12",
    "check_out": "2026-09-15",
    "nationality": "IN",
    "rooms": [
      {
        "adults": 2,
        "child_ages": []
      }
    ],
    "limit": 20,
    "pricing_mode": "instant",
    "sort": "recommended"
  }'
```

The response includes hotel results and a `search_id`. When `pricing_mode` is `instant`, poll for live supplier prices.

```bash theme={null}
curl "$UNIFYSTAYS_BASE_URL/hotels/search/srch_a1b2c3d4e5f6g7h8/prices" \
  -H "x-api-key: $UNIFYSTAYS_API_KEY" \
  -H "language: en"
```

Merge `data.updated_prices` into your visible hotel list by `hotel_id`.

## 5. Continue to Rooms

Pick a hotel from the search response and request room options:

```bash theme={null}
curl "$UNIFYSTAYS_BASE_URL/hotels/123456/rooms" \
  -X POST \
  -H "content-type: application/json" \
  -H "x-api-key: $UNIFYSTAYS_API_KEY" \
  -H "language: en" \
  -d '{
    "check_in": "2026-09-12",
    "check_out": "2026-09-15",
    "nationality": "IN",
    "rooms": [
      {
        "adults": 2,
        "child_ages": []
      }
    ]
  }'
```

Each bookable room option includes a `booking_token`. Use that token in the prebook step.

Continue with the [Hotel Booking Flow](/guides/hotel-booking-flow) or open any
endpoint in the [API Reference](/api-reference/overview).
