GET

/sync/records

Bearer*
curl --request GET \
  --url https://api.nango.dev/sync/records \
  --header 'Authorization: Bearer <token>' \
  --header 'Connection-Id: <connection-id>' \
  --header 'Provider-Config-Key: <provider-config-key>'

The delta parameter & webhooks

If you are using the Nango webhooks you can use the timestamp you get from the webhook for the delta parameter.

Response

Default behaviour

By default this returns an array of objects in the data model that you queried with some metadata about each record.

[
    {
        id: 123,
        ..., // Fields as specified in the model you queried
        _nango_metadata: {
            deleted_at: null,
            last_action: 'ADDED',
            first_seen_at: '2023-09-18T15:20:35.941305+00:00',
            last_modified_at: '2023-09-18T15:20:35.941305+00:00'
        }
    },
    ...
]
Connection-Idrequired
string

The connection ID used to create the connection.

Provider-Config-Keyrequired
string

The integration ID used to create the connection (aka Unique Key).

Query Parameters

modelrequired
string

The data model to fetch

delta
string

Timestamp, e.g. 2023-05-31T11:46:13.390Z. If passed only records added or updated after this timestamp are returned, otherwise all records are returned.

limit
integer

The maximum number of records to return. If not passed, all records are returned.

offset
integer

The number of records to skip. If not passed, no records are skipped.

sort_by
string

Set how the records are sorted. The default is id. The options are 'created_at', 'updated_at', 'id'.

order
string

Set the order of results. The default is 'desc'. The options are 'desc' or 'asc'.

include_nango_metadata
boolean

If set to true, includes Nango metadata for each record in the response. Default is 'false'.

filter
string

Filter to only show results that have been added or updated or deleted. Helpful when used in conjuction with the delta parameter to retrieve a subset or records that were added, updated, or deleted with the latest sync.