Skip to main content
Skip table of contents

Apartment selection

After successfully configuring the intercom, a push notification with the intercom object will be sent to the user's websocket channel (user.{ID}). The push notification will not be sent to the device that initiated this request.

The user will have access to the intercom camera for viewing, if it was not available previously.

The apartment number cannot be changed; you can only delete and re-add the intercom.

POST/api/v1/intercom/{intercom}/flat

Headers

Authorization

Bearer token

Accept

application/json

X-Client

ios-cctv|android-cctv|thick-legal|web

X-UUID

unique device id

Body

json

JSON
{
    "flat": 15
}

intercomoptional

int

Intercom ID for which the apartment needs to be selected (status must be «key_confirmed»)

flatrequired

int

Apartment number from the available range of apartments for this intercom. The apartment number must also be unique; you cannot add the intercom twice with the same apartment number in different accounts

Response

200

Successful response

JSON
{
    "id": 180,
    "title": "House",
    "is_online": true,
    "is_enabled": true,
    "timetable": {
        "days": [
            {
                "to": "23:59:59+05:00",
                "from": "00:00:00+05:00",
                "type": "tuesday"
            },
            {
                "to": "23:59:59+05:00",
                "from": "00:00:00+05:00",
                "type": "wednesday"
            },
            {
                "to": "23:59:59+05:00",
                "from": "00:00:00+05:00",
                "type": "saturday"
            }
        ],
        "intervals": []
    },
    "department": 100,
    "address": "Cameras",
    "camera": {
        "id": 833,
        "group_id": 124,
        "status": "active",
        "type": "media_server_v2",
        "start_at": "2022-04-19 16:43:15",
        "created_at": "2022-02-18 15:05:53",
        "billing_id": null,
        "pretty_name": "Intercom",
        "lat": null,
        "lng": null,
        "azimuth": null,
        "is_archive_recording": true,
        "is_bridge": false,
        "is_favorite": false,
        "user_status": "active",
        "name": "Intercom"
    },
    "status": "confirmed",
    "created_at": null,
    "updated_at": "2022-04-20T12:34:32.000000Z"
}
401

Authorization token not provided or invalid, see Obtaining a token

404

If the intercom does not belong to the user or does not exist

422

Returns a JSON object with an error, see Validation

JSON
{
    "message": "There won't be any informative message here",
    "errors": {
        "any_key": [
            "Here the error cause will be described"
        ]
    }
}

Example

JSON
curl -k --location --request POST 'https://vms.local/api/v1/intercom/{intercom}/flat' \
--header 'Authorization:Bearer token' \
--header 'Accept:application/json' \
--header 'X-Client:ios-cctv|android-cctv|thick-legal|web' \
--header 'X-UUID:unique device id' \
--header 'Content-Type: application/json \
--data-raw '{
    "flat": 15
}'
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.