Amenities

Within the Housemates API, the term "Amenities" refers to the set of features or facilities provided both at the property level and the room level. They play a crucial role in making the accommodations comfortable, convenient, and appealing to students.

Property Amenities

Property Amenities are the facilities and features that are available within the entire property or building. They are shared facilities, accessible to all residents. These could include common spaces like lounges or study rooms, outdoor spaces, facilities like a gym or laundry room, security features, and more.

Room Amenities

Room Amenities, on the other hand, refer to the facilities and features that are specific to an individual room. These could include private facilities like a bathroom, kitchen or kitchenette, desk, bed size, and more.

The Amenity model

The Amenity model contains all the information about a property or room amenity that is stored on Housemates' system. Following is a list of all the attributes that are available on the Property model.

Attributes

  • Name
    label
    Type
    string
    Description

    The label of amenity. This attribute is used to either denote the category of the amenity or to filter properties by amenity.

  • Name
    name
    Type
    string
    Description

    The name of the amenity.

  • Name
    type
    Type
    string
    Description

    The type of the amenity. It can be either "category" or "item".

  • Name
    as_filter
    Type
    string
    Description

    Shows if the amenity can be used to filter properties or rooms by.

Amenity model

//... Category
{
    "label":"general",
    "name":"General",
    "type":"category",
    "as_filter":false
}

//... Item
{
    "label":"GAR",
    "name":"Garden",
    "type":"item",
    "as_filter":true
}

GET/api/amenities

List all amenities

This endpoint allows you to retrieve a list of all available amenities. By default, it will return amenities for the property, but you can also specify the type of amenity you want to retrieve.

Required attributes

  • Name
    X-API-PARTNER-ID
    Type
    string
    Description

    Your API partner ID provided by Housemates. It should be provided in the header.

Optional attributes

  • Name
    filter[type]
    Type
    string
    Description

    The type of amenity you want to retrieve. It can be either "property" or "room".

Request

GET
/api/amenities
curl --globoff -i -X GET \
    'https://api.housemates.io/api/amenities?filter[type]=room' \
    --header 'X-API-PARTNER-ID: {API_PARTNER_ID}' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'Authorization: Bearer {access_token}'

Response

 {
  "success":true,
  "code":0,
  "locale":"en",
  "message":"OK",
  "data":{
    "items":[
      {
        "label":"general",
        "name":"General",
        "type":"category",
        "as_filter":false,
        "children":[
          {
            "label":"GAR",
            "name":"Garden",
            "type":"item",
            "as_filter":true
          },
          {
            "label":"BLC",
            "name":"Balcony",
            "type":"item",
            "as_filter":true
          },
          // ... more items
        ]
      },
      {
        "label":"services",
        "name":"Services",
        "type":"category",
        "as_filter":false,
        "children":[
          {
            "label":"CLN",
            "name":"Cleaner",
            "type":"item",
            "as_filter":true
          }
        ]
      },
      {
        "label":"bedroom",
        "name":"Bedroom",
        "type":"category",
        "as_filter":false,
        "children":[
          {
            "label":"BLC",
            "name":"Bedroom Lock",
            "type":"item",
            "as_filter":true
          },
          {
            "label":"TVS",
            "name":"TV",
            "type":"item",
            "as_filter":true
          }
        ]
      }
    ]
  }
}