Search code examples
pdfdocusignapi

DocuSign CLM download PDF document


I'm following the api documentation trying to download a pdf document into PDF. I'm trying to simulate this in Postman first, before delving in code. I have used many of their apis successfully, but can't get the download one. The docs say to download a document by id:

https://apidocsqana11.springcm.com/apidocs#!/Content/Content_Get

Implementation Notes Specify file type of document (image, PDF) in ACCEPT header. Do not specify an ACCEPT header for native format

Response Class string

Response Content Type: application/json

So, I tried adding Accept and content-type as application/pdf in my postman to see if I will get a pdf document, but keep getting the response as normal json. I'm trying to get back a pdf doc not json response.

enter image description here


Solution

  • You need to use the 'REST API - Download Endpoint:' which is typically like https://apidownload<>.springcm.com - in your case could be - https://apidownloaddocsqana11.springcm.com/v2/{{accountId}}/documents/{id}.

    In Postman, Raw response could be random characters, but you can click the dropdown next to 'Send' button and click 'Send & Download' which will download the document for you.

    Please mark the comment as an answer if it worked.