Retrieves a list of rooms based on the specified query parameters.

GET /api/Rooms

The retrieval of rooms can be customized by providing various query parameters. These parameters include sorting options, page number, page size, and a search term.

Sample request:

GET /rooms?sortOrder=asc&sortColumn=price&pageNumber=1&pageSize=10&searchQuery=Ritz

Query parameters

  • PageNumber integer(int32)
  • PageSize integer(int32)
  • SearchTerm string

    search by:

  • SortColumn string

    sort by:

  • SortOrder string

    asc or desc

Responses

  • Returns the list of rooms based on the query parameters.

    Hide response attributes Show response attributes object
    • id string(uuid)
    • creationDate string(date-time)
    • lastModified string(date-time)
    • roomNumber integer(int32)
    • roomType string

      Values are Standard, Luxury, Budget, or Boutique.

    • adultsCapacity integer(int32)
    • childrenCapacity integer(int32)
    • hotelName string | null
    • Additional properties are NOT allowed
    Hide response attributes Show response attributes object
    • id string(uuid)
    • creationDate string(date-time)
    • lastModified string(date-time)
    • roomNumber integer(int32)
    • roomType string

      Values are Standard, Luxury, Budget, or Boutique.

    • adultsCapacity integer(int32)
    • childrenCapacity integer(int32)
    • hotelName string | null
    • Additional properties are NOT allowed
    Hide response attributes Show response attributes object
    • id string(uuid)
    • creationDate string(date-time)
    • lastModified string(date-time)
    • roomNumber integer(int32)
    • roomType string

      Values are Standard, Luxury, Budget, or Boutique.

    • adultsCapacity integer(int32)
    • childrenCapacity integer(int32)
    • hotelName string | null
    • Additional properties are NOT allowed
  • 400

    If the request parameters are invalid or missing.

GET /api/Rooms
curl \
 -X GET http://api.example.com/api/Rooms \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
[
  {
    "id": "string",
    "creationDate": "2024-05-04T09:42:00+00:00",
    "lastModified": "2024-05-04T09:42:00+00:00",
    "roomNumber": 42,
    "roomType": "Standard",
    "adultsCapacity": 42,
    "childrenCapacity": 42,
    "hotelName": "string"
  }
]
Response examples (200)
[
  {
    "id": "string",
    "creationDate": "2025-05-04T09:42:00Z",
    "lastModified": "2025-05-04T09:42:00Z",
    "roomNumber": 42,
    "roomType": "Standard",
    "adultsCapacity": 42,
    "childrenCapacity": 42,
    "hotelName": "string"
  }
]