Chilkat Online Tools

VBScript / DocuSign eSignature REST API / Modifies tab settings for specified account

Back to Collection Items

Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
'Create a Unicode (utf-16) output text file.
Set outFile = fso.CreateTextFile("output.txt", True, True)

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

' For versions of Chilkat < 10.0.0, use CreateObject("Chilkat_9_5_0.Http")
set http = CreateObject("Chilkat.Http")

' Use this online tool to generate code from sample JSON: Generate Code to Create JSON

' The following JSON is sent in the request body.

' {
'   "textTabsEnabled": "sample string 1",
'   "textTabsMetadata": {
'     "rights": "sample string 1",
'     "uiHint": "sample string 2",
'     "uiType": "sample string 3",
'     "uiOrder": "sample string 4",
'     "is21CFRPart11": "sample string 5",
'     "options": [
'       "sample string 1"
'     ]
'   },
'   "radioTabsEnabled": "sample string 2",
'   "radioTabsMetadata": {},
'   "checkboxTabsEnabled": "sample string 3",
'   "checkboxTabsMetadata": {},
'   "listTabsEnabled": "sample string 4",
'   "listTabsMetadata": {},
'   "approveDeclineTabsEnabled": "sample string 5",
'   "approveDeclineTabsMetadata": {},
'   "noteTabsEnabled": "sample string 6",
'   "noteTabsMetadata": {},
'   "dataFieldRegexEnabled": "sample string 7",
'   "dataFieldRegexMetadata": {},
'   "dataFieldSizeEnabled": "sample string 8",
'   "dataFieldSizeMetadata": {},
'   "tabLocationEnabled": "sample string 9",
'   "tabLocationMetadata": {},
'   "tabScaleEnabled": "sample string 10",
'   "tabScaleMetadata": {},
'   "tabLockingEnabled": "sample string 11",
'   "tabLockingMetadata": {},
'   "savingCustomTabsEnabled": "sample string 12",
'   "savingCustomTabsMetadata": {},
'   "tabTextFormattingEnabled": "sample string 13",
'   "tabTextFormattingMetadata": {},
'   "sharedCustomTabsEnabled": "sample string 14",
'   "sharedCustomTabsMetadata": {},
'   "senderToChangeTabAssignmentsEnabled": "sample string 15",
'   "senderToChangeTabAssignmentsMetadata": {},
'   "tabDataLabelEnabled": "sample string 16",
'   "tabDataLabelMetadata": {},
'   "firstLastEmailTabsEnabled": "sample string 17",
'   "firstLastEmailTabsMetadata": {},
'   "calculatedFieldsEnabled": "sample string 18",
'   "calculatedFieldsMetadata": {},
'   "allowTabOrder": "sample string 19",
'   "allowTabOrderMetadata": {}
' }

' For versions of Chilkat < 10.0.0, use CreateObject("Chilkat_9_5_0.JsonObject")
set json = CreateObject("Chilkat.JsonObject")
success = json.UpdateString("textTabsEnabled","sample string 1")
success = json.UpdateString("textTabsMetadata.rights","sample string 1")
success = json.UpdateString("textTabsMetadata.uiHint","sample string 2")
success = json.UpdateString("textTabsMetadata.uiType","sample string 3")
success = json.UpdateString("textTabsMetadata.uiOrder","sample string 4")
success = json.UpdateString("textTabsMetadata.is21CFRPart11","sample string 5")
success = json.UpdateString("textTabsMetadata.options[0]","sample string 1")
success = json.UpdateString("radioTabsEnabled","sample string 2")
success = json.UpdateNewObject("radioTabsMetadata")
success = json.UpdateString("checkboxTabsEnabled","sample string 3")
success = json.UpdateNewObject("checkboxTabsMetadata")
success = json.UpdateString("listTabsEnabled","sample string 4")
success = json.UpdateNewObject("listTabsMetadata")
success = json.UpdateString("approveDeclineTabsEnabled","sample string 5")
success = json.UpdateNewObject("approveDeclineTabsMetadata")
success = json.UpdateString("noteTabsEnabled","sample string 6")
success = json.UpdateNewObject("noteTabsMetadata")
success = json.UpdateString("dataFieldRegexEnabled","sample string 7")
success = json.UpdateNewObject("dataFieldRegexMetadata")
success = json.UpdateString("dataFieldSizeEnabled","sample string 8")
success = json.UpdateNewObject("dataFieldSizeMetadata")
success = json.UpdateString("tabLocationEnabled","sample string 9")
success = json.UpdateNewObject("tabLocationMetadata")
success = json.UpdateString("tabScaleEnabled","sample string 10")
success = json.UpdateNewObject("tabScaleMetadata")
success = json.UpdateString("tabLockingEnabled","sample string 11")
success = json.UpdateNewObject("tabLockingMetadata")
success = json.UpdateString("savingCustomTabsEnabled","sample string 12")
success = json.UpdateNewObject("savingCustomTabsMetadata")
success = json.UpdateString("tabTextFormattingEnabled","sample string 13")
success = json.UpdateNewObject("tabTextFormattingMetadata")
success = json.UpdateString("sharedCustomTabsEnabled","sample string 14")
success = json.UpdateNewObject("sharedCustomTabsMetadata")
success = json.UpdateString("senderToChangeTabAssignmentsEnabled","sample string 15")
success = json.UpdateNewObject("senderToChangeTabAssignmentsMetadata")
success = json.UpdateString("tabDataLabelEnabled","sample string 16")
success = json.UpdateNewObject("tabDataLabelMetadata")
success = json.UpdateString("firstLastEmailTabsEnabled","sample string 17")
success = json.UpdateNewObject("firstLastEmailTabsMetadata")
success = json.UpdateString("calculatedFieldsEnabled","sample string 18")
success = json.UpdateNewObject("calculatedFieldsMetadata")
success = json.UpdateString("allowTabOrder","sample string 19")
success = json.UpdateNewObject("allowTabOrderMetadata")

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

' For versions of Chilkat < 10.0.0, use CreateObject("Chilkat_9_5_0.StringBuilder")
set sbRequestBody = CreateObject("Chilkat.StringBuilder")
success = json.EmitSb(sbRequestBody)

' resp is a Chilkat.HttpResponse
Set resp = http.PTextSb("PUT","https://domain.com/v2.1/accounts/{{accountId}}/settings/tabs",sbRequestBody,"utf-8","application/json",0,0)
If (http.LastMethodSuccess = 0) Then
    outFile.WriteLine(http.LastErrorText)
    WScript.Quit
End If

outFile.WriteLine(resp.StatusCode)
outFile.WriteLine(resp.BodyStr)


outFile.Close

Curl Command

curl -X PUT
	-H "Accept: application/json"
	-H "Authorization: Bearer {{accessToken}}"
	-d '{
  "textTabsEnabled": "sample string 1",
  "textTabsMetadata": {
    "rights": "sample string 1",
    "uiHint": "sample string 2",
    "uiType": "sample string 3",
    "uiOrder": "sample string 4",
    "is21CFRPart11": "sample string 5",
    "options": [
      "sample string 1"
    ]
  },
  "radioTabsEnabled": "sample string 2",
  "radioTabsMetadata": {},
  "checkboxTabsEnabled": "sample string 3",
  "checkboxTabsMetadata": {},
  "listTabsEnabled": "sample string 4",
  "listTabsMetadata": {},
  "approveDeclineTabsEnabled": "sample string 5",
  "approveDeclineTabsMetadata": {},
  "noteTabsEnabled": "sample string 6",
  "noteTabsMetadata": {},
  "dataFieldRegexEnabled": "sample string 7",
  "dataFieldRegexMetadata": {},
  "dataFieldSizeEnabled": "sample string 8",
  "dataFieldSizeMetadata": {},
  "tabLocationEnabled": "sample string 9",
  "tabLocationMetadata": {},
  "tabScaleEnabled": "sample string 10",
  "tabScaleMetadata": {},
  "tabLockingEnabled": "sample string 11",
  "tabLockingMetadata": {},
  "savingCustomTabsEnabled": "sample string 12",
  "savingCustomTabsMetadata": {},
  "tabTextFormattingEnabled": "sample string 13",
  "tabTextFormattingMetadata": {},
  "sharedCustomTabsEnabled": "sample string 14",
  "sharedCustomTabsMetadata": {},
  "senderToChangeTabAssignmentsEnabled": "sample string 15",
  "senderToChangeTabAssignmentsMetadata": {},
  "tabDataLabelEnabled": "sample string 16",
  "tabDataLabelMetadata": {},
  "firstLastEmailTabsEnabled": "sample string 17",
  "firstLastEmailTabsMetadata": {},
  "calculatedFieldsEnabled": "sample string 18",
  "calculatedFieldsMetadata": {},
  "allowTabOrder": "sample string 19",
  "allowTabOrderMetadata": {}
}'
https://domain.com/v2.1/accounts/{{accountId}}/settings/tabs

Postman Collection Item JSON

{
  "name": "Modifies tab settings for specified account",
  "request": {
    "method": "PUT",
    "header": [
      {
        "key": "Accept",
        "value": "application/json"
      },
      {
        "key": "Authorization",
        "value": "Bearer {{accessToken}}"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n  \"textTabsEnabled\": \"sample string 1\",\n  \"textTabsMetadata\": {\n    \"rights\": \"sample string 1\",\n    \"uiHint\": \"sample string 2\",\n    \"uiType\": \"sample string 3\",\n    \"uiOrder\": \"sample string 4\",\n    \"is21CFRPart11\": \"sample string 5\",\n    \"options\": [\n      \"sample string 1\"\n    ]\n  },\n  \"radioTabsEnabled\": \"sample string 2\",\n  \"radioTabsMetadata\": {},\n  \"checkboxTabsEnabled\": \"sample string 3\",\n  \"checkboxTabsMetadata\": {},\n  \"listTabsEnabled\": \"sample string 4\",\n  \"listTabsMetadata\": {},\n  \"approveDeclineTabsEnabled\": \"sample string 5\",\n  \"approveDeclineTabsMetadata\": {},\n  \"noteTabsEnabled\": \"sample string 6\",\n  \"noteTabsMetadata\": {},\n  \"dataFieldRegexEnabled\": \"sample string 7\",\n  \"dataFieldRegexMetadata\": {},\n  \"dataFieldSizeEnabled\": \"sample string 8\",\n  \"dataFieldSizeMetadata\": {},\n  \"tabLocationEnabled\": \"sample string 9\",\n  \"tabLocationMetadata\": {},\n  \"tabScaleEnabled\": \"sample string 10\",\n  \"tabScaleMetadata\": {},\n  \"tabLockingEnabled\": \"sample string 11\",\n  \"tabLockingMetadata\": {},\n  \"savingCustomTabsEnabled\": \"sample string 12\",\n  \"savingCustomTabsMetadata\": {},\n  \"tabTextFormattingEnabled\": \"sample string 13\",\n  \"tabTextFormattingMetadata\": {},\n  \"sharedCustomTabsEnabled\": \"sample string 14\",\n  \"sharedCustomTabsMetadata\": {},\n  \"senderToChangeTabAssignmentsEnabled\": \"sample string 15\",\n  \"senderToChangeTabAssignmentsMetadata\": {},\n  \"tabDataLabelEnabled\": \"sample string 16\",\n  \"tabDataLabelMetadata\": {},\n  \"firstLastEmailTabsEnabled\": \"sample string 17\",\n  \"firstLastEmailTabsMetadata\": {},\n  \"calculatedFieldsEnabled\": \"sample string 18\",\n  \"calculatedFieldsMetadata\": {},\n  \"allowTabOrder\": \"sample string 19\",\n  \"allowTabOrderMetadata\": {}\n}"
    },
    "url": {
      "raw": "{{baseUrl}}/v2.1/accounts/{{accountId}}/settings/tabs",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "v2.1",
        "accounts",
        "{{accountId}}",
        "settings",
        "tabs"
      ],
      "variable": [
        {
          "key": "accountId",
          "value": "{{accountId}}",
          "type": "string"
        }
      ]
    }
  },
  "response": [
  ]
}