From 2cc322d5e1fa0b888912c36f0e6e20c53e8b0b1c Mon Sep 17 00:00:00 2001 From: Serdar Oztetik Date: Tue, 23 Jun 2026 13:32:57 +0200 Subject: [PATCH] TRIP-62641 TRIP-62641 Document sorted=false fast path on /ledger/posting/openPost Add changelog entry and FAQ tip for the new optional `sorted` query parameter on GET /ledger/posting/openPost. Default (sorted=true) is unchanged; sorted=false returns the same open postings unordered and is significantly faster on accounts with many postings. Co-Authored-By: Claude Opus 4.8 (1M context) --- FAQ.md | 12 ++++++++++++ changelog.md | 5 +++++ 2 files changed, 17 insertions(+) diff --git a/FAQ.md b/FAQ.md index 436555c..d4ce888 100644 --- a/FAQ.md +++ b/FAQ.md @@ -26,6 +26,18 @@ If you want the orderlines related to the order as well you can expand the API r --- +### How can I make `/ledger/posting/openPost` faster on accounts with many postings? + +#### Answer: + +`GET /v2/ledger/posting/openPost` returns the open postings on an account as of a given date. By default the result is sorted by voucher (year and number), which becomes expensive on accounts that have a large number of postings. + +If you do not need the voucher ordering, add `sorted=false` to the request. You get the exact same set of open postings, only unordered, and the response is significantly faster on large accounts. For best performance, combine it with the `fields` parameter (see above) to limit the returned data, and with paging (`from` and `count`). + +Example: `GET /v2/ledger/posting/openPost?date=2026-12-31&accountId=123456&sorted=false&fields=id,date,amount,invoiceNumber&count=1000` + +--- + ### How can I correct the validation message “The unit price must be exclusive VAT since the unit price on the order is exclusive VAT.” #### Answer: diff --git a/changelog.md b/changelog.md index 1a91a08..5b24d69 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,10 @@ # API changelog +## 2.75.06 (2026-06-23) +- Added new optional query parameter `sorted` to `GET /ledger/posting/openPost`. + - `true` (default) — open postings are returned ordered by voucher (year, then number). Existing callers see no change. + - `false` — returns the same set of open postings, unordered. Significantly faster on accounts with a large number of postings, since the sort is skipped. Recommended when reading large accounts where you do not depend on the voucher ordering. + ## 2.75.05 (2026-05-15) - Added new optional query parameter `addToInvoiceMode` to `PUT /order/{id}/:attach`. Controls which invoices receive the uploaded attachment. - `NEXT` (default) — only the next invoice. Legacy behavior; existing callers see no change.