Call List
Method for retrieving a list of calls for a specific Lead.
Endpoint and method
GET /v2/call/
Parameters
createdAt[0]string
Start of the call creation period for the selection, in ISO_8601 format
createdAt[1]string
End of the call creation period for the selection, in ISO_8601 format
leadIdsarray<int>required withoutorderIds
Lead identifiers in Liner. A list of calls will be returned for these leads only. Value> 0.
orderIdsarray<int>required withoutleadIds
Order identifiers in Liner. A list of calls will be returned for these orders only. Value> 0.
userIdsarray<int>optional
User identifiers in Liner who processed the calls. Value> 0.
statusIdsarray<int>optional
Call status identifiers in Liner. Value> 0.
offsetintoptional
Pagination parameter. Specifies the offset from which the selection starts. Default is 0.
limitintoptional
Pagination parameter. Number of items returned per request. Maximum value is 100. Default is 50.
Request example
<?php
$host = 'https://YOUR_LINER_API_HOST';
$token = 'YOUR_API_TOKEN';
$query = http_build_query([
'createdAt' => [
'2023-01-01T00:00:00Z',
'2023-01-31T23:59:59Z',
],
'leadIds' => [(int) $leadId],
'orderIds' => [(int) $orderId],
'userIds' => [(int) $userId],
'statusIds' => [(int) $statusId],
'offset' => 0,
'limit' => 50,
]);
$ch = curl_init($host . '/v2/call/?' . $query);
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 params = new URLSearchParams();
params.set("createdAt[0]", "2023-01-01T00:00:00Z");
params.set("createdAt[1]", "2023-01-31T23:59:59Z");
params.append("leadIds[]", String(leadId));
params.append("orderIds[]", String(orderId));
params.append("userIds[]", String(userId));
params.append("statusIds[]", String(statusId));
params.set("offset", "0");
params.set("limit", "50");
const res = await fetch(`${host}/v2/call/?${params.toString()}`, {
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": {
"list": [
{
"id": 123,
"sipEndpointId": 456,
"finishInitiator": "client",
"direction": "outgoing",
"leadId": 789,
"statusCode": "answered",
"userId": 101,
"totalDurationSeconds": 120,
"waitTimeDurationSeconds": 5,
"talkTimeDurationSeconds": 115,
"isPredictive": false,
"clientPhone": "+79001234567",
"createdAt": "2024-01-01T00:00:00Z"
}
],
"next": 50,
"total": 12345
}
}
Response fields
Fields in data
| Field | Type | Description |
|---|---|---|
list |
array |
List of calls. |
next |
int |
Offset to use for the next request. |
total |
int |
Total number of calls. |
Fields in list
| Field | Type | Description |
|---|---|---|
id |
int |
Call identifier in Liner. |
sipEndpointId |
int |
Virtual number (SIP endpoint) identifier. |
finishInitiator |
string |
Call hangup initiator. Available values: client, operator, system. |
direction |
string |
Call direction. Available values: incoming, outgoing. |
leadId |
int |
Lead identifier the call belongs to. |
userId |
int |
User identifier who processed the call. |
orderId |
int |
Order identifier the call belongs to. |
statusId |
int |
Call status identifier. |
totalDurationSeconds |
int |
Total call duration. |
waitTimeDurationSeconds |
int |
Wait call answer duration. |
talkTimeDurationSeconds |
int |
Talk time duration. |
isPredictive |
bool |
Whether the call is predictive. |
clientPhone |
string |
Client phone number (typically E.164, e.g. +79001234567). |
hasRecords |
bool |
Is there a saved recordings of the call conversation. |
createdAt |
string |
Call record creation date and time (ISO 8601). |
Note
The structure of the data field is described above. For the common API response format, see Request Schema