Breaking changes for ledger endpoints

For better experience, we are performing breaking changes on some of our ledger endpoints.

Impacte date: 11/12/2023

Impacted endpoints : POST Ledger Entries / PUT Ledger Entries

Transition/depreciation time: Not possible

  1. A breaking change will soon be made to the POST Ledger Entries and PUT Ledger Entries endpoints that will limit to 100 the number of entry_lines that can be created/modified/deleted for each ledger_entry, for performance reasons.

  2. ID change: At Pennylane we have many different types of accounting documents that we use in order to be performant. In the next couple months we are increasing the number of documents types so that we are even faster in processing accounting requests via the API as well as the UI. In order to make our API V2 easier to work with, we excluded the concept of accounting document types. The way we do this is by suffixing the ID with a type number. In order to extend the upcoming performance improvements to the API V2 without causing a breaking change in the future, we need to make a change now.

    1. Action items

    2. If all the ledger_entry IDs that you have in your DB were created via the API V2 ("post /api/external/v2/ledger_entries"), you don’t need to take any action. All IDs created via API V2 have the right type ID suffixed.

      1. If you stored ledger entries in your DB that you retrieved via "get api/external/v2/ledger_entries", it may return 404. In those case the ID is no longer valid and you should delete the record in your DB and refetch/map the ledger entry in order to get the correct ID and type.

    This new system we’re implementing will prevent any future breaking changes when we make performance improvements to our accounting document storing.

Impacte date: 11/12/2023

Impacted endpoints : POST Ledger Entries / PUT Ledger Entries / GET Ledger Entries

Transition/depreciation time: 11/01/2024

  1. For greater clarity, entry_lines are renamed ledger_entry_lines, so be sure to update the attribute name in your queries.
  2. We're going to add a new GET ledger_entries/:id/ledger_entry_lines endpoint that returns the ledger_entry_lines of a particular ledger_entry. This improves the performance of the current GET ledger_entries endpoint, which will now only return ledger_entries. To retrieve the ledger_entry details, you'll need to call the new endpoint.