Deletion

This endpoint is used to delete a room associated with a host.

Endpoint

Method URI Headers
DELETE /api/rooms/{room} Authorization: Bearer <token>
Accept: application/json

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 DELETE \
  --url https://api.luxstay.com/api/rooms/10777 \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <token>'
1
2
3
4
5

Example response

{
    "message": "Room has been deleted successfully."
}
1
2
3

Error Response

401

Reason invalid access token

Example response

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

403

Reason unauthorized to delete 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