Photo Tags

This endpoint is used to retrieve tags associated with a single photo inside the collection of photos of a given room. The tags are generally related to different portion of the room. Here are some example tags (in English):

  • Living Room
  • Kitchen
  • Dining Room
  • Master Bedroom
  • Second Bedroom
  • Bathroom
  • Garden
  • etc.

Endpoint

Method URI Headers
GET /api/rooms/{room}/photos/{photo}/tags Authorization: Bearer <token>
Accept: application/json
Accept-Language: <language>

Route Params

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

Request & Response Examples

Successful Response

200

Example request

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

Example response

{
    "data": [
        {
            "id": 1,
            "name": "Garden",
            "normalized": "garden"
        },
        {
            "id": 2,
            "name": "Bathroom",
            "normalized": "bathroom"
        },
        {
            "id": 3,
            "name": "Kitchen",
            "normalized": "kitchen"
        }
    ]
}
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

403

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

  • Reason cannot find the given photo

Example response

{
    "message": "Cannot find the given photo."
}
1
2
3
Last Updated: 11/18/2018, 9:11:26 AM