Custom Field
Custom field is the support that helps to speed up your document preparation by dragging and dropping the customized fields and eliminating repetitive modifications. Each field can be saved with frequently used values. Each field saved as a custom field will be associated with the brand. You can easily access the collection of saved custom fields and select the ones you need for a particular document. By dragging and dropping the desired custom fields into the document, you can quickly populate the necessary information without the need for manual entry or modification.
Create custom field
post/v1/customField/createTo create a custom field using this API, provide essential details such as field name, field description, field order, and form field. These parameters are required for generating a custom field according to specific requirements and ensuring accurate customization.
Code snippet
curl --location 'https://api.boldsign.com/v1/customField/create' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json;odata.metadata=minimal;odata.streaming=true' \ --header 'Authorization: {{apiKey}}' \ --data '{ "fieldName": "string", "fieldDescription": "string", "fieldOrder": 1, "brandId": "string", "sharedField": true, "formField": { "fieldType": "Signature", "font": "Courier", "width": 60, "height": 20, "isRequired": true, "isReadOnly": true, "value": "string", "fontSize": 13, "fontHexColor": "string", "isBoldFont": true, "isItalicFont": true, "isUnderLineFont": true, "lineHeight": 15, "characterLimit": 0, "placeHolder": "string", "validationType": "NumbersOnly", "validationCustomRegex": "string", "validationCustomRegexMessage": "string", "dateFormat": "string", "timeFormat": "string", "imageInfo": { "allowedFileExtensions": "string", "title": "string", "description": "string" }, "attachmentInfo": { "allowedFileTypes": "string", "title": "string", "description": "string", "acceptedFileTypes": [ "string", "string" ] }, "editableDateFieldSettings": { "dateFormat": "string", "minDate": ""2023-06-26T04:11:52.213Z"", "maxDate": ""2023-06-26T04:11:52.213Z"" }, "hyperlinkText": "string", "dataSyncTag": "string", "dropdownOptions": [ "string", "string" ], "textAlign": "Center", "textDirection": "LTR", "characterSpacing": 0, "idPrefix": "string", "restrictIdPrefixChange": false, "backgroundHexColor": "string" } }'
var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, "https://api.boldsign.com/v1/customField/create"); request.Headers.Add("Accept", "application/json;odata.metadata=minimal;odata.streaming=true"); request.Headers.Add("Authorization", "{{apiKey}}"); var content = new StringContent(@"{ ""fieldName"": ""string"", ""fieldDescription"": ""string"", ""fieldOrder"": 1, ""brandId"": ""string"", ""sharedField"": true, ""formField"": { ""fieldType"": ""Signature"", ""font"": ""Courier"", ""width"": 60, ""height"": 20, ""isRequired"": true, ""isReadOnly"": true, ""value"": ""string"", ""fontSize"": 13, ""fontHexColor"": ""string"", ""isBoldFont"": true, ""isItalicFont"": true, ""isUnderLineFont"": true, ""lineHeight"": 15, ""characterLimit"": 0, ""placeHolder"": ""string"", ""validationType"": ""NumbersOnly"", ""validationCustomRegex"": ""string"", ""validationCustomRegexMessage"": ""string"", ""dateFormat"": ""string"", ""timeFormat"": ""string"", ""imageInfo"": { ""allowedFileExtensions"": ""string"", ""title"": ""string"", ""description"": ""string"" }, ""attachmentInfo"": { ""allowedFileTypes"": ""string"", ""title"": ""string"", ""description"": ""string"", ""acceptedFileTypes"": [ ""string"", ""string"" ] }, ""editableDateFieldSettings"": { ""dateFormat"": ""string"", ""minDate"": ""2023-06-26T04:11:52.213Z"", ""maxDate"": ""2023-06-26T04:11:52.213Z"" }, ""hyperlinkText"": ""string"", ""dataSyncTag"": ""string"", ""dropdownOptions"": [ ""string"", ""string"" ], ""textAlign"": ""Center"", ""textDirection"": ""LTR"", ""characterSpacing"": 0, ""idPrefix"": ""string"", ""restrictIdPrefixChange"": false, ""backgroundHexColor"": ""string"" } }", Encoding.UTF8, "application/json"); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync());
import boldsign configuration = boldsign.Configuration( api_key = "YOUR_API_KEY" ) with boldsign.ApiClient(configuration) as api_client: custom_field_api = boldsign.CustomFieldApi(api_client) custom_form_fields = boldsign.CustomFormField( fieldType="Signature", width= 60, height=60, isRequired=True, isReadOnly=True, value="string", characterLimit=0, placeHolder="string", validationType="NumbersOnly", validationCustomRegex="string", validationCustomRegexMessage="string", dateFormat="string", timeFormat="string", textAlign="Center", textDirection="LTR", characterSpacing=0, idPrefix="string", restrictIdPrefixChange=False, backgroundHexColor="string" ) brand_custom_field_details_request = boldsign.BrandCustomFieldDetails( fieldName="string", fieldDescription="string", fieldOrder=1, brandId="YOUR_BRAND_ID", sharedField=True, formField=custom_form_fields ) create_custom_field_details_response = custom_field_api.create_custom_field( brand_custom_field_details=brand_custom_field_details_request )
const axios = require('axios'); let data = JSON.stringify({ "fieldName": "string", "fieldDescription": "string", "fieldOrder": 1, "brandId": "string", "sharedField": true, "formField": { "fieldType": "Signature", "font": "Courier", "width": 60, "height": 20, "isRequired": true, "isReadOnly": true, "value": "string", "fontSize": 13, "fontHexColor": "string", "isBoldFont": true, "isItalicFont": true, "isUnderLineFont": true, "lineHeight": 15, "characterLimit": 0, "placeHolder": "string", "validationType": "NumbersOnly", "validationCustomRegex": "string", "validationCustomRegexMessage": "string", "dateFormat": "string", "timeFormat": "string", "imageInfo": { "allowedFileExtensions": "string", "title": "string", "description": "string" }, "attachmentInfo": { "allowedFileTypes": "string", "title": "string", "description": "string", "acceptedFileTypes": [ "string", "string" ] }, "editableDateFieldSettings": { "dateFormat": "string", "minDate": "2023-06-26T04:11:52.213Z", "maxDate": "2023-06-26T04:11:52.213Z" }, "hyperlinkText": "string", "dataSyncTag": "string", "dropdownOptions": [ "string", "string" ], "textAlign": "Center", "textDirection": "LTR", "characterSpacing": 0, "idPrefix": "string", "restrictIdPrefixChange": false, "backgroundHexColor": "string" } }); let config = { method: 'post', maxBodyLength: Infinity, url: 'https://api.boldsign.com/v1/customField/create', headers: { 'Content-Type': 'application/json', 'Accept': 'application/json;odata.metadata=minimal;odata.streaming=true', 'Authorization': '{{apiKey}}' }, data : data }; axios.request(config) .then((response) => { console.log(JSON.stringify(response.data)); }) .catch((error) => { console.log(error); });
Request body
FieldNamestring | The name of the custom field you want to create. For example, you can use "My Custom Field" as the field name. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
FieldDescriptionstring | A brief description or additional information about the custom field. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
FieldOrderstring | The order or position of the custom field within a list of form fields. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BrandIdstring | The unique identifier associated with the brand for which the custom field is being created. This property allows you to associate the custom field specifically with a particular brand within your organization. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SharedFieldstring | This property indicates whether the custom field is intended to be shared across users within your organization. If set to true, the field will be accessible and visible to all users in your organization. On the other hand, if set to false, the field will be specific to your individual account and not visible or accessible to other users. Choose true or false based on your specific requirements. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
FormFieldobject | The custom form field associated with the brand.
|
Example response
200 Success
{ "customFieldId": "e33502d4-xxxx-xxxx-xxxx-6v3n85d51948", "message": "Custom field saved successfully." }