Downloading and saving a document as a PDF is a three-step process.
-
Get a specific drawing to obtain its ID.
-
Retrieve the drawing's Uri to obtain the name of the .pdf file that will be generated. This request requires the drawing's ID as part of the input.
-
Downloading the document file and saving the drawing as a .pdf file. This request requires the .pdf file identifier generated in the previous step and the document ID as part of the input.
-
Only the Last Saved document can be download.
-
Only one document at a time can be downloaded.
Get documents
The values in the requests below are examples only.
-
Launch Postman.
-
Select any GET request and delete the text in the Uri after the variables. You should be left with something like this:
.
-
In the Uri, after the last forward slash (/) type Documents and click Send.
The response of the available documents is displayed.
Post request for document and PDF name
-
From the response locate the document you want to download as a PDF and copy the document Id to the clipboard.
-
Change the request type to Post.
-
In the Uri field after Documents (without a space) add the following; ('xxxxxxxxxxx')/Com.Ingr.SEL..LastSaved/.
-
Replace the xxxxxxxxx with the Id you saved to the clipboard.
-
Click Send.
-
This response is returned.
Download document
-
Change the request type to GET.
-
Edit the Uri by adding, after the document Id, the following: /Com.Ingr.SEL..GetDocumentResultAsync(FileName='25711a04-90d0-473b-97e8-5238cf6a364.pdf')/
The FileName you copy from the response and must include the suffix .pdf.
-
Click on the pointer next to Send and select Send and Download.
-
On the Select path to save file dialog box, do the following:
-
Select where you want to download your document.
-
Type in a file name including the suffix .pdf.
-
Click Save.
-