Skip to main content

Refreshing company data

Overview of queuing data refresh in Codat's API

There are two POST endpoints in the API for queuing a refresh of data:

  1. /companies/{companyId}/data/queue/{dataType}
    • Will queue a dataset for the specified data type
    • dataType is the key of the data type e.g. invoices
  2. /companies/{companyId}/data/all
    • Will queue a dataset for each of the data types marked as Fetch on first link in your data type settings, where that data type is supported by the company's linked data connections
Multiple dataset queued exception

If you try to queue a synchronization for a data type that is already in process, you'll receive an exception.

"error": "DatasetAlreadyInProgressException: Cannot queue {dataType} sync for {companyId} as previous sync {dataSetId} is still in progress"

Was this page useful?