### GET Request Example for Comprovante CCC (CNPJá API) Source: https://www.postman.com/cnpja-api/cnpj/folder/11645830-ed26146b-2155-426c-bbc8-ca1247ceb32d Example GET request to retrieve a CCC (Cadastro de Contribuintes) proof using the CNPJá API. Assumes API key authentication is configured. ```http GET /comprovante-ccc Host: api.cnpj.com.br Authorization: {{apiKey}} ``` -------------------------------- ### GET Request Example for Consulta CCC (CNPJá API) Source: https://www.postman.com/cnpja-api/cnpj/folder/11645830-ed26146b-2155-426c-bbc8-ca1247ceb32d Example GET request to query CCC (Cadastro de Contribuintes) information using the CNPJá API. Assumes API key authentication is set up. ```http GET /consulta-ccc Host: api.cnpj.com.br Authorization: {{apiKey}} ``` -------------------------------- ### Consulta CCC API Request Example Source: https://www.postman.com/cnpja-api/cnpj/request/11645830-68697ce5-658e-48ec-bc05-b71060421b06 This example demonstrates how to make a GET request to the Consulta CCC API. It includes the base URL and query parameters for tax ID and states. Ensure you replace `{{baseUrl}}` with the actual base URL of the API. ```plaintext GET {{baseUrl}}/ccc?taxId=37335118000180&states=PR,RS,SC ``` -------------------------------- ### API Request Example Source: https://www.postman.com/cnpja-api/cnpj/request/11645830-363ac70e-6c84-4123-b912-2d6d61477680 Example of how to construct an API request to the Suframa endpoint, including the base URL and the taxId parameter. ```HTTP GET {{baseUrl}} /suframa?taxId=37335118000180 Send ``` -------------------------------- ### API Key Authorization Setup Source: https://www.postman.com/cnpja-api/cnpj/folder/11645830-db60aa6f-c07f-4d77-afab-5693ace61591 This section details how to set up API Key authorization for requests. It specifies that the authorization header will be automatically generated and includes an example of adding the API key to the header. ```Postman Type Inherit auth from parent __ The authorization header will be automatically generated when you send the request. Learn more about authorization __ #### API Key Edit Auth in collection Key Authorization Value {{apiKey}} Add to Header __ ``` -------------------------------- ### Consulta CCC API Request Example Source: https://www.postman.com/cnpja-api/cnpj/request/36fxdl3/consulta-ccc Example of how to make a request to the Consulta CCC API. This includes the base URL and required query parameters for querying by tax ID and states. ```HTTP GET https://api.cnpja.com/ccc?taxId=37335118000180&states=PR,RS,SC ``` -------------------------------- ### Example API Request: Consulta CNPJ Source: https://www.postman.com/cnpja-api/cnpj/folder/ujlgvgk/estabelecimentos An example of a GET request to query a specific CNPJ. This is a common operation for retrieving detailed information about a company or establishment. ```http GET /{{baseURL}}/{{version}}/estabelecimentos/{{cnpj}} Host: {{host}} Authorization: {{apiKey}} ``` -------------------------------- ### Consulta Saldo Request Example Source: https://www.postman.com/cnpja-api/cnpj/folder/11645830-db60aa6f-c07f-4d77-afab-5693ace61591 An example of a GET request to 'Consulta Saldo' (Check Balance) for the CNPJ API. It shows the request method and the view count, indicating its popularity. ```Postman GET ###### Consulta Saldo __Créditos Restantes 144 Views __1 request ``` -------------------------------- ### Comprovante CCC API Request Example Source: https://www.postman.com/cnpja-api/cnpj/request/11645830-669f69ed-2adf-4db6-9847-c17c40b50445 This snippet shows a typical GET request to the Comprovante CCC endpoint. It includes the base URL and query parameters required to retrieve a certificate. Ensure you have the correct taxId and state. ```http GET {{baseUrl}}/ccc/certificate?taxId=37335118000180&state=SP HTTP/1.1 Accept: application/pdf ``` -------------------------------- ### Comprovante CCC API Request Example Source: https://www.postman.com/cnpja-api/cnpj/request/v9fht1y/comprovante-ccc This snippet shows an example API request to the Comprovante CCC endpoint. It includes the base URL, query parameters for 'taxId' and 'state', and the 'Accept' header for specifying the desired response format (PDF). ```HTTP GET {{baseUrl}}/ccc/certificate?taxId=37335118000180&state=SP Accept: application/pdf ``` -------------------------------- ### CNPJ API Request Example (cURL) Source: https://www.postman.com/cnpja-api/cnpj/documentation/wm96pex/cnpj-referncia-da-api This snippet demonstrates how to make a GET request to the CNPJ API's office endpoint using cURL. It includes headers for accepting JSON responses. ```shell curl --location 'https://api.cnpja.com/office' \ --header 'Accept: application/json' ``` -------------------------------- ### GET Request to CNPJ API Source: https://www.postman.com/cnpja-api/cnpj/documentation/wm96pex/cnpj-referncia-da-api This snippet demonstrates how to make a GET request to the CNPJ API to retrieve company information. It includes the base URL and highlights the need for an API key for authorization. The example shows the use of query parameters for filtering results. ```http GET https://api.cnpja.com/office Authorization: API Key YOUR_API_KEY Query Params: - token: 8d47bdcbde4a7a2d4a98d5f555a19701 - limit: 10 - names.in: CNPJá,Banco do Brasil,AMBEV S/A - company.equity.gte: 12345.67 - status.id.in: 3,4,8 ``` -------------------------------- ### Example API Request: Pesquisa CNPJ Source: https://www.postman.com/cnpja-api/cnpj/folder/ujlgvgk/estabelecimentos An example of a GET request used for searching CNPJ records. This typically involves query parameters to filter results based on various criteria. ```http GET /{{baseURL}}/{{version}}/estabelecimentos?query={{searchQuery}} Host: {{host}} Authorization: {{apiKey}} ``` -------------------------------- ### Comprovante Suframa API Request Example Source: https://www.postman.com/cnpja-api/cnpj/request/t37v0li/comprovante-suframa This example demonstrates how to make a request to the Comprovante Suframa endpoint using the provided baseUrl and taxId. The 'Accept' header is set to 'application/pdf' to retrieve the certificate in PDF format. ```http GET {{baseUrl}}/suframa/certificate?taxId=37335118000180 Accept: application/pdf ``` -------------------------------- ### GET /api/estabelecimentos Source: https://www.postman.com/cnpja-api/cnpj/collection/wm96pex/cnpj-referncia-da-api Retrieve establishment information by CNPJ. ```APIDOC ## GET /api/estabelecimentos ### Description Retrieves detailed information about a specific establishment using its CNPJ. ### Method GET ### Endpoint /api/estabelecimentos ### Parameters #### Query Parameters - **cnpj** (string) - Required - The CNPJ number to query. ### Request Example ```json { "example": "/api/estabelecimentos?cnpj=12345678000199" } ``` ### Response #### Success Response (200) - **company_name** (string) - The legal name of the company. - **cnpj** (string) - The CNPJ of the establishment. - **establishment_name** (string) - The trading name of the establishment. - **address** (object) - Details about the establishment's address. - **economic_activity** (object) - Information about the establishment's economic activities (CNAE). - **social_capital** (number) - The company's social capital. - **status** (string) - The current status of the establishment. #### Response Example ```json { "company_name": "EXEMPLO LTDA", "cnpj": "12.345.678/0001-99", "establishment_name": "EXEMPLO LTDA", "address": { "street": "RUA EXEMPLO", "number": "123", "complement": "SALAS 101 E 102", "neighborhood": "CENTRO", "city": "SAO PAULO", "state": "SP", "zip_code": "01000-000" }, "economic_activity": { "main_cnae": "4642701", "main_cnae_description": "Comércio atacadista de artigos do vestuário e acessórios.", "secondary_cnaes": [ "4772500" ], "secondary_cnaes_descriptions": [ "Comércio varejista de cosméticos, produtos de perfumaria e de higiene pessoal." ] }, "social_capital": 10000.00, "status": "ATIVA" } ``` ``` -------------------------------- ### Example CNPJ API Response (JSON) Source: https://www.postman.com/cnpja-api/cnpj/documentation/wm96pex/cnpj-referncia-da-api This is an example of a successful JSON response from the CNPJA API's /office endpoint when querying CNPJ data. It includes details such as the tax ID, last updated timestamp, company information (name, equity, nature, size), members, jurisdiction, and simple/SIMEI status. ```json { "taxId": "37335118000180", "updated": "2024-06-05T17:52:39.136Z", "company": { "id": 37335118, "name": "CNPJA TECNOLOGIA LTDA", "equity": 1000, "nature": { "id": 2062, "text": "Sociedade Empresária Limitada" }, "size": { "id": 1, "acronym": "ME", "text": "Microempresa" }, "members": [ { "since": "2020-06-05", "person": { "id": "1e5ed433-0f39-4309-8e85-8d21a571b212", "type": "NATURAL", "name": "João Silva", "taxId": "***123456**", "age": "31-40", "country": { "id": 76, "name": "Brasil" } }, "role": { "id": 49, "text": "Sócio-Administrador" }, "agent": { "person": { "id": "1e5ed433-0f39-4309-8e85-8d21a571b212", "type": "NATURAL", "name": "João Silva", "taxId": "***123456**", "age": "31-40", "country": { "id": 76, "name": "Brasil" } }, "role": { "id": 49, "text": "Sócio-Administrador" } } }, { "since": "2020-06-05", "person": { "id": "1e5ed433-0f39-4309-8e85-8d21a571b212", "type": "NATURAL", "name": "João Silva", "taxId": "***123456**", "age": "31-40", "country": { "id": 76, "name": "Brasil" } }, "role": { "id": 49, "text": "Sócio-Administrador" }, "agent": { "person": { "id": "1e5ed433-0f39-4309-8e85-8d21a571b212", "type": "NATURAL", "name": "João Silva", "taxId": "***123456**", "age": "31-40", "country": { "id": 76, "name": "Brasil" } }, "role": { "id": 49, "text": "Sócio-Administrador" } } } ], "jurisdiction": "Uniao", "simples": { "optant": true, "since": "2020-06-05", "history": [ { "from": "2012-12-26", "until": "2013-12-31", "text": "Excluída por Ato Administrativo praticado pela Receita Federal do Brasil" }, { "from": "2012-12-26", "until": "2013-12-31", "text": "Excluída por Ato Administrativo praticado pela Receita Federal do Brasil" } ] }, "simei": { "optant": true, "since": "2020-06-05", "history": [ { "from": "2012-12-26", "until": "2013-12-31", "text": "Excluída por Ato Administrativo praticado pela Receita Federal do Brasil" }, { ``` -------------------------------- ### Consulta Pessoa API Endpoint Example Source: https://www.postman.com/cnpja-api/cnpj/request/lx1c8wi/consulta-pessoa This snippet demonstrates how to make a GET request to the 'Consulta Pessoa' endpoint to retrieve data for a specific person. It includes the base URL and the personId path variable. ```HTTP GET https://api.cnpja.com/person/1e5ed433-0f39-4309-8e85-8d21a571b212 Accept: application/json ``` -------------------------------- ### Query Company Information (GET Request) Source: https://www.postman.com/cnpja-api/cnpj/folder/uzswoxk/empresas This snippet demonstrates how to query company information using the CNPJA API. It specifies the HTTP method as GET and includes a placeholder for the company data endpoint. ```HTTP GET ``` -------------------------------- ### GET /suframa/certificate Source: https://www.postman.com/cnpja-api/cnpj/request/t37v0li/comprovante-suframa Retrieves the PDF proof of registration in Suframa for a given tax ID. ```APIDOC ## GET /suframa/certificate ### Description Emite o comprovante em PDF do registro na Suframa. ### Method GET ### Endpoint {{baseUrl}}/suframa/certificate ### Parameters #### Query Parameters - **taxId** (string) - Required - Número do CNPJ ou CPF sem pontuação. #### Headers - **Accept** (string) - Required - application/pdf ### Request Example { "example": "" } ### Response #### Success Response (200) - **(response type)** - The API returns a PDF file. #### Response Example { "example": "PDF Content" } ``` -------------------------------- ### GET /api/empresas Source: https://www.postman.com/cnpja-api/cnpj/collection/wm96pex/cnpj-referncia-da-api Retrieve general company information by CNPJ. ```APIDOC ## GET /api/empresas ### Description Retrieves general information about a company using its CNPJ. ### Method GET ### Endpoint /api/empresas ### Parameters #### Query Parameters - **cnpj** (string) - Required - The CNPJ number to query. ### Request Example ```json { "example": "/api/empresas?cnpj=12345678000199" } ``` ### Response #### Success Response (200) - **company_name** (string) - The legal name of the company. - **cnpj** (string) - The CNPJ of the company. - **trade_name** (string) - The trading name of the company. - **situation** (string) - The current situation of the company. - **state_registration** (string) - The state registration number. - **municipal_registration** (string) - The municipal registration number. - **legal_nature** (string) - The legal nature of the company. - **opening_date** (string) - The date the company was opened. - **address** (object) - Details about the company's main address. - **email** (string) - The company's contact email. - **phone** (string) - The company's contact phone number. - **responsible_partner_type** (string) - The type of responsible partner. - **partners** (array) - List of company partners. #### Response Example ```json { "company_name": "EXEMPLO LTDA", "cnpj": "12.345.678/0001-99", "trade_name": "EXEMPLO LTDA", "situation": "ATIVA", "state_registration": "ISENTO", "municipal_registration": "", "legal_nature": "Sociedade Empresária Limitada", "opening_date": "01/01/2000", "address": { "street": "RUA EXEMPLO", "number": "123", "complement": "SALAS 101 E 102", "neighborhood": "CENTRO", "city": "SAO PAULO", "state": "SP", "zip_code": "01000-000" }, "email": "contato@exemplolda.com.br", "phone": "(11) 99999-9999", "responsible_partner_type": "", "partners": [ { "name": "SOCIO EXEMPLO", "cnpj_cpf": "111.111.111-11", "type": "PESSOA_FISICA" } ] } ``` ``` -------------------------------- ### GET /rfb Source: https://www.postman.com/cnpja-api/cnpj/request/vkyvmx0/consulta-receita-federal Retrieves company registration data, economic activities, and partner/administrator information from Receita Federal. ```APIDOC ## GET /rfb ### Description Retrieves company registration data, economic activities, and partner/administrator information from Receita Federal. ### Method GET ### Endpoint {{baseUrl}}/rfb ### Parameters #### Query Parameters - **taxId** (string) - Required - CNPJ number without punctuation. - **strategy** (string) - Optional - Cache strategy for data acquisition. Options: 'CACHE', 'CACHE_IF_FRESH', 'CACHE_IF_ERROR', 'ONLINE'. - **maxAge** (integer) - Optional - Maximum age in days for cached data (used with 'CACHE_IF_FRESH' and 'CACHE_IF_ERROR'). - **maxStale** (integer) - Optional - Maximum age in days for cached data in case of online fetch errors (used with 'CACHE_IF_FRESH'). - **sync** (boolean) - Optional - Waits for credit compensation synchronously, returning the 'cnpja-request-cost' header. Defaults to false. ### Request Example ```json { "example": "" } ``` ### Response #### Success Response (200) - **data** (object) - Contains the company information. - **company_name** (string) - Company name. - **cnpj** (string) - CNPJ number. - **opening_date** (string) - Company opening date. - **company_type** (string) - Type of company. - **state_registration** (string) - State registration number. - **business_name** (string) - Business name. - **trade_name** (string) - Trade name. - **nature_of_business** (string) - Nature of business. - **cnae** (array) - Array of economic activities (CNAE). - **address** (object) - Company address. - **partners** (array) - Array of partners and administrators. #### Response Example ```json { "example": "{\n \"data\": {\n \"company_name\": \"Example Company Name\",\n \"cnpj\": \"37335118000180\",\n \"opening_date\": \"2020-01-01\",\n \"company_type\": \"LIMITED\",\n \"state_registration\": \"123456789\",\n \"business_name\": \"Example Business Name\",\n \"trade_name\": \"Example Trade Name\",\n \"nature_of_business\": \"Example Nature\",\n \"cnae\": [\n {\n \"code\": \"6202300\",\n \"description\": \"Development and licensing of other software packages\"\n }\n ],\n \"address\": {\n \"street\": \"Example Street\",\n \"number\": \"123\",\n \"complement\": \"Suite 100\",\n \"neighborhood\": \"Example Neighborhood\",\n \"city\": \"Example City\",\n \"state\": \"EX\",\n \"zip_code\": \"12345-678\"\n },\n \"partners\": [\n {\n \"name\": \"Example Partner Name\",\n \"role\": \"ADMINISTRATOR\",\n \"document\": \"12345678901\"\n }\n ]\n }\n}" } ``` ``` -------------------------------- ### GET /api/estabelecimentos/consulta Source: https://www.postman.com/cnpja-api/cnpj/folder/11645830-2034383a-d77e-46b9-9c8c-d64c727a8c91 Retrieves detailed information about a specific establishment using its full CNPJ. ```APIDOC ## GET /api/estabelecimentos/consulta ### Description Retrieves detailed information about a specific establishment using its full CNPJ. ### Method GET ### Endpoint /api/estabelecimentos/consulta ### Parameters #### Query Parameters - **cnpj** (string) - Required - The full 14-digit CNPJ of the establishment. ### Request Example ``` GET /api/estabelecimentos/consulta?cnpj=12345678000199 ``` ### Response #### Success Response (200) - **data** (object) - Contains the establishment details. - **cnpj** (string) - The establishment's CNPJ. - **razao_social** (string) - The establishment's legal name. - **nome_fantasia** (string) - The establishment's trade name. - **uf** (string) - The state where the establishment is located. - **municipio** (string) - The municipality where the establishment is located. - **situacao_cadastral** (string) - The establishment's registration status. #### Response Example ```json { "data": { "cnpj": "12345678000199", "razao_social": "EMPRESA EXEMPLO LTDA", "nome_fantasia": "EXEMPLO NEGOCIOS", "uf": "SP", "municipio": "SAO PAULO", "situacao_cadastral": "ATIVA" } } ``` ``` -------------------------------- ### GET /Consulta Saldo Source: https://www.postman.com/cnpja-api/cnpj/folder/11645830-db60aa6f-c07f-4d77-afab-5693ace61591 Retrieves the current remaining credit balance for the authenticated user. ```APIDOC ## GET /Consulta Saldo ### Description Retrieves the current remaining credit balance for the authenticated user. ### Method GET ### Endpoint /Consulta Saldo ### Parameters #### Query Parameters - **apiKey** (string) - Required - Your API key for authentication. ### Request Example ```json { "apiKey": "your_api_key_here" } ``` ### Response #### Success Response (200) - **remainingCredits** (integer) - The number of credits left in your account. #### Response Example ```json { "remainingCredits": 144 } ``` ``` -------------------------------- ### GET /ccc/certificate Source: https://www.postman.com/cnpja-api/cnpj/request/11645830-669f69ed-2adf-4db6-9847-c17c40b50445 Retrieves the Comprovante CCC (Certificate of Compliance) for a given tax ID and state. ```APIDOC ## GET /ccc/certificate ### Description Retrieves the Comprovante CCC (Certificate of Compliance) for a given tax ID and state. ### Method GET ### Endpoint {{baseUrl}}/ccc/certificate ### Parameters #### Query Parameters - **taxId** (string) - Required - The tax identification number. - **state** (string) - Required - The state for which the certificate is requested. #### Headers - **Accept** (string) - Required - Specifies the desired response format, typically 'application/pdf'. ### Request Example (No request body for this GET request) ### Response #### Success Response (200) - The response will be a PDF document containing the Comprovante CCC. #### Response Example (PDF content would be here, typically not represented in JSON examples) ``` -------------------------------- ### Consulta CNPJ API Request Example Source: https://www.postman.com/cnpja-api/cnpj/request/xkdsdsr/consulta-cnpj This snippet demonstrates how to make a request to the Consulta CNPJ API to retrieve establishment details. It includes the base URL, the tax ID path variable, and several optional query parameters for enriching the response data. ```HTTP GET /office/:taxId?simples=true®istrations=PR,RS,SC&suframa=true&geocoding=true&links=RFB_CERTIFICATE,SIMPLES_CERTIFICATE HTTP/1.1 Host: {{baseUrl}} Accept: application/json ``` -------------------------------- ### Consultar Pessoas via cURL - CNPJá API Source: https://www.postman.com/cnpja-api/cnpj/documentation/wm96pex/cnpj-referncia-da-api Exemplo de como realizar uma consulta de pessoas na API CNPJá utilizando cURL. Não necessita de parâmetros na requisição básica. ```shell curl --location 'https://api.cnpja.com/person' \ --header 'Accept: application/json' ``` -------------------------------- ### Make API Request to Consulta Simples e MEI Source: https://www.postman.com/cnpja-api/cnpj/request/h9cehm0/consulta-simples-e-mei This snippet demonstrates how to construct and send a GET request to the CNPJA API's 'Consulta Simples e MEI' endpoint. It includes setting the base URL, the required 'taxId' parameter, and optional parameters like 'history', 'strategy', 'maxAge', 'maxStale', and 'sync'. ```HTTP GET {{baseUrl}}/simples?taxId=37335118000180&history=true&strategy=CACHE_IF_ERROR&maxAge=45&maxStale=365&sync=true Accept: application/json ``` -------------------------------- ### Mapa Aéreo API Endpoint (GET Request) Source: https://www.postman.com/cnpja-api/cnpj/request/soy3f3u/mapa-areo This snippet demonstrates how to make a GET request to the Mapa Aéreo endpoint of the CNPJA API. It includes path variables, query parameters for customization, and required headers. The response is an image. ```HTTP GET https://api.cnpja.com/office/37335118000180/map?width=640&height=640&scale=1&zoom=17&type=roadmap Accept: image/png ``` -------------------------------- ### Estabelecimentos Source: https://www.postman.com/cnpja-api/cnpj/documentation/wm96pex/cnpj-referncia-da-api This section details endpoints related to establishment data. It utilizes an Authorization API Key for authentication. ```APIDOC ## Estabelecimentos ### Description This API provides access to establishment data, likely including details about businesses registered under a CNPJ. ### Method GET (assumed, as no specific methods are detailed for this section) ### Endpoint /estabelecimentos (assumed, as this is a common RESTful pattern) ### Parameters #### Path Parameters None specified. #### Query Parameters None specified. #### Request Body None specified. ### Request Example ```json { "message": "Example request body not provided" } ``` ### Response #### Success Response (200) - **establishment_data** (object) - Detailed information about an establishment. #### Response Example ```json { "establishment_data": { "cnpj": "12.345.678/0001-90", "nome_fantasia": "Exemplo Ltda.", "razao_social": "Empresa Exemplo S.A." } } ``` ``` -------------------------------- ### API Configuration Variables Source: https://www.postman.com/cnpja-api/cnpj/request/11645830-363ac70e-6c84-4123-b912-2d6d61477680 Defines the essential variables for configuring the API request, including the base URL for the CNPJA API. ```Postman Variables apiKey baseUrl https://api.cnpja.com ``` -------------------------------- ### GET Request to Consulta Receita Federal API Source: https://www.postman.com/cnpja-api/cnpj/request/vkyvmx0/consulta-receita-federal This snippet shows a GET request to the Consulta Receita Federal API endpoint. It includes the base URL and a required 'taxId' parameter for querying company data. The 'strategy', 'maxAge', 'maxStale', and 'sync' parameters allow for controlling cache behavior and synchronization. ```http GET {{baseUrl}}/rfb?taxId=37335118000180&strategy=CACHE_IF_ERROR&maxAge=45&maxStale=365&sync=true Accept: application/json ``` -------------------------------- ### Consulta Suframa Source: https://www.postman.com/cnpja-api/cnpj/request/11645830-363ac70e-6c84-4123-b912-2d6d61477680 Retrieves SUFRAMA cadastral data, project status, economic activities, and tax incentives. Supports caching strategies and configurable age limits for cached data. ```APIDOC ## GET /suframa ### Description Retrieves SUFRAMA cadastral data, including establishment registration, project status, economic activities, and tax incentives. ### Method GET ### Endpoint /suframa ### Parameters #### Query Parameters - **taxId** (string) - Required - Número do CNPJ ou CPF sem pontuação. - **strategy** (string) - Optional - Estratégia de cache utilizada na aquisição dos dados. Options: `CACHE`, `CACHE_IF_FRESH`, `CACHE_IF_ERROR`, `ONLINE`. - **maxAge** (integer) - Optional - Idade máxima, em dias, que um dado em cache é aceite. - **maxStale** (integer) - Optional - Idade máxima, em dias, que um dado em cache é aceite em caso de erro na busca online. - **sync** (boolean) - Optional - Aguarda a compensação dos créditos de forma síncrona, retornando o cabeçalho `cnpja-request-cost`. ### Request Example ```json { "taxId": "37335118000180", "strategy": "CACHE_IF_ERROR", "maxAge": 45, "maxStale": 365, "sync": true } ``` ### Response #### Success Response (200) - **establishmentData** (object) - Cadastral data of the establishment. - **projectStatus** (string) - Status of the project. - **economicActivities** (array) - List of economic activities. - **taxIncentives** (array) - List of tax incentives. #### Response Example ```json { "establishmentData": { "name": "Example Company", "tradeName": "Example Trade", "cnpj": "37335118000180" }, "projectStatus": "Active", "economicActivities": [ { "code": "1011201", "description": "Processing of milk" } ], "taxIncentives": [ { "name": "Lei de Informática", "dueDate": "2025-12-31" } ] } ``` ``` -------------------------------- ### GET /api/pesquisa Source: https://www.postman.com/cnpja-api/cnpj/collection/wm96pex/cnpj-referncia-da-api Search for establishments based on various criteria. ```APIDOC ## GET /api/pesquisa ### Description Performs a search for establishments based on criteria such as CNPJ, company name, or trading name. ### Method GET ### Endpoint /api/pesquisa ### Parameters #### Query Parameters - **cnpj** (string) - Optional - The CNPJ number to search for. - **company_name** (string) - Optional - The company name to search for. - **trade_name** (string) - Optional - The trading name to search for. ### Request Example ```json { "example": "/api/pesquisa?company_name=EXEMPLO%20LTDA" } ``` ### Response #### Success Response (200) - **results** (array) - A list of establishments matching the search criteria. - Each item in the array contains **cnpj**, **company_name**, **trade_name**, and **status**. #### Response Example ```json { "results": [ { "cnpj": "12.345.678/0001-99", "company_name": "EXEMPLO LTDA", "trade_name": "EXEMPLO LTDA", "status": "ATIVA" }, { "cnpj": "98.765.432/0001-11", "company_name": "OUTRA EMPRESA LTDA", "trade_name": "OUTRA EMPRESA", "status": "ATIVA" } ] } ``` ``` -------------------------------- ### API Key Authorization Setup Source: https://www.postman.com/cnpja-api/cnpj/folder/ujlgvgk/estabelecimentos Demonstrates how to set up API Key authorization for requests within a Postman collection. This method uses an 'Authorization' header with a dynamic API key value, often inherited from the collection or environment. ```postman { "type": "apikey", "key": "Authorization", "value": "{{apiKey}}", "in": "header" } ``` -------------------------------- ### GET Request for Visão da Rua (Street View) Source: https://www.postman.com/cnpja-api/cnpj/request/llsnvf1/viso-da-rua This snippet demonstrates how to make a GET request to the Visão da Rua endpoint. It includes the base URL, path variable for the CNPJ, and query parameters for image dimensions and field of view. Authorization details are not provided as they require signing in. ```http GET https://api.cnpja.com/office/:taxId/street?width=640&height=640&fov=90 -- Path Variable: -- taxId: (Required) CNPJ number without punctuation. -- Query Parameters: -- width: Width in pixels. -- height: Height in pixels. -- fov: Field of view in degrees. ``` -------------------------------- ### GET /api/pessoas Source: https://www.postman.com/cnpja-api/cnpj/collection/wm96pex/cnpj-referncia-da-api Retrieve information about individuals (pessoas) by their CPF or name. ```APIDOC ## GET /api/pessoas ### Description Retrieves information about individuals using their CPF or name. ### Method GET ### Endpoint /api/pessoas ### Parameters #### Query Parameters - **cpf** (string) - Optional - The CPF number to query. - **name** (string) - Optional - The name of the person to search for. ### Request Example ```json { "example": "/api/pessoas?cpf=11111111111" } ``` ### Response #### Success Response (200) - **name** (string) - The name of the person. - **cpf** (string) - The CPF of the person. - **birth_date** (string) - The birth date of the person. - **address** (object) - Details about the person's address. - **company_affiliations** (array) - List of companies the person is affiliated with. #### Response Example ```json { "name": "SOCIO EXEMPLO", "cpf": "111.111.111-11", "birth_date": "DD/MM/YYYY", "address": { "street": "RUA PESSOA", "number": "456", "neighborhood": "BAIRRO PESSOA", "city": "CIDADE PESSOA", "state": "SP", "zip_code": "12345-678" }, "company_affiliations": [ { "company_name": "EXEMPLO LTDA", "cnpj": "12.345.678/0001-99", "role": "SOCIO" } ] } ``` ``` -------------------------------- ### GET /Consulta Saldo Source: https://www.postman.com/cnpja-api/cnpj/folder/pw8uook/crditos-restantes Retrieves the current remaining credit balance. ```APIDOC ## GET /Consulta Saldo ### Description Retrieves the current remaining credit balance. ### Method GET ### Endpoint /Consulta Saldo ### Parameters #### Query Parameters - **apiKey** (string) - Required - The API key for authentication. ### Request Example (No request body for GET request) ### Response #### Success Response (200) - **remainingCredits** (integer) - The number of remaining credits. #### Response Example { "remainingCredits": 143 } ``` -------------------------------- ### GET /api/estabelecimentos/pesquisa Source: https://www.postman.com/cnpja-api/cnpj/folder/11645830-2034383a-d77e-46b9-9c8c-d64c727a8c91 Searches for establishments based on various criteria, such as company name or state. ```APIDOC ## GET /api/estabelecimentos/pesquisa ### Description Searches for establishments based on various criteria, such as company name or state. Returns a list of matching establishments. ### Method GET ### Endpoint /api/estabelecimentos/pesquisa ### Parameters #### Query Parameters - **razao_social** (string) - Optional - Filters by the establishment's legal name. - **nome_fantasia** (string) - Optional - Filters by the establishment's trade name. - **uf** (string) - Optional - Filters by the state (UF). - **municipio** (string) - Optional - Filters by the municipality. ### Request Example ``` GET /api/estabelecimentos/pesquisa?uf=SP&municipio=SAO PAULO ``` ### Response #### Success Response (200) - **data** (array) - A list of establishment objects matching the search criteria. - Each object contains: - **cnpj** (string) - The establishment's CNPJ. - **razao_social** (string) - The establishment's legal name. - **nome_fantasia** (string) - The establishment's trade name. - **uf** (string) - The state where the establishment is located. - **municipio** (string) - The municipality where the establishment is located. #### Response Example ```json { "data": [ { "cnpj": "12345678000199", "razao_social": "EMPRESA EXEMPLO LTDA", "nome_fantasia": "EXEMPLO NEGOCIOS", "uf": "SP", "municipio": "SAO PAULO" }, { "cnpj": "87654321000155", "razao_social": "OUTRA EMPRESA LTDA", "nome_fantasia": "OUTRA FIRMA", "uf": "SP", "municipio": "SAO PAULO" } ] } ``` ``` -------------------------------- ### CNPJ API Response Example (JSON) Source: https://www.postman.com/cnpja-api/cnpj/documentation/wm96pex/cnpj-referncia-da-api This is a sample JSON response from the CNPJ API, illustrating the structure of returned company data. It includes information such as tax ID, update timestamp, company details, and member information. ```json { "next": "8d47bdcbde4a7a2d4a98d5f555a19701", "limit": 100, "count": 345, "records": [ { "taxId": "37335118000180", "updated": "2024-06-05T17:52:39.136Z", "company": { "id": 37335118, "name": "CNPJA TECNOLOGIA LTDA", "equity": 1000, "nature": { "id": 2062, "text": "Sociedade Empresária Limitada" }, "size": { "id": 1, "acronym": "ME", "text": "Microempresa" }, "members": [ { "since": "2020-06-05", "person": { "id": "1e5ed433-0f39-4309-8e85-8d21a571b212", "type": "NATURAL", "name": "João Silva", "taxId": "***123456**", "age": "31-40", "country": { "id": 76, "name": "Brasil" } }, "role": { "id": 49, "text": "Sócio-Administrador" }, "agent": { "person": { "id": "1e5ed433-0f39-4309-8e85-8d21a571b212", "type": "NATURAL", "name": "João Silva", "taxId": "***123456**", "age": "31-40", "country": { "id": 76, "name": "Brasil" } }, "role": { "id": 49, "text": "Sócio-Administrador" } } }, { "since": "2020-06-05", "person": { "id": "1e5ed433-0f39-4309-8e85-8d21a571b212", "type": "NATURAL", "name": "João Silva", "taxId": "***123456**", "age": "31-40", "country": { "id": 76, "name": "Brasil" } }, "role": { "id": 49, "text": "Sócio-Administrador" }, "agent": { "person": { "id": "1e5ed433-0f39-4309-8e85-8d21a571b212", "type": "NATURAL", "name": "João Silva", "taxId": "***123456**", "age": "31-40", "country": { "id": 76, "name": "Brasil" } }, "role": { "id": 49, "text": "Sócio-Administrador" } } } ], "jurisdiction": "Uniao", "simples": { "optant": true, "since": "2020-06-05", "history": [ { "from": "2012-12-26", "until": "2013-12-31" } ] } } } ] } ``` -------------------------------- ### Comprovante CCC Source: https://www.postman.com/cnpja-api/cnpj/folder/11645830-ed26146b-2155-426c-bbc8-ca1247ceb32d Provides proof of contributor status. ```APIDOC ## GET /Comprovante CCC ### Description Provides proof of contributor status. ### Method GET ### Endpoint /Comprovante CCC ### Parameters #### Query Parameters - **apiKey** (string) - Required - API key for authentication. ### Request Example ```json { "apiKey": "{{apiKey}}" } ``` ### Response #### Success Response (200) - **Example Response Body**: A JSON object containing contributor proof details. #### Response Example ```json { "message": "Contributor proof generated successfully." } ``` ``` -------------------------------- ### GET /person Source: https://www.postman.com/cnpja-api/cnpj/request/38bzp6j/pesquisa-pessoas Retrieves a list of people based on the provided query parameters. ```APIDOC ## GET /person ### Description Retrieves a list of people based on the provided query parameters. ### Method GET ### Endpoint {{baseUrl}}/person ### Parameters #### Query Parameters - **token** (string) - Required - Authentication token. - **limit** (integer) - Optional - Maximum number of results to return. - **type.in** (string) - Optional - Filter by person type (e.g., NATURAL, LEGAL). - **name.in** (string) - Optional - Filter by names (comma-separated). - **name.nin** (string) - Optional - Exclude names (comma-separated). - **taxId.in** (string) - Optional - Filter by tax IDs (comma-separated). - **age.in** (string) - Optional - Filter by age range (e.g., 21-30). - **country.id.in** (integer) - Optional - Filter by country IDs (comma-separated). - **country.id.nin** (integer) - Optional - Exclude country IDs (comma-separated). #### Headers - **Accept** (string) - Optional - Specifies the accepted response format, defaults to application/json. ### Request Example ```json { "example": "" } ``` ### Response #### Success Response (200) - **response** (object) - Contains the search results and metadata. #### Response Example ```json { "example": "Click Send to get a response" } ``` ### Error Handling (Error handling details not provided in the source text) ``` -------------------------------- ### API Key Authorization Setup Source: https://www.postman.com/cnpja-api/cnpj/folder/k4aaqag/cdigos-postais This configuration sets up API key authorization for requests within the Postman collection. The API key is sent in the 'Authorization' header. This can be inherited by all requests or specified individually. ```postman { "key": "Authorization", "value": "{{apiKey}}", "addto": "Header" } ```