GEThttps://api.spirestock.com/api/v1/accounts/ledger#
Without user_id: one row per party with opening, credit, debit and closing balance. With user_id: that party's ledger entries, newest first, plus current_balance.
Access: API key read scope; staff need Invoices (14) or Amount to be paid (12) — list.
Pagedpage and limit (max 100), id as the final sort key. How pagination works
Parameters
user_idnumber- One party
searchstring- Name or store contains
pagenumber- Default 1
limitnumber- Default 30, max 100
curl "https://api.spirestock.com/api/v1/accounts/ledger?limit=2" \
-H "X-API-Key: YOUR_API_KEY"{
"response_code": 200,
"data": [
{
"user_id": 44165,
"user_name": "Sample User AO",
"first_name": "Sample",
"last_name": "User",
"store_name": "Demo Store D",
"opening_balance": "0",
"credit": "0",
"debit": "0",
"closing_balance": "0",
"balance": "0",
"last_transaction_date": null
}
],
"pagination": {
"total": 10026,
"page": 1,
"limit": 2,
"total_pages": 5013
}
}