List documents for a project
What are project documents? Project documents are structured documents (estimates, specifications, contracts) that are automatically generated from project data. They are based on saved project versions (snapshots) and can include dynamic content, variables, and conditional sections.
Document types:
- Estimate: Commercial proposals summarizing project services, quantities, discounts, and costs
- Specification: Detailed requirement documents describing what must be delivered
- Custom Editor: Free-form documents like contracts, NDAs, or custom agreements
What is returned: A paginated grid/list of all documents for the specified project, including:
- Document title, type, and status
- Associated project version (snapshot)
- Contact person assigned to the document
- Creation date
- All fields can be filtered, sorted, and paginated
Document statuses:
- Draft: Initial version, not yet finalized
- Waiting for Approval: Sent to client for review
- Final: Ready for signing
- Accepted: Approved by client
- Rejected: Declined by client
- Parked: Temporarily set aside
Important notes:
- Documents are always linked to a specific project version for traceability
- Only documents from the current workspace are returned
- Requires permission to view projects in the workspace
Retrieves a paginated grid of documents with filtering and sorting capabilities. Quick search available on: title. Filterable fields: id, title, type, status, contactUserId, snapshotId, createdAt. Sortable fields: id, title, type, status, contactUserId, snapshotId, createdAt.
GET
/projects/{projectId}/documentsAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:reador
AuthorizationBearer token (JWT) · headerrequiredPath parameters
projectIdstringrequiredProject ID
Query parameters
pagenumberPage number (1-based)
pageSizenumberNumber of items per page
viewIdstringView identifier for saved grid configurations
quickSearchstringQuick search text. Searches across: title
filtersstringJSON string containing filter configuration.
**Available Fields:**
- **id** (string): Document ID
- **title** (string): Document title
- **type** (set): Document type (Estimate, Specification, CustomEditor)
- **status** (set): Document status (Draft, Final, WaitingForApproval, etc.)
- **contactUserId** (string): Contact person user ID
- **snapshotId** (string): Project snapshot ID
- **createdAt** (date): Document creation timestamp
**Filter Structure:**
```json
[
{
"type": "string|number|date|set|boolean|array|task_status|task_type",
"fieldName": "field_name",
"value": {
"comparison": "comparison_type",
"value": "filter_value"
}
}
]
```
**Group Filters (AND/OR Combinations):**
```json
[
{
"type": "group",
"fieldName": "group0.18807479823070028",
"value": {
"type": "or",
"filters": [
{
"type": "string",
"fieldName": "fileName",
"value": {
"comparison": "contain",
"value": "aa"
}
},
{
"type": "number",
"fieldName": "rowCount",
"value": {
"comparison": ">=",
"value": 33
}
}
]
}
}
]
```
**Available Comparison Operators:**
- **id** (string): Document ID (string filter). Available comparisons: contain, not_contain, equal, starts_with, ends_with, is_empty, is_not_empty
- **title** (string): Document title (string filter). Available comparisons: contain, not_contain, equal, starts_with, ends_with, is_empty, is_not_empty
- **type** (set): Document type (Estimate, Specification, CustomEditor) (set filter). Available comparisons: in, not_in, is_empty, is_not_empty
- **status** (set): Document status (Draft, Final, WaitingForApproval, etc.) (set filter). Available comparisons: in, not_in, is_empty, is_not_empty
- **contactUserId** (string): Contact person user ID (string filter). Available comparisons: contain, not_contain, equal, starts_with, ends_with, is_empty, is_not_empty
- **snapshotId** (string): Project snapshot ID (string filter). Available comparisons: contain, not_contain, equal, starts_with, ends_with, is_empty, is_not_empty
- **createdAt** (date): Document creation timestamp (date filter). Available comparisons: equal, not_equal, >, <, >=, <=, between, lastMonth, thisMonth, is_empty, is_not_empty
**Note:** Use `quickSearch` parameter for simple text search instead of adding it to filters.
sortstringJSON array of sort objects.
**Sortable Fields:**
- **id**: Document ID
- **title**: Document title
- **type**: Document type (Estimate, Specification, CustomEditor)
- **status**: Document status (Draft, Final, WaitingForApproval, etc.)
- **contactUserId**: Contact person user ID
- **snapshotId**: Project snapshot ID
- **createdAt**: Document creation timestamp
**Sort Structure:**
```json
[
{
"field": "field_name",
"direction": "asc|desc"
}
]
```
**Default Sort:** createdAt (desc)
fieldsToReturnany[]Comma-separated list of field names to include in response items. If not provided, all fields are returned.
**Available Fields:** id, title, type, status, contactUserId, snapshotId, createdAt
Responses
200Paginated list of project documents
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X GET "https://leadtime.app/api/public/projects/string/documents" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/projects/string/documents", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.get(
"https://leadtime.app/api/public/projects/string/documents",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)Response
Paginated list of project documents
Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions