Skip to content

Get Document

Retrieve details of a specific document using the Docstron API. This endpoint allows you to fetch document metadata, including the template used and the data attributes.

GET https://api.docstron.com/v1/documents/{document_id}

This endpoint requires authentication using a Bearer token. Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Path Parameters

ParameterTypeRequiredDescription
document_idstringYesThe unique identifier of the document (e.g., document-517145ce-5a09-4e47-a257-887e239ecb36)
Terminal window
curl --location 'https://api.docstron.com/v1/documents/template-c2465c0b-fc54-4672-b9ac-7446886cd6de' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data ''

200 - Success Response

{
"success": true,
"message": "Request successful",
"data": {
"document_id": "document-517145ce-5a09-4e47-a257-887e239ecb36",
"template_id": "template-c2465c0b-fc54-4672-b9ac-7446886cd6de",
"attributes": {
"customer_name": "John Doe",
"amount": "$299.00"
},
"created_at": "2025-10-15T18:19:48",
"updated_at": "2025-10-15T18:19:48"
}
}
FieldTypeDescription
successbooleanIndicates if the request was successful
messagestringA message describing the response
data.document_idstringUnique identifier of the document
data.template_idstringThe template used to generate this document
data.attributesstringJSON string containing the data used to generate the document
data.created_atstringTimestamp when the document was created (ISO 8601 format)
data.updated_atstringTimestamp when the document was last updated (ISO 8601 format)

404 - Document Not Found

Returned when the provided document_id does not exist or is invalid.

{
"success": false,
"message": "Document not found.",
"data": []
}

Common causes:

  • Invalid or mistyped document_id
  • Document has been deleted
  • The document belongs to a different account

Solution: Verify the document_id is correct. Ensure the document hasn’t been deleted.


500 - Internal Server Error

Returned when an unexpected server error occurs while retrieving the document.

{
"success": false,
"message": "Failed to get the document.",
"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.

If you have questions about applications or need assistance:

  • 📧 Email: support@docstron.com
  • 💬 Live Chat: Available in your dashboard
  • 📚 Documentation: You’re reading it!