Skip to content

Lead List

Method for retrieving a list of leads with optional data filtering.


Endpoint and Method

GET /v2/lead/


Parameters

createdAt[0] string
Start of the lead creation period for the selection, in ISO_8601 format

createdAt[1] string
End of the lead creation period for the selection, in ISO_8601 format

orderIds array<int> optional
Lead order identifiers.

statusIds array<int> optional
Lead status identifiers.

offset int optional
Pagination parameter. Specifies the ordinal number (offset) of the item from which the selection starts. Default is 0

limit int optional
Pagination parameter. Number of items returned per request; maximum is 100. Default is 50


Request Example

curl -X GET "https://YOUR_LINER_API_HOST/v2/lead/?createdAt[0]=2023-01-01T00:00:00Z&createdAt[1]=2023-01-31T23:59:59Z&orderIds[]=100&orderIds[]=101&statusIds[]=1&statusIds[]=2&offset=0&limit=50" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_TOKEN"
<?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',
    ],
    'orderIds' => [100, 101],
    'statusIds' => [1, 2],
    'offset' => 0,
    'limit' => 50,
]);

$ch = curl_init($host . '/v2/lead/?' . $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("orderIds[]", "100");
params.append("orderIds[]", "101");
params.append("statusIds[]", "1");
params.append("statusIds[]", "2");
params.set("offset", "0");
params.set("limit", "50");

const res = await fetch(`${host}/v2/lead/?${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,
        "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,
        "previousLeadId": null,
        "nextLeadId": null,
        "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"
        }
      }
    ],
    "next": 50,
    "total": 12345
  }
}

Response Fields

Fields in data

Field Type Description
list array List of leads.
next int Offset to use for the next request.
total int Total number of leads.

Fields in list

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.
previousLeadId int | null Previous Lead id. Present if Lead is secondary.
nextLeadId int | null Next Lead id. Present if Lead has dublicate.
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 date/time (usually an ISO string or system-specific format).
updatedAt string Lead last update date/time.
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