To download the full code sample see our Code Share site.
Transactions can be configured to display in a specific time zone. This means that visible time components, like the signature time stamp and date fields, will format and display according to the specified time zone. This can be done at the following levels:
-
By Account
-
By Sender Time Zone
-
By Package Time Zone
Specifying Time Zones By Account
Specifying time zone at the Account level changes the default time zone for any new Senders in the account to the newly specified time zone. You can have this configured by contacting our our Support Team.
Specifying Time Zones By Sender
Specifying a time zone at the sender level is useful when you have multiple senders in different time zones. Once this done, any new transaction created by you sender will inherit the time zone configuration you configured for them.
The following code will do this:
SenderInfo updatedSender = SenderInfoBuilder.newSenderInfo("[email protected]") .withTimezoneId("America/Toronto").build(); eslClient.getAccountService().updateSender(updatedSender,"sender_id");
Specifying Time Zones By Package
Transactions usually default to the time zone of the sender creating the transaction. However, you can override this by setting a specific time zone for the transaction.
You can also create a template with a specific time zone. Any transaction created from this template will then inherit this time zone.
When creating a transaction, you can set a time zone id by calling the WithTimezoneId() function through the PackageBuilder object. The following code shows you how to create one transaction with EST time zone, while adding one signature and one date field.
DocumentPackage pkg = PackageBuilder.newPackageNamed("Test Time Zone") .withSigner(SignerBuilder.newSignerWithEmail("[email protected]" ) .withFirstName("signer1 firstname") .withLastName("signer1 lastname") ) .withDocument(DocumentBuilder.newDocumentWithName("document 1") .fromFile("file_path") .withSignature(SignatureBuilder.signatureFor("[email protected]") .onPage(0) .atPosition(100, 300) .withSize(200, 75)) ) .withTimezoneId("America/Toronto") .build(); PackageId packageId = eslClient.createPackageOneStep(pkg); eslClient.sendPackage(packageId);
Results
Here is an example of what you can expect to see once you have run your code.
Here are the date formats used for the signature fields:
{ "signatureFormat": "e-Signed by $signer_name; \n on $date;", "signatureDateFormat":"yyyy-MM-dd HH:mm:ss z" }
And for the date field:
{ "aws.document.autofield.date.format" : "yyyy-MM-dd HH:mm:ss z" }
You can have these formats updated per your requirements by contacting our Support Team.
To download the full code sample see our Code Share site.
Transactions can be configured to display in a specific time zone. This means that visible time components, like the signature time stamp and date fields, will format and display according to the specified time zone. This can be done at the following levels:
-
By Account
-
By Sender Time Zone
-
By Package Time Zone
Specifying Time Zones By Account
Specifying time zone at the Account level changes the default time zone for any new Senders in the account to the newly specified time zone. You can have this configured by contacting our our Support Team.
Specifying Time Zones By Sender
Specifying a time zone at the sender level is useful when you have multiple senders in different time zones. Once this done, any new transaction created by you sender will inherit the time zone configuration you configured for them.
The following code will do this:
//update existing sender's time zone SenderInfo updatedSender = SenderInfoBuilder.NewSenderInfo("[email protected]").WithTimezoneId("JST").Build(); eslClient.AccountService.UpdateSender(updatedSender, "GAfpUrfGLFQL"); }
Specifying Time Zones By Package
Transactions usually default to the time zone of the sender creating the transaction. However, you can override this by setting a specific time zone for the transaction.
You can also create a template with a specific time zone. Any transaction created from this template will then inherit this time zone.
When creating a transaction, you can set a time zone id by calling the WithTimezoneId() function through the PackageBuilder object. The following code shows you how to create one transaction with EST time zone, while adding one signature and one date field.
DocumentPackage pkg = PackageBuilder.NewPackageNamed("Test Time Zone" + new DateTime()) .WithSigner(SignerBuilder.NewSignerWithEmail("[email protected]") .WithFirstName("signer1 firstname") .WithLastName("signer1 lastname") ) .WithDocument(DocumentBuilder.NewDocumentNamed("document 1") .FromFile(FILE_PATH) .WithSignature(SignatureBuilder.SignatureFor("[email protected]") .OnPage(0) .AtPosition(100, 300) .WithSize(200, 75)) ) .WithTimezoneId("America/Toronto") .Build(); PackageId packageId = eslClient.CreatePackageOneStep(pkg); eslClient.SendPackage(packageId);
Results
Here is an example of what you can expect to see once you have run your code.
Here are the date formats used for the signature fields:
{ "signatureFormat": "e-Signed by $signer_name; \n on $date;", "signatureDateFormat":"yyyy-MM-dd HH:mm:ss z" }
And for the date field:
{ "aws.document.autofield.date.format" : "yyyy-MM-dd HH:mm:ss z" }
You can have these formats updated per your requirements by contacting our Support Team.
To download the full code sample see our Code Share site.
Transactions can be configured to display in a specific time zone. This means that visible time components, like the signature time stamp and date fields, will format and display according to the specified time zone. This can be done at the following levels:
-
By Account
-
By Sender Time Zone
-
By Package Time Zone
Specifying Time Zones By Account
Specifying time zone at the Account level changes the default time zone for any new Senders in the account to the newly specified time zone. You can have this configured by contacting our our Support Team.
Specifying Time Zones By Sender
Specifying a time zone at the sender level is useful when you have multiple senders in different time zones. Once this done, any new transaction created by you sender will inherit the time zone configuration you configured for them.
The following code will do this:
HTTP Request
POST /api/account/senders/{senderId}
HTTP Headers
Accept: application/json Content-Type: application/json Authorization: Basic api_key { "timezoneId" : "JST" }
For new senders, you can first invite them and then update their time zone setting in two different steps, check Senders guide for how to invite senders.
Specifying Time Zones By Package
Transactions usually default to the time zone of the sender creating the transaction. However, you can override this by setting a specific time zone for the transaction.
You can also create a template with a specific time zone. Any transaction created from this template will then inherit this time zone.
HTTP Request
POST /api/packages
HTTP Headers
Authorization: Basic api_keyAccept: application/json
Content-Type: multipart/form-data
Request Payload
------WebKitFormBoundary1bNO60n7FqP5WO4t Content-Disposition: form-data; name="file"; filename="testDocumentExtraction.pdf" Content-Type: application/pdf %PDF-1.5 %µµµµ 1 0 obj <>>> endobj.... ------WebKitFormBoundary1bNO60n7FqP5WO4t Content-Disposition: form-data; name="payload" { "roles":[ { "id":"Role1", "signers":[ { "email":"[email protected]", "firstName":"1.firstname", "lastName":"1.lastname", "company":"OneSpan Sign" } ] }, { "id":"Role2", "signers":[ { "email":"[email protected]", "firstName":"2.firstname", "lastName":"2.lastname", "company":"OneSpan Sign" } ] } ], "documents":[ { "approvals":[ { "role":"Role1", "fields":[ { "page":0, "top":100, "subtype":"FULLNAME", "height":50, "left":100, "width":200, "type":"SIGNATURE" } ] }, { "role":"Role2", "fields":[ { "page":0, "top":300, "subtype":"FULLNAME", "height":50, "left":100, "width":200, "type":"SIGNATURE" } ] } ], "name":"Test Document" } ], "name":"Text Timezone Setting", "type":"PACKAGE", "timezoneId":"JST", "language":"en", "emailMessage":"", "description":"New Package", "autocomplete":true, "status":"SENT" } ------WebKitFormBoundary1bNO60n7FqP5WO4t--
Response Payload
{ "id": "9sKhW-h-qS9m6Ho3zRv3n2a-rkI=" }
Here is an example of what you can expect to see once you have run your code.
Here are the date formats used for the signature fields:
{ "signatureFormat": "e-Signed by $signer_name; \n on $date;", "signatureDateFormat":"yyyy-MM-dd HH:mm:ss z" }
And for the date field:
{ "aws.document.autofield.date.format" : "yyyy-MM-dd HH:mm:ss z" }
You can have these formats updated per your requirements by contacting our Support Team.