Check an invoice-line file without writing (ANALYST+, dashboard user)
const url = 'https://api.invogi.com/v1/overcharge-audits/invoice-lines/preview';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"companyId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","rows":[{"sourceRowNumber":1,"invoiceId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","invoiceExternalId":"example","invoiceNumber":"example","supplierName":"example","supplierTaxId":"example","sourceLineId":"example","itemCode":"example","variant":"example","description":"example","quantity":"example","unit":"example","unitPrice":"example","priceBaseQuantity":"example","discountPercent":"example","discountAmount":"example","lineNetAmount":"example","currency":"example","orderDate":"2026-04-15"}],"dataProfile":{"profileId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","revisionId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","clientDiagnostics":{"inputRowCount":1,"rejectedRowCount":1,"warningRowCount":1,"unusedColumnCount":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/overcharge-audits/invoice-lines/preview \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "companyId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "rows": [ { "sourceRowNumber": 1, "invoiceId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "invoiceExternalId": "example", "invoiceNumber": "example", "supplierName": "example", "supplierTaxId": "example", "sourceLineId": "example", "itemCode": "example", "variant": "example", "description": "example", "quantity": "example", "unit": "example", "unitPrice": "example", "priceBaseQuantity": "example", "discountPercent": "example", "discountAmount": "example", "lineNetAmount": "example", "currency": "example", "orderDate": "2026-04-15" } ], "dataProfile": { "profileId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "revisionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "clientDiagnostics": { "inputRowCount": 1, "rejectedRowCount": 1, "warningRowCount": 1, "unusedColumnCount": 1 } } }'Resolves each row to an invoice already in Invogi (internal ID, external ID, or invoice number with supplier, within one company). Rows that match nothing or more than one invoice are listed, never guessed, and no invoice is created. An invoice whose existing lines are missing from the file is refused. Reports reconciliation of each invoice’s lines to its net amount. A currency error rejects every row for that invoice, so an import cannot leave a partial set of lines.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”For a Clerk session, selects a workspace in which the user has an active membership. If omitted, the remembered accessible workspace is used. API keys remain bound to their own workspace and cannot select another tenant.
Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Unique within this request
Needs supplierName or supplierTaxId
Unique within the invoice; kept as text
Non-negative decimal with at most 12 whole digits and six decimal places
Before line discounts, for priceBaseQuantity units; non-negative with at most 18 whole digits and six decimal places
Positive quantity with at most 12 whole digits and six decimal places
Non-negative decimal with at most 3 whole digits and six decimal places
The line’s total discount; non-negative with at most 18 whole digits and six decimal places
Billed net amount after line discounts, before tax; non-negative with at most 18 whole digits and six decimal places
Must equal the invoice’s currency
The exact ACTIVE revision an import used. Refused with 409 if the profile is archived or the revision is not the active one, and with 400 if the dataset kind or scope does not match the route.
object
Counts the browser observed, stored labelled as client-reported
object
Example generated
{ "companyId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "rows": [ { "sourceRowNumber": 1, "invoiceId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "invoiceExternalId": "example", "invoiceNumber": "example", "supplierName": "example", "supplierTaxId": "example", "sourceLineId": "example", "itemCode": "example", "variant": "example", "description": "example", "quantity": "example", "unit": "example", "unitPrice": "example", "priceBaseQuantity": "example", "discountPercent": "example", "discountAmount": "example", "lineNetAmount": "example", "currency": "example", "orderDate": "2026-04-15" } ], "dataProfile": { "profileId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "revisionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "clientDiagnostics": { "inputRowCount": 1, "rejectedRowCount": 1, "warningRowCount": 1, "unusedColumnCount": 1 } }}Responses
Section titled “Responses”What an import would do
object
object
object
object
object
Example
{ "rejectedRows": [ { "reason": "INVOICE_NOT_FOUND" } ], "invoices": [ { "reconciliation": { "status": "RECONCILED" } } ]}Invalid request