Skip to main content
Skip table of contents

List of codes

A list of all created codes for all available intercom systems

GET/api/v1/intercom/codes

Headers

Authorization

Bearer token

Accept

application/json

X-Client

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

X-UUID

unique device id

Body

per_pagerequired

int

The number of items per page in pagination is 25 by default

pagerequired

int

Please provide the page number for pagination

Response

200

Successful response

JSON
{
    "data": [
        {
            "id": 1388,
            "title": "Visitor 1",
            "code": "12345",
            "expired_at": "2022-04-19 17:16:00",
            "is_expired": true,
            "will_deleted_at": "2022-04-20 17:16:00",
            "created_at": "2022-04-19 17:14:04",
            "intercom": {
                "id": 180,
                "title": "House",
                "is_online": true,
                "department": 100,
                "address": "Cameras",
                "created_at": null,
                "updated_at": "2022-04-18T17:25:56.000000Z"
            }
        }
    ],
    "links": {
        "first": "https://vms.local/api/v1/intercom/codes?page=1",
        "last": "https://vms.local/api/v1/intercom/codes?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "pagination.previous",
                "active": false
            },
            {
                "url": "https://vms.local/api/v1/intercom/codes?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "https://vms.local/api/v1/intercom/codes",
        "per_page": 25,
        "to": 1,
        "total": 1
    }
}
401

Authorization token not provided or invalid, see Obtaining a token

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 GET 'https://vms.local/api/v1/intercom/codes?per_page=int&page=int' \
--header 'Authorization:Bearer token' \
--header 'Accept:application/json' \
--header 'X-Client:ios-cctv|android-cctv|thick-legal|web' \
--header 'X-UUID:unique device id'
JavaScript errors detected

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

If this problem persists, please contact our support.