Prerequisites
A seal is a signature by a legal person. To activate the seal feature, your workspace must own a certificate of legal person, issued by Universign upon demand.
To request a document to be sealed by a legal person, you must first create a signature field and then, assign a seal ID to that field.
Create a signature field
To create a field, send a request to POST /v1/transactions/{transaction_id}/documents/document{id}/fields
and pass signature
in the type
argument (note that this is the default value, so it is not mandatory to set the type
.)
curl
https://api.universign.com/v1/transactions/tx_AWo949MOq0JE/documents/doc_wWz6/fields \
-d type=signature
You are returned a field ID in the API response:
{
"id": "fld_a998",
"type": "signature",
"built_in": false,
"consents": [],
"updatable": true,
"deletable": true
}
Note that the size of the seal is set to 200px x 50px and cannot be edited. Make sure the seal is well positioned in the document. If any edge of the seal exceeds the document limit, the API returns an error.
Assign a seal ID to the field
To request the document to be sealed, send a request to POST /v1/transactions/{transaction_id}/signatures
and pass the field ID (via the field
argument) and the seal ID (via the signer
argument), as follows:
curl
https://api.universign.com/v1/transactions/tx_AWo949MOq0JE/signatures \
-d signer=scd_5x \
-d field=fld_a998
Update a seal logo
You may need to use a custom logo for the seal that will display on your document. You can use either the Universign logo, the issuing entity logo or even seal a document with no logo. This endpoint, allows you to define the logo that will display on your sealed document.
To update the logo that will display on your sealed document, send a request to POST /v1/transactions/{transaction_id}/seals/{seal_id}
and pass the logo_display
argument:
curl https://api.universign.com/v1/transactions/tx_AWo949MOq0JE/seals/scd_5x \
-d logo_display=issuing_entity
The logo_display
accpeted values are as follows:
certifcate
: if you want to use the Universign logoissuing_entity
: if you want to use the issuig_entity logo (default value)none
: if you don’t want to use any logo
The API returns a seal
sub-object.
{
"id": "scd_5x",
"name": "scdName",
"logo_display": "issuing_entity"
}
Customize a seal logo (Full transaction request only)
You may need to use a custom seal logo while requesting a full transaction. To do so, you need first to own a certificate of legal person. Then, add the certificate id
and the signature_image
arguments to your full transaction request. Note that you can set signature_image
only if logo_display
value is certificate
.
"sealers": [
{
"id": "scd_wa7ZVZGxzOq0",
"signature_image" : "iVBORw0KGgoAAAANSUhEUgAAALEAAAA2CAYAAACIn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rVxKaF5HvVWtTb82h07r8LqywOfY7p3orX5CjpxhCU8TxmF6jq//0oEpBck44B0ceMwSxJz/fZhieXSTTylNS56sDurG5srY/QVzXGViNaDHee9vHIy9CltfnLhLUZzwyGcwqbT5mmNq7AT5z4N2A7vi1ypi1pdmUvGu0n/xRPh7oi6e7AD+4tH7ldYEp1Q3SomO05PhOjLEbV55OvLmNghWQcktyHKzzHINgFhty0kZwR55icv3vz00/8y+4FavE4pr/M8m7G+RNa2yrBW5C4pzUdbpXMd0uq+ByX3WZ5XjkdwLEP9d6dVCa+wJvZlnDY9snssL+zGZBXWsvZy6Nhj9YOcyjI/efpV/N+JAkuP4pcdBZYeBYkLLD0KEhdYevwfR59do57UtOkAAAAASUVORK5CYII="
}
]
Requirements
- The seal logo is passed in base64.
- The seal logo must not exceed 2 MB.
- Only PNG and JPG formats are accepted.
For more details about the full transaction request, visit Full transaction request.
Remove a signer from a field
You can remove a signer from a field. To do so, add the delete
boolean to your request and set it to true
.
curl
https://api.universign.com/v1/transactions/tx_AWo949MOq0JE/signatures \
-d signer=scd_5x \
-d field=fld_a998 \
-d delete=true
Position a field
A seal can be visible or invisible in the PDF. When you create a field, it is by default invisible but you can specify its position on a document page.
You can specify the field position by setting its coordinates on the document page or by using an anchor:
With coordinates
A field’s position is defined by the page number as well as horizontal (x
) and vertical (y
) pixels coordinates. To specify the position, send a request to POST /v1/transactions/{transaction_id}/documents/{document_id}/fields/{field_id}
and pass the position arguments:
curl
https://api.universign.com/v1/transactions/tx_AWo949MOq0JE/documents/doc_wWz6/fields/fld_a998 \
-d page=1 \
-d x=75 \
-d y=200
With an anchor
Universign can search for a string in the document and automatically position the signature field underneath it. To position the field, send a request to POST /v1/transactions/{transaction_id}/documents/{document_id}/fields
and pass the string value as the anchor
argument:
curl
https://api.universign.com/v1/transactions/tx_AWo949MOq0JE/documents/doc_wWz6/fields \
-d anchor=client signature
Note that the position of a field can be set upon field creation via the endpoint (POST /v1/transactions/{transaction_id}/documents/document{id}/fields
), or when the field already exists via the endpoint (POST /v1/transactions/{transaction_id}/documents/{document_id}/fields/{field_id}
).
Multiple fields
You can create as many signature fields as needed in the document.
For more options on fields, visit add a field.