Get records
/sync/records
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'
}
},
...
]
Headers
The connection ID used to create the connection.
The integration ID used to create the connection (aka Unique Key).
Query Parameters
The data model to fetch
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.
The maximum number of records to return. If not passed, all records are returned.
The number of records to skip. If not passed, no records are skipped.
Set how the records are sorted. The default is id. The options are 'created_at', 'updated_at', 'id'.
Set the order of results. The default is 'desc'. The options are 'desc' or 'asc'.
If set to true, includes Nango metadata for each record in the response. Default is 'false'.
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.
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>'