> For the complete documentation index, see [llms.txt](https://docs.hostelmate.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hostelmate.co/api-documentation/booking-engine.md).

# Booking Engine

Use this endpoint to fetch real-time room availability, nightly pricing, and property details — the building blocks for a custom booking flow on your own website.

### Related API Pages

* [API Authentication](/api-documentation/authentication.md)
* [Booking List](/api-documentation/bookings/list.md)
* [Booking Detail](/api-documentation/bookings/get.md)
* [Booking Create](/api-documentation/bookings/create.md)
* [Booking Update](/api-documentation/bookings/update.md)
* [Booking Logs](/api-documentation/bookings/logs.md)
* [Booking Delete](/api-documentation/bookings/delete.md)
* [Payments](/api-documentation/payments.md)
* [Guest Get](/api-documentation/guests/get.md)
* [Guest Update](/api-documentation/guests/update.md)

#### Endpoint

```http
POST /api/v1/get-new-avilablilty
```

> **Note on the URL**: The endpoint path contains a deliberate typo (`avilablilty` instead of `availability`). This is the actual path — copy it exactly as shown.

#### Example `curl` Request

```bash
curl "https://api.hostelmate.co/api/v1/get-new-avilablilty" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "dates": ["2025-11-05", "2025-11-06"],
    "property": "your-property-uuid"
  }'
```

> This endpoint does not require `X-API-Key` authentication — it is a public endpoint intended for guest-facing booking flows.

#### Request Payload

<table><thead><tr><th width="104.3515625">Field</th><th width="92.70703125">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>dates</code></td><td>array</td><td>Feed us the specific dates you want to check availability for! (Format: YYYY-MM-DD).</td></tr><tr><td><code>property</code></td><td>string</td><td>Simply your unique property ID (UUID).</td></tr></tbody></table>

#### Response

The response includes available rooms with per-date pricing, property details, and an optional price adjustment to apply before displaying prices to guests.

**Response Structure**

```json
{
    "days": [
        {
            "room_id": "265b373a-6248-4424-bf18-dc2bbf63a920",
            "room_name": "Deluxe Mixed Room",
            "room_description": "this is the room description test ",
            "date": [
                {
                    "date": "2025-10-02",
                    "price": 108
                }
            ],
            "image_fullpath": [
                "https://cdn.domain.com/room_image/oyY8W97TnEpRv7XDGCFWpIbFr.jpg",
                "https://cdn.domain.com/room_image/s2N7hsqPWECSTlGdS1JAsgS1B.jpg",
                "https://cdn.domain.com/room_image/D3HkQXEyB0w3n4bOiEVzAiwL8.jpg",
                "https://cdn.domain.com/room_image/MG30KI5I9s6GTSYMkE4C5Z3LN.jpg"
            ]
        }
    ],
    "name": "Alphatel London Bridge",
    "city": "London",
    "country": "United Kingdom",
    "postal_code": "SE1 9SG",
    "payment_gateway": {
        "status": true,
        "currency": "gbp",
        "options": [
            "nomod"
        ]
    },
    "state": "UK",
    "rate": "12",
    "phone": "+00000000000",
    "description": "",
    "googleMapLink": "https://www.google.com/maps?q=PLACEHOLDER",
    "address": "8th Floor, Building, UK",
    "website": "https://domain.com/",
    "main-image": "https://cdn.domain.com/property_image/kF3Ekirdo60z5e3r5HNCgMpBv.jpg",
    "howToReachUsLink": "https://www.google.com/maps?q=PLACEHOLDER",
    "price_adjustment": {
        "type": "increase",
        "percentage": 10
    }
}
```

**Response Fields**

<table><thead><tr><th width="272.6796875">Field</th><th width="100">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>days</code></td><td>array</td><td>Available rooms matching the requested dates. One entry per room.</td></tr><tr><td><code>days[].room_id</code></td><td>string</td><td>Room UUID. Use this as the <code>room</code> field when creating a booking.</td></tr><tr><td><code>days[].room_name</code></td><td>string</td><td>Display name for the room.</td></tr><tr><td><code>days[].room_description</code></td><td>string</td><td>Room description text.</td></tr><tr><td><code>days[].date</code></td><td>array</td><td>Per-date pricing entries for this room.</td></tr><tr><td><code>days[].date[].date</code></td><td>string</td><td>The date in YYYY-MM-DD format.</td></tr><tr><td><code>days[].date[].price</code></td><td>number | false</td><td>Price for this date. <code>false</code> means the room is fully booked for that night.</td></tr><tr><td><code>days[].image_fullpath</code></td><td>array</td><td>Array of image URLs for the room.</td></tr><tr><td><code>name</code></td><td>string</td><td>Property name.</td></tr><tr><td><code>city</code></td><td>string</td><td>City the property is in.</td></tr><tr><td><code>country</code></td><td>string</td><td>Country the property is in.</td></tr><tr><td><code>postal_code</code></td><td>string</td><td>Property postal code.</td></tr><tr><td><code>payment_gateway</code></td><td>object</td><td>Payment gateway configuration for this property.</td></tr><tr><td><code>payment_gateway.status</code></td><td>boolean</td><td><code>true</code> if the payment gateway is active.</td></tr><tr><td><code>payment_gateway.currency</code></td><td>string</td><td>ISO 4217 currency code (e.g., <code>"gbp"</code>).</td></tr><tr><td><code>payment_gateway.options</code></td><td>array</td><td>Supported payment options.</td></tr><tr><td><code>state</code></td><td>string</td><td>State or region the property is in.</td></tr><tr><td><code>rate</code></td><td>string</td><td>Property rating.</td></tr><tr><td><code>phone</code></td><td>string</td><td>Property phone number.</td></tr><tr><td><code>description</code></td><td>string</td><td>Property description text.</td></tr><tr><td><code>googleMapLink</code></td><td>string</td><td>Google Maps URL for the property location.</td></tr><tr><td><code>address</code></td><td>string</td><td>Full property address.</td></tr><tr><td><code>website</code></td><td>string</td><td>Your beautifully built property website URL.</td></tr><tr><td><code>main-image</code></td><td>string</td><td>URL of the property's main cover image.</td></tr><tr><td><code>howToReachUsLink</code></td><td>string</td><td>URL with directions to the property (typically a Google Maps link).</td></tr><tr><td><code>price_adjustment</code></td><td>object | null</td><td>The net price adjustment configured by the property for their booking engine. <code>null</code> when no adjustment is set or when rules cancel each other out (net = 0%). When present, apply this to each room's per-date price before displaying it to guests.</td></tr><tr><td><code>price_adjustment.type</code></td><td>string</td><td><code>"increase"</code> or <code>"decrease"</code> — the direction of the net adjustment.</td></tr><tr><td><code>price_adjustment.percentage</code></td><td>number</td><td>The absolute net percentage to apply. For example, <code>10</code> means ±10% depending on <code>type</code>.</td></tr></tbody></table>
