The fields that should appear on the document,
expressed as a 2-dimensional JSON array serialized to a string. The main array represents documents,
with each containing an array of form fields. One document array is required for each file provided
by the
file[] parameter.
In the case of a file with no fields, an empty list must be specified.
Each field must contain:
1. api_id - (string) an identifier for the field that is unique across all documents in the request
2. type - one of the
Type options
3. x & y - (int) location coordinates of the field in pixels
4. page - (int) page in the document where the field should be placed (requires documents be PDF files)
a. When the page number parameter is supplied, the API will use the new coordinate system.
b. Check out the differences between both
coordinate systems and how to use them.
5. width & height - (int) size of the field in pixels
6. required - (boolean) whether this field is required
7. signer - (int | string) signer index identified by the offset
%i% in the
signers[%i%] parameter, indicating which signer should fill out the field. If your
type is 'text-merge' you can set this to 'sender', so the field is non-editable by any signer.
Optionally, each field may contain a name (string) parameter. This is a display name for the field.
Each text field may contain a validation_type parameter. Check out the list of
validation types to learn more about the possible values.
The following is an example of a form_fields_per_document for a 2-document request with a text field and signature field on the first page of the document, prior to serialization to a string for the API request:
[
[
{
"api_id": "uniqueIdHere_1",
"name": "",
"type": "text",
"x": 112,
"y": 328,
"width": 100,
"height": 16,
"required": true,
"signer": 1,
"page": 1,
"validation_type": "numbers_only"
},
{
"api_id": "uniqueIdHere_2",
"name": "",
"type": "signature",
"x": 530,
"y": 415,
"width": 120,
"height": 30,
"required": true,
"signer": 0,
"page": 1
}
],
[]
]