How to enable audit trail localization via BoldSign API?
BoldSign enables users to download and view the audit trail in multiple languages based on the signer’s language preference. This feature can be enabled when making an API eSignature request. Once enabled, the audit trail will be generated in both English and the signer’s preferred language
Enabling Audit Trail Localization
To enable audit trail localization via the BoldSign API, configure the following in your request payload:
- Set the enableAuditTrailLocalization property to true.
- Set the locale property in both the DocumentInfo object and each signer entry.
Example Code Snippets
Below are sample requests showing how to enable audit trail localization when sending signature requests via the BoldSign API:
Curl
curl -X 'POST' \
'https://api.boldsign.com/v1/document/send' \
-H 'accept: application/json' \
-H 'X-API-KEY: {your API key}' \
-H 'Content-Type: multipart/form-data' \
-F 'Signers={
"name": "hanky",
"emailAddress": "hankyWhites@gmail.com",
"signerType": "Signer",
"signerRole": "Signer",
"formFields": [
{
"id": "signature",
"name": "signature",
"fieldType": "Signature",
"pageNumber": 1,
"bounds": {
"x": 100,
"y": 100,
"width": 200,
"height": 200
},
"isRequired": true
}
],
"locale": "FR"
}' \
-F 'Files=@{your file}' \
-F 'enableAuditTrailLocalization=true' \
-F 'DocumentInfo={
"locale": "FR",
"title": "Document SDK API",
"description": "Testing document from SDK integration test case"
}'
.NET
var apiClient = new ApiClient("https://api.boldsign.com", "{Your API key}");
var documentClient = new DocumentClient(apiClient);
var documentFilePath = new DocumentFilePath
{
ContentType = "application/pdf",
FilePath = "{Your File path}"
};
var filesToUpload = new List<IDocumentFile>
{
documentFilePath,
};
var signatureField = new FormField(
id: "sign",
isRequired: true,
type: FieldType.Signature,
pageNumber: 1,
bounds: new Rectangle(x: 100, y: 100, width: 100, height: 50));
var formFieldCollections = new List<FormField>()
{
signatureField
};
var signer = new DocumentSigner(
signerName: "David",
signerType: SignerType.Signer,
signerEmail: "david@cubeflakes.com",
formFields: formFieldCollections,
locale: Locales.FR);
var documentSigners = new List<DocumentSigner>()
{
signer
};
var documentInfo = new DocumentInfo(
locale: Locales.FR,
documentTitle: "Document SDK API",
documentDescription: "Testing document from SDK integration test case"
);
var documentInfos = new List<DocumentInfo>()
{
documentInfo
};
var sendForSign = new SendForSign()
{
DisableEmails = true,
Signers = documentSigners,
Files = filesToUpload,
EnableAuditTrailLocalization = true,
DocumentInfo = documentInfos
};
var documentCreated = documentClient.SendDocument(sendForSign);
Python
import boldsign
configuration = boldsign.Configuration(api_key="YOUR_API_KEY")
with boldsign.ApiClient(configuration) as api_client:
document_api = boldsign.DocumentApi(api_client)
form_field = boldsign.FormField(
fieldType="Signature",
pageNumber=1,
bounds=boldsign.Rectangle(x=50, y=50, width=200, height=25)
)
document_signer = boldsign.DocumentSigner(
name="David",
emailAddress="david@cubeflakes.com",
signerType="Signer",
formFields=[form_field],
locale="FR"
)
document_info = boldsign.DocumentInfo(
title="Document SDK API",
description="Testing document from SDK integration test case",
locale="FR"
)
send_for_sign = boldsign.SendForSign(
files=["YOUR_FILE_PATH"],
signers=[document_signer],
documentInfo=[document_info]
)
document_created = document_api.send_document(send_for_sign)
PHP
<?php require_once "vendor/autoload.php";
use BoldSign\Configuration;
use BoldSign\Api\DocumentApi;
use BoldSign\Model\{FormField, Rectangle, DocumentSigner, SendForSign, DocumentInfo, FileInfo};
$config = new Configuration();
$config->setApiKey('YOUR_API_KEY');
$document_api = new DocumentApi($config);
$form_field = new FormField();
$form_field->setName('Sign');
$form_field->setFieldType('Signature');
$form_field->setPageNumber(1);
$form_field->setFont('Helvetica');
$form_field->setIsRequired(true);
$bounds = new Rectangle([50, 50, 100, 150]);
$form_field->setBounds($bounds);
$document_signer = new DocumentSigner();
$document_signer->setName('Hanky');
$document_signer->setEmailAddress('hankyWhites@cubeflakes.com');
$document_signer->setSignerOrder(1);
$document_signer->setSignerType('Signer');
$document_signer->setFormFields([$form_field]);
$document_signer->setLocale('FR');
$send_for_sign = new SendForSign();
$documentInfo = new DocumentInfo();
$documentInfo->setTitle('Document SDK API');
$documentInfo->setDescription('Testing document from SDK integration test case');
$documentInfo->setLocale('FR');
$send_for_sign->setDocumentInfo([$documentInfo]);
$files = new FileInfo();
$files = 'YOUR_FILE_PATH';
$send_for_sign->setFiles([$files]);
$send_for_sign->setTitle('SDK Document Test case');
$send_for_sign->setEnableAuditTrailLocalization(true);
$send_for_sign->setSigners([$document_signer]);
$send_for_sign->setDisableEmails(true);
$document_created = $document_api->sendDocument($send_for_sign);
Java
ApiClient client = Configuration.getDefaultApiClient();
client.setApiKey("YOUR_API_KEY");
DocumentApi documentApi = new DocumentApi(client);
FormField formField = new FormField();
formField.setName("Sign");
formField.setFieldType(FormField.FieldTypeEnum.SIGNATURE);
formField.setPageNumber(1);
formField.setFont(FormField.FontEnum.HELVETICA);
formField.setIsRequired(true);
Rectangle bounds = new Rectangle().x(100f).y(100f).width(100f).height(50f);
formField.setBounds(bounds);
DocumentSigner signer = new DocumentSigner();
signer.setName("Hanky");
signer.setEmailAddress("hankyWhites@cubeflakes.com");
signer.setSignerOrder(1);
signer.setSignerType(DocumentSigner.SignerTypeEnum.SIGNER);
signer.setFormFields(Arrays.asList(formField));
signer.setLocale(DocumentSigner.LocaleEnum.FR);
SendForSign sendForSign = new SendForSign();
DocumentInfo documentInfo = new DocumentInfo();
documentInfo.setTitle("Document SDK API");
documentInfo.setDescription("Testing document from SDK integration test case");
documentInfo.setLocale(DocumentInfo.LocaleEnum.FR);
sendForSign.setDocumentInfo(Arrays.asList(documentInfo));
File file = new File("YOUR_FILE_PATH");
sendForSign.setFiles(Arrays.asList(file));
sendForSign.setSigners(Arrays.asList(signer));
sendForSign.setTitle("SDK Document Test case");
sendForSign.setEnableAuditTrailLocalization(true);
sendForSign.setDisableEmails(true);
DocumentCreated documentCreated = documentApi.sendDocument(sendForSign);
Node.js
import { DocumentApi, DocumentSigner, DocumentInfo, FormField, Rectangle, SendForSign } from "boldsign";
import * as fs from 'fs';
const documentApi = new DocumentApi();
documentApi.setApiKey("YOUR_API_KEY");
const bounds = new Rectangle();
bounds.x = 100;
bounds.y = 50;
bounds.width = 100;
bounds.height = 100;
const formField = new FormField();
formField.name = "Sign";
formField.fieldType = FormField.FieldTypeEnum.Signature;
formField.font = FormField.FontEnum.Helvetica;
formField.pageNumber = 1;
formField.isRequired = true;
formField.bounds = bounds;
const documentSigner = new DocumentSigner();
documentSigner.name = "David";
documentSigner.emailAddress = "david@cubeflakes.com";
documentSigner.signerOrder = 1;
documentSigner.signerType = DocumentSigner.SignerTypeEnum.Signer;
documentSigner.formFields = [formField];
documentSigner.locale = DocumentSigner.LocaleEnum.Fr;
const files = fs.createReadStream("YOUR_FILE_PATH");
const sendForSign = new SendForSign();
const documentInfo = new DocumentInfo();
documentInfo.title = "SDK Document Test case";
documentInfo.description = "Testing document from SDK integration test case";
documentInfo.locale = DocumentInfo.LocaleEnum.Fr;
sendForSign.documentInfo = [documentInfo];
sendForSign.title = "Document SDK API";
sendForSign.signers = [documentSigner];
sendForSign.files = [files];
sendForSign.disableEmails = true;
sendForSign.enableAuditTrailLocalization = true;
const documentCreated = documentApi.sendDocument(sendForSign);
In the code examples above, replace the placeholder Your API Key with your actual BoldSign API key, set the enableAuditTrailLocalization property to true to ensure localized audit trails, and configure the locale property based on the signer’s preferred language.
Download audit trail
Once the document is signed or completed, you can download the audit trail. The downloaded audit trail will be displayed in both English and the signer’s preferred language. For detailed instructions, refer to the Download audit trail guide.
Multiple signers language requirement
- If your document includes multiple signers, ensure that all signers use the same language by setting the same locale value for each signer.
- If different languages are selected for different signers, the API will return an error message and the document will not be sent.
Supported locales
BoldSign supports the following language codes for audit trail localization:
| Language | Code |
|---|---|
| English | EN |
| Norwegian | NO |
| French | FR |
| German | DE |
| Spanish | ES |
| Bulgarian | BG |
| Czech | CS |
| Danish | DA |
| Italian | IT |
| Dutch | NL |
| Polish | PL |
| Portuguese | PT |
| Romanian | RO |
| Russian | RU |
| Swedish | SV |
| Japanese | JA |
| Thai | TH |
| SimplifiedChinese | ZH_CN |
| TraditionalChinese | ZH_TW |
| Korean | KO |
If the Combined Audit Trail option is enabled on the Branding settings, you will not have the option to download the audit trail separately. Instead, when you download the document, the audit trail in both English and the signer’s preferred language will be automatically appended to it.