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 /api/cs-packages/{packageId}/documents/{documentId}/approvals/{approvalId}/fields
JS
HTTP Headers
Accept: application/json
Content-Type: application/json
Authorization: Bearer access_token
JS
Request Payload
{ "name":"Signer Name", "top":500, "left":300, "width":100, "height":30, "page":0, "type":"INPUT", "value":null, "binding":"{signer.name}", "subtype":"LABEL" }
JS
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" }
JS
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:
https://sandbox.congamerge.com/api/packages/{packageId}/documents/{documentId}/approvals/{signatureId}/fields/{fieldId}
JS
With the updated field parameters:
{ "id": "myLabelField", "top": 200, "left": 100, "width": 250, "height": 50, "page": 0, "type": "INPUT", "binding": "{approval.signed}", "subtype": "LABEL" }
JS
Deleting a Field in a Document
Deleting a field is done by making a DELETE request to:
https://services.congamerge.com/api/cs-packages/{packageId}/documents/{documentId}/ approvals/{signatureId}/fields/{fieldId}
JS
Request Payload Table
Property | Type | Editable | Required | Default | Sample Values |
---|
name | string | Yes | No | n/a | Signer Name |
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 | SIGNATURE/INPUT |
value | string | Yes | No | null | STU BANK |
subtype | string | Yes | No | n/a | FULLNAME/INITIALS/CAPTURE/LABEL/
TEXTFIELD/CHECKBOX/RADIO/LIST
|
binding | string | Yes | No | null | {approval.signed} /{signer.title} /{signer.name }/{signer.company } |