Description

This endpoint is used to retrieve the description of a given room. The response includes the name, URL and address of the room.

Endpoint

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

Route Params

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

Request & Response Examples

Successful Response

200

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'
1
2
3
4
5
6
7

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."
    }
}
1
2
3
4
5
6
7
8
9
10

Error Response

401

Reason invalid access token

Example response

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

403

Reason cannot access the room

Example response

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

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