When embedding Census, your customers will be interested in knowing things like

  1. Was my particular record synced over?
  2. If that record was not synced over, what’s the reason?
  3. Can you provide me a file with all the records that were synced over?

…and much more.

Sync Tracking is available in the UI as noted in the product docs.

Census also provides a rich set of APIs to help you answer these questions.

Fetch Records API

The Fetch Records API allows you to query any sync run by

  • primary identifier
  • status
  • operation (upsert or delete in destination)

which then retrieves the record(s), their statuses, and their error messages (if any).

For example, your query may look like:

curl --request GET \
  --url https://app.getcensus.com/api/v1/sync_runs/{sync_run_id}/records?primary_identifier=id_1234 \
  --header 'Authorization: Bearer <token>'

With response:

{
  "status": "success",
  "data": [
    {
      "record_payload": {
        "ID": "id_1234",
        "NAME": "Hello World"
      },
      "identifier": "id_1234",
      "batch_started_at": "2024-06-28T21:33:54Z",
      "batch_completed_at": "2024-06-28T21:33:54Z",
      "operation": "upsert",
      "status": "succeeded",
      "status_message": "<string>"
    }
  ]
}

Fetch Records Count

The Fetch Records Count API allows you to query any sync run by the same parameters as above, and simply return a count of how many records match those conditions.

Fetch Records Export

The Fetch Records Export API allows you to query any sync run by status and operation, and returns a list of parquet files containing each of the matching records, their statuses, and their error messages (if any).

This is ideal for large syncs where the number of records to sort through are unmanageable in paginated API responses from the above Fetch Records API.