(API) - How to download your files from a P2 - DocuSign

How to download DocuSign files by P2 Request:

Instructions

First of All, you must create a P2 containing a type DocuSign, follow the link to do that: https://botdoc.atlassian.net/wiki/spaces/BOTDOC/pages/41812142 and send to the Receiver, when the Receiver signs the document(s) you will be able to download the signed document(s):

  1. To Know what documents you should be download coming from a P2 DocuSign Request, first you need to GET a list of Documents belonging to a determined DocuSign:

    curl -i --request GET "https://api.botdoc.io/v1/module_container_docusign/docusigndocument/?docusign={docusign_id}&state=available" \ --header "Authorization: JWT <Authorization Token>" \

     

  2. Based on the list in item 1, you need to GET the DocuSign using this cURL:

    curl -i --request GET "https://api.botdoc.io/v1/module_container_docusign/docusigndocument/{docusign_file_id}/download/" \ --header "Authorization: JWT <Authorization Token>" \ --output mydocument.pdf