Detailed Information

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.

Endpoint

Method URI Headers
GET /api/rooms/{room} Authorization: Bearer <token>
Accept: application/json
Accept-Language: <language>
Time-Zone: <timezone>

URL Params

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.

Data Params

None
1

Route Params

Param Description Type Required
{room} The ID of a given room. Integer Yes

Request & Response Examples

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.

Successful Response

200

  • If no query string parameter is used, this endpoint will return the default version of the room including information about the general structure of the room, its statuses, policies, etc.

Example request

curl \
  --request GET \
  --url https://api.luxstay.com/api/rooms/10000 \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <token>'
1
2
3
4
5

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": ""
            }
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
  • To get more details about the room, you can use 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>'
1
2
3
4
5

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"
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
  • 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

    • bedType
    • roomType
    • propertyType
    • price
    • address
    • host
    • photos
    • bookingStats
    • amenities
  • To 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>'
1
2
3
4
5
  • To fetch only amenities and photos associated with the room:
curl \
  --request GET \
  --url https://api.luxstay.com/api/rooms/10000?detailed&include=photos,amenities \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <token>'
1
2
3
4
5
  • The full version of the room has the structure as follow:

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": {
            ...
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
  • The response when using includes is same as the detailed version plus some extra entities. We will demonstrate the portion of each entity below:

bedType

curl \
  --request GET \
  --url https://api.luxstay.com/api/rooms/10000?detailed&include=bedType \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <token>'
1
2
3
4
5
"bedType": {
    "data": {
        "id": 4,
        "name": "Couch"
    }
}
1
2
3
4
5
6

roomType

curl \
  --request GET \
  --url https://api.luxstay.com/api/rooms/10000?detailed&include=roomType \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <token>'
1
2
3
4
5
"roomType": {
    "data": {
        "id": 21,
        "name": "Entire home/apt",
        "description": "Entire home/apt"
    }
}
1
2
3
4
5
6
7

propertyType

curl \
  --request GET \
  --url https://api.luxstay.com/api/rooms/10000?detailed&include=propertyType \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <token>'
1
2
3
4
5
"propertyType": {
    "data": {
        "id": 28,
        "name": "Apartment",
        "description": "Apartment"
    }
}
1
2
3
4
5
6
7

price

curl \
  --request GET \
  --url https://api.luxstay.com/api/rooms/10000?detailed&include=price \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <token>'
1
2
3
4
5
"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"
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

address

curl \
  --request GET \
  --url https://api.luxstay.com/api/rooms/10000?detailed&include=address \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <token>'
1
2
3
4
5
"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."
    }
}
1
2
3
4
5
6
7
8
9
10
11
12

host

curl \
  --request GET \
  --url https://api.luxstay.com/api/rooms/10000?detailed&include=host \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <token>'
1
2
3
4
5
"host": {
    "data": {
        "first_name": "Vu",
        "last_name": "Nguyen",
        "gender": "Male",
        "email": "example@gmail.com",
        "phone": "+8483555555"
    }
}
1
2
3
4
5
6
7
8
9

photos

curl \
  --request GET \
  --url https://api.luxstay.com/api/rooms/10000?detailed&include=photos \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <token>'
1
2
3
4
5
"photos": {
    "data": {
        "thumbnail": "/rooms/10000/thumbnail/1.jpg?w=250&fit=crop&v=",
        "original": "/rooms/10000/large/1.jpg",
        "count": 10,
        "slides": 5
    }
}
1
2
3
4
5
6
7
8

bookingStats

curl \
  --request GET \
  --url https://api.luxstay.com/api/rooms/10000?detailed&include=bookingStats \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <token>'
1
2
3
4
5
"bookingStats": {
    "data": {
        "requested": 4,
        "pending": 8,
        "completed": 12
    }
}
1
2
3
4
5
6
7

amenities

curl \
  --request GET \
  --url https://api.luxstay.com/api/rooms/10000?detailed&include=amenities \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <token>'
1
2
3
4
5
"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"
                }
            }
        }
    ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

Error Response

401

Reason invalid access token

Example response

{
    "message": "Unauthenticated."
}
1
2
3

Code 403

Reason unauthorized to access room

Example response

{
    "message": "You are not allowed to access or change information associated with this room."
}
1
2
3

Code 404

Reason cannot find the given room

Example response

{
    "message": "Cannot find the given room"
}
1
2
3
Last Updated: 11/18/2018, 9:11:26 AM