Import invoice lines (ANALYST+, dashboard user)
const url = 'https://api.invogi.com/v1/overcharge-audits/invoice-lines';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 \ --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 } } }'Appends new lines and a new revision of any line whose content changed; identical lines are unchanged. Never rewrites the invoice or its canonical 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”Imported
object
object
object
object
object
Example
{ "rejectedRows": [ { "reason": "INVOICE_NOT_FOUND" } ], "invoices": [ { "reconciliation": { "status": "RECONCILED" } } ]}Invalid request