Documents API
Documents API v2 Enhanced document management API with advanced features and improved performance.
This version provides all the capabilities of v1 with additional enhancements for enterprise use cases.
Key improvements over v1:
- Advanced filtering and search capabilities
- Enhanced document versioning with hash-based integrity checking
- Improved performance with optimized database queries
- Extended metadata support for complex document structures
- Better error handling and validation
- Enhanced collaborative features with real-time updates Migration from v1: This API is backward compatible with v1 endpoints while providing additional functionality.
Existing v1 integrations will continue to work seamlessly.
Endpoints
List documents
List documents (v2)
Retrieve a paginated list of documents for the authenticated team with enhanced features including versioning, hashing, and advanced filtering. Documents can only be created and updated through the collaborative editor interface.
Endpoint: GET /api/v2/documents
Examples:
curl -X GET "https://simplistica.co/api/v2/documents?limit=20&page=1&type=VALUE&reviewStatus=VALUE" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"Query Parameters:
limit(integer) Optional (default:20) - Number of items to returnpage(integer) Optional (default:1) - Page number for pagination (starts from 1)type(string) Optional - Filter by document typereviewStatus(string) Optional - Filter by review status
Response Schema:
| Property | Type | Default | Description |
|---|---|---|---|
data[].id | string (uuid) | - | - |
data[].title | string | - | - |
data[].type | string (enum: document, module) | - | - |
data[].reviewStatus | string (enum: draft, in_review, ready) | - | - |
data[].createdAt | string (date-time) | - | - |
data[].updatedAt | string (date-time) | - | - |
pagination.page | integer | - | Current page number |
pagination.limit | integer | - | Number of items per page |
pagination.hasNextPage | boolean | - | Whether there are more pages available |
pagination.prevPage | string (uri) | - | URL to previous page (null if first page) |
pagination.nextPage | string (uri) | - | URL to next page (null if last page) |
Example Response:
{
"path": "/api/v2/documents",
"version": "v2",
"timestamp": "2025-01-27T10:30:00.000Z",
"data": {
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"title": "example_title",
"type": "document",
"reviewStatus": "draft",
"createdAt": "2025-01-27T10:30:00.000Z",
"updatedAt": "2025-01-27T10:30:00.000Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"hasNextPage": true,
"prevPage": null,
"nextPage": "https://simplistica.co/api/v1/documents?limit=20&page=2"
}
}
}Responses:
- 200: Success
- 400: Bad Request
- 401: Unauthorized
- 500: Internal Server Error
List documents
List documents
Retrieve a paginated list of documents for the authenticated team. Supports filtering by document type and review status. Documents can only be created and updated through the collaborative editor interface.
Endpoint: GET /api/v1/documents
Examples:
curl -X GET "https://simplistica.co/api/v1/documents?limit=20&page=1&type=VALUE" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"Query Parameters:
limit(integer) Optional (default:20) - Number of items to returnpage(integer) Optional (default:1) - Page number for pagination (starts from 1)type(string) Optional - Filter by document type
Response Schema:
| Property | Type | Default | Description |
|---|---|---|---|
data[].id | string (uuid) | - | - |
data[].title | string | - | - |
data[].type | string (enum: document, module) | - | - |
data[].reviewStatus | string (enum: draft, in_review, ready) | - | - |
data[].createdAt | string (date-time) | - | - |
data[].updatedAt | string (date-time) | - | - |
pagination.page | integer | - | Current page number |
pagination.limit | integer | - | Number of items per page |
pagination.hasNextPage | boolean | - | Whether there are more pages available |
pagination.prevPage | string (uri) | - | URL to previous page (null if first page) |
pagination.nextPage | string (uri) | - | URL to next page (null if last page) |
Example Response:
{
"path": "/api/v1/documents",
"version": "v1",
"timestamp": "2025-01-27T10:30:00.000Z",
"data": {
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"title": "example_title",
"type": "document",
"reviewStatus": "draft",
"createdAt": "2025-01-27T10:30:00.000Z",
"updatedAt": "2025-01-27T10:30:00.000Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"hasNextPage": true,
"prevPage": null,
"nextPage": "https://simplistica.co/api/v1/documents?limit=20&page=2"
}
}
}Responses:
- 200: Success
- 400: Bad Request
- 401: Unauthorized
- 500: Internal Server Error
Get document by ID
Get document by ID
Retrieve a specific document by its ID with full content and metadata.
Endpoint: GET /api/v1/documents/{id}
Examples:
curl -X GET "https://simplistica.co/api/v1/documents/{id}?limit=20&page=1&type=VALUE" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"Parameters:
Path Parameters:
id(string) Required - The id of the resource
Query Parameters:
limit(integer) Optional (default:20) - Number of items to returnpage(integer) Optional (default:1) - Page number for pagination (starts from 1)type(string) Optional - Filter by document type
Response Schema:
| Property | Type | Default | Description |
|---|---|---|---|
id | string (uuid) | - | - |
title | string | - | - |
content | string | - | - |
type | string (enum: document, module) | - | - |
reviewStatus | string (enum: draft, in_review, ready) | - | - |
createdAt | string (date-time) | - | - |
updatedAt | string (date-time) | - | - |
owner.id | string (uuid) | - | - |
owner.name | string | - | - |
owner.email | string (email) | - | - |
ownerTeam.id | string (uuid) | - | - |
ownerTeam.name | string | - | - |
Example Response:
{
"path": "/api/v1/documents/{id}",
"version": "v1",
"timestamp": "2025-01-27T10:30:00.000Z",
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"title": "example_title",
"content": "example_content",
"type": "document",
"reviewStatus": "draft",
"createdAt": "2025-01-27T10:30:00.000Z",
"updatedAt": "2025-01-27T10:30:00.000Z",
"owner": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "example_name",
"email": "user@example.com"
},
"ownerTeam": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "example_name"
}
}
}Responses:
- 200: Success
- 400: Bad Request
- 401: Unauthorized
- 404: Not Found
- 500: Internal Server Error
Delete document
Delete document
Soft delete a document (marks as deleted but preserves data).
Endpoint: DELETE /api/v1/documents/{id}
Examples:
curl -X DELETE "https://simplistica.co/api/v1/documents/{id}" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"Path Parameters:
id(string) Required - The id of the resource
Response Schema:
| Property | Type | Default | Description |
|---|---|---|---|
message | string | - | - |
success | boolean | - | - |
Example Response:
{
"path": "/api/v1/documents/{id}",
"version": "v1",
"timestamp": "2025-01-27T10:30:00.000Z",
"data": {
"message": "example_message",
"success": true
}
}Responses:
- 200: Success
- 400: Bad Request
- 401: Unauthorized
- 500: Internal Server Error
Response Examples
Success Response
{
"path": "/api/v1/documents",
"version": "v1",
"timestamp": "2025-01-27T10:30:00.000Z",
"data": null,
"message": "Operation completed successfully"
}Error Response
{
"path": "/api/v1/documents",
"version": "v1",
"timestamp": "2025-01-27T10:30:00.000Z",
"error": "Validation Error",
"message": "Required field 'email' is missing"
}Common HTTP Status Codes
- 200: Success
- 201: Created
- 400: Bad Request (validation error)
- 401: Unauthorized (invalid or missing token)
- 404: Not Found (resource doesn’t exist)
- 429: Too Many Requests (rate limit exceeded)
- 500: Internal Server Error