GEThttps://api.spirestock.com/api/v1/approvals#
Records waiting on the caller (workspace admins see everything at status 1 or 2), with pending counts and the caller's level per type. Types: order, leave, foc, merged into one list newest first (orders by order_date) with id as the tie-break; summary counts every pending record, not just the page.
Access: API key read scope; staff need Orders (8) or Manage Leaves (38) or FOC Management (39) — list.
Pagedpage and limit (max 100), id as the final sort key. How pagination works
Parameters
typestring- order, leave or foc
pagenumber- Page number; junk or a value below 1 reads as 1 Default
1. limitnumber- Page size, default 20, max 100 (larger values are clamped)
curl https://api.spirestock.com/api/v1/approvals \
-H "X-API-Key: YOUR_API_KEY"{
"response_code": 200,
"data": [
{
"id": 334097,
"type": "order",
"module": "Orders",
"status": 2,
"status_label": "Forwarded",
"created_at": "2024-03-25T12:00:52.000Z",
"title": "Order ORD0062581",
"subtitle": "Sample User A — Rs.19,520"
}
],
"summary": {
"pending_orders": 1988,
"pending_leaves": 0,
"pending_foc": 0,
"total": 1988
},
"levels": {
"order": 3,
"leave": 3,
"foc": 3
},
"is_admin": true,
"pagination": {
"total": 1988,
"page": 2,
"limit": 2,
"total_pages": 994
}
}