Eventos Disponíveis
documents_crlv_requested
Este evento é enviado quando a emissão foi solicitada e encontra-se em andamento.
Exemplo de payload
{
"id":"0ad46c42-1efa-4af1-99d1-c7118c28f4fa",
"webhook":{
"id":"ee74b862-541d-48be-8782-1493cc49c980",
"resource":"documents",
"version":"v2"
},
"last_status":"sent",
"event":"documents_crlv_requested",
"data":{
"request_id": "1b0560c6-9244-4874-be89-1d0e5875153e",
"license_plate":"SQZ8E76",
"document":"12345678901",
"renavam":"12345678901",
"state":"SP"
},
"attempts":[
{
"attempt":3,
"created_at":"2023-12-06T13:55:02.301309",
"status":"sent",
"server_response":{
"http_status_code":200,
"headers":{
"Access-Control-Allow-Credentials":true,
"Access-Control-Allow-Origin":"*",
"Access-Control-Expose-Headers":"filename",
"Content-Type":"application/json",
"Date":"Fri, 06 Dec 2023 13:55:03 GMT",
"Content-Length":"33",
"Connection":"keep-alive"
},
"body":{
"msg":"Ok"
}
}
},
{
"attempt":2,
"created_at":"2023-10-24T15:44:04.506308",
"status":"sent",
"server_response":{
"http_status_code":200,
"headers":{
"Access-Control-Allow-Credentials":true,
"Access-Control-Allow-Origin":"*",
"Access-Control-Expose-Headers":"filename",
"Content-Type":"application/json",
"Date":"Fri, 24 Nov 2023 15:44:15 GMT",
"Content-Length":"33",
"Connection":"keep-alive"
},
"body":{
"msg":"Ok"
}
}
},
{
"attempt":1,
"created_at":"2023-10-24T15:44:04.506308",
"status":"failed",
"server_response":{
"http_status_code":500,
"headers":{
"Access-Control-Allow-Credentials":true,
"Access-Control-Allow-Origin":"*",
"Access-Control-Expose-Headers":"filename",
"Content-Type":"application/json",
"Date":"Fri, 24 Nov 2023 15:44:15 GMT",
"Content-Length":"33",
"Connection":"keep-alive"
},
"body":{
"msg":"Error"
}
}
}
]
}
documents_crlv_issued
Este evento é enviado quando o documento é emitido com sucesso e o link de download disponível
Exemplo de payload
{
"id":"0ad46c42-1efa-4af1-99d1-c7118c28f4fa",
"webhook":{
"id":"ee74b862-541d-48be-8782-1493cc49c980",
"resource":"documents",
"version":"v2"
},
"last_status":"sent",
"event":"documents_crlv_issued",
"data":{
"request_id": "1b0560c6-9244-4874-be89-1d0e5875153e",
"license_plate":"SQZ8E76",
"document":"12345678901",
"renavam":"12345678901",
"state":"SP",
"crlv_last_year_available":"2024",
"crlv_issuance_year":"2024",
"crlv_pdf_link":"https://s3.bucket.aws.com/arquivo.pdf",
},
"attempts":[
{
"attempt":3,
"created_at":"2023-12-06T13:55:02.301309",
"status":"sent",
"server_response":{
"http_status_code":200,
"headers":{
"Access-Control-Allow-Credentials":true,
"Access-Control-Allow-Origin":"*",
"Access-Control-Expose-Headers":"filename",
"Content-Type":"application/json",
"Date":"Fri, 06 Dec 2023 13:55:03 GMT",
"Content-Length":"33",
"Connection":"keep-alive"
},
"body":{
"msg":"Ok"
}
}
},
{
"attempt":2,
"created_at":"2023-10-24T15:44:04.506308",
"status":"sent",
"server_response":{
"http_status_code":200,
"headers":{
"Access-Control-Allow-Credentials":true,
"Access-Control-Allow-Origin":"*",
"Access-Control-Expose-Headers":"filename",
"Content-Type":"application/json",
"Date":"Fri, 24 Nov 2023 15:44:15 GMT",
"Content-Length":"33",
"Connection":"keep-alive"
},
"body":{
"msg":"Ok"
}
}
},
{
"attempt":1,
"created_at":"2023-10-24T15:44:04.506308",
"status":"failed",
"server_response":{
"http_status_code":500,
"headers":{
"Access-Control-Allow-Credentials":true,
"Access-Control-Allow-Origin":"*",
"Access-Control-Expose-Headers":"filename",
"Content-Type":"application/json",
"Date":"Fri, 24 Nov 2023 15:44:15 GMT",
"Content-Length":"33",
"Connection":"keep-alive"
},
"body":{
"msg":"Error"
}
}
}
]
}
documents_crlv_failed
Este evento é enviado para notificar o parceiro houve falha o processo de emissão + retentativas falharam (possível indisponibilidade do serviço externo)
Exemplo de payload
{
"id":"0ad46c42-1efa-4af1-99d1-c7118c28f4fa",
"webhook":{
"id":"ee74b862-541d-48be-8782-1493cc49c980",
"resource":"documents",
"version":"v2"
},
"last_status":"sent",
"event":"documents_crlv_request_failed",
"data":{
"request_id": "1b0560c6-9244-4874-be89-1d0e5875153e",
"license_plate":"SQZ8E76",
"document":"12345678901",
"renavam":"12345678901",
"state":"SP"
},
"attempts":[
{
"attempt":3,
"created_at":"2023-12-06T13:55:02.301309",
"status":"sent",
"server_response":{
"http_status_code":200,
"headers":{
"Access-Control-Allow-Credentials":true,
"Access-Control-Allow-Origin":"*",
"Access-Control-Expose-Headers":"filename",
"Content-Type":"application/json",
"Date":"Fri, 06 Dec 2023 13:55:03 GMT",
"Content-Length":"33",
"Connection":"keep-alive"
},
"body":{
"msg":"Ok"
}
}
},
{
"attempt":2,
"created_at":"2023-10-24T15:44:04.506308",
"status":"sent",
"server_response":{
"http_status_code":200,
"headers":{
"Access-Control-Allow-Credentials":true,
"Access-Control-Allow-Origin":"*",
"Access-Control-Expose-Headers":"filename",
"Content-Type":"application/json",
"Date":"Fri, 24 Nov 2023 15:44:15 GMT",
"Content-Length":"33",
"Connection":"keep-alive"
},
"body":{
"msg":"Ok"
}
}
},
{
"attempt":1,
"created_at":"2023-10-24T15:44:04.506308",
"status":"failed",
"server_response":{
"http_status_code":500,
"headers":{
"Access-Control-Allow-Credentials":true,
"Access-Control-Allow-Origin":"*",
"Access-Control-Expose-Headers":"filename",
"Content-Type":"application/json",
"Date":"Fri, 24 Nov 2023 15:44:15 GMT",
"Content-Length":"33",
"Connection":"keep-alive"
},
"body":{
"msg":"Error"
}
}
}
]
}
documents_crlv_unavailable
Este evento é enviado para notificar o parceiro que houve falha, documento indisponível para emissão
Exemplo de payload
{
"id":"0ad46c42-1efa-4af1-99d1-c7118c28f4fa",
"webhook":{
"id":"ee74b862-541d-48be-8782-1493cc49c980",
"resource":"documents",
"version":"v2"
},
"last_status":"sent",
"event":"documents_crlv_unavailable",
"data":{
"request_id": "1b0560c6-9244-4874-be89-1d0e5875153e",
"license_plate":"SQZ8E76",
"document":"12345678901",
"renavam":"12345678901",
"state":"SP",
"attempt_number": 1
},
"attempts":[
{
"attempt":3,
"created_at":"2023-12-06T13:55:02.301309",
"status":"sent",
"server_response":{
"http_status_code":200,
"headers":{
"Access-Control-Allow-Credentials":true,
"Access-Control-Allow-Origin":"*",
"Access-Control-Expose-Headers":"filename",
"Content-Type":"application/json",
"Date":"Fri, 06 Dec 2023 13:55:03 GMT",
"Content-Length":"33",
"Connection":"keep-alive"
},
"body":{
"msg":"Ok"
}
}
},
{
"attempt":2,
"created_at":"2023-10-24T15:44:04.506308",
"status":"sent",
"server_response":{
"http_status_code":200,
"headers":{
"Access-Control-Allow-Credentials":true,
"Access-Control-Allow-Origin":"*",
"Access-Control-Expose-Headers":"filename",
"Content-Type":"application/json",
"Date":"Fri, 24 Nov 2023 15:44:15 GMT",
"Content-Length":"33",
"Connection":"keep-alive"
},
"body":{
"msg":"Ok"
}
}
},
{
"attempt":1,
"created_at":"2023-10-24T15:44:04.506308",
"status":"failed",
"server_response":{
"http_status_code":500,
"headers":{
"Access-Control-Allow-Credentials":true,
"Access-Control-Allow-Origin":"*",
"Access-Control-Expose-Headers":"filename",
"Content-Type":"application/json",
"Date":"Fri, 24 Nov 2023 15:44:15 GMT",
"Content-Length":"33",
"Connection":"keep-alive"
},
"body":{
"msg":"Error"
}
}
}
]
}
documents_crlv_incorrect_data
Este evento é enviado para notificar o parceiro que houve falha, dados da solicitação incorretos
Exemplo de payload
{
"id":"0ad46c42-1efa-4af1-99d1-c7118c28f4fa",
"webhook":{
"id":"ee74b862-541d-48be-8782-1493cc49c980",
"resource":"documents",
"version":"v2"
},
"last_status":"sent",
"event":"documents_crlv_incorrect_data",
"data":{
"request_id": "1b0560c6-9244-4874-be89-1d0e5875153e",
"license_plate":"SQZ8E76",
"document":"12345678901",
"renavam":"12345678901",
"state":"SP"
},
"attempts":[
{
"attempt":3,
"created_at":"2023-12-06T13:55:02.301309",
"status":"sent",
"server_response":{
"http_status_code":200,
"headers":{
"Access-Control-Allow-Credentials":true,
"Access-Control-Allow-Origin":"*",
"Access-Control-Expose-Headers":"filename",
"Content-Type":"application/json",
"Date":"Fri, 06 Dec 2023 13:55:03 GMT",
"Content-Length":"33",
"Connection":"keep-alive"
},
"body":{
"msg":"Ok"
}
}
},
{
"attempt":2,
"created_at":"2023-10-24T15:44:04.506308",
"status":"sent",
"server_response":{
"http_status_code":200,
"headers":{
"Access-Control-Allow-Credentials":true,
"Access-Control-Allow-Origin":"*",
"Access-Control-Expose-Headers":"filename",
"Content-Type":"application/json",
"Date":"Fri, 24 Nov 2023 15:44:15 GMT",
"Content-Length":"33",
"Connection":"keep-alive"
},
"body":{
"msg":"Ok"
}
}
},
{
"attempt":1,
"created_at":"2023-10-24T15:44:04.506308",
"status":"failed",
"server_response":{
"http_status_code":500,
"headers":{
"Access-Control-Allow-Credentials":true,
"Access-Control-Allow-Origin":"*",
"Access-Control-Expose-Headers":"filename",
"Content-Type":"application/json",
"Date":"Fri, 24 Nov 2023 15:44:15 GMT",
"Content-Length":"33",
"Connection":"keep-alive"
},
"body":{
"msg":"Error"
}
}
}
]
}
documents_crlv_canceled_protocol
Este evento notifica o parceiro de que todas as tentativas de emissão do CRLV foram realizadas, porém, o documento permaneceu indisponível em todas elas. Como resultado, foi gerado o evento de estorno referente ao valor da emissão.
{
"id":"0ad46c42-1efa-4af1-99d1-c7118c28f4fa",
"webhook":{
"id":"ee74b862-541d-48be-8782-1493cc49c980",
"resource":"documents",
"version":"v2"
},
"last_status":"sent",
"event":"documents_crlv_canceled_protocol",
"data":{
"request_id": "dcc98bb6-4b17-4189-ba00-5d1be3709fff",
"license_plate":"SQZ8E76",
"document":"12345678901",
"renavam":"12345678901",
"state": "SP",
"protocol": "G4KPLI",
"number_of_attempts": 1,
"last_attempt": "2024-10-04T12:02:59.262211"
},
"attempts":[
{
"attempt":3,
"created_at":"2023-12-06T13:55:02.301309",
"status":"sent",
"server_response":{
"http_status_code":200,
"headers":{
"Access-Control-Allow-Credentials":true,
"Access-Control-Allow-Origin":"*",
"Access-Control-Expose-Headers":"filename",
"Content-Type":"application/json",
"Date":"Fri, 06 Dec 2023 13:55:03 GMT",
"Content-Length":"33",
"Connection":"keep-alive"
},
"body":{
"msg":"Ok"
}
}
},
{
"attempt":2,
"created_at":"2023-10-24T15:44:04.506308",
"status":"sent",
"server_response":{
"http_status_code":200,
"headers":{
"Access-Control-Allow-Credentials":true,
"Access-Control-Allow-Origin":"*",
"Access-Control-Expose-Headers":"filename",
"Content-Type":"application/json",
"Date":"Fri, 24 Nov 2023 15:44:15 GMT",
"Content-Length":"33",
"Connection":"keep-alive"
},
"body":{
"msg":"Ok"
}
}
},
{
"attempt":1,
"created_at":"2023-10-24T15:44:04.506308",
"status":"failed",
"server_response":{
"http_status_code":500,
"headers":{
"Access-Control-Allow-Credentials":true,
"Access-Control-Allow-Origin":"*",
"Access-Control-Expose-Headers":"filename",
"Content-Type":"application/json",
"Date":"Fri, 24 Nov 2023 15:44:15 GMT",
"Content-Length":"33",
"Connection":"keep-alive"
},
"body":{
"msg":"Error"
}
}
}
]
}