Downloads a document.
| Name | Description | Default |
|---|---|---|
id
|
Document number (unique ID). | |
convertToPdf
|
Whether to convert to PDF. |
False
|
Content Type:
application/octet-stream
Document content or an error message.
| Code | Condition |
|---|---|
| 200 OK | The operation completed successfully. |
| 400 Bad Request | Invalid document number. |
| 401 Unauthorized | Access token is invalid, expired or not specified. |
| 403 Forbidden | User does not have permission to download the document. |
| 404 Not Found | Document not found. |
| 406 Not Acceptable | Content type specified in the Accept header isn't supported. |
| 500 Internal Server Error | An internal error occurred. |
| 501 Not Implemented | PDF conversion is not supported for the document. |
A more specific content type (e.g. application/pdf)
may be included in the response headers.
If PDF conversion is requested for a document which is already in PDF, no conversion is performed and the document is downloaded in its original format.