POST api/roomsByHotels

Returns a list of rooms by hotel from mongodb

Request Information

URI Parameters

None.

Body Parameters

The hotel ids.

Collection of integer

Request Formats

application/json, text/json

Sample:
[
  1,
  2
]

text/html

Sample:
[1,2]

application/xml, text/xml

Sample:
<ArrayOfint xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
  <int>1</int>
  <int>2</int>
</ArrayOfint>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

A Room collection.

Collection of Cyberlogic.eTourism.Domain.ViewModels.Hotels.Rooms.RoomsByHotelViewModel
NameDescriptionTypeAdditional information
HotelId

integer

None.

Rooms

Collection of Cyberlogic.eTourism.Domain.ViewModels.Hotels.Rooms.RoomViewModel

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "HotelId": 1,
    "Rooms": [
      {
        "Id": 1,
        "Name": "sample string 2",
        "MinCapacity": 3,
        "MaxCapacity": 4,
        "Facilities": [
          {
            "Id": 1,
            "Name": "sample string 2",
            "Charged": true
          },
          {
            "Id": 1,
            "Name": "sample string 2",
            "Charged": true
          }
        ]
      },
      {
        "Id": 1,
        "Name": "sample string 2",
        "MinCapacity": 3,
        "MaxCapacity": 4,
        "Facilities": [
          {
            "Id": 1,
            "Name": "sample string 2",
            "Charged": true
          },
          {
            "Id": 1,
            "Name": "sample string 2",
            "Charged": true
          }
        ]
      }
    ]
  },
  {
    "HotelId": 1,
    "Rooms": [
      {
        "Id": 1,
        "Name": "sample string 2",
        "MinCapacity": 3,
        "MaxCapacity": 4,
        "Facilities": [
          {
            "Id": 1,
            "Name": "sample string 2",
            "Charged": true
          },
          {
            "Id": 1,
            "Name": "sample string 2",
            "Charged": true
          }
        ]
      },
      {
        "Id": 1,
        "Name": "sample string 2",
        "MinCapacity": 3,
        "MaxCapacity": 4,
        "Facilities": [
          {
            "Id": 1,
            "Name": "sample string 2",
            "Charged": true
          },
          {
            "Id": 1,
            "Name": "sample string 2",
            "Charged": true
          }
        ]
      }
    ]
  }
]

text/html

Sample:
[{"HotelId":1,"Rooms":[{"Id":1,"Name":"sample string 2","MinCapacity":3,"MaxCapacity":4,"Facilities":[{"Id":1,"Name":"sample string 2","Charged":true},{"Id":1,"Name":"sample string 2","Charged":true}]},{"Id":1,"Name":"sample string 2","MinCapacity":3,"MaxCapacity":4,"Facilities":[{"Id":1,"Name":"sample string 2","Charged":true},{"Id":1,"Name":"sample string 2","Charged":true}]}]},{"HotelId":1,"Rooms":[{"Id":1,"Name":"sample string 2","MinCapacity":3,"MaxCapacity":4,"Facilities":[{"Id":1,"Name":"sample string 2","Charged":true},{"Id":1,"Name":"sample string 2","Charged":true}]},{"Id":1,"Name":"sample string 2","MinCapacity":3,"MaxCapacity":4,"Facilities":[{"Id":1,"Name":"sample string 2","Charged":true},{"Id":1,"Name":"sample string 2","Charged":true}]}]}]

application/xml, text/xml

Sample:
<ArrayOfRoomsByHotelViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Cyberlogic.eTourism.Domain.ViewModels.Hotels.Rooms">
  <RoomsByHotelViewModel>
    <HotelId>1</HotelId>
    <Rooms>
      <RoomViewModel>
        <Facilities>
          <RoomFacilityViewModel>
            <Charged>true</Charged>
            <Id>1</Id>
            <Name>sample string 2</Name>
          </RoomFacilityViewModel>
          <RoomFacilityViewModel>
            <Charged>true</Charged>
            <Id>1</Id>
            <Name>sample string 2</Name>
          </RoomFacilityViewModel>
        </Facilities>
        <Id>1</Id>
        <MaxCapacity>4</MaxCapacity>
        <MinCapacity>3</MinCapacity>
        <Name>sample string 2</Name>
      </RoomViewModel>
      <RoomViewModel>
        <Facilities>
          <RoomFacilityViewModel>
            <Charged>true</Charged>
            <Id>1</Id>
            <Name>sample string 2</Name>
          </RoomFacilityViewModel>
          <RoomFacilityViewModel>
            <Charged>true</Charged>
            <Id>1</Id>
            <Name>sample string 2</Name>
          </RoomFacilityViewModel>
        </Facilities>
        <Id>1</Id>
        <MaxCapacity>4</MaxCapacity>
        <MinCapacity>3</MinCapacity>
        <Name>sample string 2</Name>
      </RoomViewModel>
    </Rooms>
  </RoomsByHotelViewModel>
  <RoomsByHotelViewModel>
    <HotelId>1</HotelId>
    <Rooms>
      <RoomViewModel>
        <Facilities>
          <RoomFacilityViewModel>
            <Charged>true</Charged>
            <Id>1</Id>
            <Name>sample string 2</Name>
          </RoomFacilityViewModel>
          <RoomFacilityViewModel>
            <Charged>true</Charged>
            <Id>1</Id>
            <Name>sample string 2</Name>
          </RoomFacilityViewModel>
        </Facilities>
        <Id>1</Id>
        <MaxCapacity>4</MaxCapacity>
        <MinCapacity>3</MinCapacity>
        <Name>sample string 2</Name>
      </RoomViewModel>
      <RoomViewModel>
        <Facilities>
          <RoomFacilityViewModel>
            <Charged>true</Charged>
            <Id>1</Id>
            <Name>sample string 2</Name>
          </RoomFacilityViewModel>
          <RoomFacilityViewModel>
            <Charged>true</Charged>
            <Id>1</Id>
            <Name>sample string 2</Name>
          </RoomFacilityViewModel>
        </Facilities>
        <Id>1</Id>
        <MaxCapacity>4</MaxCapacity>
        <MinCapacity>3</MinCapacity>
        <Name>sample string 2</Name>
      </RoomViewModel>
    </Rooms>
  </RoomsByHotelViewModel>
</ArrayOfRoomsByHotelViewModel>