...
...
...
...
Table of Contents | ||||
---|---|---|---|---|
|
How to integrate with Postman
Collection
In this tutorial you will do the first API call as well as sending envelopes, upload documents and download signed papers. Let us start with creating a collection so that we can save all requests there.
...
Please see the next sample authorization (Bearer token):
Key | Value |
---|---|
"Authorization" | "Bearer asdfngtmvv8pfmsuaxpzz85zux3e63dd9zttrwitx9mln6qka6tds83du3p3lroe" |
Please see the next sample authorization (api token):
Key | Value |
---|---|
"ApiToken" | "asdfngtmvv8pfmsuaxpzz85zux3e63dd9zttrwitx9mln6qka6tds83du3p3lroe" |
...
After you have sent the envelope and you have got the envelopeId you can call the method https://demo.esignanywhere.net/api/v6/envelope/{envelopeId}/viewerlinks. With the result of this method you get information about the envelope and you can find the workstepRedirectionURL (Viewerlink).
Figure | Description | |||||||
---|---|---|---|---|---|---|---|---|
Steps:
Response
With this redirection link it is possible to open and sign the document in your web portal. |
Download the signed document
...
Figure | Description |
---|---|
Steps:
Response |
How to use variables in Postman
Let us start with the authentication but this time we will use variables, so we do not have to remember the api token for all other requests.
...
Section |
---|
After selecting the configuration button following window should appear: There you must fill in a name for the environment and we have to create one variable which is necessary for the authentication. Further details in the next Figure: First give your variable a name (it does not matter how you name them). Then fill in “initial value” and “current value” your api token. After filling up the environments for the variable, we now can use it in the header of the next request. AuthenticationThe next figure shows you the same request we have already done in the tutorial above but this time we will use the variables we have just created. In the first column we have our api token. In the second column we now do not have to fill in our api token, but we must write {{##name_of_the_variable##}}. From now on you can always use the variable instead of continual writing your api token because all the dates are saved in the environments. If you run this request, you should get the status “200 OK”. Upload a fileNow we will upload a file and save the file ID which we will get from the request in another variable in the environments. Just these three lines of code are necessary to save the file ID in another variable. First we will parse the response, then we set the file ID with the command (“pm.environment.set(“name_of_the_variable”, response.” name_of_the_response”). After running this request, the new variable “FileId” should be in the environments. See next Figure: Send an envelopeAfter saving the file id we can now send the envelope with an integration of the variable. Therefore we just fill in {{ name_of_the_variable_for_the_fileID}} instead of copy paste the file ID. This is shown in the next Figure. In the Figure 17 there is another example of how you save a date from the response. In this case we will save the envelope ID. Download the fileFirst we get the File Ids and save them in our environment: Please note: The document must be finished! Otherwise it is not possible to retrieve the document Ids. After we have saved all document Ids we can use them for the download request. Overview of all variablesAdvantages of using variables in PostmanFirst, we do not have to remember all dates which we get through all the requests. Furthermore, we can simply change the organization key and the username and wen can play all requests without other changes because the variables auto fill in the new dates in the requests. Moreover we have a better overview of all ID`s so that we can easily match them with the requirements of the requests. |
...