Chilkat Online Tools

VBScript / DocuSign eSignature REST API / Gets the custom field information for the specified envelope.

Back to Collection Items

Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set outFile = fso.CreateTextFile("output.txt", True)

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

set http = CreateObject("Chilkat_9_5_0.Http")

' Adds the "Authorization: Bearer {{accessToken}}" header.
http.AuthToken = "{{accessToken}}"
http.SetRequestHeader "Accept","application/json"

set sbResponseBody = CreateObject("Chilkat_9_5_0.StringBuilder")
success = http.QuickGetSb("https://domain.com/v2.1/accounts/{{accountId}}/envelopes/{{envelopeId}}/custom_fields",sbResponseBody)
If (success = 0) Then
    outFile.WriteLine(http.LastErrorText)
    WScript.Quit
End If

outFile.WriteLine("Response status code = " & http.LastStatus)
outFile.WriteLine(sbResponseBody.GetAsString())

outFile.Close

Curl Command

curl -X GET
	-H "Accept: application/json"
	-H "Authorization: Bearer {{accessToken}}"
https://domain.com/v2.1/accounts/{{accountId}}/envelopes/{{envelopeId}}/custom_fields

Postman Collection Item JSON

{
  "name": "Gets the custom field information for the specified envelope.",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Accept",
        "value": "application/json"
      },
      {
        "key": "Authorization",
        "value": "Bearer {{accessToken}}"
      }
    ],
    "url": {
      "raw": "{{baseUrl}}/v2.1/accounts/{{accountId}}/envelopes/{{envelopeId}}/custom_fields",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "v2.1",
        "accounts",
        "{{accountId}}",
        "envelopes",
        "{{envelopeId}}",
        "custom_fields"
      ],
      "variable": [
        {
          "key": "accountId",
          "value": "{{accountId}}",
          "type": "string"
        },
        {
          "key": "envelopeId",
          "value": "{{envelopeId}}",
          "type": "string"
        }
      ]
    },
    "description": "Retrieves the custom field information for the specified envelope. You can use these fields in the envelopes for your account to record information about the envelope, help search for envelopes, and track information. The envelope custom fields are shown in the Envelope Settings section when a user is creating an envelope in the DocuSign member console. The envelope custom fields are not seen by the envelope recipients.\n\nThere are two types of envelope custom fields, text, and list. A text custom field lets the sender enter the value for the field. With a list custom field, the sender selects the value of the field from a pre-made list."
  },
  "response": [
  ]
}