Call Details
Method for retrieving detailed information about a call in Liner by its identifier.
Endpoint and method
GET /v2/call/detail/{callId}/
callId
Call identifier in Liner. Value> 0
Request example
<?php
$host = 'https://YOUR_LINER_API_HOST';
$token = 'YOUR_API_TOKEN';
$callId = (int)$callId;
$ch = curl_init($host . '/v2/call/detail/' . $callId);
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 callId = Number(callId);
const res = await fetch(`${host}/v2/call/detail/${callId}`, {
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,
"sipEndpointId": 456,
"finishInitiator": "client",
"direction": "outgoing",
"leadId": 789,
"userId": 101,
"orderId": 202,
"statusCode": "answered",
"totalDurationSeconds": 120,
"waitTimeDurationSeconds": 5,
"talkTimeDurationSeconds": 115,
"isPredictive": false,
"clientPhone": "+79001234567",
"hasRecords": true,
"createdAt": "2024-01-01T00:00:00Z"
}
}
Response fields
| 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 |
Total wait time (time to answer). |
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 overall API response format, see Request Schema