Skip to content

Order List

Method for retrieving a list of Orders.


Endpoint and method

GET /v2/order/


Parameters

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 value is 100. Default is 50


Request example

curl -X GET "https://YOUR_LINER_API_HOST/v2/order/?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([
    'offset' => 0,
    'limit' => 50,
]);

$ch = curl_init($host . '/v2/order/?' . $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("offset", "0");
params.set("limit", "50");

const res = await fetch(`${host}/v2/order/?${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,
        "code": "order-001",
        "serviceTitle": "Internal name",
        "title": "Order title",
        "callSchedule": [["09:00", "18:00"]],
        "callHolidayOverrides": ["01.01.2024"],
        "autoDialingEnabled": true,
        "predictiveModeEnabled": false,
        "aiDefaultLanguage": "ru",
        "amdDetectionEnabled": false,
        "callRecordRule": "client_is_connected",
        "sipEndpointUsageScheme": "random_default",
        "agentUserIds": [123, 456],
        "agentGroupIds": [789],
        "showLeadContactsToAgent": true,
        "callAttemptGroupId": 1,
        "qualifiedLeadsPerDayLimit": 100,
        "callScenarioId": 10,
        "leadTransformEnabled": false,
        "status": "success",
        "speechRecognitionEnabled": false,
        "ignoreLeadTimezone": false,
        "sipEndpointIds": [123],
        "customValues": [],
        "agentLeadCreationIsAllowed": false,
        "agentLeadEditMode": "during-call",
        "autoProcessCall": true,
        "transferNumbers": [
          {
            "number": "79001234567",
            "names": []
          }
        ],
        "createdAt": "2024-01-01T00:00:00+03:00",
        "updatedAt": "2024-01-01T00:00:00+03:00"
      }
    ],
    "next": 50,
    "total": 12345
  }
}

Response fields

Fields in data

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

Fields in list

Field Type Description
id int Order identifier in LINER.
code string Order code.
serviceTitle string Internal order name.
title string Display name of the order.
callSchedule array A list of 7 items (one per weekday), each containing the start and end time of the working day.
callHolidayOverrides array List of holidays in dd.mm.yyyy format.
autoDialingEnabled bool Whether calls are allowed.
predictiveModeEnabled bool Whether calls are allowed in predictive mode.
aiDefaultLanguage string \| null Default language for AI. Available values: ru, gb, null.
amdDetectionEnabled bool Whether answering machine detection is enabled.
callRecordRule string When to start call recording. Available values: client_is_connected, agent_is_connected.
sipEndpointUsageScheme string Number usage scheme. Available values: random_default, random_without_repetition, even_loaded, even_loaded_daily.
agentUserIds array IDs of agents who can work in this order.
agentGroupIds array IDs of agent groups who can work in this order.
showLeadContactsToAgent bool Whether agents can see lead contacts.
callAttemptGroupId int Call attempt intervals group ID.
qualifiedLeadsPerDayLimit int \| null Maximum number of qualified leads per day. null means no limit.
callScenarioId int Call scenario ID.
leadTransformEnabled bool Whether an agent is allowed to change the lead type.
status string Order status. Available values: success, secondary, info.
speechRecognitionEnabled bool Whether call recognition is enabled.
ignoreLeadTimezone bool Whether to ignore the client’s time zone.
sipEndpointIds array List of virtual number identifiers.
customValues array Map of custom field values: key is the custom field ID, value is the stored value for that field. Returned as an empty array when there are none.
agentLeadCreationIsAllowed bool Whether an agent is allowed to create leads.
agentLeadEditMode string Lead editing mode for agents. Available values: during-call, always, never.
autoProcessCall bool Whether the call is processed automatically.
transferNumbers array Call transfer numbers. Each item is an object with number (string) and names (array).
createdAt string Creation date and time (ISO 8601).
updatedAt string Update date and time (ISO 8601).

Note

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