This endpoint is used to retrieve the list of all amenities associated with a given room. Each amenity has a type which is included in the response data.
Method | URI | Headers |
---|---|---|
GET | /api/rooms/{room}/amenities | Authorization: Bearer <token> Accept: application/json |
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/amenities \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
Example response
{
"data": [
{
"id": 10,
"name": "Cảnh quan đẹp",
"description": "",
"type": {
"data": {
"id": 3,
"name": "Hoạt động giải trí",
"description": ""
}
}
},
{
"id": 12,
"name": "Hướng biển",
"description": "",
"type": {
"data": {
"id": 3,
"name": "Hoạt động giải trí",
"description": ""
}
}
},
{
"id": 13,
"name": "Gần sân golf",
"description": "",
"type": {
"data": {
"id": 3,
"name": "Hoạt động giải trí",
"description": ""
}
}
}
]
}
Reason invalid access token
Example response
{
"message": "Unauthenticated."
}
Reason cannot access information of a given 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"
}