This endpoint is used to delete a room associated with a host.
Method | URI | Headers |
---|---|---|
DELETE | /api/rooms/{room} | Authorization: Bearer <token> Accept: application/json |
Param | Description | Type | Required |
---|---|---|---|
{room} | The ID of a given room. | Integer | Yes |
Example request
curl \
--request DELETE \
--url https://api.luxstay.com/api/rooms/10777 \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
Example response
{
"message": "Room has been deleted successfully."
}
Reason invalid access token
Example response
{
"message": "Unauthenticated."
}
Reason unauthorized to delete 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"
}