delphiDll / DocuSign eSignature REST API / Modifies tab settings for specified account
Back to Collection Items
var
http: HCkHttp;
success: Boolean;
json: HCkJsonObject;
sbRequestBody: HCkStringBuilder;
resp: HCkHttpResponse;
begin
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
http := CkHttp_Create();
// 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": {}
// }
json := CkJsonObject_Create();
CkJsonObject_UpdateString(json,'textTabsEnabled','sample string 1');
CkJsonObject_UpdateString(json,'textTabsMetadata.rights','sample string 1');
CkJsonObject_UpdateString(json,'textTabsMetadata.uiHint','sample string 2');
CkJsonObject_UpdateString(json,'textTabsMetadata.uiType','sample string 3');
CkJsonObject_UpdateString(json,'textTabsMetadata.uiOrder','sample string 4');
CkJsonObject_UpdateString(json,'textTabsMetadata.is21CFRPart11','sample string 5');
CkJsonObject_UpdateString(json,'textTabsMetadata.options[0]','sample string 1');
CkJsonObject_UpdateString(json,'radioTabsEnabled','sample string 2');
CkJsonObject_UpdateNewObject(json,'radioTabsMetadata');
CkJsonObject_UpdateString(json,'checkboxTabsEnabled','sample string 3');
CkJsonObject_UpdateNewObject(json,'checkboxTabsMetadata');
CkJsonObject_UpdateString(json,'listTabsEnabled','sample string 4');
CkJsonObject_UpdateNewObject(json,'listTabsMetadata');
CkJsonObject_UpdateString(json,'approveDeclineTabsEnabled','sample string 5');
CkJsonObject_UpdateNewObject(json,'approveDeclineTabsMetadata');
CkJsonObject_UpdateString(json,'noteTabsEnabled','sample string 6');
CkJsonObject_UpdateNewObject(json,'noteTabsMetadata');
CkJsonObject_UpdateString(json,'dataFieldRegexEnabled','sample string 7');
CkJsonObject_UpdateNewObject(json,'dataFieldRegexMetadata');
CkJsonObject_UpdateString(json,'dataFieldSizeEnabled','sample string 8');
CkJsonObject_UpdateNewObject(json,'dataFieldSizeMetadata');
CkJsonObject_UpdateString(json,'tabLocationEnabled','sample string 9');
CkJsonObject_UpdateNewObject(json,'tabLocationMetadata');
CkJsonObject_UpdateString(json,'tabScaleEnabled','sample string 10');
CkJsonObject_UpdateNewObject(json,'tabScaleMetadata');
CkJsonObject_UpdateString(json,'tabLockingEnabled','sample string 11');
CkJsonObject_UpdateNewObject(json,'tabLockingMetadata');
CkJsonObject_UpdateString(json,'savingCustomTabsEnabled','sample string 12');
CkJsonObject_UpdateNewObject(json,'savingCustomTabsMetadata');
CkJsonObject_UpdateString(json,'tabTextFormattingEnabled','sample string 13');
CkJsonObject_UpdateNewObject(json,'tabTextFormattingMetadata');
CkJsonObject_UpdateString(json,'sharedCustomTabsEnabled','sample string 14');
CkJsonObject_UpdateNewObject(json,'sharedCustomTabsMetadata');
CkJsonObject_UpdateString(json,'senderToChangeTabAssignmentsEnabled','sample string 15');
CkJsonObject_UpdateNewObject(json,'senderToChangeTabAssignmentsMetadata');
CkJsonObject_UpdateString(json,'tabDataLabelEnabled','sample string 16');
CkJsonObject_UpdateNewObject(json,'tabDataLabelMetadata');
CkJsonObject_UpdateString(json,'firstLastEmailTabsEnabled','sample string 17');
CkJsonObject_UpdateNewObject(json,'firstLastEmailTabsMetadata');
CkJsonObject_UpdateString(json,'calculatedFieldsEnabled','sample string 18');
CkJsonObject_UpdateNewObject(json,'calculatedFieldsMetadata');
CkJsonObject_UpdateString(json,'allowTabOrder','sample string 19');
CkJsonObject_UpdateNewObject(json,'allowTabOrderMetadata');
// Adds the "Authorization: Bearer {{accessToken}}" header.
CkHttp_putAuthToken(http,'{{accessToken}}');
CkHttp_SetRequestHeader(http,'Accept','application/json');
sbRequestBody := CkStringBuilder_Create();
CkJsonObject_EmitSb(json,sbRequestBody);
resp := CkHttp_PTextSb(http,'PUT','https://domain.com/v2.1/accounts/{{accountId}}/settings/tabs',sbRequestBody,'utf-8','application/json',False,False);
if (CkHttp_getLastMethodSuccess(http) = False) then
begin
Memo1.Lines.Add(CkHttp__lastErrorText(http));
Exit;
end;
Memo1.Lines.Add(IntToStr(CkHttpResponse_getStatusCode(resp)));
Memo1.Lines.Add(CkHttpResponse__bodyStr(resp));
CkHttpResponse_Dispose(resp);
CkHttp_Dispose(http);
CkJsonObject_Dispose(json);
CkStringBuilder_Dispose(sbRequestBody);
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": [
]
}