Outstanding items & matching
Read open items and match payments with invoices.
Matching links entry lines that offset each other, typically an invoice and its payment(s), by giving them the same matching number (MatchNo). Lines that are not matched yet make up the outstanding items.
Reading outstanding items
| Need | Endpoint |
|---|---|
| A customer's outstanding debts | customers.outstanding |
| A supplier's outstanding debts | suppliers.outstanding |
| Open sales invoices / credit notes and their linked payments | invoices.sales.outstanding.list |
| One open sales invoice and its linked elements (partial payments…) | invoices.sales.outstanding.info |
| Unmatched lines of any account | account-histories.list with NotMatchedOnly: true |
invoices.sales.outstanding.info requires the FolderId and one of:
- the
BookEntryId, or - the
BookEntryNumber, formatted as{DaybookSearchKey}-{Number}(e.g.VEN-202409001).
Matching lines
matching matches a set of account history lines under one matching number.
{
"FolderId": "83f26e75-f474-4b09-a1d3-aa698e18fbf0",
"AutoGenerateMatchNo": true,
"AccountHistoryIds": [
"4f6a2c1e-8b3d-4a7e-9f0c-2d5b8e1a6c3f",
"7e2b9d4a-1c6f-4e8b-a3d5-0f9c2b7e4a1d"
]
}{ "Data": { "MatchNo": 15 } }Rules:
- all lines must have the same account type:
100Customer,200Supplier or300General; - for customers and suppliers (
100/200), all lines must belong to the same company; - for general accounts (
300), all lines must belong to the same account.
Choosing the matching number
Either let the API generate it with AutoGenerateMatchNo: true, or provide your own MatchNo. To get the next free number beforehand, use:
| Account type | Endpoint |
|---|---|
| Customer | matching.next-number.customer |
| Supplier | matching.next-number.supplier |
| General account | matching.next-number.account |
Matching at creation timeInvoices and operation lines accept a
MatchNowhen they are created. Combined withmatching.next-number.*, this lets you post a payment already matched with its invoice.
Typical flow: reconcile a customer payment
- Find the open invoice with
invoices.sales.outstanding.list(filter onCompanyIds). - Post the payment with
book-entries.banks.newon the customer's account. - Retrieve the account history lines of the invoice and the payment (
account-histories.listwithCompanyIdandNotMatchedOnly: true). - Call
matchingwith both line Ids.
Updated about 1 hour ago
Did this page help you?