JSON API: Journal Entry Queries
Refer to the entry query schema for a formal definition of the request and the entry query response schema for a definition of the response.
Note that all properties are optional unless requesting a second page of date, at which point
after
and afterDate
tell Ledger where to start the next page. Passing an empty object will
return all transactions in the journal.
The page size limit
is capped by the ledger configuration. If a request is made for more records
than the configured limit, then only the configured maximum page size will be returned.
Route: entry/query
Sample request:
{
"amount": "100",
"amountMax": "750.05",
"currency": "CAD",
"date":"2001-01-01",
"dateEnding":"2001-02-15",
"limit": 2
}
{
"entries":[
{
"id":31,
"date":"2001-01-02 00:00:00.000000",
"description":"Random entry 31",
"language":"en",
"opening":false,
"reviewed":false,
"currency":"CAD",
"details":[
{
"accountCode":"1720",
"accountUuid":"2d81f859-8e5b-4a84-b866-4d33c30b6f91",
"amount":"-180.79"
},
{
"accountCode":"6630",
"accountUuid":"34a74425-5d1b-4549-bca1-52a78ea2f817",
"amount":"180.79"
}
],
"revision":"7180c8d8abd512082ae522a0556d8d55432e6cc932e531799c8a25c95efc58de",
"createdAt":"2022-01-18T16:10:17.036247Z",
"updatedAt":"2022-01-18T16:10:17.036247Z"},
{
"id":101,
"date":"2001-01-02 00:00:00.000000",
"description":"Random entry 101",
"language":"en",
"opening":false,
"reviewed":false,
"currency":"CAD",
"details":[
{
"accountCode":"6520",
"accountUuid":"65cfd4f1-8c20-484d-98e7-4d99b62ecfe3",
"amount":"360.04"
},
{
"accountCode":"6560",
"accountUuid":"b7978065-1d3e-453d-8483-fa0c3b5375ee",
"amount":"-360.04"
}
],
"revision":"6f859e221d065393483d2b7045491407bd152c20ada3faa9d2a84346de144a3e",
"createdAt":"2022-01-18T16:10:21.202118Z",
"updatedAt":"2022-01-18T16:10:21.202118Z"}
],
"time":"2022-01-18T16:10:58.021722Z"
}
A request for the next page in the same query :
{
"after": 101,
"afterDate": "2001-01-02 00:00:00.000000",
"amount": "100",
"amountMax": "750.05",
"currency": "CAD",
"date":"2001-01-01",
"dateEnding":"2001-02-15",
"limit": 2
}