DataFlex / DocuSign REST API / Creates a custom tab.
Back to Collection Items
Use ChilkatAx-win32.pkg
Procedure Test
Handle hoHttp
Boolean iSuccess
Variant vJson
Handle hoJson
Variant vResp
Handle hoResp
String sTemp1
Integer iTemp1
Boolean bTemp1
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
Get Create (RefClass(cComChilkatHttp)) To hoHttp
If (Not(IsComObjectCreated(hoHttp))) Begin
Send CreateComObject of hoHttp
End
// Use this online tool to generate code from sample JSON: Generate Code to Create JSON
// The following JSON is sent in the request body.
// {
// "font": "sample string 1",
// "bold": "sample string 2",
// "italic": "sample string 3",
// "underline": "sample string 4",
// "fontColor": "sample string 5",
// "fontSize": "sample string 6",
// "anchor": "sample string 7",
// "anchorXOffset": "sample string 8",
// "anchorYOffset": "sample string 9",
// "anchorUnits": "sample string 10",
// "anchorIgnoreIfNotPresent": "sample string 11",
// "anchorMatchWholeWord": "sample string 12",
// "anchorCaseSensitive": "sample string 13",
// "anchorHorizontalAlignment": "sample string 14",
// "paymentItemCode": "sample string 15",
// "paymentItemDescription": "sample string 16",
// "paymentItemName": "sample string 17",
// "height": "sample string 18",
// "width": "sample string 19",
// "customTabId": "sample string 20",
// "initialValue": "sample string 21",
// "includedInEmail": "sample string 22",
// "disableAutoSize": "sample string 23",
// "concealValueOnDocument": "sample string 24",
// "locked": "sample string 25",
// "required": "sample string 26",
// "shared": "sample string 27",
// "collaborative": "sample string 28",
// "requireInitialOnSharedChange": "sample string 29",
// "requireAll": "sample string 30",
// "items": [
// "sample string 1"
// ],
// "tabLabel": "sample string 31",
// "maximumLength": "sample string 32",
// "scaleValue": "sample string 33",
// "name": "sample string 34",
// "type": "sample string 35",
// "validationMessage": "sample string 36",
// "validationPattern": "sample string 37",
// "lastModifiedByUserId": "sample string 38",
// "lastModifiedByDisplayName": "sample string 39",
// "lastModified": "sample string 40",
// "createdByUserId": "sample string 41",
// "createdByDisplayName": "sample string 42",
// "editable": "sample string 43",
// "mergeField": {
// "configurationType": "sample string 1",
// "path": "sample string 2",
// "writeBack": "sample string 3",
// "allowSenderToEdit": "sample string 4",
// "row": "sample string 5"
// },
// "stampType": "sample string 44",
// "selected": "sample string 45"
// }
Get Create (RefClass(cComChilkatJsonObject)) To hoJson
If (Not(IsComObjectCreated(hoJson))) Begin
Send CreateComObject of hoJson
End
Get ComUpdateString Of hoJson "font" "sample string 1" To iSuccess
Get ComUpdateString Of hoJson "bold" "sample string 2" To iSuccess
Get ComUpdateString Of hoJson "italic" "sample string 3" To iSuccess
Get ComUpdateString Of hoJson "underline" "sample string 4" To iSuccess
Get ComUpdateString Of hoJson "fontColor" "sample string 5" To iSuccess
Get ComUpdateString Of hoJson "fontSize" "sample string 6" To iSuccess
Get ComUpdateString Of hoJson "anchor" "sample string 7" To iSuccess
Get ComUpdateString Of hoJson "anchorXOffset" "sample string 8" To iSuccess
Get ComUpdateString Of hoJson "anchorYOffset" "sample string 9" To iSuccess
Get ComUpdateString Of hoJson "anchorUnits" "sample string 10" To iSuccess
Get ComUpdateString Of hoJson "anchorIgnoreIfNotPresent" "sample string 11" To iSuccess
Get ComUpdateString Of hoJson "anchorMatchWholeWord" "sample string 12" To iSuccess
Get ComUpdateString Of hoJson "anchorCaseSensitive" "sample string 13" To iSuccess
Get ComUpdateString Of hoJson "anchorHorizontalAlignment" "sample string 14" To iSuccess
Get ComUpdateString Of hoJson "paymentItemCode" "sample string 15" To iSuccess
Get ComUpdateString Of hoJson "paymentItemDescription" "sample string 16" To iSuccess
Get ComUpdateString Of hoJson "paymentItemName" "sample string 17" To iSuccess
Get ComUpdateString Of hoJson "height" "sample string 18" To iSuccess
Get ComUpdateString Of hoJson "width" "sample string 19" To iSuccess
Get ComUpdateString Of hoJson "customTabId" "sample string 20" To iSuccess
Get ComUpdateString Of hoJson "initialValue" "sample string 21" To iSuccess
Get ComUpdateString Of hoJson "includedInEmail" "sample string 22" To iSuccess
Get ComUpdateString Of hoJson "disableAutoSize" "sample string 23" To iSuccess
Get ComUpdateString Of hoJson "concealValueOnDocument" "sample string 24" To iSuccess
Get ComUpdateString Of hoJson "locked" "sample string 25" To iSuccess
Get ComUpdateString Of hoJson "required" "sample string 26" To iSuccess
Get ComUpdateString Of hoJson "shared" "sample string 27" To iSuccess
Get ComUpdateString Of hoJson "collaborative" "sample string 28" To iSuccess
Get ComUpdateString Of hoJson "requireInitialOnSharedChange" "sample string 29" To iSuccess
Get ComUpdateString Of hoJson "requireAll" "sample string 30" To iSuccess
Get ComUpdateString Of hoJson "items[0]" "sample string 1" To iSuccess
Get ComUpdateString Of hoJson "tabLabel" "sample string 31" To iSuccess
Get ComUpdateString Of hoJson "maximumLength" "sample string 32" To iSuccess
Get ComUpdateString Of hoJson "scaleValue" "sample string 33" To iSuccess
Get ComUpdateString Of hoJson "name" "sample string 34" To iSuccess
Get ComUpdateString Of hoJson "type" "sample string 35" To iSuccess
Get ComUpdateString Of hoJson "validationMessage" "sample string 36" To iSuccess
Get ComUpdateString Of hoJson "validationPattern" "sample string 37" To iSuccess
Get ComUpdateString Of hoJson "lastModifiedByUserId" "sample string 38" To iSuccess
Get ComUpdateString Of hoJson "lastModifiedByDisplayName" "sample string 39" To iSuccess
Get ComUpdateString Of hoJson "lastModified" "sample string 40" To iSuccess
Get ComUpdateString Of hoJson "createdByUserId" "sample string 41" To iSuccess
Get ComUpdateString Of hoJson "createdByDisplayName" "sample string 42" To iSuccess
Get ComUpdateString Of hoJson "editable" "sample string 43" To iSuccess
Get ComUpdateString Of hoJson "mergeField.configurationType" "sample string 1" To iSuccess
Get ComUpdateString Of hoJson "mergeField.path" "sample string 2" To iSuccess
Get ComUpdateString Of hoJson "mergeField.writeBack" "sample string 3" To iSuccess
Get ComUpdateString Of hoJson "mergeField.allowSenderToEdit" "sample string 4" To iSuccess
Get ComUpdateString Of hoJson "mergeField.row" "sample string 5" To iSuccess
Get ComUpdateString Of hoJson "stampType" "sample string 44" To iSuccess
Get ComUpdateString Of hoJson "selected" "sample string 45" To iSuccess
// Adds the "Authorization: Bearer {{accessToken}}" header.
Set ComAuthToken Of hoHttp To "{{accessToken}}"
Send ComSetRequestHeader To hoHttp "Accept" "application/json"
Get pvComObject of hoJson to vJson
Get ComPostJson3 Of hoHttp "https://domain.com/v2.1/accounts/{{accountId}}/tab_definitions" "application/json" vJson To vResp
If (IsComObject(vResp)) Begin
Get Create (RefClass(cComChilkatHttpResponse)) To hoResp
Set pvComObject Of hoResp To vResp
End
Get ComLastMethodSuccess Of hoHttp To bTemp1
If (bTemp1 = False) Begin
Get ComLastErrorText Of hoHttp To sTemp1
Showln sTemp1
Procedure_Return
End
Get ComStatusCode Of hoResp To iTemp1
Showln iTemp1
Get ComBodyStr Of hoResp To sTemp1
Showln sTemp1
Send Destroy of hoResp
End_Procedure
Curl Command
curl -X POST
-H "Accept: application/json"
-H "Authorization: Bearer {{accessToken}}"
-d '{
"font": "sample string 1",
"bold": "sample string 2",
"italic": "sample string 3",
"underline": "sample string 4",
"fontColor": "sample string 5",
"fontSize": "sample string 6",
"anchor": "sample string 7",
"anchorXOffset": "sample string 8",
"anchorYOffset": "sample string 9",
"anchorUnits": "sample string 10",
"anchorIgnoreIfNotPresent": "sample string 11",
"anchorMatchWholeWord": "sample string 12",
"anchorCaseSensitive": "sample string 13",
"anchorHorizontalAlignment": "sample string 14",
"paymentItemCode": "sample string 15",
"paymentItemDescription": "sample string 16",
"paymentItemName": "sample string 17",
"height": "sample string 18",
"width": "sample string 19",
"customTabId": "sample string 20",
"initialValue": "sample string 21",
"includedInEmail": "sample string 22",
"disableAutoSize": "sample string 23",
"concealValueOnDocument": "sample string 24",
"locked": "sample string 25",
"required": "sample string 26",
"shared": "sample string 27",
"collaborative": "sample string 28",
"requireInitialOnSharedChange": "sample string 29",
"requireAll": "sample string 30",
"items": [
"sample string 1"
],
"tabLabel": "sample string 31",
"maximumLength": "sample string 32",
"scaleValue": "sample string 33",
"name": "sample string 34",
"type": "sample string 35",
"validationMessage": "sample string 36",
"validationPattern": "sample string 37",
"lastModifiedByUserId": "sample string 38",
"lastModifiedByDisplayName": "sample string 39",
"lastModified": "sample string 40",
"createdByUserId": "sample string 41",
"createdByDisplayName": "sample string 42",
"editable": "sample string 43",
"mergeField": {
"configurationType": "sample string 1",
"path": "sample string 2",
"writeBack": "sample string 3",
"allowSenderToEdit": "sample string 4",
"row": "sample string 5"
},
"stampType": "sample string 44",
"selected": "sample string 45"
}'
https://domain.com/v2.1/accounts/{{accountId}}/tab_definitions
Postman Collection Item JSON
{
"name": "Creates a custom tab.",
"request": {
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{accessToken}}"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"font\": \"sample string 1\",\n \"bold\": \"sample string 2\",\n \"italic\": \"sample string 3\",\n \"underline\": \"sample string 4\",\n \"fontColor\": \"sample string 5\",\n \"fontSize\": \"sample string 6\",\n \"anchor\": \"sample string 7\",\n \"anchorXOffset\": \"sample string 8\",\n \"anchorYOffset\": \"sample string 9\",\n \"anchorUnits\": \"sample string 10\",\n \"anchorIgnoreIfNotPresent\": \"sample string 11\",\n \"anchorMatchWholeWord\": \"sample string 12\",\n \"anchorCaseSensitive\": \"sample string 13\",\n \"anchorHorizontalAlignment\": \"sample string 14\",\n \"paymentItemCode\": \"sample string 15\",\n \"paymentItemDescription\": \"sample string 16\",\n \"paymentItemName\": \"sample string 17\",\n \"height\": \"sample string 18\",\n \"width\": \"sample string 19\",\n \"customTabId\": \"sample string 20\",\n \"initialValue\": \"sample string 21\",\n \"includedInEmail\": \"sample string 22\",\n \"disableAutoSize\": \"sample string 23\",\n \"concealValueOnDocument\": \"sample string 24\",\n \"locked\": \"sample string 25\",\n \"required\": \"sample string 26\",\n \"shared\": \"sample string 27\",\n \"collaborative\": \"sample string 28\",\n \"requireInitialOnSharedChange\": \"sample string 29\",\n \"requireAll\": \"sample string 30\",\n \"items\": [\n \"sample string 1\"\n ],\n \"tabLabel\": \"sample string 31\",\n \"maximumLength\": \"sample string 32\",\n \"scaleValue\": \"sample string 33\",\n \"name\": \"sample string 34\",\n \"type\": \"sample string 35\",\n \"validationMessage\": \"sample string 36\",\n \"validationPattern\": \"sample string 37\",\n \"lastModifiedByUserId\": \"sample string 38\",\n \"lastModifiedByDisplayName\": \"sample string 39\",\n \"lastModified\": \"sample string 40\",\n \"createdByUserId\": \"sample string 41\",\n \"createdByDisplayName\": \"sample string 42\",\n \"editable\": \"sample string 43\",\n \"mergeField\": {\n \"configurationType\": \"sample string 1\",\n \"path\": \"sample string 2\",\n \"writeBack\": \"sample string 3\",\n \"allowSenderToEdit\": \"sample string 4\",\n \"row\": \"sample string 5\"\n },\n \"stampType\": \"sample string 44\",\n \"selected\": \"sample string 45\"\n}"
},
"url": {
"raw": "{{baseUrl}}/v2.1/accounts/{{accountId}}/tab_definitions",
"host": [
"{{baseUrl}}"
],
"path": [
"v2.1",
"accounts",
"{{accountId}}",
"tab_definitions"
],
"variable": [
{
"key": "accountId",
"value": "{{accountId}}"
}
]
},
"description": "Creates a tab with pre-defined properties, such as a text tab with a certain font type and validation pattern. Users can access the custom tabs when sending documents through the DocuSign web application.\n\nCustom tabs can be created for approve, checkbox, company, date, date signed, decline, email, email address, envelope ID, first name, formula, full name, initial here, last name, list, note, number, radio, sign here, signer attachment, SSN, text, title, and zip tabs."
},
"response": [
]
}