Analyze confirmed, normalized historical invoice rows (ANALYST+)
const url = 'https://api.invogi.com/v1/scans';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"companyId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","rows":[{"supplierName":"example","supplierTaxId":"example","invoiceNumber":"example","issueDate":"2026-04-15","currency":"GBP","grossAmount":"example","purchaseOrderRef":"example","bankIban":"example","bankSortCode":"60-16-13","bankAccountNumber":"31926819","externalId":"example","sourceRowNumber":1}],"payments":[{"supplierName":"example","supplierTaxId":"example","supplierExternalId":"example","invoiceExternalId":"example","invoiceNumber":"example","amount":"example","currency":"GBP","paidAt":"2026-04-15","paymentReference":"example","method":"example","direction":"PAYMENT","sourceRowNumber":1}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.invogi.com/v1/scans \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "companyId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "rows": [ { "supplierName": "example", "supplierTaxId": "example", "invoiceNumber": "example", "issueDate": "2026-04-15", "currency": "GBP", "grossAmount": "example", "purchaseOrderRef": "example", "bankIban": "example", "bankSortCode": "60-16-13", "bankAccountNumber": "31926819", "externalId": "example", "sourceRowNumber": 1 } ], "payments": [ { "supplierName": "example", "supplierTaxId": "example", "supplierExternalId": "example", "invoiceExternalId": "example", "invoiceNumber": "example", "amount": "example", "currency": "GBP", "paidAt": "2026-04-15", "paymentReference": "example", "method": "example", "direction": "PAYMENT", "sourceRowNumber": 1 } ] }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Defaults to the default company
object
Optional. Rows without a currency are analysed in the organization’s base currency (a ledger export is in one functional currency).
UK sort code; used only together with bankAccountNumber
Example
60-16-13UK account number (6-8 digits); used only together with bankSortCode
Example
31926819Optional payment history for the same period. Imported after the invoices, in the same all-or-nothing transaction, so a payment can link to an invoice by invoiceExternalId or invoiceNumber; then checked for duplicate payments. Payees that match no known supplier are kept as provisional payees and checked against each other at lower confidence; no supplier is created from payment data.
object
Payee name as exported
The payee’s ID in the customer’s system; kept as evidence
Matches an invoice’s externalId
Matches an invoice by number when there is no invoice ID
A positive payment amount; at most 18 integer and 6 decimal digits
Optional; defaults to the organization’s base currency
REFUND is money the supplier sent back (in an export, a row of the opposite sign to the payments). It is kept as a supplier refund that can be suggested on a matching recovery case, never checked as a payment. The amount stays positive. A refund already imported (same payee, currency, amount, date and reference) is not added again.
Responses
Section titled “Responses”Scan created
object
Rows not analyzed because their externalId was already imported or repeated in the file
object
Present for ALREADY_IMPORTED and DUPLICATE_EXTERNAL_ID_IN_FILE
ALREADY_SYNCED_FROM_ERP means an ERP sync already imported an invoice for the same company with the same supplier, invoice number, currency and gross amount
The ERP-synced invoice this row matched (ALREADY_SYNCED_FROM_ERP only)
Total gross value of the analysed invoices in the organization’s base currency (analyzedValueCurrency). Invoices with no exchange rate are left out; see unconvertedInvoices.
Analysed invoices not included in analyzedValue because no exchange rate was available
object
object
object
object
object
Matched to a known supplier but no invoice
Matched to no supplier; grouped by normalized payee name at lower confidence
No invoice or known supplier match
Example
{ "status": "COMPLETE", "skippedRows": [ { "reason": "ALREADY_IMPORTED" } ]}Invalid request
object
object
Example
{ "error": { "code": "NOT_FOUND" }}Missing or invalid API key
object
object
Example
{ "error": { "code": "NOT_FOUND" }}API key lacks required scope/role
object
object
Example
{ "error": { "code": "NOT_FOUND" }}Conflicting idempotency key or resource processing state
object
object
Example
{ "error": { "code": "NOT_FOUND" }}Request-rate or customer-usage limit exceeded; inspect the stable error code
object
object
Example
{ "error": { "code": "NOT_FOUND" }}