Skip to main content
POST
Attach a receipt to a ledger entry

Attaching an uploaded receipt

If you uploaded a receipt without a ledgerEntryId, it lands in the document inbox. Use this endpoint to attach it to a ledger entry later, for example once the corresponding entry has been posted:
The receipt is filed to the receipts location and the response reflects the ledger entry it is now attached to. A receipt that is already attached to another ledger entry is moved to the given one.
Ledger entries with VAT are booked as two transactions internally. Only the id of the ledger entry itself, as returned by find ledger entries, is accepted here — the id of the VAT transaction results in a 404 Not Found response with the error code transactions/not-found.

Authorizations

x-api-token
string
header
required

API token for authentication. Obtain from your Infinity account settings.

Path Parameters

receiptId
string
required

The id of the receipt, as returned when it was uploaded

Body

application/json

The ledger entry to attach the receipt to.

ledgerEntryId
string
required

The id of the ledger entry to attach the receipt to.

Example:

"682338d9e9500b3ffe4baa5a"

Response

The receipt was attached to the ledger entry.

receipt
Receipt · object
required

A receipt document that was uploaded to the organisation.