Chilkat Online Tools

TCL / DocuSign REST API / 3. Get Envelope Status

Back to Collection Items

load ./chilkat.dll

# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.

set http [new_CkHttp]

# Adds the "Authorization: Bearer {{accessToken}}" header.
CkHttp_put_AuthToken $http "{{accessToken}}"

set sbResponseBody [new_CkStringBuilder]

set success [CkHttp_QuickGetSb $http "https://domain.com/{{apiVersion}}/accounts/{{accountId}}/envelopes/{{envelopeId}}" $sbResponseBody]
if {$success == 0} then {
    puts [CkHttp_lastErrorText $http]
    delete_CkHttp $http
    delete_CkStringBuilder $sbResponseBody
    exit
}

puts "Response status code = [CkHttp_get_LastStatus $http]"
puts [CkStringBuilder_getAsString $sbResponseBody]

delete_CkHttp $http
delete_CkStringBuilder $sbResponseBody

Curl Command

curl -X GET
	-H "Authorization: Bearer {{accessToken}}"
https://domain.com/{{apiVersion}}/accounts/{{accountId}}/envelopes/{{envelopeId}}

Postman Collection Item JSON

{
  "name": "3. Get Envelope Status",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Authorization",
        "value": "Bearer {{accessToken}}"
      }
    ],
    "url": {
      "raw": "{{baseUrl}}/{{apiVersion}}/accounts/{{accountId}}/envelopes/{{envelopeId}}",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "{{apiVersion}}",
        "accounts",
        "{{accountId}}",
        "envelopes",
        "{{envelopeId}}"
      ]
    },
    "description": "If one needs to check the status of an envelope, they can use this endpoint to retrieve the status."
  },
  "response": [
  ]
}