Page 1 of 1

Problem with exporting a specific version of the document.

Posted: Sun Sep 19, 2021 6:11 pm
by qra
Is it possible to download (from the Rest API) the generated preview file (pdf) for a specific version of the document? Function "documents_versions_export_create" doesn't return such link or file.

Re: Problem with exporting a specific version of the document.

Posted: Wed Sep 22, 2021 1:57 pm
by rosarior
If it is a document file, you can download it from the API using the " "/api/v4/documents/{ document ID }/files/{ document file ID }/download/" link.

2021-09-22_09-52.png
2021-09-22_09-52.png (81.64 KiB) Viewed 166 times

For document versions you need to submit them for export using the "/api/v4/documents/{ document ID}/versions/{ document version ID}/export/" link.
Since the export happens as a background task an empty 200 response is returned. The download link for the exported document version will be sent via message to the user requesting the export. The message system is not yet exposed to the API. Version 4.1 is now in beta and in soft feature freeze, it might be possible for the messaging API to make it before release candidate stage.
2021-09-22_09-53.png
2021-09-22_09-53.png (47.54 KiB) Viewed 166 times