Get All Documents
Retrieve a list of all documents using the Docstron API. This endpoint allows you to fetch all document metadata, including the templates used and the data attributes for each document.
Endpoint
Section titled “Endpoint”GET https://api.docstron.com/v1/documents
Authentication
Section titled “Authentication”This endpoint requires authentication using a Bearer token. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Parameters
Section titled “Parameters”This endpoint does not require any parameters.
Request Examples
Section titled “Request Examples”curl --location 'https://api.docstron.com/v1/documents' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer YOUR_API_KEY' \ --data ''
Response
Section titled “Response”200 - Success Response
{ "success": true, "message": "Request successful", "data": [ { "document_id": "document-48201f3d-8b7f-443b-8223-8e75a692a325", "template_id": "template-8c043edf-fa70-4e51-a8a2-36f67958c123", "attributes": { "amount": "$299.00", "customer_name": "John Doe" }, "created_at": "2025-10-12T17:07:27", "updated_at": "2025-10-12T17:07:27" }, { "document_id": "document-fb5cf3c7-eddc-4edd-9683-81ff7fc64f34", "template_id": "template-8c043edf-fa70-4e51-a8a2-36f67958c654", "attributes": { "amount": "$299.00", "customer_name": "John Doe" }, "created_at": "2025-10-12T17:07:55", "updated_at": "2025-10-12T17:07:55" } ]}
Response Fields
Section titled “Response Fields”Field | Type | Description |
---|---|---|
success | boolean | Indicates if the request was successful |
message | string | A message describing the response |
data | array | Array of document objects |
data.document_id | string | Unique identifier of the document |
data.template_id | string | The template used to generate this document |
data.attributes | object | JSON object containing the data used to generate the document |
data.created_at | string | Timestamp when the document was created (ISO 8601 format) |
data.updated_at | string | Timestamp when the document was last updated (ISO 8601 format) |
Error Responses
Section titled “Error Responses”500 - Internal Server Error
Returned when an unexpected server error occurs while retrieving the documents.
{ "success": false, "message": "Failed to get the documents.", "data": []}
Common causes:
- Temporary server issue
- Database connectivity problem
- Service maintenance
Solution: Wait a few moments and retry the request. If the problem persists, contact support@docstron.com.
Need Help?
Section titled “Need Help?”If you have questions about applications or need assistance:
- 📧 Email: support@docstron.com
- 💬 Live Chat: Available in your dashboard
- 📚 Documentation: You’re reading it!