Upload a receipt
Uploads a receipt or other document to the organisation’s documents, and optionally attaches it to an existing ledger entry.
The request must be sent as multipart/form-data with the file contents in the file field.
Uploading a receipt
Send the request asmultipart/form-data with the file contents in the file field. For example, the following request uploads a receipt PDF and attaches it to an existing ledger entry:
transactionId is omitted, the document lands in the organisation’s document inbox, where it can be processed later — just like a manual upload in the app.
Supported file types
Files can be at most 10 MB in size, and must be one of the following types:415 Unsupported Media Type response and the error code
files/unsupported-file-type, even if a supported content type or file
extension is claimed in the request.Live Capture analysis
If Live Capture is enabled for the organisation and analysis quota is available, an automatic document analysis starts after the upload, similar to uploading a receipt manually in the app. The analysis runs in the background and does not delay the response. To skip the automatic analysis for an upload, set thesuppressAnalysis field to true.
Rate limits
Because uploads are materially more expensive to process than other requests, this endpoint has a stricter rate limit than the rest of the API: at most 100 requests per hour. When the limit is exceeded, you’ll receive a429 Too Many Requests response with error code general/too-many-requests.
Uploads are also processed in a background queue, so bursts of uploads within the rate limit (for example, an automation submitting dozens of receipts in a short window) are handled gracefully. Analyses from a large batch are processed a few at a time, so it can take several minutes until every document in the batch has finished analysing.Authorizations
API token for authentication. Obtain from your Infinity account settings.
Body
The receipt file and its metadata as multipart/form-data.
The file to upload (maximum 10 MB). Supported content types:
application/pdfimage/pngimage/jpegimage/gifimage/tiffimage/heicimage/heif
The actual file content is validated, so the file must really be one of these types regardless of the declared content type or file extension.
A title or file name for the document.
200"Coffee receipt 2025-01-30"
An optional note to store with the document.
1000The id of an existing ledger entry transaction to attach the receipt to. If set, the document is filed to the receipts location. If unset, the document lands in the inbox.
"682338d9e9500b3ffe4baa5a"
If true, no automatic Live Capture document analysis is started for this upload. By default, analysis starts after upload if Live Capture is enabled for the organisation and analysis quota is available.
true, false Response
The receipt was uploaded successfully.
A receipt document that was uploaded to the organisation.