Download a document's primary file
GET/api/v1/documents/:id/primary-file/content
Downloads the document's current primary file: the originally uploaded file when one is stored, otherwise the current document image. Never returns a converted representation, such as a generated PDF, in place of the original.
Request
Responses
- 200
- 401
- 403
- 404
- 406
- 500
- 503
The primary file's exact bytes. Content-Type reflects the stored file's recorded media type, falling back to application/octet-stream.
Response Headers
attachment with the stored original file name, Unicode-safe encoded.
The authentication credential is invalid or has expired (unauthorized).
The request has no authentication credential, or the user is not allowed to use the API (forbidden).
The document does not exist or is not accessible (not_found), or the document is accessible but has no primary file (file_not_found).
The request does not accept any representation the operation can produce (not_acceptable).
An unexpected server error occurred (internal_error).
The service is temporarily unavailable, for example while it restarts (service_unavailable). Retry the request later.