Skip to main content

FAQ

Common coding questions with the Legalesign API

Count of documents sent from a team over a time period.

Make two queries to the GET /document/ endpoint at the start and end of your time period using the 'created_gt' filter. The difference between the values of meta['total_count'] will be your documents-sent count.

Include filters archived=all, nosigners=1 and limit=1 in your query.

example query to get a count of documents created from the start of 2024

/api/v1/document/?group=your-group&limit=1&created_gt=2024-01-01&archived=all&nosigners=1
use a precise time if necessary

/api/v1/document/?group=your-group&limit=1&created_gt=2024-06-01T10:45:25&archived=all&nosigners=1

Go to the Document API reference.

Query for documents changed since your last query.

Use the GET /document/ endpoint with the 'modified_gt' filter.

Make your query fast by using the nosigners=1 filter if you don't need signer details, and reduce overhead on requests by using a larger offset/limit value than the default.

example query to get (up to 500) documents modified since a previous datetime

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

Go to the Document API reference.

Have a question? let us know - support@legalesign.com

Understanding web IDs and API IDs

If you are using console.legalesign.com for your web experience you'll notice the IDs in the web urls do not match the API IDs.

The console web app is using base64 encoded versions of the API IDs.

The base64 encoded versions are also prefixed with 3 characters that identify the relevant object.

For example, on the web app a document details page URL might look like this:

http://console.legalesign.com/group/Z3JwMGJjZTY3ZTgtYTVlOS00MzM4LTlmMDYtMmM3OWY2ZTVmMmY3/detail/ZG9jNjc4NDc3N2YtMDExNC00OTdhLTk0NmYtNTc2OTE0YjU0YzZj/

The first ID after /group/ is the base64 encoded group ID, and the second, after /detail/, is the base64 encoded document ID. Simply decode them and strip the first 3 characters to get the underlying UUID.

For example, using the atob function in javascript:

atob("Z3JwMGJjZTY3ZTgtYTVlOS00MzM4LTlmMDYtMmM3OWY2ZTVmMmY3")
"grp0bce67e8-a5e9-4338-9f06-2c79f6e5f2f7"

atob("ZG9jZTZiMjNjYTEtODQ0My00MTZkLTgzMTktYzgwYTBhZmEyMDAy")
"doce6b23ca1-8443-416d-8319-c80a0afa2002"

The API identifiers are revealed. Your group is '0bce67e8-a5e9-4338-9f06-2c79f6e5f2f7' and the relevant document is 'e6b23ca1-8443-416d-8319-c80a0afa2002'.