Published 26 January 2026, Updated 26 January 2026
POST /aircrafts/list
Purpose: list aircrafts with filters, ordering, pagination, and optional joins.
Access:
- read-only
- read-write
- admin
Payload: list format above.
Options and samples:
fields: include join fields such asgroup_namewhen configured inusers_joins.filters: sample with join field.order: sample with join field.
Joins:
- Join fields can be used in
fields,filters, andorder.
Allowed fields (from config):
id,registration,type,description,inactive,initial_TTSN,actual_air_TTSN,actual_total_TTSN
Sample payload:
{
"limit": 25,
"page": 1,
"fields": ["id", "registration", "type", "description", "inactive", "initial_TTSN", "actual_air_TTSN", "actual_total_TTSN"],
"filters": {
"registration": { "op": "like", "value": "C-%" }
},
"order": [["registration", "ASC"]]
}
Response:
{
"meta": { "status": 200, "error": null },
"data": {
"page": 1,
"total_pages": 1,
"total_records": 1,
"count": 1,
"items": [
{
"id": 1,
"registration": "C-GABC"
}
]
}
}
Examples (curl):
curl -X POST https://example.com/api/v1/prod/aircrafts/list \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Client: LTW-API" \
-H "Content-Type: application/json" \
-d "{\"limit\":25,\"page\":1}"
Examples (PHP):
<?php
$url = 'https://example.com/api/v1/prod/aircrafts/list';
$payload = json_encode(['limit' => 10, 'page' => 1]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer YOUR_TOKEN',
'X-Client: LTW-API',
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
$response = curl_exec($ch);
if ($response === false) {
throw new RuntimeException(curl_error($ch));
}
curl_close($ch);
echo $response;
Examples (Node.js):
const fetch = require('node-fetch');
async function listAircrafts() {
const res = await fetch('https://example.com/api/v1/prod/aircrafts/list', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_TOKEN',
'X-Client': 'LTW-API',
'Content-Type': 'application/json',
},
body: JSON.stringify({ limit: 10, page: 1 }),
});
if (!res.ok) {
throw new Error(`HTTP ${res.status}`);
}
const data = await res.json();
console.log(data);
}
listAircrafts().catch(console.error);
