### GET /lawsuits-summary/v1 - Sumário de Processos API Source: https://nextcodebr.github.io/doc-apis/apis/data/lawsuits-summary Consulta um sumário de processos existentes para um documento (CPF/CNPJ) consultado. Os resultados são separados por ano, tribunal e segmento. Certifique-se de passar a versão correta do endpoint. ```APIDOC Endpoint: GET /lawsuits-summary/v1 Descrição: Retorna um sumário de processos para um documento consultado, agrupado por ano, tribunal e segmento. Parâmetros: - taxId (string, obrigatório): CPF ou CNPJ das partes do processo. Exemplo de Requisição: GET /lawsuits-summary/v1?taxId=11122233345 Exemplo de Resposta (Status 200): { "id": "3aa55faf-0c97-40f0-a5a2-4a06ba6db92b", "version": "v1", "data": [ { "total": 84, "totalByCourt": { "TRT-9": 14, "TST": 2, "TJ-SC": 51, "TJ-SP": 1, "STJ": 1, "TRT-12": 11, "TJ-RS": 3, "TJ-RJ": 1 }, "totalByJustice": { "TST": 2, "STJ": 1, "JUSTICA DO TRABALHO": 25, "JUSTICA ESTADUAL": 56 }, "totalByYear": { "2012": 4, "2011": 2, "2010": 2, "1998": 7, "2009": 1, "2008": 3, "1997": 1, "1995": 1, "2005": 1, "2004": 1, "2003": 2, "2002": 1, "1999": 13, "2001": 2, "2000": 4, "2022": 2, "2021": 2, "2020": 2, "2019": 3, "2018": 8, "2017": 5, "2016": 2, "2015": 5, "2014": 5, "2013": 5 } } ], "metadata": { "timeSpent": 4833 } } ``` -------------------------------- ### Document Not Found Source: https://nextcodebr.github.io/doc-apis/apis/ids/ocr-by-face Example response when no identity document is found for the provided person's tax ID and filters. This typically returns a 404 status code. ```json { "id": "7c86a49b-c392-4f6e-bd32-74f359d736bc", "error": { "statusCode": 404, "error": "Not Found", "message": "not found identity document for the provided person tax id and filters" } } ``` -------------------------------- ### Selfie Mismatch with CPF Source: https://nextcodebr.github.io/doc-apis/apis/ids/ocr-by-face Example response when the provided selfie does not match the CPF. The response indicates a mismatch and includes a similarity score, but no OCR data. ```json { "id": "943fb612-838e-46c3-92e7-4c92dc18b370", "data": { "match": false, "similarity": 0.5110294818878174 } } ``` -------------------------------- ### Document Found with CPF and Selfie Source: https://nextcodebr.github.io/doc-apis/apis/ids/ocr-by-face Example of a successful response when an identity document is found using CPF and selfie. Includes a unique ID, matched data with base64 encoded images, OCR results, and a similarity score. ```json { "id": "e83b9a9b-0547-4d52-84b4-68a156f6116a", "data": { "idCards": [ { "base64": "iVBORw0KG...K5CYII=" }, { "base64": "iVBORw0K...SuQmCC" } ], "match": true, "ocr": { "birthdate": "2025-06-21", "fathersName": "Joe Doe", "issuedAt": "2010-10-01", "mothersName": "Jane Doe", "name": "John Doe", "taxId": "11122233345" }, "similarity": 0.9982403814792633 } } ``` -------------------------------- ### JSON Example: Sintegra Data Response Source: https://nextcodebr.github.io/doc-apis/apis/data/sintegra This JSON object represents a successful API response (Status Code: 200) containing Sintegra data. It includes details such as CNPJ, state registrations (inscricoesEstaduais) with associated company information, and economic activities. The structure also includes metadata and a specific field `situacaoCadastralTratada` for status interpretation. ```json { "id": "13cfec7c-b238-4820-a4d1-5173e4c1418e", "version": "v2", "data": { "cnpj": "00000000000000", "sintegra": { "inscricoesEstaduais": [ { "cnpj": "00000000000000", "inscricaoEstadual": "00.000.000-0", "razaoSocial": "EMPRESA LTDA", "nomeFantasia": "EMPRESA LTDA", "logradouro": "RUA", "numero": "10", "complemento": "COMPLEMENTO", "bairro": "CENTRO", "cep": "00000000", "municipio": "GOIANIA", "uf": "GO", "telefone": "", "atividadeEconomica": "4692300 - Comércio atacadista de mercadorias em geral, com predominância de insumos agropecuários (MERCADORIAS EM GERAL, COM PREDOMINÂNCIA DE INSUMOS AGROPECUÁRIOS; COMÉRCIO ATACADISTA DE)", "atividadesEconomicasSecundarias": [ "4623109 - Comércio atacadista de alimentos para animais", "4644302 - Comércio atacadista de medicamentos e drogas de uso veterinário" ], "dataInicioAtividade": "", "dataSituacaoCadastral": "01/12/2000", "regimeRecolhimento": "Normal", "observacao": "", "situacaoCadastral": "Suspenso - NÃO HABILITADO", "situacaoCadastralTratada": 1, "ocorrenciaFiscal": "", "atividadeEconomicaTratada": "4930-2/02 - Transporte rodoviário de carga, exceto produtos perigosos e mudanças, intermunicipal, interestadual e internacional", "atividadesEconomicasSecundariasTratada": [ "7719-5/99 - Locação de outros meios de transporte não especificados anteriormente, sem condutor", "4744-0/99 - Comércio varejista de materiais de construção em geral" ], "urlComprovante": "https://...", "camposExclusivos": { } } ] } }, "metadata": { "timeSpent": 10000 } } ``` -------------------------------- ### Invalid Payload (CPF or Image) Source: https://nextcodebr.github.io/doc-apis/apis/ids/ocr-by-face Example response for an invalid payload, such as an incorrect CPF format or an invalid image. This returns a 422 status code indicating an unprocessable entity. ```json { "id": "795ada3c-5b6f-42de-8878-c5e59f98133d", "error": { "statusCode": 422, "error": "Unprocessable Entity", "message": "Invalid taxId (CPF)" } } ``` -------------------------------- ### Bureau PF API - Search Personal Data by CPF Source: https://nextcodebr.github.io/doc-apis/apis/data/bureau-pf This API endpoint allows searching for personal data from the Receita Federal using a CPF. It supports GET requests and returns detailed personal information or an empty data object if the CPF is not found. The CPF can be provided with or without mask. ```APIDOC GET /bureau/natural-person/{CPF} Description: Endpoint to search for personal data from the Receita Federal using a CPF. Parameters: CPF (string, required): The CPF of the person to consult. Can be passed with or without mask (e.g., "111.111.111-11" or "11111111111"). Must be 11 characters, including leading zeros. Response Structure: id (string): Unique ID of the request. version (string): API version. data (object): Object containing the search result. name (string): Found name. federalRevenueNumber (string): Found CPF. mothersName (string): Found mother's name. birthdate (number): Found birthdate (format YYYYMMDD). metadata (object): Object with request metadata. timeSpent (number): Time taken for the request in milliseconds. TIP: The CPF can be passed with or without mask (111.111.111-11 or 11111111111) and must be passed with the 11 characters, including leading zeros. Example Request: GET /bureau/natural-person/111.111.111-11 Example JSON Responses: 1. Example when CPF found (Status Code: 200): { "id": "13cfec7c-b238-4820-a4d1-5173e4c1418e", "version": "v2", "data": { "name": "JOAO DA SILVA", "federalRevenueNumber": "12345678990", "mothersName": "MARIA DA SILVA", "birthdate": 19990201 }, "metadata": { "timeSpent": 10000 } } 2. Example when CPF not found (Status Code: 200): { "id": "13cfec7c-b238-4820-a4d1-5173e4c1418e", "version": "v2", "data": {}, "metadata": { "timeSpent": 10000 } } ``` -------------------------------- ### Introdução ao Uso das APIs Nextcode Source: https://nextcodebr.github.io/doc-apis/apis/introduction Este bloco descreve o processo geral para começar a usar as APIs da Nextcode. Inclui os passos para obter acesso, explorar a documentação, testar os endpoints e iniciar a implementação. ```APIDOC API Usage Onboarding Steps: 1. Request API Access Key: - Contact the Nextcode support or commercial team to obtain an API access key. 2. Explore API Documentation: - Visit the API documentation to discover available endpoints and their functionalities. 3. Test APIs: - Utilize the Playground or Postman/Insomnia collections to test desired APIs. 4. Implement APIs: - Begin integrating the APIs into your development environment and solution. 5. Go to Production: - Request production access and deploy your solution. ``` -------------------------------- ### Categorias de APIs Disponíveis Source: https://nextcodebr.github.io/doc-apis/apis/introduction Lista as principais categorias de APIs oferecidas pela Nextcode, focando em funcionalidades de Identidades e Dados para verificação de identidade e onboarding. ```APIDOC Available API Categories: Identities: - Classifier: For classifying identity documents. - Available IDs: Lists accepted identity types. - OCR by Face (Non-Doc): Performs OCR on faces, not documents. Data: - Bureau PF: Access to personal data. - Restricted Lists: Checks against various restricted lists. - Lawsuits: Information on legal processes. - Lawsuits by Number: Retrieve specific lawsuit details by number. - Lawsuits Summary: Provides summaries of legal processes. - Sintegra: Access to Sintegra data. - QSA: Query Shareholder Information. - E-Social: Access to e-Social data. - Vehicles: Information on vehicles. - Vehicles Async: Asynchronous vehicle data retrieval. ``` -------------------------------- ### Regras de Cobrança por Código HTTP Source: https://nextcodebr.github.io/doc-apis/getting-started/billing Define a política de tarifação baseada nos códigos de resposta HTTP. Respostas com códigos de status `2xx` são tarifadas, indicando processamento concluído, enquanto respostas com outros códigos (`4xx`, `5xx`, etc.) não são tarifadas, pois indicam falha ou interrupção no processamento. ```APIDOC Política de Tarifação: - Tarifado: Códigos de status HTTP na faixa `2xx`. - Não Tarifado: Códigos de status HTTP fora da faixa `2xx` (ex: `4xx`, `5xx`). Exemplos: - Uma resposta `200 OK`, mesmo com lista de documentos vazia, é tarifada pois o processamento ocorreu. - Uma resposta `500 Internal Server Error` não é tarifada pois o processamento falhou. - Uma resposta `4xx Client Error` (ex: autenticação) não é tarifada pois o processamento não iniciou ou foi interrompido. - O uso de SDK é tarifado com base nas requisições enviadas ao backend, seguindo o mesmo padrão. ``` -------------------------------- ### HTTP Response Codes Source: https://nextcodebr.github.io/doc-apis/getting-started/http-response-codes Esta seção detalha os códigos de status HTTP que as APIs da Nextcode utilizam para comunicar o resultado das requisições. Códigos 2xx indicam sucesso, 4xx indicam erros do cliente, e 5xx indicam erros do servidor. O código 200 OK não garante que um resultado positivo foi encontrado, apenas que o processamento ocorreu sem erros internos. ```APIDOC HTTP Response Codes: 200 OK - Descrição: Sua requisição foi bem sucedida. - Observação: Indica sucesso no processamento, mas não necessariamente que um resultado positivo foi encontrado (ex: documento não localizado). 201 Created - Descrição: A requisição foi bem sucedida e um recurso foi criado como resultado. 400 Bad Request - Descrição: Algum parâmetro obrigatório não foi enviado ou é inválido. A resposta indicará o problema específico. 401 Unauthorized - Descrição: Não foi enviada uma chave de API, ela é inválida, ou o usuário não tem permissão para acessar o recurso. 404 Not Found - Descrição: O endpoint ou o objeto solicitado não existe. 500 Internal Server Error - Descrição: Uma falha inesperada ocorreu no servidor da Nextcode. Detalhes serão ofuscados por segurança. ``` -------------------------------- ### API Response Structure for Vehicle Search Source: https://nextcodebr.github.io/doc-apis/apis/data/vehicles-async Descreve a estrutura completa da resposta da API para consultas de veículos. Inclui detalhes sobre os campos de nível superior como 'id', 'version', 'data' e 'metadata', bem como os subcampos dentro de 'data' e 'data.vehicleData'. Fornece exemplos de respostas para estados 'pending' e 'sucessful'. ```APIDOC API Response Structure for Vehicle Search: Table of Fields: | Campo | Descrição | Tipo | Observação | | --- | --- | --- | --- | | id | ID único da requisição | `String` | | | version | Versão da API | `String` | | | data | Objeto com todas as informação da busca | `Object` | | | data.status | Status da requisição | `String` | Enum: (`pending`, `sucessful`, `error`) | | data.requestId | ID da pesquisa consultada | `String` | | | data.licensePlate | ID da placa consultada | `String` | | | data.createdAt | Data e hora da criação da pesquisa | `String` | Formato timestamp | | data.vehicleData | Objeto com o resultado da busca | `Object` | | | data.webhook | Webhook da pesquisa consultada | `Object` | Retornado conforme foi recebido na criação da consulta | | metadata | Informações sobre a requisição | `Object` | | | metadata.timeSpent | Tempo de resposta da requisição | `Number` | | JSON Examples: Example 1: Pending Processing Response ```json { "id": "ef2a3b1d-7041-49ab-8927-58f470ef33f6", "version": "v3", "data": { "status": "pending", "requestId": "cc02bb73-1d62-423e-9ef6-047a7963d5c1", "licensePlate": "JIF4461", "createdAt": "2025-04-07T20:36:24.868Z", "vehicleData": null, "webhook": null }, "metadata": { "timeSpent": 165 } } ``` Example 2: Successful Finalized Response ```json { "id": "cc02bb73-1d62-423e-9ef6-047a7964d5c0", "version": "v3", "data": { "status": "sucessful", "requestId": "cc02bb73-1d62-423e-9ef6-047a7963d5c1", "licensePlate": "JIF4461", "createdAt": "2025-04-08T13:46:53.652Z", "vehicleData": { "licensePlate": "jif4461", "preMercosurLicensePlate": null, "chassis": "93YBSR7RHBJ781071", "chassisRemark": true, "engineNumber": "D4DH760Q157965", "licensePlateState": "DF", "licensePlateCity": "BRASILIA", "renavam": "00311900097", "invoicedDocumentType": null, "invoicedIdentificationNumber": "04621624000187", "invoiceState": "DF", "manufactureYear": 2011, "modelYear": 2011, "maxTractionCapacity": 2, "totalGrossWeight": 1, "restrictions": { "occurrence": null, "robberyOrTheft": false, "renajudRestrictionIndicator": false, "renainfRestrictionIndicator": false, "recall": false, "insuranceClaim": false }, "status": null, "brandModel": "RENAULT/SANDERO EXP1016V", "brandModelCode": null, "vehicleGroup": "AUTOS", "vehicleType": "AUTOMOVEL", "kind": "PASSAGEIRO", "color": "PRATA", "fuel": "ALCOOL/GASOLINA", "category": "PARTICULAR", "origin": "NACIONAL", "potency": 77, "cylinders": 998, "axle": null, "capacity": 5, "fuelTankCapacityLiters": null, "loadCapacityKg": null, "yearOfLastLicensing": null, "activeFlag": null, "proprietaryName": "JOHN DOE", "proprietaryDocumentNumber": null, "proprietaryDocumentType": null, "alienationInstitutionName": null, "alienationInstitutionDocument": null, "licensedStatus": null, "licensedUntil": null, "client": { "name": "JOHN DOE", "motherName": null, "fatherName": null, "situation": null, "size": null, "opening": null, "legalNatureCode": null, "legalNatureDescription": null, "shareCapital": null, "legalName": "JOHN DOE", "documentNumber": "04583429126", "birthDate": null, "birthDateStr": null, "addresses": [], "activities": [], "partners": [] } }, "webhook": null }, "metadata": { "timeSpent": 143 } } ``` ``` -------------------------------- ### OCR by Face/Selfie API Source: https://nextcodebr.github.io/doc-apis/apis/ids/ocr-by-face API for identity verification using CPF and a selfie. It validates and retrieves identity documents based on the CPF, facilitating KYC processes. Supports filtering by document types and returns analysis results including similarity scores and extracted OCR data. ```APIDOC POST /ocr-by-face/v1/tax-id/{CPF} Parameters: - cpf (String, Required, URL): CPF number (11 digits). - selfie (File, Required, Body): Selfie image file (JPEG/JPG). - document_types (String[], Optional, URL): Filter by document types (e.g., "federal-id", "passport", "driver_license"). Example: ?document_types[]=drivers-license&document_types[]=federal-id&document_types[]=passport Default: Filters RGs and CNHs. Response: - id (String): ID of the request. - data (Object): Object with the analysis result. - data.idCards (Object[]): List with found identities. - data.idcards.base64 (String): Base64 encoded identity image. - data.similarity (Number): Similarity percentage between selfie and document. - data.match (Boolean): Indicates if the selfie corresponds to the CPF. - data.ocr (Object): Object with text extracted from the document. - data.ocr.taxId (String): CPF of the proponent. - data.ocr.name (String): Name of the proponent. - data.ocr.birthDate (String): Birth date of the proponent. - data.ocr.mothersName (String): Mother's name of the proponent. - data.ocr.fathersName (String): Father's name of the proponent. - data.ocr.issuedAt (String): Document issue date. ``` -------------------------------- ### Processos por Número API Endpoint Source: https://nextcodebr.github.io/doc-apis/apis/data/lawsuits-by-number This endpoint verifies the existence of legal processes by accepting a lawsuit number as a parameter. It returns the complete process cover, including movements and their attachments. ```APIDOC GET /lawsuits-by-number/v2 - Verifies the existence of processes by lawsuit number. - Parameters: - lawsuitNumber (string, required): The number of the process. - Description: The query by Unique Number (process number) will return the complete process cover, including movements and their attachments. - Returns: Complete process cover, movements, and attachments. - Tip: Ensure you always pass the endpoint version described in the documentation. ``` -------------------------------- ### Receita Federal QSA CNPJ Endpoint Source: https://nextcodebr.github.io/doc-apis/apis/data/qsa This API endpoint retrieves the Quadro de Sócios e Administradores (QSA) for a given CNPJ from the Receita Federal. It requires the CNPJ as a parameter and returns detailed information about the company's partners and administrators, along with a link to the official proof document. ```APIDOC GET /receita-federal-cnpj-qsa --- **Description:** Retrieves QSA (Quadro de Sócios e Administradores) information for a given CNPJ from the Receita Federal. **Parameters:** | Parameter | Description | Required | |---|---|---| | `taxId` | The CNPJ (Cadastro Nacional da Pessoa Jurídica) to query. Can be passed with or without mask (e.g., '01.111.111.0001/11' or '01111111000111'). All characters, including leading zeros, must be provided. | Yes | **Response:** | Field | Description | Type | |---|---|---| | `id` | Unique ID of the request. | `String` | | `version` | Version of the API. | `String` | | `data` | Object containing the search result. | `Object` | | `data.cnpj` | The queried CNPJ. | `String` | | `data.receitaFederalQsa` | Object with the search result from Receita Federal. | `Object` | | `data.receitaFederalQsa.qsa` | List of QSA data found per person. | `Object[]` | | `data.receitaFederalQsa.qsa[].nome` | Name of the partner/administrator. | `String` | | `data.receitaFederalQsa.qsa[].qualificacao` | Qualification of the partner/administrator (e.g., '49-Sócio-Administrador'). | `String` | | `data.receitaFederalQsa.qsa[].nomeRepresentanteLegal` | Name of the legal representative. | `String` | | `data.receitaFederalQsa.qsa[].qualificacaoRepresentanteLegal` | Qualification of the legal representative. | `String` | | `data.receitaFederalQsa.qsa[].paisOrigem` | Country of origin for foreign individuals. | `String` | | `data.receitaFederalQsa.urlComprovante` | URL to the official proof document of the search. | `String` | **Example Request:** `GET /receita-federal-cnpj-qsa?taxId=01.111.111.0001/11` **Example JSON Response (Status Code: 200):** ```json { "id": "13cfec7c-b238-4820-a4d1-5173e4c1418e", "version": "v2", "data": { "cnpj": "000000000", "receitaFederalQsa": { "qsa": [ { "nome": "FULANO", "qualificacao": "49-Sócio-Administrador", "nomeRepresentanteLegal": "", "qualificacaoRepresentanteLegal": "", "paisOrigem": "" } ], "urlComprovante": "https://..." } }, "metadata": { "timeSpent": 10000 } } ``` **Related Endpoints:** - [Sintegra](/doc-apis/apis/data/sintegra.html) - [E-Social](/doc-apis/apis/data/e-social.html) ``` -------------------------------- ### API JSON Response: No Identity Found Source: https://nextcodebr.github.io/doc-apis/apis/ids/classify Este exemplo ilustra a resposta da API quando nenhum documento ou identidade é detectado na imagem processada. A seção 'data' da resposta estará vazia, indicando a ausência de resultados de classificação. ```json { "id": "5a7bad63-cac6-430c-ac65-a94def0f7b7a", "version": "v3", "data": [], "metadata": { "filesInfo": [ { "fieldname": "documento", "name": "arquivo.JPG", "size": 567098, "pages": 1, "mimetype": "image/jpeg", "encoding": "7bit", "sha256": "41c2ece339abfcf9ba1e7d5a60666162a24ef34ba95adeb41ed1d9721c91c6b0" } ], "timeSpent": 10000 } } ``` -------------------------------- ### Listas Restritivas API Source: https://nextcodebr.github.io/doc-apis/apis/data/restricted-lists Este endpoint verifica se o nome de uma pessoa se encontra em uma ou mais listas restritivas. Inclui detalhes sobre parâmetros de requisição, opções de listas disponíveis, e a estrutura do objeto de resposta. ```APIDOC GET /restricted-lists/ Parâmetros: name (string, obrigatório): Nome da pessoa consultada. list (string, obrigatório): Lista desejada. Opções: - auxilioemergencial - bacen - candidatoseleitorais - ceis - cepim - cnep - cvm - diariooficial - europeias - leniencia - ofacsdn - onu - pep - todas - trabalhoescravo - uk Observação: O uso do parâmetro `list=todas` busca em todas as listas e o valor tarifado é a somatória de cada consulta individual. Response (Status Code: 200): { "id": "String", "version": "String", "data": { "found": "Boolean", "lists": "String[]", "files": "String[]" }, "metadata": { "timeSpent": "Number" } } Campos da Resposta: id (String): ID único da requisição. version (String): Versão da API. data (Object): Objeto com o resultado da busca. data.found (Boolean): Indica se o nome foi encontrado na lista buscada. data.lists (String[]): Lista com os nomes das listas consultadas. data.files (String[]): Lista com os arquivos respectivos das listas. metadata (Object): Objeto com os metadatas da requisição. metadata.timeSpent (Number): Tempo em milissegundos que a requisição levou para ser processada. Exemplo de Requisição: GET /restricted-lists?name=Joao da Silva&list=ofacsdn Exemplo de Resposta JSON: { "id": "13cfec7c-b238-4820-a4d1-5173e4c1418e", "version": "v1", "data": { "found": false, "lists": [ "OFACSDN" ], "files": [ "20210802_sdn.xml" ] }, "metadata": { "timeSpent": 10000 } } ``` -------------------------------- ### Sintegra CNPJ Data Query API Source: https://nextcodebr.github.io/doc-apis/apis/data/sintegra Provides access to Sintegra data for Brazilian companies and individuals. Supports queries by CNPJ, CPF with UF, or IE with UF. The API returns a unique request ID, API version, the queried data, and metadata including request time. ```APIDOC Sintegra CNPJ Data Query API: Endpoint: GET /receita-federal-and-sintegra Description: Retrieves Sintegra (Sistema Integrado de Informações Sobre Operações Interestaduais com Mercadorias e Serviços) data. This API allows querying information about taxpayers based on their CNPJ, CPF with UF, or IE with UF. Parameters: Query Parameters: - cnpj (string, optional): The CNPJ (Cadastro Nacional da Pessoa Jurídica) to search for. Can be provided with or without mask (e.g., "01.111.111.0001/11" or "01111111000111"). All characters, including leading zeros, must be included. - cpf (string, optional): The CPF (Cadastro de Pessoas Físicas) to search for. Must be provided along with 'uf'. - ie (string, optional): The IE (Inscrição Estadual) to search for. Must be provided along with 'uf'. - uf (string, optional): The UF (Unidade Federativa) for CPF or IE searches. Example: "SP". Note on Input Format: CNPJ or CPF can be passed with or without a mask. All characters, including leading zeros, must be included. Example Usage: - By CNPJ: `GET /receita-federal-and-sintegra?cnpj=01.111.111.0001/11` - By CPF + UF: `GET /receita-federal-and-sintegra?cpf=11122233345&uf=SP` - By IE + UF: `GET /receita-federal-and-sintegra?ie=111222333&uf=SP` Response Structure: { "id": "string", // Unique ID of the request "version": "string", // API version "data": { // Object containing the search result "cnpj": "string", // The queried CNPJ "sintegra": { // Object with Sintegra search results "inscricoesEstaduais": [ // Array of objects for each IE found { // ... IE specific data ... } ] } }, "metadata": { "timeSpent": "number" // Time taken for the request in milliseconds } } ``` -------------------------------- ### API JSON Response: Identity Found Source: https://nextcodebr.github.io/doc-apis/apis/ids/classify Este exemplo demonstra a estrutura da resposta da API quando uma identidade é encontrada na imagem processada. Inclui detalhes de classificação, país, subtipo e informações sobre os arquivos processados. ```json { "id": "5a7bad63-cac6-430c-ac65-a94def0f7b7a", "version": "v3", "data": [ { "classification": { "type": "DriversLicense", "subtype": "Printed", "country": "BRA", "sides": [ { "side": "FrontAndBack", "page": 0, "fieldname": "documento", "confidence": 0.99 } ] } } ], "metadata": { "filesInfo": [ { "fieldname": "documento", "name": "arquivo.JPG", "size": 567098, "pages": 1, "mimetype": "image/jpeg", "encoding": "7bit", "sha256": "41c2ece339abfcf9ba1e7d5a60666162a24ef34ba95adeb41ed1d9721c91c6b0" } ], "timeSpent": 10000 } } ``` -------------------------------- ### Lawsuits API Response Structure Source: https://nextcodebr.github.io/doc-apis/apis/data/lawsuits Details the structure of the JSON response returned by the Lawsuits API, including lawsuit metadata, case details, parties, and movements. ```APIDOC { "id": "string", "version": "string", "data": [ { "urlProcesso": "string", "numeroProcessoUnico": "string", "statusObservacao": "string", "grauProcesso": "integer", "relator": "string", "area": "string", "sistema": "string", "segmento": "string", "tribunal": "string", "uf": "string", "orgaoJulgador": "string", "classeProcessual": { "nome": "string", "codigoCNJ": "string" }, "assuntosCNJ": [ { "titulo": "string" } ], "dataDistribuicao": "datetime", "partes": [ { "tipo": "string", "polo": "string", "cpf": "string", "nome": "string" } ], "movimentos": [ { "data": "datetime", "indice": "integer", "eMovimento": "boolean", "nomeOriginal": ["string"] } ], "processosRelacionados": [ { "numeroProcesso": "string" } ], "eProcessoDigital": "boolean", "dataProcessamento": "datetime", "statusPredictus": { "statusProcesso": "string", "julgamentos": [], "dataTransitoJulgado": "datetime", "ramoDireito": "string" }, "unidadeOrigem": "string" } ], "metadata": { "timeSpent": "integer" } } ``` -------------------------------- ### Superior Courts and Councils Source: https://nextcodebr.github.io/doc-apis/apis/data/lawsuits Lists the recognized Superior Courts and Councils within the Brazilian judicial system. ```APIDOC Tribunal ou Corte: Tribunais Superiores e Conselhos: - STF (Supremo Tribunal Federal) - STJ (Superior Tribunal de Justiça) - STM (Superior Tribunal Militar) - TSE (Tribunal Superior Eleitoral) - TST (Tribunal Superior do Trabalho) - CJF (Conselho da Justiça Federal) ``` -------------------------------- ### Lawsuits API Endpoint Source: https://nextcodebr.github.io/doc-apis/apis/data/lawsuits This section describes the primary endpoint for querying lawsuit information. It allows filtering by exact party name. ```APIDOC GET /lawsuits/v2?exactPartName= Retrieves lawsuit information based on the exact name of a party involved in the lawsuit. Parameters: exactPartName: The exact name of the party to search for (e.g., SUZANE DA SILVA). ``` -------------------------------- ### E-Social Qualification Cadastral API Source: https://nextcodebr.github.io/doc-apis/apis/data/e-social Provides an API endpoint to check the qualification of a CPF and NIS for eSocial. It requires taxId, name, birthdate, and nis as parameters. The response includes details about the consultation, such as name, CPF, NIS, messages, and a link to the proof document. ```APIDOC E-Social Qualification Cadastral API: Endpoint: GET /esocial-qualificacao-cadastral Description: O aplicativo de Consulta Qualificação Cadastral permite ao usuário verificar se o Cadastro de Pessoa Física-CPF e o Número de Identificação Social-NIS (NIT/PIS/PASEP) estão aptos para serem utilizados no eSocial. Parameters: - taxId (string, required): CPF (can be passed with or without mask, including leading zeros). - name (string, required): Nome da pessoa consultada. - birthdate (string, required): Data de Nascimento (format: DD/MM/YYYY). - nis (string, required): NIS (NIT/PIS/PASEP). Response: - id (string): ID único da requisição. - version (string): Versão da API. - data (object): Objeto com o resultado da busca. - data.cpf (string): CPF consultado. - data.eSocialQualificacaoCadastral (object): Objeto com o resultado da busca. - data.eSocialQualificacaoCadastral.nome (string): Nome da pessoa consultada. - data.eSocialQualificacaoCadastral.dataNascimento (string): Data de Nascimento da pessoa consultada. - data.eSocialQualificacaoCadastral.cpf (string): CPF da pessoa consultada. - data.eSocialQualificacaoCadastral.nis (string): NIS da pessoa consultada. - data.eSocialQualificacaoCadastral.mensagem (string): Mensagem retornada na consulta. - data.eSocialQualificacaoCadastral.orientacao (string): Orientação retornada na consulta. - data.eSocialQualificacaoCadastral.urlComprovante (string): URL do comprovante da consulta realizada. Example Request: GET /esocial-qualificacao-cadastral?taxId=11111111111&name=Maria da Silva&birthdate=01/01/2001&nis=00000000000 Tip: O CPF pode ser passado com ou sem máscara (11111111111 111.111.111-11) e deve ser passado todos os chars, incluindo os zeros à esquerda. ``` ```JSON { "cpf": "00000000000000", "eSocialQualificacaoCadastral": { "nome": "Fulana", "dataNascimento": "10/10/2010", "cpf": "022.022.022-00", "nis": "0.000.000.000-0", "mensagem": "O nome existente no cadastro do CPF é : Ciclano", "orientacao": " Verifique os dados digitados. Se estiverem corretos, dirija-se a uma agência do Banco do Brasil ou Correios, entidades autorizadas pela RFB, para regularização do CPF.", "urlComprovante": "https://..." } } ``` -------------------------------- ### Classificador API Endpoint Source: https://nextcodebr.github.io/doc-apis/apis/ids/classify Provides an API endpoint for classifying documents within uploaded files or images. The service uses AI to identify and classify documents. It accepts a single file or image per request. ```APIDOC POST /classify/v3 Serviços para classificação de documentos. O serviço identifica documentos dentro do arquivo enviado e a partir deles nossas IA's os classificam. Parameters: - file or image: The file or image to be classified. For more information, access here: /doc-apis/getting-started/payloads.html TIP: This endpoint only accepts one file or image at a time. Response Schema: { "id": "String", // ID único da requisição "version": "String", // Versão da API "data": "Object[]", // Lista com os resultados da análise "data.classification": "Object", // Objeto com os detalhes da classificação "data.classification.type": "String", // Tipo do documento encontrado (Vide lista de documentos aceitos) "data.classification.subtype": "String", // Subtipo do documento encontrado (Vide lista de documentos aceitos) "data.classification.country": "String", // País de origem do documento encontrado (Vide lista de documentos aceitos) "data.classification.sides": "Object[]", // Lista com o lado do documento encontrado (Sempre conterá somente um item) "data.classification.sides.side": "String", // Lado encontrado do documento (Enum: OnlyFront, OnlyBack, FrontAndBack) "data.classification.sides.page": "Number", // Página onde o documento foi encontrado "data.classification.sides.fieldname": "String", // Nome do campo em que o arquivo foi passado "data.classification.sides.confidence": "Number", // Confiança da classificação (Valor já filtrado internamente) "metadata": "Object", // Metadatas das informações (para apoio a debug) "metadata.filesInfo": "Object[]", // Lista com as informações (metadata dos arquivos) "metadata.filesInfo.fieldname": "Number", // Nome do parâmetro passado o arquivo "metadata.filesInfo.name": "Number", // Nome do arquivo passado "metadata.filesInfo.size": "Number", // Tamanho do arquivo passado "metadata.filesInfo.pages": "Number", // Página em questão "metadata.filesInfo.mimetype": "Number", // Mimetypes do arquivo passado "metadata.filesInfo.encoding": "Number", // Encoding do arquivo passado "metadata.filesInfo.sha256": "Number" // SHA256 do arquivo passado } Example Request: POST /classify/v3 Example Usage Notes: The response `data` field is always a list, as a file/image can contain zero, one, or more identities. The list is ordered from best to worst results. If expecting only one file, take the first item. An empty list means no document was identified. TIP: `confidence` - Internal filtering is applied to return only documents above the expected confidence. It's recommended to use filtering on this field only in specific cases where the default filter is insufficient or to increase the minimum accepted quality. ```