Skip to content

Turn a scan-only connection whose grant is still held into the recurring sync (ADMIN+, requires an active subscription)

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

A scan-only grant is normally revoked when its scan finishes; then the customer reconnects with POST /erp-connections/oauth/start (mode: SYNC), which reuses the same connection. While the grant is still held (mid-scan, or a revocation awaiting the hourly fallback), this keeps the connection (and its ID, which namespaces every imported bill’s external ID), switches it to SYNC, and starts the first sync. That sync reads full history but skips every bill the scan already imported. Idempotent for a connection that is already SYNC; 409 for a disabled one. Same responses as the sync endpoint.

connectionId
required
string format: uuid

Activated; first sync completed synchronously (no Queue binding)

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

Activated; first sync queued, or left to the hourly job while a scan or sync still holds the connection

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

Example

{
"status": "QUEUED"
}

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

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

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

Conflicting idempotency key or resource processing state

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