Add an image field

A field is the object that bears the action to be performed by a participant. A field has a type which can be either:

  • signature (for a signature request by a physical person),
  • visa (for a consultation request by a physical person),
  • text (for a text field to be filled by the participant),
  • label (for a read only text added by the transaction creator on a document),
  • checkbox_group (for a group of checkboxes to be checked by the participant),
  • checkbox (for a checkbox to be checked by the participant),
  • radio_group (for a group of radio buttons to be checked by the participant),
  • radiobutton (for a radio button to be checked by the participant),
  • dropdown (for a dropdown list where the participant needs to select an option).
  • image (for an image field where the participant needs to import an image file),
  • signature_date (for a field that displays the date and hour when the participant signed the document),
  • full_name (for a field that displays the participant full name),
  • email (for a field that displays the participant email),
  • company_name (for a field that displays the participant company name),
  • job_title (for a field that displays the participant job title).

You can also add initials fields.

About image fields

You may need your participant to add an image (for example a company or entity logo) when processing the document. To do so, add an image field and assign a participant to it. The image imported by the participant must be a JPEG or PNG and size must not exceed 2MB.

Note that you can’t add image fields:

  • on a document that has already been processed by a participant,
  • on a document that already contains a signature (before being imported to the transaction).

Create an image field

To create an image field, send a request to POST /v1/transactions/{transaction_id}/documents/{document_id}/fields and pass image in the type argument.

You can set other optional arguments:

curl
https://api.universign.com/v1/transactions/tx_DwYGle91EQZA/documents/doc_4dn/fields \
-d type=image \
-d name=ImageField \
-d page=1 \
-d x=75 \
-d y=200 \
-d tooltip="Please add your company logo here."
  • name: The text field name.
  • page: The page number on which you want to position the text field.
  • anchor: The PDF anchor (a string in the document) underneath which the field is automatically positioned.
  • x: The text field horizontal coordinate on the document page (in pixels).
  • y: The text field vertical coordinate on the document page (in pixels).
  • copy_from: Use to copy the field. Expected value is the ID of the field you want to copy. This creates a new field with no position on the document. Do not pass if you pass the move_from argument
  • move_from: Use to move a field to another document. Expected value is the ID of the field you want to move. Do not pass if you pass the copy_from argument.
  • tooltip: Tooltips about the image the participant needs to add to the document during signature process. Set only if field type is text or image. Max 100 characters.
  • required: Whether the participant must fill the image field or not. Set only if field type is text, image or dropdown. Default value is true.

For more details about positioning a field using an anchor, visit Create a signature field with a position on a document page.

The API response returns a field object.

{
  "id" : "fld_yXr",
  "name" : "ImageField",
  "type" : "image",
  "position" : {
    "page" : 2,
    "x" : 77,
    "y" : 400,
    "width" : 123,
    "height" : 95
  },
  "built_in" : false,
  "updatable" : true,
  "deletable" : false,
  "tooltip" : "Please add your company logo here.",
  "required" : true
}

Update a text field

To update a text field, send a request to POST /v1/transactions/{transaction_id}/documents/{document_id}/fields/{field_id}.

curl
https://api.universign.com/v1/transactions/tx_DwYGle91EQZA/documents/doc_4dn/fields/fld_DL4x \
-d type=image \
-d name=UpdatedImageField \
-d page=2 \
-d x=75 \
-d y=200 \ 
-d tooltip="Please add your entity logo here." \
-d required=false

The API response returns a field sub-object as it was last updated.

{
  "id" : "fld_DL4x",
  "name" : "UpdatedImageField",
  "position" : {
    "page" : 2,
    "x" : 75,
    "y" : 200,
    "width" : 200,
    "height" : 19
  },
  "built_in" : false,
  "updatable" : true,
  "deletable" : true,
  "max_length" : 27,
  "tooltip" : "Please add your entity logo here.",
  "required" : false,
  "font_size" : 12,
  "type" : "text"
}

Add a label field
Add checkbox fields
Developer tools
Guides
Services
API reference