latestOpenAPI 3.0.02026-08-081631260.8 KB

ae9d64e51a99

Documents

Get a list of documents

Gets a paginated and filtered list of documents.

This endpoint supports cursor-based pagination. To fetch several pages of documents, repeat the following steps:

  1. fetch a page of documents, without specifying a cursor value,

  2. if there's a next page, the response will contain a non-empty cursor value:

    {
      "documents": [...],
      "pagination_meta": {
        "cursor": "c3RyaW5nCg"
      }
    }
    
  3. make a subsequent GET /v3/documents request while including a parameter cursor=c3RyaW5nCg, e.g.

    GET /v3/documents?cursor=c3RyaW5nCg
    

Repeat steps 2 and 3 until you fetch all documents. Use page_size parameter to control the number of items in the response list.

get/documents

Query parameters

context[]string[]

Filters contracts by context.

Possible values:

  • my_documents - returns only contracts that are directly accessible by the user (contracts owned by the user, contracts directly shared with the user or contracts where the user is a signee).
  • team_documents - returns contracts that are accessible by the user's team members.
  • workspace - returns contracts that are accessible to the user through contract spaces.

Default value is my_documents.

If you wish to get all available contracts, just pass all 3 values.

fullboolean

Adds extra document data to the response, such as data_fields and full party details

titlestring
Example:Employment aggrement

Filter by document title (case insensitive partial match)

states[]string[]

Filter by document states

types[]string[]

Filter by document types

tags[]string[]

Filter by tags

ownedboolean

Whether to look for documents owned by the requester or not

cursorstring byte
Example:OGUzOTlmZjAK

Page identifier. The next page identifier will be found in the response body

signed_at_ltstring date-time
Example:2022-01-02T00:00:00Z

Filter by maximum date when the documents were signed (non-inclusive)

signed_at_gtestring date-time

Filter by minimum date when the documents were signed (inclusive)

updated_at_ltstring date-time

Filter by maximum date when the documents were updated (non-inclusive)

updated_at_gtestring date-time

Filter by minimum date when the documents were updated (inclusive)

page_sizeinteger

Page size. The default is 25 and the max value is 100

sort_column'created_at' | 'updated_at' | 'title'

Column to use for sorting the documents (defaults to created_at)

sort_direction'asc' | 'desc'

Order direction when sorting the documents

integration_object_idstring string

Filter by the ID of the integration object which the document is related to (e.g. Salesforce Opportunity ID)

workspace_idstring
Example:059fb683-a2d9-4c3a-b134-6f5e7282d499

Workspace ID where documents are contained. It should be used in combination with context parameter with value workspace

Response

Paginated list of documents

Example response

{
  "documents": [
    {
      "ocr_status": "pending",
      "owner": {
        "full_name": "Jane Doe"
      },
      "parties": [
        {
          "address": "123 Main Street",
          "name": "Jane Doe",
          "reference": "Recipient",
          "signees": [
            {
              "full_name": "Jane Doe",
              "signature_verification_methods": [
                "sms",
                "basic",
                "wet_signature"
              ],
              "title": "Software Engineer"
            }
          ]
        }
      ],
      "signing_order_mode": "strict",
      "tags": [
        "tags"
      ],
      "visibilities": [
        {
          "full_name": "Jane Doe"
        }
      ]
    }
  ]
}