Read a CSV or Excel statement with chosen columns (ANALYST+, dashboard user)
POST
/statements/{statementId}/layout
const url = 'https://api.invogi.com/v1/statements/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/layout';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"columns":{"date":"example","type":"example","reference":"example","description":"example","debit":"example","credit":"example","amount":"example","balance":"example","dueDate":"example"},"invertAmount":true,"dayFirst":true}'};
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/statements/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/layout \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "columns": { "date": "example", "type": "example", "reference": "example", "description": "example", "debit": "example", "credit": "example", "amount": "example", "balance": "example", "dueDate": "example" }, "invertAmount": true, "dayFirst": true }'The columns are remembered for the statement’s supplier and used for its later statements.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”statementId
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
columns
required
The header for each column read; date and an amount (amount, or debit and/or credit) are needed
object
date
string
type
string
reference
string
description
string
debit
string
credit
string
amount
string
balance
string
dueDate
string
invertAmount
The single amount column shows payments and credits as positive
boolean
dayFirst
03/04/2026 is 3 April (default true)
boolean
Example generated
{ "columns": { "date": "example", "type": "example", "reference": "example", "description": "example", "debit": "example", "credit": "example", "amount": "example", "balance": "example", "dueDate": "example" }, "invertAmount": true, "dayFirst": true}Responses
Section titled “Responses”The statement
Media typeapplication/json
object
id
string format: uuid
status
string
reviewReasons
Array<string>
source
string
filename
string | null
mediaType
string
fromAddress
string | null
statementDate
string | null format: date
currency
string | null
openingBalance
Signed; negative is in the customer’s favour
string | null
closingBalance
Signed; negative means the supplier holds the customer’s money
string | null
balanceCheck
Opening balance + lines = closing balance
string | null
balanceDifference
string | null
balanceDetail
string | null
error
string | null
reviewedAt
string | null format: date-time
createdAt
string format: date-time
lineCount
List only
integer
supplierNameRaw
As printed on the statement
string | null
supplierTaxIdRaw
As printed on the statement
string | null
supplierMatchMethod
How the supplier was found
string | null
extractionMethods
Array<string>
pageCount
integer | null
layout
CSV/Excel only: the headers found, the column layout used, and a sample of rows
object | null
skippedRows
integer
lines
Array<object>
object
id
string format: uuid
lineNumber
integer
txnDate
string | null format: date
type
string
reference
string | null
description
string | null
amount
Signed; positive adds to what the customer owes
string
balance
Running balance as printed
string | null
dueDate
string | null format: date
duplicate
Upload only
boolean
Example
{ "status": "PROCESSING", "reviewReasons": [ "UNKNOWN_SUPPLIER" ], "source": "UPLOAD", "balanceCheck": "BALANCED", "supplierMatchMethod": "SENDER", "lines": [ { "type": "INVOICE" } ]}Invalid request
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
Example
{ "error": { "code": "NOT_FOUND" }}Resource not found
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
Example
{ "error": { "code": "NOT_FOUND" }}