Problem with exporting a specific version of the document.

Anything concerning integration via the REST API
Post Reply
qra
Posts: 47
Joined: Fri Oct 25, 2019 9:08 pm

Problem with exporting a specific version of the document.

Post 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.
User avatar
rosarior
Developer
Developer
Posts: 685
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

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

Post 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 319 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 319 times
Post Reply