Skip to content

Lead Details

Method for retrieving detailed information about a lead in Liner by its identifier.


Endpoint and Method

GET /v2/lead/detail/{leadId}/

leadId
Lead identifier in Liner. Value must be > 0.


Request Example

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

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

$ch = curl_init($host . '/v2/lead/detail/' . $leadId);
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 leadId = Number(leadId);

const res = await fetch(`${host}/v2/lead/detail/${leadId}`, {
  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,
    "name": "John Doe",
    "phone": "+79001234567",
    "sourceComment": "",
    "ip": "192.168.1.1",
    "externalIdBitrix24": "B24-001",
    "externalIdAmo": "AMO-001",
    "externalIdMacro": "MACRO-001",
    "externalIdDomoplaner": "DP-001",
    "statusId": 10,
    "leadType": "straight",
    "createMethod": "api",
    "isSecondary": false,
    "planningCallDateTime": "2024-01-02T10:00:00Z",
    "priority": 0,
    "utcOffset": 3,
    "createdAt": "2024-01-01T00:00:00Z",
    "updatedAt": "2024-01-01T00:00:00Z",
    "orderId": 202,
    "orderCode": "order-001",
    "vkId": "123456",
    "instagramLogin": "user_instagram",
    "telegramUserName": "user_telegram",
    "telegramPhone": "+79001234567",
    "customValues": {
      "10": "example value"
    }
  }
}

Response Fields

Field Type Description
id int Lead identifier in Liner.
name string Client name.
phone string Client phone number (typically E.164, e.g. +79001234567).
sourceComment string Questionnaire comment/log (may be plain text or a JSON string).
ip string User IP address (if collected).
externalIdBitrix24 string Lead identifier in Bitrix24.
externalIdAmo string Lead identifier in amoCRM.
externalIdMacro string Lead identifier in Macro CRM.
externalIdDomoplaner string Lead identifier in Domoplaner.
statusId int Current lead status code in Liner.
leadType string Lead type (e.g. straight / selection).
createMethod string Lead creation method (API/form/manual — depends on the system).
isSecondary bool | null Indicates whether this is a secondary (repeat) lead.
planningCallDateTime string Date/time of the next call (ISO string/Unix/internal format).
priority int Lead priority in the call queue.
utcOffset int Client time zone offset from UTC (e.g. 3, -5).
createdAt string Lead creation datetime (ISO 8601).
updatedAt string Lead last update datetime (ISO 8601).
orderId int Lead order identifier.
orderCode string Lead order alphanumeric code.
vkId string VK user identifier.
instagramLogin string Instagram user login.
telegramUserName string Telegram username.
telegramPhone string Telegram phone number (if known).
customValues object Map of custom field values: key is the custom field ID, value is the stored value for that field.

Note

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