Skip to main content

I need to create a GET Request to get the status of a sent document. Can someone help me without to set this up? 

@StevenF - Assuming you know how to make an API call using Postman, the GET call would include:

GET https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}

Replace {accountId} with your actual account ID and {envelopeId} with the envelope ID you are querying.

DocuSign offers a great resource API Explorer | Docusign.  


Thanks, John. 

I am trying to get the status of a sent document where I know the email recipient. This is part of a Zap. 

So basically the Zap would include: 

IF document has a Status of Sent, then do blah blah blah. 

Any idea how to do this? I have specified the parameters in Zapier but it’s still not returning what I would like. 


Hi Ahmad, to access the endpoint, go here:

https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/get/ 

 

However, Zapier is a third-party tool. 

Because of this, you will need to inquire with Zapier support to confirm if the tool supports your desired actions. 

Retrieving the envelope status through a GET request is feasible, but because of reliance on Zapier, you lack direct control over the code and API requests

 


I need to create a GET Request to get the status of a sent document. Can someone help me without to set this up? 

Certainly! To create a GET request to get the status of a sent document in DocuSign, you’ll need to follow these steps:

Prerequisites

  1. DocuSign Account: Make sure you have an active DocuSign account.
  2. API Credentials: Obtain your API credentials (Integrator Key, User ID, and Secret Key).
  3. Envelope ID: The ID of the document you sent (Envelope ID).

Step-by-Step Guide

1. Authentication

DocuSign uses OAuth 2.0 for authentication. First, you need to get an access token. Here’s a quick guide to get the token using the REST API.

Request:

POST /oauth/token
Host: account.docusign.com
Authorization: Basic BASE64_ENCODED(CLIENT_ID:SECRET)
Content-Type: application/x-www-form-urlencoded

grant_type=password&username=YOUR_EMAIL&password=YOUR_PASSWORD

Certainly! To create a GET request to get the status of a sent document in DocuSign, you’ll need to follow these steps:

Prerequisites

  1. DocuSign Account: Make sure you have an active DocuSign account.
  2. API Credentials: Obtain your API credentials (Integrator Key, User ID, and Secret Key).
  3. Envelope ID: The ID of the document you sent (Envelope ID).

Step-by-Step Guide

1. Authentication

DocuSign uses OAuth 2.0 for authentication. First, you need to get an access token. Here’s a quick guide to get the token using the REST API.

Request:

 

sh

Copy code

POST /oauth/token Host: account.docusign.com Authorization: Basic BASE64_ENCODED(CLIENT_ID:SECRET) Content-Type: application/x-www-form-urlencoded grant_type=password&username=YOUR_EMAIL&password=YOUR_PASSWORD

Replace:

  • CLIENT_ID with your Integrator Key
  • SECRET with your Secret Key
  • YOUR_EMAIL and YOUR_PASSWORD with your DocuSign account credentials

Response:
 

{
"access_token": "YOUR_ACCESS_TOKEN",
"token_type": "bearer",
"expires_in": 3600
}

2. Get Document Status

Now, use the access token to make a GET request to retrieve the status of a sent document.

Request:

GET /v2.1/accounts/{accountId}/envelopes/{envelopeId}
Host: demo.docusign.net
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json

Replace:

  • {accountId} with your DocuSign account ID
  • {envelopeId} with the ID of the sent document
  • YOUR_ACCESS_TOKEN with the token received from the previous step

Example cURL Command:

curl --request GET \
--url https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId} \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json'

3. Response

The response will contain the details of the document, including its status. Here’s a sample response:

{
"envelopeId": "YOUR_ENVELOPE_ID",
"status": "sent", // Other possible values: "created", "voided", "completed", etc.
"statusDateTime": "2024-06-27T12:34:56Z",
...
}

Example Code Snippet

Here is an example using Python and the requests library:

import requests

# Define the endpoint and the headers
url = "https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}

# Make the GET request
response = requests.get(url, headers=headers)

# Check the response status
if response.status_code == 200:
# Print the response data
print(response.json())
else:
print(f"Error: {response.status_code}")
print(response.json())

Additional Tips

  • Testing Environment: Use the https://demo.docusign.net endpoint for testing in the sandbox environment. For production, use https://www.docusign.net.
  • API Documentation: Refer to the DocuSign API documentation for more details.

By following these steps, you should be able to set up a GET request to retrieve the status of a sent document in DocuSign. If you encounter any issues or need further assistance, feel free to ask!


Reply