Data Status

When you pull data using the Codat API, you can check the last time each data type was synchronized, and view any errors that occurred when Codat tried to refresh the data.

Sync status

The GET /companies/{companyId}/dataStatus endpoint returns:

  • A full list of data types for your company with their current sync status: currentStatus .
  • The last time each data type was synced successfully: lastSuccessfulSync .

Dataset Statuses

Datasets can be in one of the following states:

State

Description

Fetching

The data is currently being pulled from the integration.

Mapping

The data is being converted into Codat's standard model.

Validating

The data is being checked for consistency and correctness.

Processing

The data is being stored into Codat's cache.

Complete

The dataset has completed, and the data is available to be queried via Codat's API.

NotSupported

The integration does not support the datatype that was requested. For example, Clearbooks does not support pulling the Profit and Loss Report.

FetchError, MapError, ValidationError, ProcessingError, InternalError

The dataset failed in one of the above states. These are monitored by our engineering teams, but you may contact support team for assistance as required.

AuthError

The authentication to the data source has expired. This usually means you will need to relink, by getting the end user to follow the data connections's linkUrl to re-enter their credentials.

Queued

The dataset has just been requested, and will move into fetching shortly.

Examples

Data type that has never been synced

{
  "suppliers": {
    "dataType": "suppliers”
  },
  ...
}

First sync for the data type failed

{
  "suppliers": {
    "dataType": "suppliers",
    "currentStatus": "FetchError",
    "latestSyncId": "31632c48-23dc-4cb1-b3ff-0829343c8e85",
  },
  ...
}

Last sync failed although a previous sync was successful

{
  "suppliers": {
    "dataType": "suppliers",
    "lastSuccessfulSync": "2019-10-10T00:31:04.497225Z",
    "currentStatus": "FetchError",
    "latestSyncId": "31632c48-23dc-4cb1-b3ff-0829343c8e85",
    "latestSuccessfulSyncId": "9d6d3754-deeb-42b7-ad37-e10942f9e258"
  },
  ...
}

Sync was successful

{
  "suppliers": {
    "dataType": "suppliers",
    "lastSuccessfulSync": "2019-10-10T00:31:04.497225Z",
    "currentStatus": "Complete",
    "latestSyncId": "31632c48-23dc-4cb1-b3ff-0829343c8e85",
    "latestSuccessfulSyncId": "31632c48-23dc-4cb1-b3ff-0829343c8e85"
  },
  ...
}

Did this page help you?