This endpoint is used to retrieve the detailed information of the room. By default, it returns much more information compared to listing rooms endpoint. You can optionally specify includes to retrieve more information about the room such as address, photos, amenities, pricing terms, etc.
| Method | URI | Headers |
|---|---|---|
| GET | /api/rooms/{room} | Authorization: Bearer <token> Accept: application/json Accept-Language: <language> Time-Zone: <timezone> |
| Param | Description | Type | Required | Notes |
|---|---|---|---|---|
| detailed | Get more detailed attributes of the room. | - | No | This query string parameter has no value |
| include | The comma-separated list of related attributes. | String | No | detailed query string must be enabled first in order for this parameter to work properly. |
None
| Param | Description | Type | Required |
|---|---|---|---|
| {room} | The ID of a given room. | Integer | Yes |
There are several methods you can use to fetch information of a given room. Each method returns a different type of response, we're going to call them as default version, detailed version and full version. Each version has a lot more information compared to preceding ones.
Example request
curl \
--request GET \
--url https://api.luxstay.com/api/rooms/10000 \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
Example response
{
"data": {
"id": 10000,
"host": 10001,
"name": "Apartment 1",
"num_bedrooms": 3,
"num_bathrooms": 4,
"num_beds": 4,
"standard_guests": 5,
"maximum_guests": 10,
"booking_type": "instant_book",
"status": "Listed",
"submit_status": "Accept",
"cancellation_policy": "Flexible",
"bedType": {
"data": {
"id": 4,
"name": "Couch"
}
},
"roomType": {
"data": {
"id": 21,
"name": "Test",
"description": "Test"
}
},
"propertyType": {
"data": {
"id": 28,
"name": "Studio",
"description": ""
}
}
}
}
detailed query string parameter with no specified value. This adds some additional attributes
to the room response such as the introduction to the room, its unique features and utilities, apartment rules and manual, notes for guests,
check-in guides, host experiences, etc.Example request
curl \
--request GET \
--url https://api.luxstay.com/api/rooms/10000?detailed \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
Example response
{
"data": {
"id": 10000,
"host_id": 10130,
"name": "Apartment 1",
"summary": "<content>",
"introduction": "<content>",
"unique_features": "<content>",
"utilities": "<content>",
"host_experiences": "<content>",
"special_note": "<content>",
"apartment_rules": "<content>",
"apartment_manual": "<content>",
"direction_manual": "<content>",
"checkin_guide": "<content>",
"num_bedrooms": 5,
"num_bathrooms": 4,
"num_beds": 8,
"area": "120",
"maximum_guests": 15,
"booking_type": "instant_book",
"calendar_type": null,
"status": "Listed",
"submit_status": "Accept",
"cancellation_policy": "Flexible",
"url": "https://www.luxstay.com/rooms/10000",
"last_action": "2018-10-27T02:30:17+00:00"
}
}
When fetching the detailed version of a room, you may optionally provide includes that allow the request to fetch more information about entities (relations) related to the room.
There are a lot of include types, you can specify one of them or combine multiple includes together using commas. include query string
parameter is used to perform that. Note that include must be used with detailed query string parameters in order to this fetching process
works properly.
Below is the list of all currently supported includes
bedTyperoomTypepropertyTypepriceaddresshostphotosbookingStatsamenitiesTo get the full version of a room, you may construct your request as follow:
curl \
--request GET \
--url https://api.luxstay.com/api/rooms/10000?detailed&include=bedType,roomType,propertyType,price,address,host,photos,bookingStats,amenities \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
curl \
--request GET \
--url https://api.luxstay.com/api/rooms/10000?detailed&include=photos,amenities \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
Example response
{
"data": {
"id": 10000,
"host_id": 10130,
"name": "Apartment 1",
"summary": "<content>",
"introduction": "<content>",
"unique_features": "<content>",
"utilities": "<content>",
"host_experiences": "<content>",
"special_note": "<content>",
"apartment_rules": "<content>",
"apartment_manual": "<content>",
"direction_manual": "<content>",
"checkin_guide": "<content>",
"num_bedrooms": 5,
"num_bathrooms": 4,
"num_beds": 8,
"area": "120",
"maximum_guests": 15,
"booking_type": "instant_book",
"calendar_type": null,
"status": "Listed",
"submit_status": "Accept",
"cancellation_policy": "Flexible",
"url": "https://www.luxstay.com/rooms/10000",
"last_action": "2018-10-27T03:55:14+07:00",
"bedType": {
...
},
"roomType": {
...
},
"propertyType": {
...
},
"price": {
...
},
"address": {
...
},
"host": {
...
},
"photos": {
...
},
"bookingStats": {
...
},
"amenities": {
...
}
}
}
curl \
--request GET \
--url https://api.luxstay.com/api/rooms/10000?detailed&include=bedType \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
"bedType": {
"data": {
"id": 4,
"name": "Couch"
}
}
curl \
--request GET \
--url https://api.luxstay.com/api/rooms/10000?detailed&include=roomType \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
"roomType": {
"data": {
"id": 21,
"name": "Entire home/apt",
"description": "Entire home/apt"
}
}
curl \
--request GET \
--url https://api.luxstay.com/api/rooms/10000?detailed&include=propertyType \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
"propertyType": {
"data": {
"id": 28,
"name": "Apartment",
"description": "Apartment"
}
}
curl \
--request GET \
--url https://api.luxstay.com/api/rooms/10000?detailed&include=price \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
"price": {
"data": {
"room_id": 10000,
"nightly_price": 650000,
"monthly_price": 550000,
"weekend_price": 650000,
"cleaning_fee": 250000,
"security_fee": 150000,
"additional_guests_fee": 200000,
"currency_code": "VND",
"standard_guests": 5,
"cancellation_policy": "Flexible",
"booking_type": "instant_book",
"checkin_time": "2:0 PM",
"checkout_time": "12:00 PM",
"minimum_stay": "5",
"maximum_stay": "12"
}
}
curl \
--request GET \
--url https://api.luxstay.com/api/rooms/10000?detailed&include=address \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
"address": {
"data": {
"address_line_1": "Tay Ho, Hanoi, Vietnam.",
"address_line_2": "82-84 Xóm Chùa, Quảng An, Tây Hồ, Hà Nội.",
"city": "Tây Hồ",
"state": "Hà Nội",
"country": "Vietnam",
"latitude": "44.968046",
"longitude": "-94.420307",
"full_address": "82-84 Xóm Chùa, Quảng An, Tây Hồ, Hà Nội., Tay Ho, Hanoi, Vietnam."
}
}
curl \
--request GET \
--url https://api.luxstay.com/api/rooms/10000?detailed&include=host \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
"host": {
"data": {
"first_name": "Vu",
"last_name": "Nguyen",
"gender": "Male",
"email": "example@gmail.com",
"phone": "+8483555555"
}
}
curl \
--request GET \
--url https://api.luxstay.com/api/rooms/10000?detailed&include=photos \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
"photos": {
"data": {
"thumbnail": "/rooms/10000/thumbnail/1.jpg?w=250&fit=crop&v=",
"original": "/rooms/10000/large/1.jpg",
"count": 10,
"slides": 5
}
}
curl \
--request GET \
--url https://api.luxstay.com/api/rooms/10000?detailed&include=bookingStats \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
"bookingStats": {
"data": {
"requested": 4,
"pending": 8,
"completed": 12
}
}
curl \
--request GET \
--url https://api.luxstay.com/api/rooms/10000?detailed&include=amenities \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
"amenities": {
"data": [
{
"id": 159,
"name": "Luggage dropoff allowed",
"description": "",
"status": "Active",
"type": {
"data": {
"id": 11,
"name": "Other",
"description": "",
"status": "Active"
}
}
},
{
"id": 160,
"name": "Long term stays allowed",
"description": "",
"status": "Active",
"type": {
"data": {
"id": 11,
"name": "Other",
"description": "",
"status": "Active"
}
}
}
]
}
Reason invalid access token
Example response
{
"message": "Unauthenticated."
}
403Reason unauthorized to access room
Example response
{
"message": "You are not allowed to access or change information associated with this room."
}
404Reason cannot find the given room
Example response
{
"message": "Cannot find the given room"
}