GET
/
api
/
external
/
v2
/
ledger_entries
List Ledger Entries
curl --request GET \
  --url https://app.pennylane.com/api/external/v2/ledger_entries \
  --header 'Authorization: Bearer <token>'
{
  "total_pages": 5,
  "current_page": 1,
  "total_items": 12,
  "per_page": 40,
  "items": [
    {
      "id": 1,
      "created_at": "2023-06-14T12:12:56.146343Z",
      "updated_at": "2023-08-30T10:08:08.146343Z",
      "label": "Payment for Services",
      "date": "2023-08-30",
      "journal_id": 123,
      "ledger_attachment_filename": "filename.pdf"
    }
  ]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Query Parameters

page
integer

Items are paginated, this is the current page which will be returned. The page index is starting at 1.

Example:

1

per_page
integer

Items are paginated. By default, you get 20 items per page. You can specify another number of items per page.

Required range: 1 <= x <= 100
Example:

20

filter
string

You can choose to filter items on specific fields. Available fields and values:

  • updated_at, created_at, date: lt, lteq, gt, gteq, eq, not_eq
  • journal_id: lt, lteq, gt, gteq, eq, not_eq, in, not_in
Example:

"[{\"field\": \"updated_at\", \"operator\": \"gteq\", \"value\": \"2024-01-01T17:10:09Z\"}]"

sort
string

You can choose to sort items on specific attributes Sort field may be prefixed with - for descending order. Example : updated_at will sort by ascending order, -updated_at will sort by descending order. Available fields : updated_at, created_at, date

Example:

"-updated_at"

Response

Returns a list of ledger entries. By default, entries from fiscal periods that are closed or frozen are excluded. However, if a 'date' filter is provided, it will return all entries within the specified date range, even if they fall within a closed or frozen fiscal period.

total_pages
integer
required

The total number of pages available

Example:

5

current_page
integer
required

The current page returned

Example:

1

total_items
integer
required

The total number of items available

Example:

12

per_page
integer
required

The number of items per page

Example:

40

items
object[]
required