Skip to content

Analyze the bills a first sync left out (OWNER only)

POST
/erp-connections/{connectionId}/backfill
curl --request POST \
--url https://api.invogi.com/v1/erp-connections/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/backfill \
--header 'Authorization: Bearer <token>'

A new connection’s first sync keeps the bills that fit the one-time history allowance plus the plan’s remaining included volume (unpaid first, then newest) and leaves the rest out. This imports everything the provider has that Invogi does not, billed like other usage: history allowance, then included volume, then overage. An owner-set overage limit still refuses what exceeds it and the run reports PAUSED. Repeating it is safe.

connectionId
required
string format: uuid

Completed inline (no background queue bound)

Media typeapplication/json
object
sync_run_id
required

Null when the sync was skipped before a run started because the overage limit has no room

string | null format: uuid
status
required

PAUSED means the owner-set overage limit refused further bills; nothing failed and the rest are imported after the limit is raised or the period renews

string
Allowed values: COMPLETED PAUSED
paused_reason
string
Allowed value: OVERAGE_LIMIT
vendorsSeen
required
integer
invoicesSeen
required
integer
invoicesImported
required
integer
invoicesLinked
required

Of the imported invoices

integer

Example

{
"status": "COMPLETED",
"paused_reason": "OVERAGE_LIMIT"
}

Queued

Media typeapplication/json
object
status
required
string
Allowed value: QUEUED

Example

{
"status": "QUEUED"
}

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"
}
}

Resource not found

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"
}
}