BoldSignDocumentation
BoldSign Mobile Icon

List documents

Thu, 8 Apr, 2021

The list of documents which is available in your "My documents" section can be fetched with the help of this API. The document list can be fetched with different parameters like sender, recipients, document status, search key, start and end date, etc.

Refer the below code snippet for more information:

C#CURL

/// <summary>
///     Lists the documents.
/// </summary>
public DocumentRecords ListDocuments()
{
    var documentRecords = this.DocumentClient.ListDocuments(page: 1, pageSize: 20);
    return documentRecords;
}
curl -X GET "https://api.boldsign.com/v1/document/list?page=1&pagesize=20" \
-H "accept: application/json" \
-H "Authorization: Bearer <authtoken>"

Please note that the default pageSize for a request is 10 and maximum limit on pageSize is 100.

The below given table shows the list of properties available in document records:

Property Description
Result Collection of document information which is fetched for the requested document list
PageDetails Contains information about the requested page which contains the document list

The document Result will contain information on list of documents requested which can be found below:

Properties Description
DocumentId Document ID
MessageTitle Message title of the document
Status Status of the document such as In-progress, completed, Decline, Expired, Revoked, Draft.
SenderDetail Contains information about the sender
SignerDetails Contains information about the signer
CcDetails Contains information about the CC
ActivityBy Gets the information of user who performed the last activity in the document
ActivityDate Gets the date of the last performed activity in the document
ActivityAction Gets the last activity performed in the document
CreatedDate Created date of the document
ExpiryDate Expiry date of the document
EnableSigningOrder Boolean indicating whether the signing order is enabled

The PageDetails will contain following information about the pages fetched:

Property Description
PageSize Page size specified in get document list request
Page Page index specified in get document list request
TotalRecordsCount Total number of documents fetched
TotalPages Total number of pages fetched
SortedColumn The field with which the list is sorted
SortDirection Direction in which the data is sorted as ascending or descending

List documents by sender

The documents can be listed by the sender of the document. Refer the below code snippet to list the document by sender:

C#CURL

/// <summary>
///  Lists the document by senders.
/// </summary>
public DocumentRecords ListDocumentBySenders()
{
    var senders = new List<string> { "sender1@email.com", "sender2@email.com" };
    var documentRecords = this.DocumentClient.ListDocuments(page: 1, pageSize: 20, sentBy: senders);
    return documentRecords;
}
curl -X GET "https://api.boldsign.com/v1/document/list?page=1&pagesize=20&sentby=sender1@email.com&sentby=sender2@email.com" \
-H "accept: application/json" \
-H "Authorization: Bearer <authtoken>"

List documents by recipients

The documents can be listed by the recipients present in the document. Refer the below code for the same:

C#CURL

/// <summary>
/// Lists the document by recipients.
/// </summary>
public DocumentRecords ListDocumentByRecipients()
{
    var senders = new List<string> { "signer1@email.com", "signer2@email.com" };
    var documentRecords = this.DocumentClient.ListDocuments(page: 1, pageSize: 20, recipients: senders);
    return documentRecords;
}
curl -X GET "https://api.boldsign.com/v1/document/list?page=1&pagesize=20&sentby=recipients@email.com&recipients=sender2@email.com" \
-H "accept: application/json" \
-H "Authorization: Bearer <authtoken>"

List documents by search key

The documents can be listed by the search key present in the document like document title, document ID, sender or recipients name etc. Refer the below code for the same:

C#CURL

/// <summary>
/// Lists the document by search key.
/// </summary>
public DocumentRecords ListDocumentsBySearchKey()
{
    var documentRecords = this.DocumentClient.ListDocuments(page: 1, pageSize: 20, searchKey: "NDA");
    return documentRecords;
}
curl -X GET "https://api.boldsign.com/v1/document/list?page=1&pagesize=20&searchKey=NDA" \
-H "accept: application/json" \
-H "Authorization: Bearer <authtoken>"

List documents by status

The documents can be listed by the document status like In-progress, completed, declined revoked etc. Refer the below code for the same:

C#CURL

/// <summary>
///     Lists the documents by status.
/// </summary>
public DocumentRecords ListDocumentsByStatus()
{
    var status = new List<Status> { Status.Declined, Status.Completed };
    var documentRecords = this.DocumentClient.ListDocuments(page: 1, pageSize: 20, status: status);
    return documentRecords;
}
curl -X GET "https://api.boldsign.com/v1/document/list?page=1&pagesize=20&status=Completed&status=Declined" \
-H "accept: application/json" \
-H "Authorization: Bearer <authtoken>"

List documents by date range

The documents can be listed by the start date and end date of the document. Refer the below code for the same:

C#CURL

// <summary>
///     Lists the documents with date rage.
/// </summary>
public DocumentRecords ListDocumentsWithDateRage()
{
    var startDate = DateTime.UtcNow.Subtract(TimeSpan.FromDays(5));
    var documentRecords = this.DocumentClient.ListDocuments(page: 1, pageSize: 20, startDate: startDate, endDate: DateTime.UtcNow);
    return documentRecords;
}
curl -X GET "https://api.boldsign.com/v1/document/list?page=1&pagesize=20&startDate=2021-01-30T18:30:00.000Z&endDate=2021-05-30T18:30:00.000Z" \
-H "accept: application/json" \
-H "Authorization: Bearer <authtoken>"

List documents by labels

The documents can be listed by the labels of the document. Refer the below code for the same:

C#CURL

// <summary>
///     Lists the documents with labels.
/// </summary>
public DocumentRecords ListDocumentsWithLabels()
{
    var labels = new List<string>
    {
        "labelname"
    };
    var documentRecords = this.DocumentClient.ListDocuments(page: 1, pageSize: 20, labels: labels);
    return documentRecords;
}
curl -X GET "https://api.boldsign.com/v1/document/list?page=1&pagesize=20&labels=labelname" \
-H "accept: application/json" \
-H "Authorization: Bearer <authtoken>"
Copied to clipboard