This endpoint is used to retrieve the description of a given room. The response includes the name, URL and address of the room.
Method | URI | Headers |
---|---|---|
GET | /api/rooms/{room}/description | Authorization: Bearer <token> Accept: application/json Accept-Language: <language> Time-Zone: <timezone> |
Param | Description | Type | Required |
---|---|---|---|
{room} | The ID of a given room. | Integer | Yes |
Example request
curl \
--request GET \
--url https://api.luxstay.com/api/rooms/10000/description \
--header 'Authorization: Bearer <token>' \
--header 'Accept: application/json' \
--header 'Accept-Language: en' \
--header 'Time-Zone: Asia/Ho_Chi_Minh'
Example response
{
"data": {
"room_id": 10000,
"room_name": "Apartment 1",
"room_url": "https://www.luxstay.com/rooms/10000",
"house_rules": "<content>",
"address_line_1": "445 Mount Eden Road, Mount Eden, Auckland.",
"address_full": "21 Greens Road RD 2 Ruawai 0592., 445 Mount Eden Road, Mount Eden, Auckland."
}
}
Reason invalid access token
Example response
{
"message": "Unauthenticated."
}
Reason cannot access the room
Example response
{
"message": "You are not allowed to access or change information associated with this room."
}
Reason cannot find the given room
Example response
{
"message": "Cannot find the given room"
}