GET api/Hotels?locationID={locationID}
Retrieves Hotels based on the provided Location ID.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
locationID |
The ID of the Location to filter the Locations. |
integer |
Required |
Body Parameters
None.
Response Information
Resource Description
A list of Hotels matching the provided Location ID.
Collection of HotelName | Description | Type | Additional information |
---|---|---|---|
hotelID |
The unique identifier of the hotel. |
integer |
None. |
hotelName |
The name of the hotel. |
string |
None. |
locationID |
The location identifier of the hotel. |
integer |
None. |
cost |
The cost of the hotel. |
decimal number |
None. |
roomDetails |
The details of the hotel rooms. |
string |
None. |
aboutHotel |
Information about the hotel. |
string |
None. |
imageURL |
The URL of the hotel image. |
string |
None. |
Response Formats
application/json, text/json
Sample:
[ { "hotelID": 1, "hotelName": "sample string 2", "locationID": 3, "cost": 4.0, "roomDetails": "sample string 5", "aboutHotel": "sample string 6", "imageURL": "sample string 7" }, { "hotelID": 1, "hotelName": "sample string 2", "locationID": 3, "cost": 4.0, "roomDetails": "sample string 5", "aboutHotel": "sample string 6", "imageURL": "sample string 7" } ]
application/xml, text/xml
Sample:
<ArrayOfHotel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OTJServices.Models"> <Hotel> <aboutHotel>sample string 6</aboutHotel> <cost>4</cost> <hotelID>1</hotelID> <hotelName>sample string 2</hotelName> <imageURL>sample string 7</imageURL> <locationID>3</locationID> <roomDetails>sample string 5</roomDetails> </Hotel> <Hotel> <aboutHotel>sample string 6</aboutHotel> <cost>4</cost> <hotelID>1</hotelID> <hotelName>sample string 2</hotelName> <imageURL>sample string 7</imageURL> <locationID>3</locationID> <roomDetails>sample string 5</roomDetails> </Hotel> </ArrayOfHotel>