Adding Fields
Fields enable the placement of additional data in a document at the time of signing. Like signature fields, non-signature fields can be placed anywhere inside a document. Nonetheless, each field is linked to a particular signature. Only the signer of that signature can assign or change the field's value. Once the signature is signed, however, the value of the field cannot be changed by anyone.
You cannot add fields to (1) documents that are Accept Only; (2) the Electronic Consent form; (3) documents in an accessible transaction.
Adding a Field to a Document
The sample request below shows you how to add a field to an existing document:
HTTP Request
POST <host domain>/api/sign/v1/cs-packages/{packageId}/documents/{documentId}/approvals/{approvalId}/fields
HTTP Headers
Accept: application/json Content-Type: application/json Authorization: Bearer access_token
Request Payload
{ "name":"Signer Name", "top":500, "left":300, "width":100, "height":30, "page":0, "type":"INPUT", "value":null, "binding":"{signer.name}", "subtype":"LABEL" }
For a complete description of each field, see the Request Payload Table below.
Response Payload
{ "binding": "{signer.name}", "validation": null, "id": "BsZv3XvmpsMH", "page": 0, "data": null, "subtype": "LABEL", "top": 500, "height": 30, "extractAnchor": null, "width": 100, "extract": false, "left": 300, "type": "INPUT", "value": "{signer.name}", "name": "Signer Name" }
Updating a Field in a Document
It is important to note that when updating a field, your new Field object must have the same id as the field you want to update.
To update a field, you will need to make a PUT request to:
<host domain>/api/sign/v1/packages/{packageId}/documents/{documentId}/approvals/{signatureId}/fields/{fieldId}
With the updated field parameters:
{ "id": "myLabelField", "top": 200, "left": 100, "width": 250, "height": 50, "page": 0, "type": "INPUT", "binding": "{approval.signed}", "subtype": "LABEL" }
Deleting a Field in a Document
Deleting a field is done by making a DELETE request to:
<host domain>/api/sign/v1/cs-packages/{packageId}/documents/{documentId}/ approvals/{signatureId}/fields/{fieldId}
Request Payload Table
Property |
Type |
Editable |
Required |
Default |
Sample Values |
---|---|---|---|---|---|
name |
string |
Yes |
No |
n/a |
|
top |
integer |
Yes |
No |
0 |
500 |
left |
integer |
Yes |
No |
0 |
300 |
width |
integer |
Yes |
No |
200 |
100 |
height |
integer |
Yes |
No |
50 |
30 |
page |
integer |
Yes |
No |
0 |
0/1/2 ... |
type |
string |
Yes |
No |
n/a |
|
value |
string |
Yes |
No |
null |
|
subtype |
string |
Yes |
No |
n/a |
|
binding |
string |
Yes |
No |
null |
{ |