> For the complete documentation index, see [llms.txt](https://syticks.gitbook.io/merpi-by-syticks/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://syticks.gitbook.io/merpi-by-syticks/api-reference/hospitality-ticketing-hotels-resorts-apartments/get-hotel-apartment-resort-rooms.md).

# Get Hotel/Apartment/Resort Rooms

#### GET `/v2/merpi/hotels/:hotel_id/rooms`

Retrieve all available rooms for a specific hotel, including room types, pricing, capacity, and availability status.

## Path Parameters

<table><thead><tr><th width="164.9317626953125">Parameter</th><th>Type</th><th>Required</th><th>Description</th></tr></thead><tbody><tr><td><code>hotel_id</code></td><td>number</td><td>Yes</td><td>The unique identifier of the hotel</td></tr></tbody></table>

### Example Request

```bash
GET {{url}}/v2/merpi/hotels/16/rooms
```

javascript

```javascript
const hotelId = 16;
const response = await fetch(`{{url}}/v2/merpi/hotels/${hotelId}/rooms`, {
  method: 'GET',
  headers: {
    'X-API-KEY': 'your_api_key_here',
    'TransactionMedium': 'Web'
  }
});
const data = await response.json();
```

## Get list of rooms for a single hotel, apartment, or resort

> Retrieve all available rooms for a specific hotel, apartment, or resort. This endpoint returns detailed room information including room name, description, pricing per night with breakdown, maximum occupancy, images, and real-time availability status. This endpoint is strictly for fetching rooms belonging to a single property.<br>

```json
{"openapi":"3.0.3","info":{"title":"Syticks Hospitality API","version":"2.0.0"},"paths":{"/v2/merpi/hotels/{hotel_id}/rooms":{"get":{"summary":"Get list of rooms for a single hotel, apartment, or resort","description":"Retrieve all available rooms for a specific hotel, apartment, or resort. This endpoint returns detailed room information including room name, description, pricing per night with breakdown, maximum occupancy, images, and real-time availability status. This endpoint is strictly for fetching rooms belonging to a single property.\n","operationId":"getRoomsByHotelId","parameters":[{"name":"hotel_id","in":"path","required":true,"schema":{"type":"integer"},"description":"ID of the hotel, apartment, or resort."},{"name":"page","in":"query","required":false,"schema":{"type":"integer"},"description":"Page number for pagination."},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"},"description":"Number of rooms per page."}],"responses":{"200":{"description":"List of rooms for the specified property","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"status":{"type":"integer"},"message":{"type":"string"},"data":{"type":"object","properties":{"hotel":{"type":"object","description":"Summary information for the selected property","properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"rooms":{"type":"array","items":{"$ref":"#/components/schemas/Room"}},"next_page":{"type":"string","nullable":true},"count":{"type":"integer"},"per_page":{"type":"integer"}}}}}}}}}}}},"components":{"schemas":{"Room":{"type":"object","description":"Room belonging to a single hotel, apartment, or resort","properties":{"id":{"type":"integer","description":"Unique identifier for the room"},"hotel_id":{"type":"integer","description":"ID of the hotel, apartment, or resort this room belongs to"},"number_of_rooms":{"type":"string","description":"Number of rooms of this type available in the property"},"room_name":{"type":"string","description":"Name or category of the room (e.g., Basic, Deluxe, Suite)"},"type":{"type":"string","nullable":true,"description":"Room type classification"},"description":{"type":"string","nullable":true,"description":"Detailed description of the room and its amenities"},"max_occupancy":{"type":"integer","description":"Maximum number of guests allowed in the room"},"price":{"type":"number","description":"Total price per night in local currency (NGN).\nThis is what the customer pays. Includes base price, convenience fee, and merchant commission.\n"},"price_breakdown":{"type":"object","description":"Detailed breakdown of the total price showing individual components","properties":{"ticket_price":{"type":"number","description":"Base room price per night set by the hotel/property"},"convenience_fee":{"type":"number","description":"Platform convenience fee"},"merchant_commission":{"type":"number","description":"Merchant earning on the transaction"}},"required":["ticket_price","convenience_fee","merchant_commission"]},"is_available":{"type":"boolean","description":"Indicates if the room is currently available for booking"},"images":{"type":"array","description":"Array of room images","items":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier for the image"},"image_url":{"type":"string","format":"uri","description":"Full URL to the room image"},"alt_text":{"type":"string","description":"Alternative text for the image"}}}},"created_at":{"type":"string","format":"date-time","description":"Timestamp when the room was created"},"updated_at":{"type":"string","format":"date-time","description":"Timestamp when the room was last updated"}},"required":["id","hotel_id","number_of_rooms","room_name","max_occupancy","price","price_breakdown","is_available"]}}}}
```

## Response Fields

#### Hotel Summary

| Field  | Type   | Description      |
| ------ | ------ | ---------------- |
| `id`   | number | Hotel identifier |
| `name` | string | Hotel name       |

#### Room Object

| Field             | Type         | Description                                     |
| ----------------- | ------------ | ----------------------------------------------- |
| `id`              | number       | Unique room identifier (use this for booking)   |
| `hotel_id`        | number       | Parent hotel identifier                         |
| `number_of_rooms` | string       | Number of rooms available of this type          |
| `room_name`       | string       | Room category name (e.g., Basic, Deluxe, Suite) |
| `type`            | string\|null | Additional room type classification             |
| `description`     | string\|null | Detailed room description                       |
| `max_occupancy`   | number       | Maximum number of guests allowed                |
| `price`           | number       | Price per night in Naira                        |
| `is_available`    | boolean      | Current availability status                     |
| `images`          | array        | Room images with URLs                           |
| `created_at`      | string       | Record creation timestamp                       |
| `updated_at`      | string       | Last update timestamp                           |

## Important Notes

**Availability Check:** Always call this endpoint immediately before booking to ensure real-time room availability. The `is_available` field indicates current status.

**Room ID for Booking:** Use the `id` field (not `hotel_id`) when making a booking request.

**Pricing:** The `price` field represents the cost per night. Total booking cost = `price` × number of nights × number of rooms.

**Occupancy:** Check `max_occupancy` to ensure the room can accommodate your guest count.

## Integration Flow

```javascript
// 1. User selects a hotel from the list
const hotels = await getHotels();
const selectedHotelId = hotels.data.hotels[0].id;

// 2. Fetch available rooms for selected hotel
const rooms = await fetch(`/v2/merpi/hotels/${selectedHotelId}/rooms`);
const roomData = await rooms.json();

// 3. Display rooms to user with pricing
roomData.data.rooms.forEach(room => {
  console.log(`${room.room_name}: ₦${room.price}/night`);
  console.log(`Available: ${room.is_available}`);
  console.log(`Max guests: ${room.max_occupancy}`);
});

// 4. User selects room and proceeds to booking
const selectedRoomId = roomData.data.rooms[0].id;
// Proceed to book using this room_id
```

## Next Steps

After retrieving room information:

1. Display available rooms with pricing to your users
2. Allow users to select room type and quantity
3. Proceed to [Book Hotel Room](/merpi-by-syticks/api-reference/hospitality-ticketing-hotels-resorts-apartments/book-hotel-apartment-room-tickets.md) to complete the reservation


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://syticks.gitbook.io/merpi-by-syticks/api-reference/hospitality-ticketing-hotels-resorts-apartments/get-hotel-apartment-resort-rooms.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
