e-copedia hjælpecenter

How to retrieve matched entries

Sidst opdateret:
Skrevet af Charles J

When working with booked entries, you may need to determine which payments and invoices have been matched in e-conomic.

For example, you might retrieve a booked customer invoice and want to find the payment or payments that have been matched against it. The same applies to supplier invoices and supplier payments.

A match does not necessarily mean an invoice matched with a payment. Depending on the bookkeeping, different combinations of entries can be matched.

Examples include (Both for supplier- and customerInvoices, and manual customer invoices):

Entry Type

Entry Type

Invoice

Payment

Invoice

Creditnote

Payment

Payment

Creditnote

Payment

The matched-pairs endpoint can be used to retrieve these relationships.

Retrieve matched pairs

Use:

GET /booked-entries/matched-pairs

The endpoint returns pairs of booked entries that have been matched with each other.

A pair can, for example, represent:

  • a customer invoice matched with a customer payment

  • a supplier invoice matched with a supplier payment

Find matches for a specific entry

A booked entry can appear as either fromEntry or toEntry in a matched pair.

When looking for all matches related to a specific entry, you should therefore filter on both:

GET /booked-entries/matched-pairs?filter=fromEntry$eq:{entryNumber}$or:toEntry$eq:{entryNumber}

This returns all matched pairs where the entry appears on either side of the match.

Filtering by date

You can also use date filtering to retrieve matches within a specific period.

When filtering by date, a matched pair is returned when either entry in the pair falls within the specified date range.

Partial matches

The amounts returned by the endpoint require some additional consideration when working with partial matches.

EntryAmountDKK represents the full amount of the booked entry.

It does not represent the amount that was matched between the two entries.

For example, if an invoice of DKK 1,000 has only been partially matched with a payment, the invoice entry will still return its full EntryAmountDKK of DKK 1,000.

The specific amount matched between two entries is not currently exposed by the endpoint.

An entry can appear more than once

Entry IDs are not guaranteed to be unique in the response.

If one booked entry has been matched with multiple other entries, the same entry can appear in multiple matched pairs.

This isn't unintended and should be taken into account when processing the response.

Var denne artikel nyttig?