List Ledger Entries
Changed onReturns a list of ledger entries.
ℹ️ This endpoint requires one of the following scopes: ledger_entries:readonly, ledger_entries:all
Request
- Base URLhttps://app.pennylane.com
- URLhttps://app.pennylane.com/api/external/v2/ledger_entries
- AuthOAuth 2Authorization code: https://app.pennylane.com/oauth/authorizeToken URL: https://app.pennylane.com/oauth/oauth/token scopes: ledger_entries:readonly, ledger_entries:all
Query parameters
Cursor for pagination. Use this to fetch the next set of results. The cursor is an opaque string returned in the previous response's metadata. Leave empty for the first request.
Number of items to return per request. Defaults to 20 if not specified. Must be between 1 and 100.
You can choose to filter items on specific fields. Available fields and values:
- id: lt, lteq, gt, gteq, eq, not_eq, in, not_in
- date: lt, lteq, gt, gteq, eq, not_eq
- journal_id: lt, lteq, gt, gteq, eq, not_eq, in, not_in
You can choose to sort items on specific attributes Sort field may be prefixed with - for descending order. Example : date will sort by ascending order, -date will sort by descending order. Available fields :
- id
- date
Headers
Numeric ID of the company to act on. Required when authenticating with a firm token. Ignored when the token is already bound to a company.
Response
Returns a list of ledger entries
Example response
{
"items": [
{
"id": 1,
"created_at": "2023-06-14T12:12:56.146343Z",
"updated_at": "2023-08-30T10:08:08.146343Z",
"label": "Payment for Services",
"piece_number": "TENSNYLUGV",
"date": "2023-08-30",
"due_date": "2023-08-30",
"invoice_number": "FAC-2024-001",
"journal_id": 123,
"journal": {
"id": 123,
"url": "https://app.pennylane.com/api/external/v2/journals/123"
},
"categories": [
{
"id": 421,
"label": "HR - Salaries",
"weight": "0.25",
"category_group": {
"id": 229
},
"analytical_code": "CODE123",
"created_at": "2023-08-30T10:08:08.146343Z",
"updated_at": "2023-08-30T10:08:08.146343Z"
}
],
"ledger_attachment_filename": "filename.pdf",
"attachment": {
"filename": "filename.pdf",
"url": "http://www.pennylane.com/rails/active_storage/blobs/redirect/eyJfc..==--26d6e7391dd728fae2cde59bd3fbe4dd11e20a95/filename.pdf"
}
}
],
"has_more": true,
"next_cursor": "MjAyNS0wMS0wOVQwODoyNDozOC44MTI0NTha"
}Changes
- info
added the new optional
headerrequest parameterX-Company-Id
- info