Skip to main content

How to do an overnight sync

Solution

Make a document query that enables you to get everything that happened since your last query.

Use the /document/ endpoint, with the 'modified_gt' parameter.

How to

If you only need document statues, and don't need signer information, make your query fast by adding the parameter nosigners=1. If you do this you can also use a larger offset/limit value than the default. (Go to document status reference)

e.g. Get up to 500 documents modified since a previous datetime (without signer details).

/api/v1/document/?group=your-group&nosigners=1&limit=500&modified_gt=[datetime of last query]

/api/v1/document/?group=your-group&nosigners=1&limit=500&offset=500&modified_gt=[datetime of last query]

Use the offset parameter to iterate the list.

The 'meta' object in the response contains 'next' to give you the next url to query.

When are no more items, then 'next' will be null.

Example response including 'meta':

{
"meta": {
"limit": 20,
"next": "/api/v1/document/?limit=20&offset=40&group=xxxx",
"offset": 20,
"previous": "/api/v1/document/?limit=20&offset=0&group=xxxx",
"total_count": 192
},
"objects": [
{
"archived": false,

Go to the Document API reference.