Skip to content

Agent group details

Method to retrieve detailed information about an Agent Group in Liner by its identifier.


URL and method

GET /v2/agent-group/{id}/

id
Agent group identifier in Liner. Value > 0


Request example

curl -X GET "https://YOUR_LINER_API_HOST/v2/agent-group/{id}/" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_TOKEN"
<?php

$host = 'https://YOUR_LINER_API_HOST';
$token = 'YOUR_API_TOKEN';
$id = (int)$id;

$ch = curl_init($host . '/v2/agent-group/' . $id . '/');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
        'X-Api-Key: ' . $token,
    ],
    CURLOPT_TIMEOUT => 15,
]);

$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

if ($response === false) {
    throw new RuntimeException('cURL error: ' . curl_error($ch));
}

curl_close($ch);

echo "HTTP {$httpCode}\n";
echo $response;
const host = "https://YOUR_LINER_API_HOST";
const token = "YOUR_API_TOKEN";
const id = Number(id);

const res = await fetch(`${host}/v2/agent-group/${id}/`, {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "X-Api-Key": token
  }
});

const data = await res.json();
console.log("HTTP", res.status, data);

Response example

{
  "success": true,
  "message": "",
  "data": {
    "id": 123,
    "names": {
      "ru": "Группа агентов",
      "gb": "Agent group"
    },
    "agentIds": [101, 102],
    "createdBy": 0,
    "updatedBy": 0,
    "createdAt": "01.01.2024 09:00",
    "updatedAt": "01.01.2024 09:00"
  }
}

Response fields

Field Type Description
id int Agent group identifier in Liner.
names object Object containing agent group names in different languages.
names.ru string Agent group name in Russian.
names.gb string Agent group name in English.
agentIds array<int> Array of agent identifiers assigned to the group.
createdBy int Identifier of the user who created the group. 0 means created by the system.
updatedBy int Identifier of the user who last updated the group. 0 means updated by the system.
createdAt string Creation date and time in dd.mm.yyyy hh:mm format.
updatedAt string Update date and time in dd.mm.yyyy hh:mm format.

Note

The structure of the data field is described above. For the general API response format, see Request schema