Room Types

This endpoint is used to fetch all available room types.

Endpoint

Method URI Headers
GET /api/roomTypes Authorization: Bearer <token>
Accept: application/json
Accept-Language: <language>

Request & Response Examples

Successful Response

200

Example request

curl \
  --request GET \
  --url https://api.luxstay.com/api/roomTypes \
  --header 'Accept: application/json' \
  --header 'Accept-Language: en' \
  --header 'Authorization: Bearer <token>'
1
2
3
4
5
6

Example response

{
    "data": [
        {
            "id": 1,
            "name": "Entire home",
            "description": "Entire home/apt"
        },
        {
            "id": 2,
            "name": "Private room",
            "description": "Private room"
        },
        {
            "id": 3,
            "name": "Shared room",
            "description": "Shared room"
        }
    ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Error Response

401

Reason invalid access token

Example response

{
    "message": "Unauthenticated."
}
1
2
3
Last Updated: 11/18/2018, 9:11:26 AM