Breadcrumbs

Список домофонов для внешней системы

GET  /api/v1/billing/intercoms

200  OK

Успешный ответ

JSON
{
    "data": [
        {
            "id": 1,
            "external_id": null,
            "department": 89
        }
    ],
    "links": {
        "first": "http://localhost/api/v1/billing/intercoms?page=1",
        "last": "http://localhost/api/v1/billing/intercoms?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "pagination.previous",
                "active": false
            },
            {
                "url": "http://localhost/api/v1/billing/intercoms?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "http://localhost/api/v1/billing/intercoms",
        "per_page": 25,
        "to": 1,
        "total": 1
    }
}

422  Unprocessable Entity

Возвращает JSON объект с ошибкой. Детально в разделе Общая информация→Валидация.

JSON
{
    "message": "Сообщение отсутствует",
    "errors": {
        "any_key": [
            "Детальная информация об ошибке"
        ]
    }
}
cURL
Bash
curl -k --request GET \
	--url 'https://your-domain/api/v1/billing/intercoms' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '[]'
PHP
PHP
$data = array (
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'GET',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/v1/billing/intercoms', false, $context);