Published 26 January 2026, Updated 26 January 2026
POST //listsched
Purpose: list scheduled items with filters, ordering, pagination.
Access:
- read-only
- read-write
- admin
Payload: list format above (with default order and start filter if omitted).
Options and samples:
filters: sample with date range.order: sample sort bystart.
Allowed fields (from config):
id,ress_type,ress_registration,type,start,end,pic,stud,lesson,cancel,duration
Sample payload:
{
"limit": 25,
"page": 1,
"fields": ["id", "ress_type", "ress_registration", "type", "start", "end", "pic", "stud", "lesson", "cancel", "duration"],
"filters": {
"start": { "op": ">=", "value": "2026-01-01 00:00:00" },
"end": { "op": "<=", "value": "2026-01-07 23:59:59" }
},
"order": [["start", "ASC"]]
}
Response:
{
"meta": { "status": 200, "error": null },
"data": {
"page": 1,
"total_pages": 1,
"total_records": 1,
"count": 1,
"items": [
{
"id": 1,
"ress_type": "F",
"ress_registration": "C-GABC",
"type": "training",
"start": "2026-01-01 10:00:00",
"end": "2026-01-01 11:00:00",
"pic": {
"id": 10,
"type": "member",
"lastname": "Doe",
"givenname": "Jane",
"cell": "+1-555-0100",
"group_name": "Instructor"
},
"stud": {
"id": 12,
"type": "member",
"lastname": "Smith",
"givenname": "John",
"cell": "+1-555-0110",
"group_name": "Student"
},
"lesson": "Solo practice",
"cancel": 0,
"duration": 1.0,
"cancelled": false
}
]
}
}
Examples (curl):
curl -X POST https://example.com/api/v1/prod/sched/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/sched/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 listSchedule() {
const res = await fetch('https://example.com/api/v1/prod/sched/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);
}
listSchedule().catch(console.error);
