Skip to main content
Skip table of contents

Getting a matrix

Matrix construction. The size of elements in the matrix may vary depending on the type of switch

POST/api/admin/v1/intercoms/{intercom}/common-matrix

Headers

Authorization

Bearer token

Accept

application/json

X-Client

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

X-UUID

unique device id

Body

json

JSON
{
    "switch": "metakom",
    "capacity": 20,
    "is_last_item_first": true,
    "flat_from": 1
}

intercomoptional

int

Unique identifier of the intercom

switchrequired

string

Switch type. All types are listed in the Main configurations

capacityrequired

integer

Number of flats within 1 switch, specified under the key intercom_flat_capacity in the Main configurations

is_last_item_firstrequired

boolean

Is the last element of the matrix the first one

matrix.*.flat_fromrequired

integer

Number of the first flat in the matrix

Response

200

Successful response

JSON
{
                "capacity": 20,
                "items": [
                    [
                        20,
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9
                    ],
                    [
                        10,
                        11,
                        12,
                        13,
                        14,
                        15,
                        16,
                        17,
                        18,
                        19
                    ]
                ]
            }
401

Authorization token is not provided or is invalid. Obtaining a token

422

Returns a JSON object with an error. Validation

JSON
{
    "message": "There will be no informative message here",
    "errors": {
        "any_key": [
            "The reason for the error will be described here"
        ]
    }
}

Example

JSON
curl -k --location --request POST 'https://vms.local/api/admin/v1/intercoms/{intercom}/common-matrix' \
--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 '{
    "switch": "metakom",
    "capacity": 20,
    "is_last_item_first": true,
    "flat_from": 1
}'
JavaScript errors detected

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

If this problem persists, please contact our support.