v1

latestOpenAPI 3.0.12026-07-144840447.2 KB
Ledger Entries

List Ledger Entries

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.

ℹ️ This endpoint requires one of the following scopes: ledger_entries:all, ledger_entries:readonly

get/api/external/firm/v1/companies/{company_id}/ledger_entries

Path parameters

company_idinteger required

Existing company identifier (id)

Query parameters

cursorstring
Example:MjAyNS0wMS0wOVQwODoyNDozOC44MTI0NTha

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.

limitinteger

Number of items to return per request. Defaults to 20 if not specified. Must be between 1 and 1000.

filterstring
Example:[{"field": "journal_id", "operator": "eq", "value": "42"}]

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

  • id,journal_id: lt, lteq, gt, gteq, eq, not_eq, in, not_in
  • date: lt, lteq, gt, gteq, eq, not_eq
sortstring
Example:-id

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

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.

has_moreboolean required

Indicates whether additional results are available beyond this set. Use this flag to determine if another request is needed.

next_cursorstring nullable required

Cursor to retrieve the next set of results. Include this value in the cursor parameter of your next request to fetch subsequent items. A null next_cursor in the response indicates no further results.

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",
      "journal": {
        "id": 123,
        "url": "https://app.pennylane.com/api/external/firm/v1/companies/234/journals/123"
      },
      "due_date": "2023-08-30",
      "invoice_number": "FAC-2024-001",
      "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"
        }
      ],
      "attachment": {
        "filename": "filename.pdf",
        "url": "http://www.pennylane.com/rails/active_storage/blobs/redirect/eyJfc..==--26d6e7391dd728fae2cde59bd3fbe4dd11e20a95/filename.pdf"
      }
    }
  ],
  "has_more": true,
  "next_cursor": "MjAyNS0wMS0wOVQwODoyNDozOC44MTI0NTha"
}