Skip to content

Order List

Retrieves the list of orders in Liner. If successful, returns all active (non-archived) orders.

Note

Pagination is not implemented yet — the full list of active orders is returned.


Endpoint and Method

GET /v1/order/list/


Request Example

curl -X GET "https://YOUR_LINER_API_HOST/v1/order/list/" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_TOKEN"
<?php

$host = 'https://YOUR_LINER_API_HOST';
$token = 'YOUR_API_TOKEN';

$ch = curl_init($host . '/v1/order/list/');
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 res = await fetch(`${host}/v1/order/list/`, {
  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": 1,
      "title": "Example | Title",
      "code": "example-code",
      "callsAllowed": true
    }
  ]
}

Response Fields

Field Type Description
id int Order identifier.
title string Order name.
code string Order code.
callsAllowed boolean Whether calls are allowed for this order.

Note

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