Callback / Webhook
callbacks
Quando uma busca ou um monitoramento e feito pela API da JUDIT enviamos um retorno com as informações encontradas. O Webhook pode ser configurado atráves do nosso dashboard acessando: https://app.judit.io/
Fazemos uma solicitação POST para webhooks com a resposta de acordo com sua busca. O retorno ao webhook será feito após o status da requisição estar como “completed”.
Exemplo de um payload do tipo de resposta, onde o campo reference_type
pode variar entre “request” ou “tracking”
{
"user_id": "5ccba00e-1563-4418-91a4-c164b9f02411",
"callback_id": "0815b90b-9016-4470-9e1b-d7c8ee837f34",
"event_type": "response_created",
"reference_type": "request",
"reference_id": "6dec567b-c4d7-47cb-ab2c-0393dae9d089",
"created_at": "2023-10-18T13:25:10.357Z",
"payload": {
"request_id": "d9ff8e29-524d-4904-89d7-35389880cb12",
"response_id": "11039f4e-9a6b-4d4f-8ad2-b2af01aae795",
"response_type": "lawsuit",
"response_data": ResponseData,
"user_id": "82082593-c664-4d7b-b174-2f0dc4791daf",
"created_at": "2023-10-18T13:27:05.272Z",
"request_status": "completed",
"request_created_at": "2023-10-18T13:25:08.347Z"
}
}
Exemplos:
Se voce realizar uma consulta processual com o campo response_type
passando como valor “lawsuit”, o campo response_data
retornará a resposta com o formato parecido com o seguinte:
{
//...
"payload": {
//...
"response_data": {
"code": "0027400-51.2009.5.03.0135",
"instance": 1,
"lawsuit_cnj": "91970cc2-7f45-4c58-af9a-89e8b905dea6",
"crawler": {
"parties": {
"code": "JTrtScrapper",
"updated_at": "2023-10-06T19:45:51.489Z",
"weight": 10
},
"cover": {
"code": "JTrtScrapper",
"updated_at": "2023-10-06T19:44:45.773Z",
"weight": 10
},
"amount": {
"code": "JTrtScrapper",
"updated_at": "2023-10-06T19:44:44.054Z",
"weight": 0
},
"classification": {
"code": "JTrtScrapper",
"updated_at": "2023-10-06T19:44:40.254Z",
"weight": 10
},
"status": {
"code": "JTrtScrapper",
"updated_at": "2023-10-06T19:44:46.553Z",
"weight": 0
},
"subjects": {
"code": "JTrtScrapper",
"updated_at": "2023-10-06T19:44:41.713Z",
"weight": 10
},
"attachments": {
"code": "JTrtScrapper",
"updated_at": "2023-10-06T19:44:50.527Z",
"weight": 10
},
"related_lawsuits": {
"code": "JTrtScrapper",
"updated_at": "2023-10-06T19:44:47.014Z",
"weight": 10
},
"steps": {
"code": "JTrtScrapper",
"updated_at": "2023-10-06T19:44:47.951Z",
"weight": 10
}
},
"parties": [
{
"name": "ALINE PAULA RAMOS",
"main_document": "05196308660",
"document_type": "cpf",
"person_type": "Autor",
"side": "Active",
"lawyers": [
{
"name": "RONEI MUNIZ BONFIM",
"document": "03344781626",
"document_type": "cpf",
"license": "MG100560",
}
]
},
{
"name": "ADRIANA AMELIA DA SILVA MELO",
"document": "83359079604",
"document_type": "cpf",
"person_type": "Réu",
"side": "Passive",
"lawyers": [
{
"name": "JOSE RIBAMAR MATOS AMARAL",
"document": "10912797720",
"document_type": "cpf",
"license": "MG94008"
}
]
}
],
"subjects": [],
"related_lawsuits": [],
"created_at": "2023-10-06T19:44:33.358Z",
"updated_at": "2023-10-06T19:45:51.489Z",
"classification": {
"code": "985",
"name": "Ação Trabalhista - Rito Ordinário",
},
"distribution_date": "2009-03-19T00:00:00.000Z",
"free_justice": false,
"judge": null,
"justice": "5",
"last_step": {
"step_id": "mEktW9BQ/O+yIHnJnkdQO9t91oWJdhuDq7xums+zcpI=",
"step_date": "2020-12-01T18:52:00.000Z",
"content": "Arquivados os autos definitivamente",
"step_type": "ATOrd"
},
"secrecy_level": 0,
"tags": {},
"tribunal": "03",
"tribunal_acronym": "TRT3",
"tribunal_id": "985",
"name": "JUDIT X LEONARDO REBBITE"
}
//...
}
}
Quando uma busca com o campo response_type
retornar o valor “steps”,“attachments” ou “parties”, o campo response_data
irá gerar as respostas de forma paginada, onde page_data
será um array que poderá conter no máximo 50 itens e também pode variar seu tipo de acordo com o search_type
informado.
Se quisermos consultar as respostas para ver um grupo de itens específicos poderemos realizar uma consulta de respostas passando filtros e paginação.
{
//...
"payload": {
//...
"response_data": {
"code": "0027400-51.2009.5.03.0135",
"instance": 1,
"page": 1,
"page_data": PageData[],
"page_count": 5,
"all_count": 15,
"all_pages_count": 3
}
//...
}
}
Exemplos:
Se voce realizar uma busca com o response_type
campo passando como valor “parties”, o campo page_data
retornará um array com o formato parecido com o seguinte:
{
//...
"payload": {
//...
"response_data": {
"code": "0027400-51.2009.5.03.0135",
"instance": 1,
"page": 1,
"page_data": [
{
"name": "JUDIT IO",
"document": "05196308660",
"document_type": "cpf",
"person_type": "Autor",
"side": "Active",
"lawyers": [
{
"name": "LEONARDO REBBITE",
"document": "12345678910",
"document_type": "cpf",
"license": "MG100560"
}
]
},
...
],
"page_count": 5,
"all_count": 15,
"all_pages_count": 3
}
//...
}
}
Uma busca com o response_type
passando como valor “steps”:
{
//...
"payload": {
//...
"response_data": {
//...
"page_data": [
{
"step_id": "UnXf6c/5Hf7Hhsd9Rhqpm4EynA2SoLkmKZOcyGBqX/Q=",
"step_date": "2020-12-01T08:38:38.000Z",
"lawsuit_cnj": "91970cc2-7f45-4c58-af9a-89e8b905dea6",
"content": "Registrada a inclusão de dados de JUDIT - RJ no CNJ",
"step_type": "ATOrd",
"tags": {},
"created_at": "2023-10-06T19:44:47.392Z",
"updated_at": "2023-10-06T19:44:47.392Z"
},
...
]
//...
}
//...
}
}
Uma busca com o response_type
passando como valor “attachments”:
Alguns campos podem não está inclusos como ‘attachment_type’, ‘step_id’ ou ‘extension’.
{
//...
"payload": {
//...
"response_data": {
//...
"page_data": [
{
"attachment_id": "830a19d1-f23d-4b62-8212-d2e3d71d8a47",
"attachment_type": "image",
"step_id": "UnXf6c/5Hf7Hhsd9Rhqpm4EynA2SoLkmKZOcyGBqX/Q=",
"extension": "jpeg",
"tags": "documento"
},
...
],
//...
}
//...
}
}
Uma busca com o response_type
passando como valor “lawsuits”:
{
//...
"payload": {
//...
"response_data": {
//...
"page_data": [
{
"code": "0027400-51.2009.5.03.0135",
"instance": 1,
"lawsuit_cnj": "91970cc2-7f45-4c58-af9a-89e8b905dea6",
"crawler": {
"parties": {
"code": "JTrtScrapper",
"updated_at": "2023-10-06T19:45:51.489Z",
"weight": 10
},
"cover": {
"code": "JTrtScrapper",
"updated_at": "2023-10-06T19:44:45.773Z",
"weight": 10
},
"amount": {
"code": "JTrtScrapper",
"updated_at": "2023-10-06T19:44:44.054Z",
"weight": 0
},
"classification": {
"code": "JTrtScrapper",
"updated_at": "2023-10-06T19:44:40.254Z",
"weight": 10
},
"status": {
"code": "JTrtScrapper",
"updated_at": "2023-10-06T19:44:46.553Z",
"weight": 0
},
"subjects": {
"code": "JTrtScrapper",
"updated_at": "2023-10-06T19:44:41.713Z",
"weight": 10
},
"attachments": {
"code": "JTrtScrapper",
"updated_at": "2023-10-06T19:44:50.527Z",
"weight": 10
},
"related_lawsuits": {
"code": "JTrtScrapper",
"updated_at": "2023-10-06T19:44:47.014Z",
"weight": 10
},
"steps": {
"code": "JTrtScrapper",
"updated_at": "2023-10-06T19:44:47.951Z",
"weight": 10
}
},
"parties": [
{
"name": "ALINE PAULA RAMOS",
"document": "05196308660",
"document_type": "cpf",
"person_type": "Autor",
"side": "Active",
"lawyers": [
{
"name": "RONEI MUNIZ BONFIM",
"document": "03344781626",
"document_type": "cpf",
"license": "MG100560",
}
]
},
{
"name": "ADRIANA AMELIA DA SILVA MELO",
"document": "83359079604",
"document_type": "cpf",
"person_type": "Réu",
"side": "Passive",
"lawyers": [
{
"name": "JOSE RIBAMAR MATOS AMARAL",
"document": "10912797720",
"document_type": "cpf",
"license": "MG94008"
}
]
}
],
"subjects": [],
"related_lawsuits": [],
"created_at": "2023-10-06T19:44:33.358Z",
"updated_at": "2023-10-06T19:45:51.489Z",
"classification": {
"code": "985",
"name": "Ação Trabalhista - Rito Ordinário",
},
"distribution_date": "2009-03-19T00:00:00.000Z",
"free_justice": false,
"judge": null,
"justice": "5",
"last_step": {
"step_id": "mEktW9BQ/O+yIHnJnkdQO9t91oWJdhuDq7xums+zcpI=",
"step_date": "2020-12-01T18:52:00.000Z",
"content": "Arquivados os autos definitivamente",
"step_type": "ATOrd"
},
"secrecy_level": 0,
"tags": {},
"tribunal": "03",
"tribunal_acronym": "TRT3",
"tribunal_id": "985",
"name": "JUDIT X LEONARDO REBBITE"
},
...
]
//...
}
//...
}
}
Caso o processo consultado que tenha um ou mais processos relacionado ou em alguma outra instância, esses processos serão retornados em um array `related_lawsuits.