List Documents API Parameters

Complete reference for all parameters available in the List Documents API endpoint

List Documents API Parameters

Endpoint

GET /public/v1/documents

Filter Parameters

Document Identification

ParameterTypeRequiredDescription
idstringNoFilter by specific document ID
template_idstringNoFilter by parent template ID
form_idstringNoFilter by parent form ID
qstringNoSearch by document name or reference number

User and Contact Filters

ParameterTypeRequiredDescription
membership_idstringNoFilter by document owner's membership ID
contact_idstringNoFilter by recipient or approver contact ID

Status Filters

ParameterTypeRequiredDescription
statusintegerNoFilter by document status (see status values below)
status__neintegerNoExclude documents with specified status (see status values below)

Organization Filters

ParameterTypeRequiredDescription
folder_uuidstringNoFilter by folder UUID
tagstringNoFilter by document tag
metadataarrayNoFilter by metadata key-value pairs (format: metadata_{key}={value})

Date Range Filters

ParameterTypeRequiredDescription
completed_fromdatetimeNoInclude documents completed after this date
completed_todatetimeNoInclude documents completed before this date
created_fromdatetimeNoInclude documents created after this date
created_todatetimeNoInclude documents created before this date
modified_fromdatetimeNoInclude documents modified after this date
modified_todatetimeNoInclude documents modified before this date

Special Filters

ParameterTypeRequiredDescription
deletedbooleanNoInclude only deleted documents when true

Pagination Parameters

ParameterTypeRequiredDefaultDescription
countintegerNo50Number of results per page (max: 100)
pageintegerNo1Page number (starts from 1)

Ordering Parameters

ParameterTypeRequiredDefaultDescription
order_bystringNodate_status_changedField to order results by

Available Order Fields

  • date_created (recommended for performance)
  • date_status_changed (default)
  • date_modified
  • name

Data Types

DateTime Format

All datetime parameters must use ISO 8601 format:

  • Format: YYYY-MM-DDTHH:MM:SSZ
  • Example: 2023-08-01T00:00:00Z

Document Status Values

Status values are numeric integers:

ValueStatusDescription
0document.draftDocument is in draft state
1document.sentDocument has been sent
2document.completedDocument is completed
3document.uploadedDocument uploaded
4document.errorDocument has an error
5document.viewedDocument has been viewed
6document.waiting_approvalDocument is waiting for approval
7document.approvedDocument has been approved
8document.rejectedDocument has been rejected
9document.waiting_payDocument is waiting for payment
10document.paidDocument has been paid
11document.voidedDocument has been voided
12document.declinedDocument has been declined
13document.external_reviewDocument is under external review

Performance Considerations

Recommended Practices

  • Use order_by=date_created for consistent results
  • Include created_from and created_to when ordering for best performance
  • Limit count to 100 or less
  • Use date range filters for large workspaces

Performance Impact

  • Ordering by date_created with date ranges: High performance
  • Ordering by date_status_changed without date ranges: Lower performance for large datasets
  • Complex metadata filters: May impact response time

Response Format

The API returns a JSON object with:

  • results: Array of document objects
  • count: Total number of documents matching criteria
  • next: URL for next page (if available)
  • previous: URL for previous page (if available)

Usage Examples

Filter by Status

# Get all completed documents
GET /public/v1/documents?status=2

# Exclude draft documents
GET /public/v1/documents?status__ne=0

Filter by Metadata

# Filter by opportunity ID
GET /public/v1/documents?metadata_opportunity_id=2181432

# Filter by multiple metadata fields
GET /public/v1/documents?metadata_opportunity_id=2181432&metadata_custom_key=custom_value

Ordering with Date Range

# Order by creation date with date range
GET /public/v1/documents?order_by=date_created&created_from=2023-08-01T00:00:00Z&created_to=2023-09-01T00:00:00Z&count=100

Related Endpoints