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)

Você poderá diferenciar um do outro pelo atributo "event_type" que seguirá junto de todo webhook.

"event_type": "doc_created"

Abaixo seguem exemplos.

doc_created (exemplo)

{
"event_type": "doc_created",
"open_id": 3,
"token": "9f555d66-38bb-4989-abdc-3c1bxxxx",
"status": "pending",
"name": "PROPOSTA FULANO DA SILVA.pdf",
"original_file": "https://zapsign.s3.amazonaws.com/docs/2763xxxxx-435a-a301-f1cfdf202190/17691de4-bxxxxxx-085ea1734205.pdf",
"signed_file": null,
"created_at": "2020-04-18T16:20:08.841718Z",
"last_update_at": "2020-04-18T16:20:08.841742Z",
"signers": [
{
"token": "03befd61-3a14-453c-9f8f-30xxxxxxxda",
"status": "new",
"name": "Fulano da Silva",
"email": "",
"phone_country": "",
"phone_number": "",
"times_viewed": 0,
"last_view_at": null,
"signed_at": null
},
{
"token": "10de1a14-7643-4eb7-bb42-ac32xxxxxx8a5",
"status": "new",
"name": "Siclano Beltrano",
"email": "",
"phone_country": "",
"phone_number": "",
"times_viewed": 0,
"last_view_at": null,
"signed_at": null
}
],
"created_through": "web"
}

doc_signed (exemplo)

{
"event_type": "doc_signed",
"open_id": 3,
"token": "9f555d66-38bb-4989-abdc-3c1bxxxx",
"status": "signed",
"name": "PROPOSTA RENATO HAIDAMOUS RAMPAZZO.pdf",
"original_file": "https://zapsign.s3.amazonaws.com/docs/2763xxxxx-435a-a301-f1cfdf202190/17691de4-bxxxxxx-085ea1734205.pdf",
"signed_file": "https://zapsign.s3.amazonaws.com/pdf/ae0xxxx-304f-4123-9e76-0xxx51fe8/13xxxe35-1b54-4cc7-b5b6-878024b7b038.pdf",
"created_at": "2020-04-18T16:20:08.841718Z",
"last_update_at": "2020-04-18T16:24:37.851335Z",
"signers": [
{
"token": "03befd61-3a14-453c-9f8f-30xxxxxxxda",
"status": "signed",
"name": "Fulano da Silva",
"email": "fulano@gmail.com",
"phone_country": "55",
"phone_number": "11977550022",
"times_viewed": 1,
"last_view_at": "2020-04-18T16:21:22.245475Z",
"signed_at": "2020-04-18T16:21:43.843991Z"
},
{
"token": "10de1a14-7643-4eb7-bb42-ac32xxxxxx8a5",
"status": "signed",
"name": "Siclano Beltrano",
"email": "siclano@gmail.com",
"phone_country": "55",
"phone_number": "45950500116",
"times_viewed": 2,
"last_view_at": "2020-04-18T16:24:08.396995Z",
"signed_at": "2020-04-18T16:24:34.457331Z"
}
],
"created_through": "web"
}