ZapSign API
Search…
Eventos
Entenda os eventos que são enviados por webhooks
A ZapSign envia os seguintes eventos por webhook:
    doc_created (enviado quando um documento é criado)
    doc_signed (enviado quando algum signatário assina o documento)
    doc_deleted (enviado quando um documento é deletado, via plataforma ou via API)
Você poderá diferenciar um do outro pelo atributo "event_type" que seguirá junto de todo webhook.
1
"event_type": "doc_created"
Copied!
Abaixo seguem exemplos:

doc_created (exemplo)

1
{
2
"event_type": "doc_created",
3
"sandbox": false,
4
"external_id": "id-suaaplicacao-e32213ds-243",
5
"open_id": 23,
6
"token": "cce11abf-abcd-abcd-a657-25b55f185f16",
7
"name": "sample.pdf",
8
"folder_path": "/",
9
"status": "pending",
10
"lang": "pt-br",
11
"original_file": "https://zapsign.s3.amazonaws.com/c11c4f2c11c4f2/c11c4f2/c11c4f25-79c7-4eea-8dcf-5434996a4251.pdf",
12
"signed_file": null,
13
"created_through": "web",
14
"deleted": false,
15
"deleted_at": null,
16
"signed_file_only_finished": false,
17
"disable_signer_emails": false,
18
"brand_logo": "",
19
"brand_primary_color": "",
20
"created_at": "2021-06-07T19:21:59.609067Z",
21
"last_update_at": "2021-06-07T19:21:59.609094Z",
22
"signers": [
23
{
24
"external_id": "",
25
"token": "b14f141f-aaaa-425e-8dfa-0bdac0ec806a",
26
"status": "new",
27
"name": "[email protected]",
28
"lock_name": false,
29
"email": "[email protected]",
30
"lock_email": false,
31
"phone_country": "55",
32
"phone_number": "",
33
"lock_phone": false,
34
"times_viewed": 0,
35
"last_view_at": null,
36
"signed_at": null,
37
"auth_mode": "assinaturaTela",
38
"qualification": "",
39
"require_selfie_photo": false,
40
"require_document_photo": false,
41
"geo_latitude": null,
42
"geo_longitude": null
43
}
44
]
45
}
Copied!

doc_signed (exemplo)

1
{
2
"event_type": "doc_signed",
3
"sandbox": false,
4
"external_id": "id-suaaplicacao-e32213ds-243",
5
"open_id": 23,
6
"token": "cce11abf-abcd-abcd-a657-25b55f185f16",
7
"name": "sample.pdf",
8
"folder_path": "/",
9
"status": "signed", //caso nem todos assinaram, continuará como "pending"
10
"lang": "pt-br",
11
"original_file": "https://zapsign.s3.amazonaws.com/asddasdasdasads08e1-48f5-8972-7b4e476dec9d/c11c4f25-79c7-4eea-8dcf-5434996a4251.pdf",
12
"signed_file": "https://zapsign.s3.amazonaws.com/saddas1d5as16d5asads-2b89-460e-8c30-1644fbe8f249/a5bf7fe0-05d0-4d09-bbeb-0beaa91abc56.pdf",
13
"created_through": "web",
14
"deleted": false,
15
"deleted_at": null,
16
"signed_file_only_finished": false,
17
"disable_signer_emails": false,
18
"brand_logo": "",
19
"brand_primary_color": "",
20
"created_at": "2021-06-07T19:21:59.609067Z",
21
"last_update_at": "2021-06-07T19:22:21.838310Z",
22
"signers": [
23
{
24
"external_id": "",
25
"token": "b14f141f-abcd-abcd-8dfa-0bdac0ec806a",
26
"status": "signed",
27
"name": "Fulano Silva",
28
"lock_name": false,
29
"email": "[email protected]",
30
"lock_email": false,
31
"phone_country": "55",
32
"phone_number": "1155551111",
33
"lock_phone": false,
34
"times_viewed": 1,
35
"last_view_at": "2021-06-07T19:22:12.875967Z",
36
"signed_at": "2021-06-07T19:22:19.956056Z",
37
"auth_mode": "assinaturaTela",
38
"qualification": "",
39
"require_selfie_photo": false,
40
"require_document_photo": false,
41
"geo_latitude": "-23.559298",
42
"geo_longitude": "-46.683343"
43
}
44
],
45
"signer_who_signed": { //objeto que trás quem assinou o documento.
46
"external_id": "",
47
"token": "b14f141f-abcd-abcd-8dfa-0bdac0ec806a",
48
"status": "signed",
49
"name": "Fulano Silva",
50
"lock_name": false,
51
"email": "[email protected]",
52
"lock_email": false,
53
"phone_country": "55",
54
"phone_number": "1155551111",
55
"lock_phone": false,
56
"times_viewed": 1,
57
"last_view_at": "2021-06-07T19:22:12.875967Z",
58
"signed_at": "2021-06-07T19:22:19.956056Z",
59
"auth_mode": "assinaturaTela",
60
"qualification": "",
61
"require_selfie_photo": false,
62
"require_document_photo": false,
63
"geo_latitude": "-23.559298",
64
"geo_longitude": "-46.683343"
65
}
66
}
Copied!

doc_deleted (exemplo)

1
{
2
"event_type": "doc_deleted",
3
"sandbox": false,
4
"external_id": "id-suaaplicacao-e32213ds-243",
5
"open_id": 23,
6
"token": "cce11abf-abcd-abcd-a657-25b55f185f16",
7
"name": "sample.pdf",
8
"folder_path": "/",
9
"status": "signed",
10
"lang": "pt-br",
11
"original_file": "https://zapsign.s3.amazonaws.com/asddasdasdasads08e1-48f5-8972-7b4e476dec9d/c11c4f25-79c7-4eea-8dcf-5434996a4251.pdf",
12
"signed_file": "https://zapsign.s3.amazonaws.com/saddas1d5as16d5asads-2b89-460e-8c30-1644fbe8f249/a5bf7fe0-05d0-4d09-bbeb-0beaa91abc56.pdf",
13
"created_through": "web",
14
"deleted": true, // deleted: true significa que o documento foi excluído
15
"deleted_at": "2021-06-07T19:22:33.932981Z", // data e horário do delete
16
"signed_file_only_finished": false,
17
"disable_signer_emails": false,
18
"brand_logo": "",
19
"brand_primary_color": "",
20
"created_at": "2021-06-07T19:21:59.609067Z",
21
"last_update_at": "2021-06-07T19:22:21.838310Z",
22
"signers": [
23
{
24
"external_id": "",
25
"token": "b14f141f-abcd-abcd-8dfa-0bdac0ec806a",
26
"status": "signed",
27
"name": "Fulano Silva",
28
"lock_name": false,
29
"email": "[email protected]",
30
"lock_email": false,
31
"phone_country": "55",
32
"phone_number": "1155551111",
33
"lock_phone": false,
34
"times_viewed": 1,
35
"last_view_at": "2021-06-07T19:22:12.875967Z",
36
"signed_at": "2021-06-07T19:22:19.956056Z",
37
"auth_mode": "assinaturaTela",
38
"qualification": "",
39
"require_selfie_photo": false,
40
"require_document_photo": false,
41
"geo_latitude": "-23.559298",
42
"geo_longitude": "-46.683343"
43
}
44
]
45
}
Copied!
Last modified 4mo ago