Skip to content

Upload a statement (ANALYST+, dashboard user)

POST
/statements
curl --request POST \
--url https://api.invogi.com/v1/statements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/pdf' \
--data binary

The file is the raw request body, its type the Content-Type: PDF, CSV, Excel (.xlsx), PNG, JPEG or TIFF; the contents must match the type. The same file again returns the existing statement (200, duplicate: true). The statement is read in the background (status PROCESSING) or at once. A statement that reads, balances and whose supplier is known is READY; otherwise NEEDS_REVIEW with reviewReasons. PDFs and scans need the workspace’s external document processing.

filename
string
<= 255 characters
supplier_id
string format: uuid

Whose statement this is

string format: binary

The same file was already received; the existing statement

Media typeapplication/json
object
id
string format: uuid
status
string
Allowed values: PROCESSING NEEDS_REVIEW READY FAILED
reviewReasons
Array<string>
Allowed values: UNKNOWN_SUPPLIER SUPPLIER_MISMATCH UNBALANCED BALANCE_UNKNOWN NEEDS_LAYOUT NEEDS_PROCESSING_CONSENT UNGROUNDED_VALUES SKIPPED_ROWS
source
string
Allowed values: UPLOAD EMAIL
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
Allowed values: BALANCED UNBALANCED UNKNOWN
balanceDifference
string | null
balanceDetail
string | null
error
string | null
reviewedAt
string | null format: date-time
createdAt
string format: date-time
supplier
One of:
null
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
Allowed values: SENDER CONTACT TAX_ID NAME TITLE_TEXT PERSON
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
Allowed values: INVOICE CREDIT_NOTE PAYMENT ADJUSTMENT OTHER
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"
}
]
}

The statement

Media typeapplication/json
object
id
string format: uuid
status
string
Allowed values: PROCESSING NEEDS_REVIEW READY FAILED
reviewReasons
Array<string>
Allowed values: UNKNOWN_SUPPLIER SUPPLIER_MISMATCH UNBALANCED BALANCE_UNKNOWN NEEDS_LAYOUT NEEDS_PROCESSING_CONSENT UNGROUNDED_VALUES SKIPPED_ROWS
source
string
Allowed values: UPLOAD EMAIL
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
Allowed values: BALANCED UNBALANCED UNKNOWN
balanceDifference
string | null
balanceDetail
string | null
error
string | null
reviewedAt
string | null format: date-time
createdAt
string format: date-time
supplier
One of:
null
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
Allowed values: SENDER CONTACT TAX_ID NAME TITLE_TEXT PERSON
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
Allowed values: INVOICE CREDIT_NOTE PAYMENT ADJUSTMENT OTHER
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
Allowed values: NOT_FOUND UNAUTHORIZED FORBIDDEN INVALID_REQUEST CONFLICT RATE_LIMITED USAGE_LIMIT_EXCEEDED PROCESSING_FAILED
message
required
string
request_id
required
string

Example

{
"error": {
"code": "NOT_FOUND"
}
}

API key lacks required scope/role

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: NOT_FOUND UNAUTHORIZED FORBIDDEN INVALID_REQUEST CONFLICT RATE_LIMITED USAGE_LIMIT_EXCEEDED PROCESSING_FAILED
message
required
string
request_id
required
string

Example

{
"error": {
"code": "NOT_FOUND"
}
}