Skip to main content
POST
Trigger Historical Sync

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Historical sync parameters

connectionId
string
required

The unique identifier of the connection to sync

Minimum string length: 1
startDate
string

Start date in YYYY-MM-DD format

Pattern: ^\d{4}-\d{2}-\d{2}$
endDate
string

End date in YYYY-MM-DD format

Pattern: ^\d{4}-\d{2}-\d{2}$
allInvoices
boolean
default:false

Whether to fetch all invoices or only OPEN ones

useWorker
boolean
default:false

Whether to enqueue to SQS for distributed processing

invoiceIds
string[]

Optional array that will not work with date range to fetch a specific list of invoices

customerIds
string[]

Optional array of customer IDs to sync (for rutter integrations use emails)

jobType
enum<string>
default:sync_invoice

Type of sync job to run

Available options:
sync_customer,
sync_invoice
slackUsername
string

Optional Slack username to notify when sync completes (without @)

Response

Historical sync triggered successfully

data
object
required
code
enum<string>
Available options:
health_status_ok,
health_status_error,
validation_error,
bad_request,
unauthorized,
forbidden,
not_found,
method_not_allowed,
internal_server_error,
organization_not_found,
cannot_access_organization,
api_key_not_found,
resource_already_exists
message
string