GET api/Documents/{id}/Download

Downloads a document.

Request

Parameters

Name Description Default
id Document number (unique ID).
convertToPdf Whether to convert to PDF. False

Response

Body

Content Type: application/octet-stream
Document content or an error message.

Status Codes

Code Condition
200 OK The operation completed successfully.
400 Bad RequestInvalid document number.
401 Unauthorized Access token is invalid, expired or not specified.
403 ForbiddenUser does not have permission to download the document.
404 Not FoundDocument 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 ImplementedPDF conversion is not supported for the document.

Remarks

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.