Skip to content

Preview what an import of these rows would do, without storing anything (ANALYST+)

POST
/payments/import/preview
curl --request POST \
--url https://api.invogi.com/v1/payments/import/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "rows": [ { "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 } ], "source": "BANK_STATEMENT", "dataProfile": { "profileId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "revisionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "clientDiagnostics": { "inputRowCount": 1, "rejectedRowCount": 1, "warningRowCount": 1, "unusedColumnCount": 1 } } }'

Runs the same matching, credit handling and duplicate-payment checks as POST /payments/import inside a transaction that is always rolled back. No payments, refunds, findings, notifications, import batch or automation activity are recorded. A later import can differ if other payments or suppliers are recorded in between; its response is authoritative.

X-Invogi-Organization
string format: uuid

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.

Media typeapplication/json
object
rows
required
Array<object>
>= 1 items <= 5000 items
object
supplierName

Payee name as exported

string
supplierTaxId
string
supplierExternalId

The payee’s ID in the customer’s system; kept as evidence

string
<= 200 characters
invoiceExternalId

Matches an invoice’s externalId

string
invoiceNumber

Matches an invoice by number when there is no invoice ID

string
<= 200 characters
amount
required

A positive payment amount; at most 18 integer and 6 decimal digits

string
/^-?[0-9]+(\.[0-9]{1,6})?$/
currency

Optional; defaults to the organization’s base currency

string
/^[A-Za-z]{3}$/
paidAt
required
string format: date
paymentReference
string
method
string
direction

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.

string
default: PAYMENT
Allowed values: PAYMENT REFUND
sourceRowNumber
required
integer
source

What kind of file the rows came from. AP_PAYMENT_EXPORT (the default): an AP or ERP payment report, where every REFUND row is a supplier refund. BANK_STATEMENT: a bank account export, where a REFUND (credit) row is kept as a supplier refund only when it resolves to a known supplier by invoice, tax ID or exact name. A credit that matches an earlier payment to that supplier (same amount and currency, paid within the previous 14 days, explicit return/rejection wording, and containing the earlier payment’s non-empty reference) is counted as a returned payment instead and sets that payment’s returnedOn, which excludes it from later duplicate-payment checks. A credit matching a payment in an undismissed duplicate-payment finding or a recovery case is kept as a supplier refund instead. Other credits are counted and not stored. BANK_STATEMENT rows are processed in date order, credits first on each date.

string
Allowed values: BANK_STATEMENT AP_PAYMENT_EXPORT
dataProfile

Optional SETTLED_PAYMENTS profile (dashboard users only); its file type must equal source. Accepted on preview for early validation; only an import records a receipt.

object
profileId
required
string format: uuid
revisionId
required
string format: uuid
clientDiagnostics

Counts the browser observed, stored labelled as client-reported

object
inputRowCount
integer
rejectedRowCount
integer
warningRowCount
integer
unusedColumnCount
integer

The counts the import would produce

Media typeapplication/json
object
preview
required
boolean
source
required

What kind of file the rows came from. AP_PAYMENT_EXPORT (the default): an AP or ERP payment report, where every REFUND row is a supplier refund. BANK_STATEMENT: a bank account export, where a REFUND (credit) row is kept as a supplier refund only when it resolves to a known supplier by invoice, tax ID or exact name. A credit that matches an earlier payment to that supplier (same amount and currency, paid within the previous 14 days, explicit return/rejection wording, and containing the earlier payment’s non-empty reference) is counted as a returned payment instead and sets that payment’s returnedOn, which excludes it from later duplicate-payment checks. A credit matching a payment in an undismissed duplicate-payment finding or a recovery case is kept as a supplier refund instead. Other credits are counted and not stored. BANK_STATEMENT rows are processed in date order, credits first on each date.

string
Allowed values: BANK_STATEMENT AP_PAYMENT_EXPORT
inputRowCount
required
integer
>= 1
paymentsImported
required

Payments the import would store.

integer
refundsImported
required

Supplier refunds the import would store.

integer
creditsIgnored
required
integer
returnedPayments
required
integer
recordsNeedingReview
required
integer
findingCounts
required
object
key
additional properties
integer
coverage
required
object
linkedToInvoice
required
integer
linkedToSupplier
required
integer
provisionalPayee
required
integer
unmatched
required
integer

Example

{
"preview": true,
"source": "BANK_STATEMENT"
}

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
details

Optional stable, content-free context, e.g. {reason, resets_at, preparation_id}.

object
key
additional properties
One of:
string

Example

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

Missing or invalid API key

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
details

Optional stable, content-free context, e.g. {reason, resets_at, preparation_id}.

object
key
additional properties
One of:
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
details

Optional stable, content-free context, e.g. {reason, resets_at, preparation_id}.

object
key
additional properties
One of:
string

Example

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