Table of contents
Creation of a signature request
To create the "Signature request", you must have the following available:
- the dossier_id
- the signer_id.
You can also indicated the expiration date of the signature request, which is the maximum time the user has to sign. If you decide to send the signature request via a message on IO, the expiration date will be included in the body of the message that is sent to the user.
Do you want to enter signature fields different than those in the dossier?
During the phase of creating a signature request, it may be necessary to have signature fields that are different than those in the relative dossier. You therefore have the option to enter specific metadata for that signature request, which will overwrite those of the dossier. documents_metadata is an optional field.
An example of a call to the endpoint is shown below: POST /api/v1/sign/signature-requests
With the message body:
1{
2 "dossier_id": "01GG4NFBCN4ZH8ETCCKX3766KX",
3 "signer_id": "01GG4TG9FP2D3JPWFTAM0WEFTG",
4 "expires_at": "2023-01-01T00:00:00.000Z",
5 "documents_metadata": [
6 {
7 "title": "Sign 150 hour contract",
8 "signature_fields": [
9 {
10 "attrs": {
11 "coordinates": {
12 "x": 112,
13 "y": 510
14 },
15 "size": {
16 "w": 140,
17 "h": 40
18 },
19 "page": 0
20 },
21 "clause": {
22 "title": "Sign contract",
23 "type": "REQUIRED"
24 }
25 }
26 ]
27 }
28 ]
29}
30The response will be as follows:
1{
2 "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
3 "dossier_id": "01GG4NFBCN4ZH8ETCCKX3766KX",
4 "signer_id": "01GG4TG9FP2D3JPWFTAM0WEFTG",
5 "status": "DRAFT",
6 "created_at": "2022-12-05T00:00:00.000Z",
7 "updated_at": "2022-12-05T00:00:00.000Z",
8 "expires_at": "2023-01-01T00:00:00.000Z",
9 "documents": [
10 {
11 "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
12 "status": "WAIT_FOR_UPLOAD",
13 "metadata": {
14 "title": "Sign 150 hour contract",
15 "signature_fields": [
16 {
17 "attrs": {
18 "coordinates": {
19 "x": 112,
20 "y": 510
21 },
22 "size": {
23 "w": 140,
24 "h": 40
25 },
26 "page": 0
27 },
28 "clause": {
29 "title": "Sign contract",
30 "type": "REQUIRED"
31 }
32 }
33 ]
34 },
35 "created_at": "2022-12-05T00:00:00.000Z",
36 "updated_at": "2022-12-05T00:00:00.000Z"
37 }
38 ]
39}
40In the response you will receive the Signature request created with the associated signature_request_id.
Ongoing support
For problems or questions after integration, write to us at the address enti-firmaconio@assistenza.pagopa.it