{"openapi":"3.1.0","info":{"version":"v2","title":"CNPJá API","description":"## Introduction\n\nThe CNPJá API is organized around REST. It has predictable URLs, accepts JSON request bodies, returns JSON responses, and uses standard HTTP verbs and status codes.\n\nAll requests are made over HTTPS to the base URL `https://api.cnpja.com`, and every operation is under the `/v2` path prefix. Use `GET` to look up and search data, and `POST`, `PATCH` and `DELETE` to manage resources. [Authentication](#description/authentication) uses an API key in the `Authorization` header. Status codes in the `2xx` range indicate success, `4xx` indicate an error related to the request, and `5xx` indicate a failure on the API side, as detailed in [error codes](#description/error-codes).\n\nOperations are organized into groups by type of data, such as [companies](#tag/companies), [establishments](#tag/establishments) and [postal codes](#tag/postal-codes). The Fundamentals sections below describe the behavior shared across operations, and the details specific to each one are in its own documentation.\n\n---\n\n## Fundamentals\n\n### Authentication\n\nEvery request to the API needs an API key, except the public requests described below. Send the key as the entire value of the `Authorization` header, with no prefix.\n\n> [!IMPORTANT]\n> Do not add a scheme such as `Bearer` before the key. The whole header value is treated as the key, so `Bearer YOUR_API_KEY` is rejected with `401` `API_KEY_INVALID`.\n\n```http\nGET /v2/establishments/37335118000180 HTTP/1.1\nHost: api.cnpja.com\nAuthorization: YOUR_API_KEY\n```\n\nEach key belongs to an organization. All keys of an organization have the same access and share the organization's data, [usage limits](#description/usage-limits) and usage: for example, a list created with one key can be read with any other, and requests from all keys count toward the same limits. Having several keys does not raise those limits, but it lets you separate applications and replace or revoke one key without affecting the others.\n\nWhen authentication fails, the response has status `401` and `code` tells you why:\n\n- `API_KEY_MISSING`: no key was sent. On operations with public access, it is also returned when a request without a key includes query parameters.\n- `API_KEY_INVALID`: the value sent does not match any key. Check that the key is complete and has no prefix.\n- `API_KEY_REVOKED`: the key was revoked and will not work again. Use another active key from your organization.\n\nRetrying the same request does not fix a `401`: fix the key or the request before trying again. Other errors are listed in [error codes](#description/error-codes).\n\nTreat your key like a password:\n\n- Keep the key only on your server, in environment variables or a secrets manager, out of source code, version control and logs.\n- Do not include the key in web pages or mobile apps, where any user can extract it. Call the API from your backend.\n- Revoke an exposed key without delay. Revocation takes effect immediately: later requests with that key return `API_KEY_REVOKED`.\n- To replace a key without downtime, create a new one, update your application, and only then revoke the old one.\n\n#### Public access\n\nSome operations, such as [Lookup CNPJ](#tag/establishments/GET/v2/establishments/{taxId}) and [Lookup CEP](#tag/postal-codes/GET/v2/postal-codes/{code}), also accept requests without an API key, called public requests. Each operation's documentation states whether it accepts public access.\n\nA request is accepted as public only when its URL has no query parameters at all. Any parameter, including an unknown one or one added automatically by another tool, makes the request return `401` `API_KEY_MISSING`:\n\n- `GET /v2/postal-codes/01310100` is accepted.\n- `GET /v2/establishments/37335118000180?maxAge=1d` is rejected.\n- `GET /v2/postal-codes/01310100?utm_source=site` is rejected.\n\nWhen this happens, the error `message` names the parameter that caused the rejection.\n\nSince no parameter can be sent, public requests always use default values. On [Lookup CNPJ](#tag/establishments/GET/v2/establishments/{taxId}), for example, this is the same as sending `maxAge=45d` without `expand`, that is, without any of the optional resources described in [response expansion](#description/response-expansion). To use other values, send a key.\n\nPublic requests are not charged and have [usage limits](#description/usage-limits) of 5 requests per second and 5 concurrent requests.\n\nWhen a request has a key in the `Authorization` header, it is never treated as public. The key is always validated, and an invalid or revoked key returns `401` instead of falling back to public access. With a valid key, the request follows the normal rules: it accepts every parameter, is charged and counts toward the organization's limits.\n\nPublic access can be used in commercial operations too, as long as they have low volume or low criticality, such as validating a new customer's CNPJ or filling in an address from a CEP in a form. When volume grows, when a rejection due to limits is not acceptable or when you need other parameters, send a key: it unlocks every parameter and gives the organization its own limits, set by its plan.\n\n---\n\n### Usage limits\n\nThe API limits how many requests you send per second and how many you keep in progress at the same time. With a key, both limits follow the plan of the organization's current usage period:\n\n| Access | Requests per second | Concurrent requests |\n|---|---|---|\n| Free plan | 5 | 5 |\n| Pro plan | 50 | 50 |\n| Enterprise plan | Up to 250 | Up to 250 |\n| Without key | 5 | 5 |\n\nThe per-second limit counts the requests that arrive in each second, regardless of how long they take. The concurrency limit counts requests in progress: each one takes a slot from the moment it arrives until its response finishes. Slow operations, such as those that run live queries, hold their slots longer.\n\nBoth limits apply together. If your requests take 5 seconds on average, the 50 concurrent requests of the Pro plan sustain about 10 per second; above that you start getting `CONCURRENCY_LIMIT_EXCEEDED`, well before reaching 50 per second.\n\nWith a key, limits apply to the whole organization: they are shared by all of its keys and applications, cover every operation and change along with its plan. Public requests, made without a key, follow the limits without key in the table, counted per source IP address, and do not count toward any organization's limits. Requests with a key also count toward the source IP's limit, so public requests sent from the same IP as a keyed integration reach that limit sooner.\n\nA request over a limit is rejected with `429` and is not charged. Its `code` tells you which limit was reached:\n\n- `RATE_LIMIT_EXCEEDED`: too many requests in the same second. Wait about a second before retrying, and spread requests evenly instead of sending them in bursts.\n- `CONCURRENCY_LIMIT_EXCEEDED`: too many requests in progress. Reduce parallelism, for example by processing requests with a fixed number of parallel workers, below the limit, and resend the rejected request once another in-progress request completes.\n\nResponses carry no rate limit headers and no `Retry-After`, so control pace and parallelism on your side, keeping a margin below the limits.\n\nEach request has up to 60 seconds to complete. Beyond that, the response is `504` `REQUEST_TIMED_OUT`. Set your HTTP client timeout above 60 seconds so you receive this response instead of closing the connection first.\n\nRequest bodies, used by operations that create or change data, are limited to 50 MB.\n\n---\n\n### Error codes\n\nEvery error response has a `4xx` or `5xx` HTTP status and a JSON body that always has the same shape. For example, a [Lookup CNPJ](#tag/establishments/GET/v2/establishments/{taxId}) request that sends `company.taxRegime.view=DETAILED` without `company.taxRegime` in `expand` receives:\n\n```json\n{\n  \"status\": 400,\n  \"code\": \"REQUEST_VALIDATION_FAILED\",\n  \"traceId\": \"4bf92f3577b34da6a3ce929d0e0e4736\",\n  \"message\": \"company.taxRegime.view requires company.taxRegime to be present at expand\",\n  \"errors\": [\n    {\n      \"field\": \"company.taxRegime.view\",\n      \"code\": \"DEPENDENCIES\",\n      \"message\": \"Requires company.taxRegime to be present at expand\"\n    }\n  ]\n}\n```\n\n- `status`: the same HTTP status as the response.\n- `code`: stable error identifier. Base your error handling on it, never on `message`.\n- `message`: human-readable description, in the response [language](#description/language) whenever a translation exists. It is meant for display only and may change without notice.\n- `traceId`: request identifier, also sent in the `trace-id` header, which successful responses carry too. Include it when contacting support.\n- `errors`: up to 100 validation failures, with one item per failed rule. When present, `message` restates only the first item.\n\nIn each `errors` item, `field` tells where the problem is: the parameter name, such as `company.taxRegime.view`, or the property path in the body. List positions are zero-based and separated by a dot, such as `expand.0` for the first value of `expand` or `items.2` for the third body item. `message` describes the problem, and `code` names the failed rule, for example `REQUIRED` for a missing required value, `FORMAT` for an invalid format, `ENUM` for a value outside the allowed ones and `DEPENDENCIES` for combinations that are not accepted, such as a parameter that configures a resource missing from `expand`, or `cursor` sent with other parameters.\n\nOn operations that take query parameters or a body, an unrecognized name, such as a typo, produces `ADDITIONAL_PROPERTIES`. The message does not say which name was rejected, so check the spelling of the parameters you sent. On operations without query parameters, such as [Lookup company](#tag/companies/GET/v2/companies/{id}), unrecognized names are ignored.\n\n`field` is empty on `ADDITIONAL_PROPERTIES` and when the problem is in a path parameter, such as a malformed CNPJ in the URL, except on `REQUIRED`, where it holds the parameter name. `errors` is absent when the body cannot be read, as with malformed JSON, an unsupported `Content-Type` or a body over 50 MB, and on every code other than `REQUEST_VALIDATION_FAILED`.\n\n| Code | Status | Description |\n|---|---|---|\n| `REQUEST_VALIDATION_FAILED` | 400 | A parameter or the request body is invalid. See `errors`, when present, for what to fix. |\n| `PAGE_CURSOR_INVALID` | 400 | The `cursor` has expired or is unknown. |\n| `API_KEY_MISSING` | 401 | The `Authorization` header is missing or empty, or a public request included query parameters. |\n| `API_KEY_INVALID` | 401 | The `Authorization` value is not a valid API key, for example because it has a prefix such as `Bearer`. |\n| `API_KEY_REVOKED` | 401 | The API key was revoked and can no longer be used. |\n| `CACHED_QUERY_QUOTA_EXCEEDED` | 402 | The organization used up its quota of cached queries. |\n| `LIVE_QUERY_QUOTA_EXCEEDED` | 402 | The organization used up its quota of live queries. |\n| `OVERAGE_BUDGET_EXCEEDED` | 402 | The organization used up its overage budget. |\n| `COMPANY_NOT_FOUND` | 404 | No company has the given ID. |\n| `ESTABLISHMENT_DOSSIER_EMPTY` | 404 | None of the requested certificates is available for the given CNPJ. |\n| `ESTABLISHMENT_NOT_FOUND` | 404 | The given CNPJ is not registered with the Receita Federal. |\n| `INDIVIDUAL_DOSSIER_EMPTY` | 404 | None of the requested certificates is available for the given CPF. |\n| `INDIVIDUAL_NOT_FOUND` | 404 | No record was found for the given CPF. |\n| `LIST_NOT_FOUND` | 404 | The list does not exist or belongs to another organization. |\n| `NOT_FOUND` | 404 | The request path or HTTP method does not exist. |\n| `PERSON_NOT_FOUND` | 404 | No person has the given ID. |\n| `POSTAL_CODE_NOT_FOUND` | 404 | The given CEP was not found. |\n| `LIST_EXPORT_IN_PROGRESS` | 409 | The list CNPJs cannot change while one of its exports is pending or processing. |\n| `LIST_LIMIT_EXCEEDED` | 422 | The organization reached its maximum number of lists. |\n| `LIST_SIZE_EXCEEDED` | 422 | The list would exceed its maximum number of items. |\n| `ORGANIZATION_DEACTIVATED` | 422 | The organization was deactivated. |\n| `RATE_LIMIT_EXCEEDED` | 429 | Requests from the organization, or public requests, exceeded the requests-per-second limit. |\n| `CONCURRENCY_LIMIT_EXCEEDED` | 429 | Requests from the organization, or public requests, exceeded the concurrent-requests limit. |\n| `UNEXPECTED_ERROR` | 500 | An unexpected failure prevented the request from completing. |\n| `REQUEST_TIMED_OUT` | 504 | The request did not complete within 60 seconds. |\n\nErrors with status `429`, `500` and `504` are usually temporary and can be retried unchanged. The others are not fixed by retrying the same request. What to do in each case:\n\n- `400`: fix what `errors` points out or, when it is absent, the request body. For `PAGE_CURSOR_INVALID`, restart the search from the first page.\n- `401`: send a valid API key in the `Authorization` header, with no prefix, or remove the query parameters from a public request.\n- `402`: increase the organization's quota or overage budget, or wait for the quota to reset next month, as described in [billing](#description/billing).\n- `404`: check the identifier and the parameters you sent. A lookup that ends in `404` can be billed, as described in [billing](#description/billing), so only repeat it later, when the registration may have changed.\n- `422`: the request would exceed a limit of the resource, such as a maximum number of items. Adjust the request or free up space before retrying. For `ORGANIZATION_DEACTIVATED`, use an API key of an active organization.\n- `429`: slow down or reduce the number of concurrent requests and retry after a short wait, as described in [usage limits](#description/usage-limits).\n- `500` and `504`: retry with increasing intervals between attempts. These responses are not charged. If the error persists, contact support with the `traceId`.\n\nIf you receive a `code` you do not recognize, handle the error by its HTTP status. An operation that creates or changes data may have completed even when the response is a `500` or `504`: before retrying it, check the current state of the resource.\n\n---\n\n### Data freshness\n\nSome operations, such as [Lookup CNPJ](#tag/establishments/GET/v2/establishments/{taxId}), build their responses from resources that come from official sources, such as the registration data or the tax regime of a CNPJ. Each resource can be delivered in two ways:\n\n- From cached data, with the last update obtained from the official source. It is the fastest, lowest-cost option.\n- Through a live query at the official source, made during the request. You get the latest data, but the response can take a few seconds and costs more, as described in [billing](#description/billing).\n\nThese operations accept the `maxAge` parameter, which sets the maximum data age you accept. For each resource, the time since its last update from the source is compared with `maxAge`: within the limit, the resource comes from cached data; if more time has passed, or the resource was never queried, it is queried live before the response. Stale resources are queried in parallel, so response time follows the slowest query, not the sum of all of them.\n\n`maxAge` is 1 to 3 digits followed by a unit: `y` (years), `w` (weeks), `d` (days), `h` (hours) or `m` (minutes, not months). It ranges from `5m` to `1y` and defaults to `45d`.\n\nSome operations also accept separate limits per resource, such as `stateRegistry.maxAge`, which replace `maxAge` for that resource only. When you do not send a separate limit, `maxAge` applies. Each separate limit is accepted only with its resource in `expand`, as described in [response expansion](#description/response-expansion).\n\nIn this request, registration data can be up to 30 days old, and state registrations up to 1 day old:\n\n```http\nGET /v2/establishments/37335118000180?maxAge=30d&expand=stateRegistry&stateRegistry.maxAge=1d HTTP/1.1\nHost: api.cnpja.com\nAuthorization: YOUR_API_KEY\n```\n\nSome resources have their own update rules, described in each operation's documentation. For example, the address coordinates of a CNPJ do not follow `maxAge`, and higher levels of detail, such as `stateRegistry.view=DETAILED`, can require more live queries.\n\nEach resource reports its last update in its own `updatedAt` field, such as `company.taxRegime.updatedAt` for the tax regime.\n\nChoose `maxAge` based on how much your use case depends on up-to-date data. Larger values, such as the default, suit record enrichment and bulk analysis, with faster responses and lower cost. Smaller values suit one-off checks, such as confirming a state registration before issuing an invoice.\n\nOperations that do not accept `maxAge`, such as [Lookup company](#tag/companies/GET/v2/companies/{id}) and the searches, deliver cached data only.\n\n#### Partial success\n\nEach live query has up to 30 seconds to complete. When it fails or does not complete in time, the request is not aborted: the other resources are delivered as usual, and the response comes with status `206` instead of `200`. Only operations that accept `maxAge` can return `206`.\n\nIn a `206` response:\n\n- The body has the same format as a `200` response, including when the response is a file.\n- The affected resource keeps its cached data, which can be older than the requested limit. If it was never queried, it comes back empty.\n- In responses made of documents, such as dossiers, affected documents appear in their cached version, or are left out when none exists. When no document is left, the response is a `404` instead.\n- The affected resource is not charged, even when the response includes its cached data. The others are charged as usual.\n\n> [!IMPORTANT]\n> Treat `206` as success. A client that only accepts `200` discards valid responses.\n\nThe response does not indicate which resource failed. To identify possibly outdated resources, compare each one's `updatedAt` with the limit that applies to it: the resource's own limit, `maxAge` or the `45d` default. A resource without `updatedAt` was never queried. In any case, retry later to get fresh data.\n\nPartial success needs cached data to fall back on. When none exists, for example on the first lookup of a CNPJ, a failure at the official source makes the request fail instead of returning `206`. In that case, retry later.\n\n---\n\n### Billing\n\nAPI usage is measured in two units:\n\n- **Cached queries**: resources served from cached data.\n- **Live queries**: resources queried live at the official source or generated during the request, such as images.\n\nA live query costs more than a cached query and also takes longer. Each resource is charged separately, including those added through [response expansion](#description/response-expansion), so a single request can consume both units. On [Lookup CNPJ](#tag/establishments/GET/v2/establishments/{taxId}) with `expand=company.taxRegime`, for example, the establishment can be served from cached data while the tax regime is queried live: you consume one cached query and one live query.\n\nA resource can also consume more than one query, for example when it is charged per returned item. Each operation's documentation details what it consumes.\n\nCharges depend on the work done and on the outcome of the request:\n\n| Outcome | Charge |\n|---|---|\n| Resource served from cached data | Cached queries |\n| Resource queried live, or generated during the request | Live queries |\n| Live query failed in a partial success | Nothing for that resource |\n| Not found (`404`) | Queries needed to conclude that the record does not exist |\n| Failure on the API side (`5xx`) | Nothing |\n| Rejected with `400`, `401`, `402` or `429` | Nothing |\n| Public request | Nothing |\n| Operation that does not query data, such as list operations | Nothing |\n\nA `404` consumes the queries needed to conclude that the record does not exist, such as the live query made when an unknown CNPJ is not found at the official source. A request that ends with a `5xx` status, such as `500` or `504`, is not charged, even if some queries completed before the failure.\n\nEach organization has a quota of cached queries and another of live queries, both reset every month. Each quota is the plan's allowance plus any purchased add-ons.\n\nWhen the plan has overage pricing and the organization has an overage budget, requests keep being served after a quota is used up: each query beyond the quota is charged at the plan's overage price, and the organization is blocked once its overage spend reaches the budget. Otherwise, the organization is blocked as soon as either quota is used up. Usage is updated with a short delay, so the quota or the overage budget can be slightly exceeded before the block takes effect. While the organization is blocked, every authenticated request is rejected with `402` and is not charged, including list operations and requests that would only consume the other quota. The `code` tells you which limit was reached:\n\n- `CACHED_QUERY_QUOTA_EXCEEDED`: the organization has no cached queries left and no overage available.\n- `LIVE_QUERY_QUOTA_EXCEEDED`: the organization has no live queries left and no overage available.\n- `OVERAGE_BUDGET_EXCEEDED`: the organization used up its overage budget.\n\nRetrying the same request does not fix a `402`: increase the quota or the overage budget, for example by changing plans or purchasing add-ons, or wait for the quota to reset next month.\n\nResponses carry no balance or cost headers, so a response does not tell you how much it consumed. Prices and plans are available on the CNPJá website.\n\n> [!TIP]\n> A larger `maxAge` lets more resources be served from cached data, which lowers both cost and response time. See [data freshness](#description/data-freshness).\n\n---\n\n### Response expansion\n\nSome operations have optional resources that are left out of the default response and are included only when you request them in the `expand` parameter. Because each expanded resource is charged separately and may require a live query, the default response stays faster and cheaper.\n\nEach `expand` value is also the path of the field it adds to the response. On [Lookup CNPJ](#tag/establishments/GET/v2/establishments/{taxId}), for example, `expand=company.taxRegime` adds the company tax regime under `company.taxRegime`. The values each operation accepts are listed in its documentation.\n\nSend several values separated by commas or by repeating the parameter: `expand=stateRegistry,suframa` is the same as `expand=stateRegistry&expand=suframa`. A resource you do not request is absent from the response, and a requested resource is present even when there is no data, for example as an empty list.\n\nOn some operations, `expand` is required, because the response consists mainly of the requested resources. Public requests accept no query parameters, so expansion always requires an [API key](#description/authentication).\n\nParameters that configure a resource, such as `company.taxRegime.view` or `suframa.maxAge`, are accepted only with the matching resource in `expand`. Without it, the request fails with `400` `REQUEST_VALIDATION_FAILED`, and `errors` includes an item with the `DEPENDENCIES` code.\n\nEach expanded resource is served from cached data or queried live according to the [data freshness](#description/data-freshness) rules, and is charged as described in [billing](#description/billing).\n\n```http\nGET /v2/establishments/37335118000180?expand=company.taxRegime,stateRegistry&company.taxRegime.view=DETAILED HTTP/1.1\nHost: api.cnpja.com\nAuthorization: YOUR_API_KEY\n```\n\nThis request returns the establishment with the detailed tax regime and the state registrations. The other optional resources are left out of the response.\n\n> [!TIP]\n> Request only the resources you will use and prefer the narrowest options, such as a lower level of detail or fewer items. Each extra resource adds to the cost of the request and, when it needs a live query, to the response time.\n\n---\n\n### Search filters\n\nSearch operations, such as [Search CNPJ](#tag/establishments/GET/v2/establishments), accept filters as query parameters. All filters are optional, and each one you add narrows the result.\n\nA filter name is a field path followed by an operator, such as `address.state.in` or `incorporationDate.gte`. The dots are part of the parameter name, which you send exactly as written. Not every field supports every operator: each operation lists its available filters, and an unknown parameter or a value in the wrong format is rejected with `400` `REQUEST_VALIDATION_FAILED`.\n\n| Operator | Meaning | Example |\n|---|---|---|\n| `in` | Equals any of the values | `address.state.in=SP,RJ` |\n| `nin` | Equals none of the values | `company.legalNature.code.nin=2135` |\n| `some` | Contains any of the words or values | `names.some=padaria,confeitaria` |\n| `none` | Contains none of the words or values | `economicActivities.code.none=4711302,5611201` |\n| `gte` | Greater than or equal to the value | `incorporationDate.gte=2020-01-01` |\n| `lte` | Less than or equal to the value | `company.shareCapital.lte=100000` |\n\nWith `in` and `some`, a record needs to match only one of the values; with `nin` and `none`, it is excluded if it matches any of them. Different filters combine with AND, so a record must satisfy all of them. `gte` and `lte` include the value itself, and using both on the same field sets a closed range. On fields that are lists, such as phones, they compare the number of items: `phones.gte=1` returns records with at least one phone.\n\nMulti-value filters accept comma-separated values, a repeated parameter or both: `address.state.in=SP,RJ` is the same as `address.state.in=SP&address.state.in=RJ`. Since a comma always separates values, it cannot be part of a term.\n\nValues follow the format of the fields in responses:\n\n- Dates as `YYYY-MM-DD`.\n- Codes without punctuation, such as the CEP `01452922`, the CNAE `6311900` and the municipality IBGE code `3550308`.\n- Enum values exactly as listed on each parameter, such as `ACTIVE` or `MICRO`.\n\nText filters, such as those on names, and the `search` parameter ignore case and accents, so `São José` matches `sao jose`. Punctuation is removed without splitting words: `S/A` matches `SA`. Words are compared by their Portuguese stem, so `mercado` also matches `mercados`, but always as whole words: `mercado` does not match `supermercado`.\n\nIn `some` and `none`, each word counts on its own, even inside one value: `names.some=pao de queijo` matches any name containing `pao`, `de` or `queijo`. To require all words, use `search`, which returns only records containing every given word, in any order, and, with the default [sorting](#description/sorting), ranks records containing them as an exact phrase higher.\n\nOther filters do not follow these rules and compare exact values. This includes `some` and `none` on fields holding a list of values, such as phones, email domains and economic activities, which compare each whole item.\n\nThis request finds active establishments in SP or RJ, opened in 2020, with `padaria` or `confeitaria` in the legal name or trade name:\n\n```http\nGET /v2/establishments?status.code.in=ACTIVE&address.state.in=SP,RJ&incorporationDate.gte=2020-01-01&incorporationDate.lte=2020-12-31&names.some=padaria,confeitaria HTTP/1.1\nHost: api.cnpja.com\nAuthorization: YOUR_API_KEY\n```\n\nSome searches, such as [Search lists](#tag/lists/GET/v2/lists), accept only part of these filters or follow their own text matching rules, described in each operation's documentation.\n\n---\n\n### Sorting\n\nSearch operations accept `sort`, which sets the field used to order records, and `order`, which sets the direction: `ASC` for ascending or `DESC` for descending. Each operation lists the fields available in `sort` and which one is the default. When `order` is omitted, each field follows its own default direction, given in its description: relevance, dates, amounts and counts start from the highest value, while names and codes start from the lowest.\n\nRecords with the same value in the chosen field follow a fixed tiebreaker, described in each operation's documentation, so the order is the same on every page.\n\nThis request returns establishments in SP, starting from the most recently opened:\n\n```http\nGET /v2/establishments?address.state.in=SP&sort=incorporationDate HTTP/1.1\nHost: api.cnpja.com\nAuthorization: YOUR_API_KEY\n```\n\nText fields are compared by character code, without ignoring case or accents: uppercase letters come before lowercase ones, and accented letters come after both. This does not apply to [Search lists](#tag/lists/GET/v2/lists).\n\n---\n\n### Pagination\n\nSearch operations, such as [Search CNPJ](#tag/establishments/GET/v2/establishments), return their results in pages. The first request defines the search, and you read the following pages with a cursor, without repeating the filters.\n\nUse `limit` to set how many records each page holds, from `1` to `1000`. The default is `10`. Larger pages mean fewer requests to read a full result, and [compression](#description/compression) greatly reduces their size.\n\nEvery paginated response has the same format:\n\n- `records` holds the records of the page. The last page may hold fewer than `limit`.\n- `total` is the number of records matching the search, across all pages.\n- `limit` echoes the page size in effect.\n- `nextCursor` identifies the next page, or is `null` when there are no more pages.\n\nA search with no matches returns `200` with empty `records`, `total` set to `0` and `nextCursor` set to `null`.\n\nTo read a full result, send the first request with the filters and `limit` you want:\n\n```http\nGET /v2/establishments?address.state.in=SP&status.code.in=ACTIVE&limit=100 HTTP/1.1\nHost: api.cnpja.com\nAuthorization: YOUR_API_KEY\n```\n\nThen send the `nextCursor` from each response as `cursor` to the same operation, with no other parameter, until `nextCursor` is `null`:\n\n```http\nGET /v2/establishments?cursor=9ed11ce29dc14f9c78304c1a403e9f85 HTTP/1.1\nHost: api.cnpja.com\nAuthorization: YOUR_API_KEY\n```\n\nThe cursor follows these rules:\n\n- It keeps the filters, `sort`, `order` and `limit` of the first request. To change any of them, start a new search.\n- It must be the only parameter. Combined with any other, including `limit`, the request fails with `400` `REQUEST_VALIDATION_FAILED`.\n- It is valid for 15 minutes from the response that returned it and can be reused within that time, for example to retry a page after a network failure.\n- Each page returns a new `nextCursor` with its own validity. The 15-minute limit applies between one page and the next, not to the whole read.\n\nAn expired or unknown cursor returns `400` `PAGE_CURSOR_INVALID`. A cursor cannot be renewed: start again from the first request, with the same filters.\n\nPagination does not freeze results. If data changes while you read, records can move and appear on two pages or on none, and `total` can vary from one page to the next. The number of pages, however, is set by the first response: a page can come back short or empty before the end, and new records may be left out. So keep going until `nextCursor` is `null` and, if your process cannot handle repeats, drop duplicates by each record's identifier, such as `taxId` for establishments.\n\n---\n\n### Compression\n\nThe API can compress response bodies to reduce the amount of data transferred. The benefit is greatest on searches, where a single page can hold up to 1,000 records, and on integrations with a high request volume.\n\nTo receive compressed responses, list the encodings your client accepts in the `Accept-Encoding` header. The API supports `zstd`, `br`, `gzip` and `deflate`, picks one of the encodings you listed and reports it in the `Content-Encoding` response header. When that header is absent, the body was sent uncompressed.\n\n```http\nGET /v2/establishments?address.state.in=SP&limit=1000 HTTP/1.1\nHost: api.cnpja.com\nAuthorization: YOUR_API_KEY\nAccept-Encoding: zstd, br, gzip\n```\n\n- JSON responses are compressed, except very small ones, such as most error responses, where the gain would be negligible.\n- Files, such as PDFs and images, are sent uncompressed.\n- Without `Accept-Encoding`, no response is compressed.\n\nMany HTTP clients send `Accept-Encoding` and decompress responses automatically. Others need configuration, such as curl, which requires the `--compressed` option. If you set `Accept-Encoding` yourself, list only encodings your client can decode and make sure it still decompresses the response, since some clients only do so when they add the header themselves.\n\nRequest bodies can also be sent compressed, which helps, for example, when sending large lists to [Create list](#tag/lists/POST/v2/lists). Compress the JSON with one of the same encodings, declare it in the `Content-Encoding` request header and keep `Content-Type: application/json`. The 50 MB body limit described in [usage limits](#description/usage-limits) applies to the decompressed JSON.\n\n---\n\n### Language\n\nSome of the response content is text meant for display, such as the description of a CNPJ's registration status or an error message. This text is available in Portuguese and English, and you choose the language with the `Accept-Language` header, sending `pt-BR` or `en-US`.\n\n```http\nGET /v2/establishments/37335118000180 HTTP/1.1\nHost: api.cnpja.com\nAuthorization: YOUR_API_KEY\nAccept-Language: en-US\n```\n\nIn the response, the registration status text comes in English, while its code stays the same in any language:\n\n```json\n{\n  \"status\": {\n    \"code\": \"ACTIVE\",\n    \"label\": \"Active\"\n  }\n}\n```\n\nOnly these two exact tags are recognized. Tags without a region, such as `en` or `pt`, are ignored, and responses use `pt-BR` when the header is missing or has no recognized tag. Send only one of the two tags, with no other languages in the same header, to get the expected language.\n\nThe chosen language affects:\n\n- `label` fields, which give a readable description of the `code` next to them, such as the registration status, the company size or an economic activity.\n- The `message` field of error responses, including the validation failures listed in `errors`. A message with no translation for the chosen language is returned in English.\n\nThe language does not affect codes, field names, enum values, dates or numbers. Data from official sources, such as legal names, person names, streets and cities, is returned as registered, regardless of the language.\n\n> [!IMPORTANT]\n> Fields named `label` or `message` exist for display only. Their text depends on the response language and may change without notice. Never use them in program logic: rely on the `code` field next to them, present in every object that has a `label`.\n"},"servers":[{"url":"https://api.cnpja.com"}],"paths":{"/v2/companies/{id}":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyDto"}}},"description":"Request successful."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDto"}}},"description":"Malformed request."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDto"}}},"description":"Missing or invalid API key."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredErrorDto"}}},"description":"Query quota or overage budget exceeded."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}},"description":"Requested entity not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsErrorDto"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDto"}}},"description":"Unexpected internal error."},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayTimeoutErrorDto"}}},"description":"Request timed out."}},"summary":"Lookup company","description":"Returns the company of a CNPJ root, with its registration data, tax regime, partners and a summary of each establishment. To find companies without knowing the root, use the `company.*` filters of [Search CNPJ](#tag/establishments/GET/v2/establishments).\n\n#### Datasources\n\n- Registration data, partners and establishments come from the [CNPJ open data](https://dados.gov.br/dados/conjuntos-dados/cadastro-nacional-da-pessoa-juridica---cnpj), updated with each Receita Federal release, and from live queries of the company's CNPJs at the [Receita Federal CNPJ registry](https://solucoes.receita.fazenda.gov.br/Servicos/cnpjreva/).\n- In `taxRegime`, the Simples Nacional and SIMEI option comes from CNPJ open data and from live queries at the [Simples Nacional](https://consopt.www8.receita.fazenda.gov.br/consultaoptantes), and the IBS and CBS regular regime option only from these live queries; when the company is not a Simples Nacional optant, the declared regime, such as actual or presumed profit, comes from the latest release of the Escrituração Contábil Fiscal (ECF).\n\n#### Billing\n\n- Each `200` response consumes one cached query, regardless of how many partners and establishments are returned.\n- A `404` `COMPANY_NOT_FOUND` also consumes one cached query.\n\n#### Remarks\n\n- To update the company, or add it to cached data when it is not there yet, look up one of its CNPJs with [Lookup CNPJ](#tag/establishments/GET/v2/establishments/{taxId}): when the CNPJ's cached data is older than `maxAge` or does not exist yet, the live query updates the company's registration data and partners, as well as the queried establishment.\n","parameters":[{"required":true,"in":"path","name":"id","description":"Company registration number, equivalent to the first 8 characters of the CNPJ.","schema":{"type":"string","minLength":8,"maxLength":8,"pattern":"^[\\dA-Z]+$","example":"37335118"}}],"tags":["Companies"],"operationId":"readCompanyById"}},"/v2/establishments/{taxId}":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstablishmentDto"}}},"description":"Request successful."},"206":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstablishmentDto"}}},"description":"Request partially successful."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDto"}}},"description":"Malformed request."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDto"}}},"description":"Missing or invalid API key."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredErrorDto"}}},"description":"Query quota or overage budget exceeded."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}},"description":"Requested entity not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsErrorDto"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDto"}}},"description":"Unexpected internal error."},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayTimeoutErrorDto"}}},"description":"Request timed out."}},"summary":"Lookup CNPJ","description":"Returns the registration of a CNPJ with its company data and the optional resources requested in `expand`, from cached data or live queries, according to `maxAge`. To find establishments without knowing the CNPJ, use [Search CNPJ](#tag/establishments/GET/v2/establishments).\n\n> [!NOTE]\n> This operation also accepts public requests, without an API key, as described in [public access](#description/public-access).\n\n#### Datasources\n\n- Registration, company and partner data come from [CNPJ open data](https://dados.gov.br/dados/conjuntos-dados/cadastro-nacional-da-pessoa-juridica---cnpj), updated with each Receita Federal release, and from live queries at the [Receita Federal CNPJ registry](https://solucoes.receita.fazenda.gov.br/Servicos/cnpjreva/), made according to `maxAge` or when the CNPJ is not in cached data yet.\n- In `company.taxRegime`, the Simples Nacional and SIMEI option comes from CNPJ open data and from live queries at the [Simples Nacional](https://consopt.www8.receita.fazenda.gov.br/consultaoptantes), and the IBS and CBS regular regime option only from these live queries; when the company is not a Simples Nacional optant, the declared regime, such as actual or presumed profit, comes from the latest release of the Escrituração Contábil Fiscal (ECF).\n- With `company.taxRegime.view=DETAILED`, `company.taxRegime.regularIbsStartDate` and `company.taxRegime.regularCbsStartDate` come from live queries at the [Simples Nacional](https://consopt.www8.receita.fazenda.gov.br/consultaoptantes), and `company.taxRegime.timeline` from these live queries and from the Escrituração Contábil Fiscal (ECF) releases.\n- `stateRegistry` comes from the [Cadastro Centralizado de Contribuintes](https://dfe-portal.svrs.rs.gov.br/Nfe/Ccc) and is updated only by live queries.\n- `suframa` comes from live queries at the [SUFRAMA registry](https://www4.suframa.gov.br/cadsuf/#/menu-externo).\n- `address.coordinates` comes from live queries at [Google Maps](https://www.google.com/maps) for the registered address, or for its district when no address result is in the registered city, centered on the municipality seat and kept only when they fall inside the municipality boundaries published by IBGE; otherwise, the IBGE municipal seat is used. For addresses without a municipality, such as those located abroad, the queries are biased towards the address country and kept only when they fall inside it, with no seat fallback. `address.coordinates.precision` tells which one applies: `ADDRESS`, `DISTRICT` or `MUNICIPALITY`.\n\n#### Billing\n\n- Registration data: one query.\n- `company.taxRegime`: one query.\n- `stateRegistry` with `SUMMARY`: one query.\n- `stateRegistry` with `DETAILED`: one query per registration in each requested state, with a minimum of one per state.\n- `suframa`: one query.\n- `address.coordinates`: one query.\n- For addresses without a municipality, such as those located abroad, each request with `address.coordinates` consumes a live query while the address cannot be located.\n- A `404` consumes one live query.\n\n> [!WARNING]\n> With `stateRegistry.view=DETAILED`, each requested state where the CNPJ has no registration consumes a live query on every request, regardless of the age limit. With `stateRegistry.states=ALL`, a CNPJ with no registration at all consumes 27 live queries per request, so request only the states you need.\n\n#### Remarks\n\n- With `company.taxRegime.view=DETAILED`, the age counts only from the last live query at the Simples Nacional, which can require a live query where `SUMMARY` would come from cached data.\n- With `stateRegistry.view=SUMMARY`, the age of `stateRegistry.updatedAt` applies, and only the establishment's state is queried live. In this query, if the CNPJ has a registration in the establishment's state, the registrations in the other states are also refreshed; otherwise, they come from cached data only.\n- With `stateRegistry.view=DETAILED`, each requested state has its age checked and is queried live separately when needed.\n- `address.coordinates` does not follow `maxAge`: the coordinates are computed once and recomputed only when the registered address changes, or, for addresses without a municipality, on every request while the address has not been located.\n","parameters":[{"required":true,"in":"path","name":"taxId","description":"National Registry of Legal Entities (CNPJ) registration number.","schema":{"type":"string","minLength":14,"format":"cnpj","maxLength":14,"example":"37335118000180"}},{"in":"query","required":false,"name":"expand","description":"Additional resources to include in the response, comma separated.","schema":{"type":"array","items":{"type":"string","enum":["address.coordinates","company.taxRegime","stateRegistry","suframa"],"x-enumDescriptions":{"company.taxRegime":"Tax regime","stateRegistry":"State registrations","suframa":"SUFRAMA registrations","address.coordinates":"Address coordinates"}},"example":["company.taxRegime","stateRegistry"],"uniqueItems":true}},{"in":"query","required":false,"name":"maxAge","description":"Maximum accepted age for cached data, expressed as a duration. If the cached information is\nolder than this limit, a live query is forced. Accepted suffixes: y (years), w (weeks), d (days),\nh (hours), m (minutes). Examples: 1y, 4w, 14d, 8h, 45m.","schema":{"type":"string","example":"45d","default":"45d","pattern":"^\\d{1,3}[ywdhm]$"}},{"in":"query","required":false,"name":"company.taxRegime.view","description":"Level of detail of the information regarding the company tax regime.","schema":{"type":"string","example":"DETAILED","default":"SUMMARY","enum":["SUMMARY","DETAILED"],"x-enumDescriptions":{"SUMMARY":"Regime type, Simples Nacional and MEI option","DETAILED":"Regime type, Simples Nacional, MEI and IBS/CBS regular regime option, previous periods and upcoming events"}}},{"in":"query","required":false,"name":"company.taxRegime.maxAge","description":"Maximum accepted age for cached tax regime data, expressed as a duration. Overrides `maxAge`\nfor this resource. If omitted, the value of `maxAge` is adopted.","schema":{"type":"string","example":"45d","pattern":"^\\d{1,3}[ywdhm]$"}},{"in":"query","required":false,"name":"stateRegistry.states","description":"States to be considered when obtaining the state registrations. Values add up: `ORIGIN,SP` requests\nthe establishment's state and also SP.","schema":{"type":"array","items":{"default":["ORIGIN"],"enum":["ORIGIN","ALL","AC","AL","AM","AP","BA","CE","DF","ES","GO","MA","MG","MS","MT","PA","PB","PE","PI","PR","RJ","RN","RO","RR","RS","SC","SE","SP","TO"],"type":"string","x-enumDescriptions":{"ORIGIN":"Same state as the establishment registration","ALL":"All states","AC":"Acre","AL":"Alagoas","AM":"Amazonas","AP":"Amapá","BA":"Bahia","CE":"Ceará","DF":"Distrito Federal","ES":"Espírito Santo","GO":"Goiás","MA":"Maranhão","MG":"Minas Gerais","MS":"Mato Grosso do Sul","MT":"Mato Grosso","PA":"Pará","PB":"Paraíba","PE":"Pernambuco","PI":"Piauí","PR":"Paraná","RJ":"Rio de Janeiro","RN":"Rio Grande do Norte","RO":"Rondônia","RR":"Roraima","RS":"Rio Grande do Sul","SC":"Santa Catarina","SE":"Sergipe","SP":"São Paulo","TO":"Tocantins"}},"example":["SP","RJ"]}},{"in":"query","required":false,"name":"stateRegistry.view","description":"Level of detail of the information regarding the state registrations.","schema":{"type":"string","example":"DETAILED","default":"SUMMARY","enum":["SUMMARY","DETAILED"],"x-enumDescriptions":{"SUMMARY":"Number, state, type and status","DETAILED":"Number, state, type, status, activity, address, sublimit and authorized documents"}}},{"in":"query","required":false,"name":"stateRegistry.maxAge","description":"Maximum accepted age for cached state registration data, expressed as a duration. Overrides\n`maxAge` for this resource. If omitted, the value of `maxAge` is adopted.","schema":{"type":"string","example":"45d","pattern":"^\\d{1,3}[ywdhm]$"}},{"in":"query","required":false,"name":"suframa.maxAge","description":"Maximum accepted age for cached SUFRAMA registration data, expressed as a duration. Overrides\n`maxAge` for this resource. If omitted, the value of `maxAge` is adopted.","schema":{"type":"string","example":"45d","pattern":"^\\d{1,3}[ywdhm]$"}}],"tags":["Establishments"],"operationId":"readEstablishmentByTaxId"}},"/v2/establishments":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstablishmentPageDto"}}},"description":"Request successful."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDto"}}},"description":"Malformed request."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDto"}}},"description":"Missing or invalid API key."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredErrorDto"}}},"description":"Query quota or overage budget exceeded."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}},"description":"Requested entity not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsErrorDto"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDto"}}},"description":"Unexpected internal error."},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayTimeoutErrorDto"}}},"description":"Request timed out."}},"summary":"Search CNPJ","description":"Returns, in [pages](#description/pagination), the establishments that match the given [filters](#description/search-filters), from cached data. For a CNPJ you already know, use [Lookup CNPJ](#tag/establishments/GET/v2/establishments/{taxId}), which also accepts `maxAge` and optional resources.\n\n#### Datasources\n\n- Returned data and the data used by filters and `search` combine [CNPJ open data](https://dados.gov.br/dados/conjuntos-dados/cadastro-nacional-da-pessoa-juridica---cnpj), updated with each Receita Federal release, and the results of live CNPJ queries at the [Receita Federal CNPJ registry](https://solucoes.receita.fazenda.gov.br/Servicos/cnpjreva/).\n- The `company.taxRegime` filters use the Simples Nacional and SIMEI option from CNPJ open data and from live queries at the [Simples Nacional](https://consopt.www8.receita.fazenda.gov.br/consultaoptantes), the IBS and CBS regular regime option only from these live queries and, for companies that are not Simples Nacional optants, the regime declared in the latest release of the Escrituração Contábil Fiscal (ECF).\n\n#### Billing\n\n- One cached query per record returned, with a minimum of one per search, even when no record is found.\n\n#### Remarks\n\n- `lists.some` and `lists.none` use the content of the lists at the time of each request: CNPJs added with [Update list](#tag/lists/PATCH/v2/lists/{listId}) take effect immediately.\n- `lists.some` and `lists.none` accept only lists of your organization. A list that does not exist fails with `400` `REQUEST_VALIDATION_FAILED`.\n- With the default `sort=relevance`, records containing the terms as an exact phrase come first when `search` has more than one word; then records follow a relevance that favors head offices, active establishments and larger companies. With any `sort`, ties follow ascending `taxId`.\n","parameters":[{"in":"query","required":false,"name":"cursor","description":"Pagination token, mutually exclusive with other properties.","schema":{"type":"string","maxLength":32,"minLength":32}},{"in":"query","required":false,"name":"limit","description":"Number of records to be read per page.","schema":{"type":"integer","maximum":1000,"minimum":1,"default":10,"multipleOf":1}},{"in":"query","required":false,"name":"search","description":"Free-text search term. Matches records whose tax ID, legal name, trade name, phones, emails or\naddress contain the given value.","schema":{"type":"string","example":"cnpja faria lima","minLength":1}},{"in":"query","required":false,"name":"sort","description":"Field used to sort records.","schema":{"type":"string","example":"incorporationDate","default":"relevance","enum":["relevance","taxId","incorporationDate","company.shareCapital","company.legalName"],"x-enumDescriptions":{"relevance":"Relevance, descending by default","taxId":"Tax ID, ascending by default","incorporationDate":"Incorporation date, descending by default","company.shareCapital":"Share capital, descending by default","company.legalName":"Legal name, ascending by default"}}},{"in":"query","required":false,"name":"order","description":"Sort direction. When omitted, follows the default direction of the field in `sort`.","schema":{"type":"string","example":"DESC","enum":["ASC","DESC"],"x-enumDescriptions":{"ASC":"Ascending","DESC":"Descending"}}},{"in":"query","required":false,"name":"names.some","description":"Terms to be included in the legal name or trade name, separated by comma. Matches records\ncontaining any of the given words.","schema":{"type":"array","items":{"type":"string"},"example":["borracharia","pneu"]}},{"in":"query","required":false,"name":"names.none","description":"Terms to be excluded from the legal name or trade name, separated by comma. Removes records\ncontaining any of the given words.","schema":{"type":"array","items":{"type":"string"},"example":["eireli","ltda"]}},{"in":"query","required":false,"name":"incorporationDate.gte","description":"Incorporation date greater than or equal to the date specified.","schema":{"type":"string","example":"2020-01-01","format":"date"}},{"in":"query","required":false,"name":"incorporationDate.lte","description":"Incorporation date less than or equal to the date specified.","schema":{"type":"string","example":"2020-12-31","format":"date"}},{"in":"query","required":false,"name":"company.id.in","description":"Company registration numbers to be included, separated by comma.","schema":{"type":"array","items":{"maxLength":8,"minLength":8,"type":"string"},"example":["37335118"]}},{"in":"query","required":false,"name":"company.legalName.some","description":"Terms to be included in the legal name, separated by comma. Matches records containing any\nof the given words.","schema":{"type":"array","items":{"type":"string"},"example":["tecnologia","software"]}},{"in":"query","required":false,"name":"company.legalName.none","description":"Terms to be excluded from the legal name, separated by comma. Removes records containing any\nof the given words.","schema":{"type":"array","items":{"type":"string"},"example":["s/a"]}},{"in":"query","required":false,"name":"company.shareCapital.gte","description":"Share capital greater than or equal to the value specified.","schema":{"type":"number","example":10000,"minimum":0}},{"in":"query","required":false,"name":"company.shareCapital.lte","description":"Share capital less than or equal to the value specified.","schema":{"type":"number","example":1000000,"minimum":0}},{"in":"query","required":false,"name":"company.legalNature.code.in","description":"Codes of legal natures to be included, separated by comma.","schema":{"type":"array","items":{"maxLength":4,"minLength":4,"type":"string"},"example":["2062","2135"]}},{"in":"query","required":false,"name":"company.legalNature.code.nin","description":"Codes of legal natures to be excluded, separated by comma.","schema":{"type":"array","items":{"maxLength":4,"minLength":4,"type":"string"},"example":["2135"]}},{"in":"query","required":false,"name":"company.size.code.in","description":"Codes of company sizes to be included, separated by comma.","schema":{"type":"array","items":{"type":"string","enum":["MICRO","SMALL","OTHER"],"x-enumDescriptions":{"MICRO":"Microenterprise","SMALL":"Small-sized Company","OTHER":"Others"}},"example":["MICRO","SMALL"]}},{"in":"query","required":false,"name":"company.taxRegime.type.code.in","description":"Codes of tax regime types to be included, separated by comma.","schema":{"type":"array","items":{"type":"string","enum":["ACTUAL_PROFIT","PRESUMED_PROFIT","ARBITRATED_PROFIT","SIMPLES_NACIONAL","SIMPLES_NACIONAL_HYBRID","SIMPLES_NACIONAL_SIMEI","NOT_APPLICABLE"],"x-enumDescriptions":{"ACTUAL_PROFIT":"Actual Profit","PRESUMED_PROFIT":"Presumed Profit","ARBITRATED_PROFIT":"Arbitrated Profit","SIMPLES_NACIONAL":"Simples Nacional","SIMPLES_NACIONAL_HYBRID":"Simples Nacional Hybrid","SIMPLES_NACIONAL_SIMEI":"SIMEI","NOT_APPLICABLE":"Not Applicable"}},"example":["ACTUAL_PROFIT","PRESUMED_PROFIT"]}},{"in":"query","required":false,"name":"company.taxRegime.simplesNacionalStartDate.gte","description":"Date of inclusion of the current period in Simples Nacional greater than or equal to the date specified.","schema":{"type":"string","example":"2018-01-01","format":"date"}},{"in":"query","required":false,"name":"company.taxRegime.simplesNacionalStartDate.lte","description":"Date of inclusion of the current period in Simples Nacional less than or equal to the date specified.","schema":{"type":"string","example":"2020-12-31","format":"date"}},{"in":"query","required":false,"name":"company.taxRegime.simeiStartDate.gte","description":"Date of inclusion of the current period in SIMEI greater than or equal to the date specified.","schema":{"type":"string","example":"2018-01-01","format":"date"}},{"in":"query","required":false,"name":"company.taxRegime.simeiStartDate.lte","description":"Date of inclusion of the current period in SIMEI less than or equal to the date specified.","schema":{"type":"string","example":"2020-12-31","format":"date"}},{"in":"query","required":false,"name":"company.taxRegime.regularIbsStartDate.gte","description":"Date of inclusion of the current period in the IBS regular regime greater than or equal to the date specified.","schema":{"type":"string","example":"2027-01-01","format":"date"}},{"in":"query","required":false,"name":"company.taxRegime.regularIbsStartDate.lte","description":"Date of inclusion of the current period in the IBS regular regime less than or equal to the date specified.","schema":{"type":"string","example":"2027-12-31","format":"date"}},{"in":"query","required":false,"name":"company.taxRegime.regularCbsStartDate.gte","description":"Date of inclusion of the current period in the CBS regular regime greater than or equal to the date specified.","schema":{"type":"string","example":"2027-01-01","format":"date"}},{"in":"query","required":false,"name":"company.taxRegime.regularCbsStartDate.lte","description":"Date of inclusion of the current period in the CBS regular regime less than or equal to the date specified.","schema":{"type":"string","example":"2027-12-31","format":"date"}},{"in":"query","required":false,"name":"type.code.in","description":"Codes of establishment types to be included, separated by comma.","schema":{"type":"array","items":{"type":"string","enum":["HEAD","BRANCH"],"x-enumDescriptions":{"HEAD":"Head Establishment","BRANCH":"Branch"}},"example":["HEAD"]}},{"in":"query","required":false,"name":"tradeName.some","description":"Terms to be included in the trade name, separated by comma. Matches records containing any\nof the given words.","schema":{"type":"array","items":{"type":"string"},"example":["barbearia","cabelo"]}},{"in":"query","required":false,"name":"tradeName.none","description":"Terms to be excluded from the trade name, separated by comma. Removes records containing any\nof the given words.","schema":{"type":"array","items":{"type":"string"},"example":["supermercado","mercado"]}},{"in":"query","required":false,"name":"statusDate.gte","description":"Registration status date greater than or equal to the date specified.","schema":{"type":"string","example":"2018-01-01","format":"date"}},{"in":"query","required":false,"name":"statusDate.lte","description":"Registration status date less than or equal to the date specified.","schema":{"type":"string","example":"2020-12-31","format":"date"}},{"in":"query","required":false,"name":"status.code.in","description":"Codes of registration statuses to be included, separated by comma.","schema":{"type":"array","items":{"type":"string","enum":["ACTIVE","CLOSED","NONCOMPLIANT","SUSPENDED","VOID"],"x-enumDescriptions":{"ACTIVE":"Active","CLOSED":"Closed","NONCOMPLIANT":"Noncompliant","SUSPENDED":"Suspended","VOID":"Void"}},"example":["ACTIVE"]}},{"in":"query","required":false,"name":"statusReason.code.in","description":"Codes of registration status reasons to be included, separated by comma.","schema":{"type":"array","items":{"maxLength":2,"minLength":2,"type":"string"},"example":["01"]}},{"in":"query","required":false,"name":"specialStatusDate.gte","description":"Special status date greater than or equal to the date specified.","schema":{"type":"string","example":"2018-01-01","format":"date"}},{"in":"query","required":false,"name":"specialStatusDate.lte","description":"Special status date less than or equal to the date specified.","schema":{"type":"string","example":"2020-12-31","format":"date"}},{"in":"query","required":false,"name":"specialStatus.code.in","description":"Codes of special registration statuses to be included, separated by comma.","schema":{"type":"array","items":{"maxLength":3,"minLength":3,"type":"string"},"example":["405","418"]}},{"in":"query","required":false,"name":"address.street.in","description":"Street names to be included, separated by comma.","schema":{"type":"array","items":{"type":"string"},"example":["Avenida Paulista","Rua Augusta"]}},{"in":"query","required":false,"name":"address.street.nin","description":"Street names to be excluded, separated by comma.","schema":{"type":"array","items":{"type":"string"},"example":["Rua Augusta"]}},{"in":"query","required":false,"name":"address.number.in","description":"Street numbers to be included, separated by comma.","schema":{"type":"array","items":{"type":"string"},"example":["2369"]}},{"in":"query","required":false,"name":"address.number.nin","description":"Street numbers to be excluded, separated by comma.","schema":{"type":"array","items":{"type":"string"},"example":["s/n","sn"]}},{"in":"query","required":false,"name":"address.details.in","description":"Address complements to be included, separated by comma.","schema":{"type":"array","items":{"type":"string"},"example":["Conj 1102","Sala 101"]}},{"in":"query","required":false,"name":"address.details.nin","description":"Address complements to be excluded, separated by comma.","schema":{"type":"array","items":{"type":"string"},"example":["Loja 1"]}},{"in":"query","required":false,"name":"address.district.in","description":"Districts to be included, separated by comma.","schema":{"type":"array","items":{"type":"string"},"example":["Pinheiros","Jardim Paulistano"]}},{"in":"query","required":false,"name":"address.district.nin","description":"Districts to be excluded, separated by comma.","schema":{"type":"array","items":{"type":"string"},"example":["Centro"]}},{"in":"query","required":false,"name":"address.state.in","description":"Federal units to be included, separated by comma.","schema":{"type":"array","items":{"type":"string","enum":["AC","AL","AM","AP","BA","CE","DF","ES","GO","MA","MG","MS","MT","PA","PB","PE","PI","PR","RJ","RN","RO","RR","RS","SC","SE","SP","TO"],"x-enumDescriptions":{"AC":"Acre","AL":"Alagoas","AM":"Amazonas","AP":"Amapá","BA":"Bahia","CE":"Ceará","DF":"Distrito Federal","ES":"Espírito Santo","GO":"Goiás","MA":"Maranhão","MG":"Minas Gerais","MS":"Mato Grosso do Sul","MT":"Mato Grosso","PA":"Pará","PB":"Paraíba","PE":"Pernambuco","PI":"Piauí","PR":"Paraná","RJ":"Rio de Janeiro","RN":"Rio Grande do Norte","RO":"Rondônia","RR":"Roraima","RS":"Rio Grande do Sul","SC":"Santa Catarina","SE":"Sergipe","SP":"São Paulo","TO":"Tocantins"}},"example":["SP","RJ"]}},{"in":"query","required":false,"name":"address.postalCode.in","description":"Postal codes to be included, separated by comma.","schema":{"type":"array","items":{"maxLength":8,"minLength":8,"type":"string"},"example":["01452922","01310100"]}},{"in":"query","required":false,"name":"address.postalCode.gte","description":"Postal code greater than or equal to the value specified.","schema":{"type":"string","example":"01000000","maxLength":8,"minLength":8}},{"in":"query","required":false,"name":"address.postalCode.lte","description":"Postal code less than or equal to the value specified.","schema":{"type":"string","example":"05999999","maxLength":8,"minLength":8}},{"in":"query","required":false,"name":"address.municipality.in","description":"Codes of municipalities to be included, separated by comma.","schema":{"type":"array","items":{"maxLength":7,"minLength":7,"type":"string"},"example":["3550308","3304557"]}},{"in":"query","required":false,"name":"address.municipality.nin","description":"Codes of municipalities to be excluded, separated by comma.","schema":{"type":"array","items":{"maxLength":7,"minLength":7,"type":"string"},"example":["3304557"]}},{"in":"query","required":false,"name":"address.country.code.in","description":"Alpha-2 codes of countries to be included, separated by comma.","schema":{"type":"array","items":{"maxLength":2,"minLength":2,"type":"string"},"example":["AR","US"]}},{"in":"query","required":false,"name":"address.country.code.nin","description":"Alpha-2 codes of countries to be excluded, separated by comma.","schema":{"type":"array","items":{"maxLength":2,"minLength":2,"type":"string"},"example":["BR"]}},{"in":"query","required":false,"name":"phones.gte","description":"Number of phones greater than or equal to the value specified.","schema":{"type":"integer","example":1,"minimum":0,"multipleOf":1}},{"in":"query","required":false,"name":"phones.lte","description":"Number of phones less than or equal to the value specified.","schema":{"type":"integer","example":2,"minimum":0,"multipleOf":1}},{"in":"query","required":false,"name":"phones.type.code.some","description":"Codes of phone types to be included, separated by comma.","schema":{"type":"array","items":{"type":"string","enum":["LANDLINE","MOBILE"],"x-enumDescriptions":{"LANDLINE":"Landline","MOBILE":"Mobile"}},"example":["MOBILE"]}},{"in":"query","required":false,"name":"phones.area.some","description":"Area codes (DDD) to be included, separated by comma.","schema":{"type":"array","items":{"maxLength":2,"minLength":2,"type":"string"},"example":["11","21"]}},{"in":"query","required":false,"name":"phones.area.none","description":"Area codes (DDD) to be excluded, separated by comma.","schema":{"type":"array","items":{"maxLength":2,"minLength":2,"type":"string"},"example":["11"]}},{"in":"query","required":false,"name":"phones.number.some","description":"Phone numbers in E.164 format to be included, separated by comma.","schema":{"type":"array","items":{"pattern":"^\\+[1-9]\\d{10,14}$","type":"string"},"example":["+5511971564144"]}},{"in":"query","required":false,"name":"phones.number.none","description":"Phone numbers in E.164 format to be excluded, separated by comma.","schema":{"type":"array","items":{"pattern":"^\\+[1-9]\\d{10,14}$","type":"string"},"example":["+5511971564144"]}},{"in":"query","required":false,"name":"emails.gte","description":"Number of emails greater than or equal to the value specified.","schema":{"type":"integer","example":1,"minimum":0,"multipleOf":1}},{"in":"query","required":false,"name":"emails.lte","description":"Number of emails less than or equal to the value specified.","schema":{"type":"integer","example":2,"minimum":0,"multipleOf":1}},{"in":"query","required":false,"name":"emails.type.code.some","description":"Codes of email types to be included, separated by comma.","schema":{"type":"array","items":{"type":"string","enum":["ACADEMIC","ACCOUNTING","CORPORATE","CONSUMER","GOVERNMENT"],"x-enumDescriptions":{"ACADEMIC":"Academic","ACCOUNTING":"Accounting","CORPORATE":"Corporate","CONSUMER":"Consumer","GOVERNMENT":"Government"}},"example":["CORPORATE"]}},{"in":"query","required":false,"name":"emails.address.some","description":"Email addresses to be included, separated by comma.","schema":{"type":"array","items":{"format":"email","type":"string"},"example":["contato@cnpja.com"]}},{"in":"query","required":false,"name":"emails.address.none","description":"Email addresses to be excluded, separated by comma.","schema":{"type":"array","items":{"format":"email","type":"string"},"example":["contato@cnpja.com"]}},{"in":"query","required":false,"name":"emails.domain.some","description":"Email domains to be included, separated by comma.","schema":{"type":"array","items":{"type":"string"},"example":["cnpja.com"]}},{"in":"query","required":false,"name":"emails.domain.none","description":"Email domains to be excluded, separated by comma.","schema":{"type":"array","items":{"type":"string"},"example":["gmail.com","hotmail.com"]}},{"in":"query","required":false,"name":"economicActivities.code.some","description":"Codes of primary or secondary economic activities to be included, separated by comma.","schema":{"type":"array","items":{"maxLength":7,"minLength":7,"type":"string"},"example":["6311900","6201501"]}},{"in":"query","required":false,"name":"economicActivities.code.none","description":"Codes of primary or secondary economic activities to be excluded, separated by comma.","schema":{"type":"array","items":{"maxLength":7,"minLength":7,"type":"string"},"example":["4781400"]}},{"in":"query","required":false,"name":"primaryActivity.code.in","description":"Codes of primary economic activities to be included, separated by comma.","schema":{"type":"array","items":{"maxLength":7,"minLength":7,"type":"string"},"example":["6311900"]}},{"in":"query","required":false,"name":"primaryActivity.code.nin","description":"Codes of primary economic activities to be excluded, separated by comma.","schema":{"type":"array","items":{"maxLength":7,"minLength":7,"type":"string"},"example":["4781400"]}},{"in":"query","required":false,"name":"secondaryActivities.code.some","description":"Codes of secondary economic activities to be included, separated by comma.","schema":{"type":"array","items":{"maxLength":7,"minLength":7,"type":"string"},"example":["6201501"]}},{"in":"query","required":false,"name":"secondaryActivities.code.none","description":"Codes of secondary economic activities to be excluded, separated by comma.","schema":{"type":"array","items":{"maxLength":7,"minLength":7,"type":"string"},"example":["4781400"]}},{"in":"query","required":false,"name":"lists.some","description":"Identifiers of tax ID lists whose establishments are to be included, separated by comma.","schema":{"type":"array","items":{"format":"uuid","type":"string"},"example":["b7736fa2-fb08-4b39-a8ff-26e8a53d36c3"]}},{"in":"query","required":false,"name":"lists.none","description":"Identifiers of tax ID lists whose establishments are to be excluded, separated by comma.","schema":{"type":"array","items":{"format":"uuid","type":"string"},"example":["37505509-b2a5-42c2-94f4-aa99d2033bf5"]}}],"tags":["Establishments"],"operationId":"readEstablishments"}},"/v2/establishments/{taxId}/dossier":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstablishmentDto"}},"*/*":{"schema":{}}},"description":"Request successful.","headers":{"Content-Type":{"example":"application/pdf","schema":{"type":"string"}}}},"206":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstablishmentDto"}}},"description":"Request partially successful."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDto"}}},"description":"Malformed request."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDto"}}},"description":"Missing or invalid API key."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredErrorDto"}}},"description":"Query quota or overage budget exceeded."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}},"description":"Requested entity not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsErrorDto"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDto"}}},"description":"Unexpected internal error."},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayTimeoutErrorDto"}}},"description":"Request timed out."}},"summary":"Issue CNPJ dossier","description":"Returns a single PDF file with the CNPJ certificates chosen in `certificates`. For a CPF, use [Issue CPF dossier](#tag/individuals/GET/v2/individuals/{taxId}/dossier).\n\n#### Datasources\n\n- `RFB_REGISTRATION` and `RFB_PARTNERS` come from the same live query at the [Receita Federal CNPJ registry](https://solucoes.receita.fazenda.gov.br/Servicos/cnpjreva/).\n- `SIMPLES_NACIONAL_OPTION` comes from live queries at the [Simples Nacional](https://consopt.www8.receita.fazenda.gov.br/consultaoptantes).\n- `CCC_REGISTRATIONS` comes from live queries at the [Cadastro Centralizado de Contribuintes](https://dfe-portal.svrs.rs.gov.br/Nfe/Ccc), in the establishment's state.\n- `SUFRAMA_REGISTRATION` comes from live queries at the [SUFRAMA registry](https://www4.suframa.gov.br/cadsuf/#/menu-externo).\n\n#### Billing\n\n- `RFB_REGISTRATION`: one query.\n- `RFB_PARTNERS`: one query.\n- `SIMPLES_NACIONAL_OPTION`: one query.\n- `CCC_REGISTRATIONS`: one query.\n- `SUFRAMA_REGISTRATION`: one query.\n- Each query can be cached or live, according to [data freshness](#description/data-freshness).\n- A `404` with `ESTABLISHMENT_NOT_FOUND` consumes one live query, made to confirm that the CNPJ is not registered with the Receita Federal.\n- A `404` with `ESTABLISHMENT_DOSSIER_EMPTY` is charged the same as a PDF with the requested certificates.\n\n> [!WARNING]\n> A certificate left out of the PDF because the official source has no record for the CNPJ is still charged, even when no certificate is left and the response is a `404`. For `SIMPLES_NACIONAL_OPTION`, the missing record is not cached, so every request consumes a live query.\n\n#### Remarks\n\n- The body of a `200` or `206` response is a PDF file (`application/pdf`).\n- A CNPJ that is not in cached data yet is queried live at the Receita Federal before the dossier is issued.\n- `RFB_REGISTRATION` and `RFB_PARTNERS` are updated only by live queries at the Receita Federal, including those made by [Lookup CNPJ](#tag/establishments/GET/v2/establishments/{taxId}), and not by CNPJ open data. So they can require a live query even when Lookup CNPJ would respond from cached data.\n- A certificate served from cached data reflects the live query that produced it, not the date of the request.\n- `CCC_REGISTRATIONS` is left out of the PDF for establishments without a state, such as those located abroad.\n- A certificate is also left out when the official source has no record for the CNPJ, such as `SUFRAMA_REGISTRATION` for an establishment not registered with SUFRAMA.\n- When every requested certificate is left out, the response is a `404` with `ESTABLISHMENT_DOSSIER_EMPTY` instead of an empty PDF.\n","parameters":[{"required":true,"in":"path","name":"taxId","description":"National Registry of Legal Entities (CNPJ) registration number.","schema":{"type":"string","minLength":14,"format":"cnpj","maxLength":14,"example":"37335118000180"}},{"in":"query","required":true,"name":"certificates","description":"Certificates to be included in the dossier, comma separated. The order of the pages in the\ndocument follows the order informed. `CCC_REGISTRATIONS` is issued only for the state of the\nestablishment's address. `SIMPLES_NACIONAL_OPTION` refers to the company and is shared by all of its\nestablishments.","schema":{"type":"array","items":{"type":"string","enum":["RFB_REGISTRATION","RFB_PARTNERS","SIMPLES_NACIONAL_OPTION","CCC_REGISTRATIONS","SUFRAMA_REGISTRATION"],"x-enumDescriptions":{"RFB_REGISTRATION":"National Registry of Legal Entities (CNPJ) registration certificate","RFB_PARTNERS":"Board of partners and administrators (QSA)","SIMPLES_NACIONAL_OPTION":"Simples Nacional optants certificate","CCC_REGISTRATIONS":"Centralized Taxpayer Registry (CCC) registrations certificate","SUFRAMA_REGISTRATION":"SUFRAMA registration certificate"}},"example":["RFB_REGISTRATION","RFB_PARTNERS"],"uniqueItems":true,"minItems":1}},{"in":"query","required":false,"name":"maxAge","description":"Maximum accepted age for cached certificates, expressed as a duration. If the cached document is\nolder than this limit, a live render is forced. Accepted suffixes: y (years), w (weeks), d (days),\nh (hours), m (minutes). Examples: 1y, 4w, 14d, 8h, 45m.","schema":{"type":"string","example":"45d","default":"45d","pattern":"^\\d{1,3}[ywdhm]$"}}],"tags":["Establishments"],"operationId":"readEstablishmentDossierByTaxId"}},"/v2/establishments/{taxId}/map":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstablishmentDto"}},"*/*":{"schema":{}}},"description":"Request successful.","headers":{"Content-Type":{"example":"image/png","schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDto"}}},"description":"Malformed request."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDto"}}},"description":"Missing or invalid API key."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredErrorDto"}}},"description":"Query quota or overage budget exceeded."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}},"description":"Requested entity not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsErrorDto"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDto"}}},"description":"Unexpected internal error."},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayTimeoutErrorDto"}}},"description":"Request timed out."}},"summary":"Render CNPJ map","description":"Returns a map image centered on the establishment's registered address, with a marker at that point. To get the latitude and longitude of the address, use `expand=address.coordinates` on [Lookup CNPJ](#tag/establishments/GET/v2/establishments/{taxId}).\n\n#### Datasources\n\n- The registered address comes from [CNPJ open data](https://dados.gov.br/dados/conjuntos-dados/cadastro-nacional-da-pessoa-juridica---cnpj) releases and from live queries at the [Receita Federal CNPJ registry](https://solucoes.receita.fazenda.gov.br/Servicos/cnpjreva/).\n- The map image is generated by [Google Maps](https://www.google.com/maps) from the registered address.\n\n#### Billing\n\n- Each generated image consumes one live query.\n- Images are not reused, so repeating the request generates and charges a new image.\n- A `404` consumes one live query, made to confirm that the CNPJ is not registered with the Receita Federal.\n\n#### Remarks\n\n- The body of a `200` response is a PNG image (`image/png`) of 640 × 640 pixels, with fixed size and zoom.\n- A CNPJ that is not in cached data yet is queried live at the Receita Federal before the image is generated.\n","parameters":[{"required":true,"in":"path","name":"taxId","description":"National Registry of Legal Entities (CNPJ) registration number.","schema":{"type":"string","minLength":14,"format":"cnpj","maxLength":14,"example":"37335118000180"}},{"in":"query","required":false,"name":"type","description":"Type of the map to be rendered.","schema":{"type":"string","example":"SATELLITE","default":"ROADMAP","enum":["ROADMAP","TERRAIN","SATELLITE","HYBRID"],"x-enumDescriptions":{"ROADMAP":"Roads","TERRAIN":"Elevation","SATELLITE":"Satellite","HYBRID":"Roads and satellite"}}}],"tags":["Establishments"],"operationId":"readEstablishmentMapByTaxId"}},"/v2/establishments/{taxId}/street-view":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstablishmentDto"}},"*/*":{"schema":{}}},"description":"Request successful.","headers":{"Content-Type":{"example":"image/jpeg","schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDto"}}},"description":"Malformed request."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDto"}}},"description":"Missing or invalid API key."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredErrorDto"}}},"description":"Query quota or overage budget exceeded."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}},"description":"Requested entity not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsErrorDto"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDto"}}},"description":"Unexpected internal error."},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayTimeoutErrorDto"}}},"description":"Request timed out."}},"summary":"Render CNPJ street view","description":"Returns a street-level image of the establishment's registered address. For a map of the area, use [Render CNPJ map](#tag/establishments/GET/v2/establishments/{taxId}/map).\n\n#### Datasources\n\n- The registered address comes from [CNPJ open data](https://dados.gov.br/dados/conjuntos-dados/cadastro-nacional-da-pessoa-juridica---cnpj) releases and from live queries at the [Receita Federal CNPJ registry](https://solucoes.receita.fazenda.gov.br/Servicos/cnpjreva/).\n- The street-level image is generated by [Google Maps](https://www.google.com/maps) from the registered address.\n\n#### Billing\n\n- Each generated image consumes one live query.\n- Images are not reused, so repeating the request generates and charges a new image.\n- A `404` consumes one live query, made to confirm that the CNPJ is not registered with the Receita Federal.\n\n#### Remarks\n\n- The body of a `200` response is a JPEG image (`image/jpeg`) of 640 × 640 pixels, with a 90° horizontal field of view.\n- A CNPJ that is not in cached data yet is queried live at the Receita Federal before the image is generated.\n","parameters":[{"required":true,"in":"path","name":"taxId","description":"National Registry of Legal Entities (CNPJ) registration number.","schema":{"type":"string","minLength":14,"format":"cnpj","maxLength":14,"example":"37335118000180"}}],"tags":["Establishments"],"operationId":"readEstablishmentStreetViewByTaxId"}},"/v2/individuals/{taxId}":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndividualDto"}}},"description":"Request successful."},"206":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndividualDto"}}},"description":"Request partially successful."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDto"}}},"description":"Malformed request."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDto"}}},"description":"Missing or invalid API key."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredErrorDto"}}},"description":"Query quota or overage budget exceeded."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}},"description":"Requested entity not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsErrorDto"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDto"}}},"description":"Unexpected internal error."},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayTimeoutErrorDto"}}},"description":"Request timed out."}},"summary":"Lookup CPF","description":"Returns the state registrations and SUFRAMA registrations of a CPF, according to the resources requested in `expand`. To get the dossier as a PDF, use [Issue CPF dossier](#tag/individuals/GET/v2/individuals/{taxId}/dossier).\n\n#### Datasources\n\n- `stateRegistry` comes from the [Cadastro Centralizado de Contribuintes (CCC)](https://dfe-portal.svrs.rs.gov.br/Nfe/Ccc), queried per state, and is updated only by live queries.\n- `suframa` comes from live queries at the [SUFRAMA registry](https://www4.suframa.gov.br/cadsuf/#/menu-externo).\n- `legalName` comes from the CCC or SUFRAMA, whichever was updated most recently.\n\n#### Billing\n\n- `stateRegistry` with `SUMMARY`: one query.\n- `stateRegistry` with `DETAILED`: one query per registration in each requested state, with a minimum of one per state.\n- `suframa`: one query.\n- Each query can be cached or live, according to [data freshness](#description/data-freshness).\n- A `404` consumes one live query per state in `stateRegistry.states` and one for `suframa`, according to the resources requested, except for live queries that failed.\n\n#### Remarks\n\n- With `stateRegistry.view=SUMMARY` and a CPF that already has a known state registration, the age of the registrations is that of `stateRegistry.updatedAt`, a single live query updates them when they are stale, and `stateRegistry.states` only filters the registrations returned.\n- With `DETAILED`, or with `SUMMARY` while the CPF has no known state registration, as on its first lookup, the age is checked in each state in `stateRegistry.states`, and each stale state is queried live separately.\n","parameters":[{"required":true,"in":"path","name":"taxId","description":"National Registry of Individual Entities (CPF) registration number.","schema":{"type":"string","minLength":11,"format":"cpf","maxLength":11,"example":"96419512034"}},{"in":"query","required":true,"name":"expand","description":"Resources to include in the response, comma separated.","schema":{"type":"array","items":{"type":"string","enum":["stateRegistry","suframa"],"x-enumDescriptions":{"stateRegistry":"State registrations","suframa":"SUFRAMA registrations"}},"example":["stateRegistry","suframa"],"uniqueItems":true,"minItems":1}},{"in":"query","required":false,"name":"maxAge","description":"Maximum accepted age for cached data, expressed as a duration. If the cached information is\nolder than this limit, a live query is forced. Accepted suffixes: y (years), w (weeks), d (days),\nh (hours), m (minutes). Examples: 1y, 4w, 14d, 8h, 45m.","schema":{"type":"string","example":"45d","default":"45d","pattern":"^\\d{1,3}[ywdhm]$"}},{"in":"query","required":false,"name":"stateRegistry.states","description":"States to be considered when obtaining the state registrations. Required when `expand`\nincludes `stateRegistry`.","schema":{"type":"array","items":{"enum":["ALL","AC","AL","AM","AP","BA","CE","DF","ES","GO","MA","MG","MS","MT","PA","PB","PE","PI","PR","RJ","RN","RO","RR","RS","SC","SE","SP","TO"],"type":"string","x-enumDescriptions":{"ALL":"All states","AC":"Acre","AL":"Alagoas","AM":"Amazonas","AP":"Amapá","BA":"Bahia","CE":"Ceará","DF":"Distrito Federal","ES":"Espírito Santo","GO":"Goiás","MA":"Maranhão","MG":"Minas Gerais","MS":"Mato Grosso do Sul","MT":"Mato Grosso","PA":"Pará","PB":"Paraíba","PE":"Pernambuco","PI":"Piauí","PR":"Paraná","RJ":"Rio de Janeiro","RN":"Rio Grande do Norte","RO":"Rondônia","RR":"Roraima","RS":"Rio Grande do Sul","SC":"Santa Catarina","SE":"Sergipe","SP":"São Paulo","TO":"Tocantins"}},"example":["SP","RJ"]}},{"in":"query","required":false,"name":"stateRegistry.view","description":"Level of detail of the information regarding the state registrations.","schema":{"type":"string","example":"DETAILED","default":"SUMMARY","enum":["SUMMARY","DETAILED"],"x-enumDescriptions":{"SUMMARY":"Number, state, type and status","DETAILED":"Number, state, type, status, activity, address, sublimit and authorized documents"}}},{"in":"query","required":false,"name":"stateRegistry.maxAge","description":"Maximum accepted age for cached state registration data, expressed as a duration. Overrides\n`maxAge` for this resource. If omitted, the value of `maxAge` is adopted.","schema":{"type":"string","example":"45d","pattern":"^\\d{1,3}[ywdhm]$"}},{"in":"query","required":false,"name":"suframa.maxAge","description":"Maximum accepted age for cached SUFRAMA registration data, expressed as a duration. Overrides\n`maxAge` for this resource. If omitted, the value of `maxAge` is adopted.","schema":{"type":"string","example":"45d","pattern":"^\\d{1,3}[ywdhm]$"}}],"tags":["Individuals"],"operationId":"readIndividualByTaxId"}},"/v2/individuals/{taxId}/dossier":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndividualDto"}},"*/*":{"schema":{}}},"description":"Request successful.","headers":{"Content-Type":{"example":"application/pdf","schema":{"type":"string"}}}},"206":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndividualDto"}}},"description":"Request partially successful."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDto"}}},"description":"Malformed request."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDto"}}},"description":"Missing or invalid API key."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredErrorDto"}}},"description":"Query quota or overage budget exceeded."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}},"description":"Requested entity not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsErrorDto"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDto"}}},"description":"Unexpected internal error."},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayTimeoutErrorDto"}}},"description":"Request timed out."}},"summary":"Issue CPF dossier","description":"Returns a single PDF file with the certificates requested in `certificates`, from the Cadastro Centralizado de Contribuintes (CCC) and SUFRAMA. To get the registrations as JSON, use [Lookup CPF](#tag/individuals/GET/v2/individuals/{taxId}).\n\n#### Datasources\n\n- `CCC_REGISTRATIONS` comes from live queries at the [Cadastro Centralizado de Contribuintes (CCC)](https://dfe-portal.svrs.rs.gov.br/Nfe/Ccc).\n- `SUFRAMA_REGISTRATION` comes from live queries at the [SUFRAMA registry](https://www4.suframa.gov.br/cadsuf/#/menu-externo).\n\n#### Billing\n\n- `CCC_REGISTRATIONS`: one query.\n- `SUFRAMA_REGISTRATION`: one query.\n- Each query can be cached or live, according to [data freshness](#description/data-freshness).\n- A `404` with `INDIVIDUAL_NOT_FOUND` consumes one live query when the live query for `SUFRAMA_REGISTRATION` completes without finding a registration, and nothing otherwise.\n- A `404` with `INDIVIDUAL_DOSSIER_EMPTY` is charged the same as a PDF with the requested certificates.\n\n#### Remarks\n\n- The body of a `200` or `206` response is a PDF file (`application/pdf`).\n- `CCC_REGISTRATIONS` is issued for a single state where the CPF has a known state registration, and the state cannot be chosen.\n- When the CPF has no known state registration, the CCC is not queried. To fetch the registrations, first use [Lookup CPF](#tag/individuals/GET/v2/individuals/{taxId}) with `expand=stateRegistry` and the states in `stateRegistry.states`.\n- `CCC_REGISTRATIONS` is left out of the PDF when the CPF has no known state registration, and `SUFRAMA_REGISTRATION` when the CPF has no SUFRAMA registration. A certificate left out because the official source has no record for the CPF is still charged.\n- When every requested certificate is left out, the response is a `404` with `INDIVIDUAL_DOSSIER_EMPTY` instead of an empty PDF.\n","parameters":[{"required":true,"in":"path","name":"taxId","description":"National Registry of Individual Entities (CPF) registration number.","schema":{"type":"string","minLength":11,"format":"cpf","maxLength":11,"example":"96419512034"}},{"in":"query","required":true,"name":"certificates","description":"Certificates to be included in the dossier, comma separated. The order of the pages in the\ndocument follows the order informed.","schema":{"type":"array","items":{"type":"string","enum":["CCC_REGISTRATIONS","SUFRAMA_REGISTRATION"],"x-enumDescriptions":{"CCC_REGISTRATIONS":"Centralized Taxpayer Registry (CCC) registrations certificate","SUFRAMA_REGISTRATION":"SUFRAMA registration certificate"}},"example":["CCC_REGISTRATIONS","SUFRAMA_REGISTRATION"],"uniqueItems":true,"minItems":1}},{"in":"query","required":false,"name":"maxAge","description":"Maximum accepted age for cached certificates, expressed as a duration. If the cached document is\nolder than this limit, a live render is forced. Accepted suffixes: y (years), w (weeks), d (days),\nh (hours), m (minutes). Examples: 1y, 4w, 14d, 8h, 45m.","schema":{"type":"string","example":"45d","default":"45d","pattern":"^\\d{1,3}[ywdhm]$"}}],"tags":["Individuals"],"operationId":"readIndividualDossierByTaxId"}},"/v2/lists":{"post":{"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDto"}}},"description":"Request successful."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDto"}}},"description":"Malformed request."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDto"}}},"description":"Missing or invalid API key."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredErrorDto"}}},"description":"Query quota or overage budget exceeded."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}},"description":"Requested entity not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsErrorDto"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDto"}}},"description":"Unexpected internal error."},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayTimeoutErrorDto"}}},"description":"Request timed out."}},"summary":"Create list","description":"Creates a list with the given CNPJs and returns the created list, including the `id` used to reference it in other operations. To change the CNPJs of an existing list, use [Update list](#tag/lists/PATCH/v2/lists/{listId}).\n\n#### Remarks\n\n- Each organization can have up to 10,000 lists.\n- The operation is not idempotent: each request creates a new list, even if another one already has the same `name`.\n","parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCreateDto"}}}},"tags":["Lists"],"operationId":"createList"},"get":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPageDto"}}},"description":"Request successful."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDto"}}},"description":"Malformed request."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDto"}}},"description":"Missing or invalid API key."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredErrorDto"}}},"description":"Query quota or overage budget exceeded."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}},"description":"Requested entity not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsErrorDto"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDto"}}},"description":"Unexpected internal error."},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayTimeoutErrorDto"}}},"description":"Request timed out."}},"summary":"Search lists","description":"Returns your organization's lists in [pages](#description/pagination), optionally filtered by name. To get a single list by `id`, use [Lookup list](#tag/lists/GET/v2/lists/{listId}).\n\n#### Remarks\n\n- `search` only filters and does not change the order, which by default starts from the most recently created list. With any `sort`, ties follow ascending `id`.\n","parameters":[{"in":"query","required":false,"name":"cursor","description":"Pagination token, mutually exclusive with other properties.","schema":{"type":"string","maxLength":32,"minLength":32}},{"in":"query","required":false,"name":"limit","description":"Number of records to be read per page.","schema":{"type":"integer","maximum":1000,"minimum":1,"default":10,"multipleOf":1}},{"in":"query","required":false,"name":"search","description":"Free-text search term. Matches records whose name contains every given word, in any order.","schema":{"type":"string","example":"clientes","minLength":1}},{"in":"query","required":false,"name":"sort","description":"Field used to sort records.","schema":{"type":"string","example":"name","default":"createdAt","enum":["createdAt","updatedAt","name","size"],"x-enumDescriptions":{"createdAt":"Creation date, descending by default","updatedAt":"Last update date, descending by default","name":"Name, ascending by default","size":"Number of items, descending by default"}}},{"in":"query","required":false,"name":"order","description":"Sort direction. When omitted, follows the default direction of the field in `sort`.","schema":{"type":"string","example":"ASC","enum":["ASC","DESC"],"x-enumDescriptions":{"ASC":"Ascending","DESC":"Descending"}}}],"tags":["Lists"],"operationId":"readLists"}},"/v2/lists/{listId}":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDto"}}},"description":"Request successful."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDto"}}},"description":"Malformed request."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDto"}}},"description":"Missing or invalid API key."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredErrorDto"}}},"description":"Query quota or overage budget exceeded."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}},"description":"Requested entity not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsErrorDto"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDto"}}},"description":"Unexpected internal error."},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayTimeoutErrorDto"}}},"description":"Request timed out."}},"summary":"Lookup list","description":"Returns the name, type and number of CNPJs of a list. To find a list by name, use [Search lists](#tag/lists/GET/v2/lists).\n","parameters":[{"required":true,"in":"path","name":"listId","description":"List unique identifier.","schema":{"type":"string","minLength":1,"format":"uuid","example":"3014e069-dd7f-429e-9649-484a424d5614"}}],"tags":["Lists"],"operationId":"readListById"},"patch":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDto"}}},"description":"Request successful."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDto"}}},"description":"Malformed request."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDto"}}},"description":"Missing or invalid API key."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredErrorDto"}}},"description":"Query quota or overage budget exceeded."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}},"description":"Requested entity not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsErrorDto"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDto"}}},"description":"Unexpected internal error."},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayTimeoutErrorDto"}}},"description":"Request timed out."}},"summary":"Update list","description":"Updates the name of a list, its CNPJs or both, and returns the updated list, with the new number of CNPJs in `size`.\n\n#### Remarks\n\n- `operation` and `items` must be sent together.\n- To only rename the list, send just `name`: its CNPJs stay unchanged.\n- `REPLACE` with an empty `items` removes every CNPJ, keeping the list and its `id`.\n- With `ADD`, the list's current size plus the distinct CNPJs sent, including those already in it, cannot exceed 1,000,000.\n- While an export of the list is pending or processing, `operation` is rejected with `LIST_EXPORT_IN_PROGRESS`, but renaming still works.\n","parameters":[{"required":true,"in":"path","name":"listId","description":"List unique identifier.","schema":{"type":"string","minLength":1,"format":"uuid","example":"3014e069-dd7f-429e-9649-484a424d5614"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUpdateDto"}}}},"tags":["Lists"],"operationId":"updateListById"},"delete":{"responses":{"204":{"description":"Request successful."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDto"}}},"description":"Malformed request."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDto"}}},"description":"Missing or invalid API key."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredErrorDto"}}},"description":"Query quota or overage budget exceeded."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}},"description":"Requested entity not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsErrorDto"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDto"}}},"description":"Unexpected internal error."},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayTimeoutErrorDto"}}},"description":"Request timed out."}},"summary":"Delete list","description":"Deletes a list and all of its CNPJs, with no way to recover it. To empty a list while keeping its `id`, use `REPLACE` with an empty `items` in [Update list](#tag/lists/PATCH/v2/lists/{listId}).\n","parameters":[{"required":true,"in":"path","name":"listId","description":"List unique identifier.","schema":{"type":"string","minLength":1,"format":"uuid","example":"3014e069-dd7f-429e-9649-484a424d5614"}}],"tags":["Lists"],"operationId":"deleteListById"}},"/v2/people/{id}":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonDto"}}},"description":"Request successful."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDto"}}},"description":"Malformed request."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDto"}}},"description":"Missing or invalid API key."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredErrorDto"}}},"description":"Query quota or overage budget exceeded."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}},"description":"Requested entity not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsErrorDto"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDto"}}},"description":"Unexpected internal error."},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayTimeoutErrorDto"}}},"description":"Request timed out."}},"summary":"Lookup person","description":"Returns the person with the given `id` and all of their current participations. To find a person by name, CPF or CNPJ, use [Search people](#tag/people/GET/v2/people).\n\n#### Datasources\n\n- `ESTABLISHMENT` people come from [CNPJ open data](https://dados.gov.br/dados/conjuntos-dados/cadastro-nacional-da-pessoa-juridica---cnpj) and from live queries at the [Receita Federal CNPJ registry](https://solucoes.receita.fazenda.gov.br/Servicos/cnpjreva/).\n- `INDIVIDUAL` people come from CNPJ open data, the [Cadastro Centralizado de Contribuintes](https://dfe-portal.svrs.rs.gov.br/Nfe/Ccc) and the [SUFRAMA registry](https://www4.suframa.gov.br/cadsuf/#/menu-externo).\n- `FOREIGNER` people come from CNPJ open data.\n- `UNKNOWN` people come from live queries at the Receita Federal CNPJ registry.\n- Participations come from CNPJ open data and from live queries at the Receita Federal CNPJ registry, such as those made by [Lookup CNPJ](#tag/establishments/GET/v2/establishments/{taxId}) when cached data is older than `maxAge` or does not include the CNPJ yet.\n\n#### Billing\n\n- Each `200` response consumes one cached query, regardless of how many participations are returned.\n- A `404` `PERSON_NOT_FOUND` also consumes one cached query.\n\n#### Remarks\n\n- A person's `id` is stable and can be stored.\n- A person's participations can take until the next open data release to reflect partners updated by a live query.\n- In a live query, a partner whose name does not match any partner already known for the company is added as an `UNKNOWN` person, and so is its legal representative.\n","parameters":[{"required":true,"in":"path","name":"id","description":"Unique person identifier.","schema":{"type":"string","minLength":1,"format":"uuid","example":"ae3d1d92-bc15-4126-896f-2dbdbc6bfc97"}}],"tags":["People"],"operationId":"readPersonById"}},"/v2/people":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonPageDto"}}},"description":"Request successful."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDto"}}},"description":"Malformed request."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDto"}}},"description":"Missing or invalid API key."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredErrorDto"}}},"description":"Query quota or overage budget exceeded."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}},"description":"Requested entity not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsErrorDto"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDto"}}},"description":"Unexpected internal error."},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayTimeoutErrorDto"}}},"description":"Request timed out."}},"summary":"Search people","description":"Returns, in [pages](#description/pagination), the people who match the given [filters](#description/search-filters), each with their current participations. To read a person whose `id` you already have, use [Lookup person](#tag/people/GET/v2/people/{id}).\n\n#### Datasources\n\n- The people found by the filters and `search` are those in the latest release of [CNPJ open data](https://dados.gov.br/dados/conjuntos-dados/cadastro-nacional-da-pessoa-juridica---cnpj).\n- The people and participations in each record come from CNPJ open data and from live queries at the [Receita Federal CNPJ registry](https://solucoes.receita.fazenda.gov.br/Servicos/cnpjreva/), such as those made by [Lookup CNPJ](#tag/establishments/GET/v2/establishments/{taxId}).\n\n#### Billing\n\n- One cached query per record returned, with a minimum of one per search, even when no record is found.\n\n#### Remarks\n\n- `UNKNOWN` people do not appear in the search, but can still be read in [Lookup person](#tag/people/GET/v2/people/{id}).\n- A CPF in `search` or `taxId.in` also matches other people with the same digits visible in the masked CPF. To narrow the result, send the CPF and the name in the same `search`.\n- With the default `sort=relevance`, records come in ascending order of `legalName` when there is no `search` or it has a single word. With more than one word, records that exactly match the search term come first, then those containing it as an exact phrase, then the rest, each group in that same order. With any `sort`, ties follow ascending `legalName`, then ascending `id`.\n","parameters":[{"in":"query","required":false,"name":"cursor","description":"Pagination token, mutually exclusive with other properties.","schema":{"type":"string","maxLength":32,"minLength":32}},{"in":"query","required":false,"name":"limit","description":"Number of records to be read per page.","schema":{"type":"integer","maximum":1000,"minimum":1,"default":10,"multipleOf":1}},{"in":"query","required":false,"name":"search","description":"Free-text search term. Matches records whose legal name or tax ID contain the given value.\nCPF matching is performed by the digits between the fourth and ninth.","schema":{"type":"string","example":"CNPJA TECNOLOGIA","minLength":1}},{"in":"query","required":false,"name":"sort","description":"Field used to sort records.","schema":{"type":"string","example":"participations","default":"relevance","enum":["relevance","legalName","participations"],"x-enumDescriptions":{"relevance":"Relevance, descending by default","legalName":"Legal name, ascending by default","participations":"Corporate participations, descending by default"}}},{"in":"query","required":false,"name":"order","description":"Sort direction. When omitted, follows the default direction of the field in `sort`.","schema":{"type":"string","example":"DESC","enum":["ASC","DESC"],"x-enumDescriptions":{"ASC":"Ascending","DESC":"Descending"}}},{"in":"query","required":false,"name":"type.code.in","description":"Codes of person types to be included, separated by comma.","schema":{"type":"array","items":{"type":"string","enum":["ESTABLISHMENT","FOREIGNER","INDIVIDUAL","UNKNOWN"],"x-enumDescriptions":{"ESTABLISHMENT":"Legal Entity","FOREIGNER":"Foreign Entity","INDIVIDUAL":"Individual"}},"example":["INDIVIDUAL","ESTABLISHMENT"]}},{"in":"query","required":false,"name":"legalName.in","description":"Legal names to be included, separated by comma.","schema":{"type":"array","items":{"type":"string"},"example":["Maria Oliveira","Ana Martins"]}},{"in":"query","required":false,"name":"legalName.nin","description":"Legal names to be excluded, separated by comma.","schema":{"type":"array","items":{"type":"string"},"example":["Ana Martins"]}},{"in":"query","required":false,"name":"taxId.in","description":"CPFs or CNPJs to be included, separated by comma. CPF matching is performed by the digits\nbetween the fourth and ninth.","schema":{"type":"array","items":{"format":"cpf-cnpj","type":"string"},"example":["78326957062","92854908082","07526557000100"]}},{"in":"query","required":false,"name":"ageGroup.in","description":"Age groups to be included, separated by comma.","schema":{"type":"array","items":{"type":"string","enum":["0-12","13-20","21-30","31-40","41-50","51-60","61-70","71-80","81+"],"x-enumDescriptions":{"0-12":"0 to 12 years old","13-20":"13 to 20 years old","21-30":"21 to 30 years old","31-40":"31 to 40 years old","41-50":"41 to 50 years old","51-60":"51 to 60 years old","61-70":"61 to 70 years old","71-80":"71 to 80 years old","81+":"81 years old or above"}},"example":["21-30","31-40"]}},{"in":"query","required":false,"name":"domicileCountry.code.in","description":"Alpha-2 codes of domicile countries to be included, in uppercase and separated by comma.","schema":{"type":"array","items":{"maxLength":2,"minLength":2,"type":"string"},"example":["AR","CL","PY"]}},{"in":"query","required":false,"name":"domicileCountry.code.nin","description":"Alpha-2 codes of domicile countries to be excluded, in uppercase and separated by comma.","schema":{"type":"array","items":{"maxLength":2,"minLength":2,"type":"string"},"example":["AR","CL","PY"]}},{"in":"query","required":false,"name":"participations.gte","description":"Corporate participations greater than or equal to the value specified.","schema":{"type":"integer","example":1,"minimum":1,"multipleOf":1}},{"in":"query","required":false,"name":"participations.lte","description":"Corporate participations less than or equal to the value specified.","schema":{"type":"integer","example":10,"minimum":0,"multipleOf":1}}],"tags":["People"],"operationId":"readPeople"}},"/v2/postal-codes/{code}":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostalCodeDto"}}},"description":"Request successful."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDto"}}},"description":"Malformed request."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDto"}}},"description":"Missing or invalid API key."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredErrorDto"}}},"description":"Query quota or overage budget exceeded."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}},"description":"Requested entity not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsErrorDto"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDto"}}},"description":"Unexpected internal error."},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayTimeoutErrorDto"}}},"description":"Request timed out."}},"summary":"Lookup CEP","description":"Returns the address, type and registration status of a CEP from its 8 digits. To find CEPs by address or by their first digits, use [Search CEP](#tag/postal-codes/GET/v2/postal-codes).\n\n> [!NOTE]\n> This operation also accepts public requests, without an API key, as described in [public access](#description/public-access).\n\n#### Datasources\n\n- The address, type and registration status of the CEP come from the Correios National Address Directory (DNE).\n- Data is updated with each new DNE edition published by Correios.\n\n#### Billing\n\n- Each `200` response consumes one cached query.\n- A `404` `POSTAL_CODE_NOT_FOUND` also consumes one cached query.\n\n#### Remarks\n\n- `LOCALITY` carries only `city`, `state` and `municipality`, with the other address fields null. When active, it is the general CEP of a locality without street-level CEPs.\n- `STREET` covers a street or a stretch of it, which `details` can delimit, as in `até 610 - lado par`. `name` and `number` are null.\n- `LARGE_RECIPIENT`, `OPERATIONAL_UNIT` and `COMMUNITY_PO_BOX` belong to a single recipient, named in `name`, at the address in `street` and, when available, `number`. In the first two, `details` describes the street stretch, not the recipient; in `COMMUNITY_PO_BOX`, it is null.\n","parameters":[{"required":true,"in":"path","name":"code","description":"Postal code (CEP).","schema":{"type":"string","minLength":8,"maxLength":8,"pattern":"^\\d+$","example":"01452922"}}],"tags":["Postal codes"],"operationId":"readPostalCodeByCode"}},"/v2/postal-codes":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostalCodePageDto"}}},"description":"Request successful."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDto"}}},"description":"Malformed request."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDto"}}},"description":"Missing or invalid API key."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredErrorDto"}}},"description":"Query quota or overage budget exceeded."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}},"description":"Requested entity not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsErrorDto"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDto"}}},"description":"Unexpected internal error."},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayTimeoutErrorDto"}}},"description":"Request timed out."}},"summary":"Search CEP","description":"Returns, in [pages](#description/pagination), the CEPs that match the given [filters](#description/search-filters). For a CEP you already know, use [Lookup CEP](#tag/postal-codes/GET/v2/postal-codes/{code}).\n\n#### Datasources\n\n- The CEPs found by the search and the content of each record come from the National Address Directory (DNE), updated with each new edition published by Correios.\n\n#### Billing\n\n- One cached query per record returned, with a minimum of one per search, even when no record is found.\n\n#### Remarks\n\n- With the default `sort=relevance`, records are sorted by CEP in ascending order, and with a multi-word `search`, records containing the words as an exact phrase come first, each group following CEP order. With other `sort` values, ties follow ascending CEP.\n","parameters":[{"in":"query","required":false,"name":"cursor","description":"Pagination token, mutually exclusive with other properties.","schema":{"type":"string","maxLength":32,"minLength":32}},{"in":"query","required":false,"name":"limit","description":"Number of records to be read per page.","schema":{"type":"integer","maximum":1000,"minimum":1,"default":10,"multipleOf":1}},{"in":"query","required":false,"name":"search","description":"Free-text search term. Matches records whose postal code, name, street, number, district,\ncity or state contain the given value.","schema":{"type":"string","minLength":1}},{"in":"query","required":false,"name":"sort","description":"Field used to sort records.","schema":{"type":"string","example":"city","default":"relevance","enum":["relevance","code","state","city","municipality"],"x-enumDescriptions":{"relevance":"Relevance, descending by default","code":"Postal code, ascending by default","state":"Federal unit, ascending by default","city":"City, ascending by default","municipality":"Municipality code, ascending by default"}}},{"in":"query","required":false,"name":"order","description":"Sort direction. When omitted, follows the default direction of the field in `sort`.","schema":{"type":"string","example":"ASC","enum":["ASC","DESC"],"x-enumDescriptions":{"ASC":"Ascending","DESC":"Descending"}}},{"in":"query","required":false,"name":"status.code.in","description":"Codes of registration statuses to be included, separated by comma.","schema":{"type":"array","items":{"type":"string","enum":["ACTIVE","DEACTIVATED"],"x-enumDescriptions":{"ACTIVE":"Active","DEACTIVATED":"Deactivated"}}}},{"in":"query","required":false,"name":"type.code.in","description":"Codes of postal code types to be included, separated by comma.","schema":{"type":"array","items":{"type":"string","enum":["COMMUNITY_PO_BOX","LARGE_RECIPIENT","LOCALITY","OPERATIONAL_UNIT","STREET"],"x-enumDescriptions":{"COMMUNITY_PO_BOX":"Community PO Box","LARGE_RECIPIENT":"Large Recipient","LOCALITY":"Locality","OPERATIONAL_UNIT":"Operational Unit","STREET":"Street"}}}},{"in":"query","required":false,"name":"state.in","description":"Federal units to be included, separated by comma.","schema":{"type":"array","items":{"type":"string","enum":["AC","AL","AM","AP","BA","CE","DF","ES","GO","MA","MG","MS","MT","PA","PB","PE","PI","PR","RJ","RN","RO","RR","RS","SC","SE","SP","TO"],"x-enumDescriptions":{"AC":"Acre","AL":"Alagoas","AM":"Amazonas","AP":"Amapá","BA":"Bahia","CE":"Ceará","DF":"Distrito Federal","ES":"Espírito Santo","GO":"Goiás","MA":"Maranhão","MG":"Minas Gerais","MS":"Mato Grosso do Sul","MT":"Mato Grosso","PA":"Pará","PB":"Paraíba","PE":"Pernambuco","PI":"Piauí","PR":"Paraná","RJ":"Rio de Janeiro","RN":"Rio Grande do Norte","RO":"Rondônia","RR":"Roraima","RS":"Rio Grande do Sul","SC":"Santa Catarina","SE":"Sergipe","SP":"São Paulo","TO":"Tocantins"}}}},{"in":"query","required":false,"name":"municipality.in","description":"Codes of municipalities to be included, separated by comma.","schema":{"type":"array","items":{"maxLength":7,"minLength":7,"type":"string"}}}],"tags":["Postal codes"],"operationId":"readPostalCodes"}}},"tags":[{"name":"Companies","description":"A company holds the data shared by its head office and branches, such as legal name, tax regime and partners. It is identified by the CNPJ root, its first 8 characters, and reflects the Receita Federal registry. Address, contacts and activities belong to each establishment.\n"},{"name":"Establishments","description":"An establishment is one unit of a company, the head office or a branch, identified by its own CNPJ. Each record reflects the CNPJ registration at the Receita Federal, with registration status, address, contacts and economic activities, and also carries the company data, such as legal name and partners. State and SUFRAMA registrations can be included from their own official sources.\n"},{"name":"Individuals","description":"An individual is a natural person identified by CPF, with their state registrations from the Cadastro Centralizado de Contribuintes (CCC) and their SUFRAMA registrations. Only CPFs with at least one of these registrations are available, and Receita Federal CPF data is not part of this resource.\n"},{"name":"Lists","description":"A list is a named set of CNPJs chosen by your organization, identified by a unique `id`. It reflects no official source and lets you exclude CNPJs you already know, such as current customers or leads already contacted, from establishment searches.\n"},{"name":"People","description":"A person is a natural person, legal entity or foreign party that can be part of the board of partners and administrators of companies, and the record includes its current participations. Each person is identified by its own `id`, which is not the CPF or CNPJ, and the data reflects the Receita Federal CNPJ registry.\n"},{"name":"Postal codes","description":"A CEP is a Brazilian postal code, identified by its 8 digits, that can cover a whole locality, a street or a stretch of it, or a single recipient, such as a building, a company or a Correios unit. Each record holds the address and type of the CEP as registered in the Correios National Address Directory (DNE), the official source of CEPs.\n"}],"components":{"schemas":{"BadRequestErrorDto":{"type":"object","properties":{"status":{"type":"number","description":"HTTP status code.","example":400},"code":{"type":"string","description":"Error identifier code.","minLength":1,"example":"REQUEST_VALIDATION_FAILED"},"traceId":{"type":"string","description":"Trace identifier, provide it when requesting support.","example":"4b1f0a2c9d8e7f6a5b4c3d2e1f0a9b8c"},"message":{"type":"string","description":"Error description.","minLength":1,"example":"Must have required property taxId"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorDto"},"description":"Up to 100 validation failures found in the request, one entry per failed rule."}},"additionalProperties":false,"required":["status","code","message"]},"ValidationErrorDto":{"type":"object","properties":{"field":{"type":"string","description":"Path of the property that failed validation.","example":"taxId","minLength":1},"code":{"type":"string","description":"Validation failure code.","example":"REQUIRED","minLength":1},"message":{"type":"string","description":"Validation failure description.","example":"Must have required property taxId","minLength":1}},"additionalProperties":false,"required":["field","code","message"]},"UnauthorizedErrorDto":{"type":"object","properties":{"status":{"type":"number","description":"HTTP status code.","example":401},"code":{"type":"string","description":"Error identifier code.","minLength":1,"example":"API_KEY_INVALID"},"traceId":{"type":"string","description":"Trace identifier, provide it when requesting support.","example":"4b1f0a2c9d8e7f6a5b4c3d2e1f0a9b8c"},"message":{"type":"string","description":"Error description.","minLength":1,"example":"API key invalid"}},"additionalProperties":false,"required":["status","code","message"]},"PaymentRequiredErrorDto":{"type":"object","properties":{"status":{"type":"number","description":"HTTP status code.","example":402},"code":{"type":"string","description":"Error identifier code.","minLength":1,"example":"LIVE_QUERY_QUOTA_EXCEEDED"},"traceId":{"type":"string","description":"Trace identifier, provide it when requesting support.","example":"4b1f0a2c9d8e7f6a5b4c3d2e1f0a9b8c"},"message":{"type":"string","description":"Error description.","minLength":1,"example":"Live query quota exceeded"}},"additionalProperties":false,"required":["status","code","message"]},"NotFoundErrorDto":{"type":"object","properties":{"status":{"type":"number","description":"HTTP status code.","example":404},"code":{"type":"string","description":"Error identifier code.","minLength":1,"example":"ESTABLISHMENT_NOT_FOUND"},"traceId":{"type":"string","description":"Trace identifier, provide it when requesting support.","example":"4b1f0a2c9d8e7f6a5b4c3d2e1f0a9b8c"},"message":{"type":"string","description":"Error description.","minLength":1,"example":"Establishment not registered at federal tax registry service"}},"additionalProperties":false,"required":["status","code","message"]},"TooManyRequestsErrorDto":{"type":"object","properties":{"status":{"type":"number","description":"HTTP status code.","example":429},"code":{"type":"string","description":"Error identifier code.","minLength":1,"example":"RATE_LIMIT_EXCEEDED"},"traceId":{"type":"string","description":"Trace identifier, provide it when requesting support.","example":"4b1f0a2c9d8e7f6a5b4c3d2e1f0a9b8c"},"message":{"type":"string","description":"Error description.","minLength":1,"example":"Rate limit exceeded, retry after the window resets"}},"additionalProperties":false,"required":["status","code","message"]},"InternalServerErrorDto":{"type":"object","properties":{"status":{"type":"number","description":"HTTP status code.","example":500},"code":{"type":"string","description":"Error identifier code.","minLength":1,"example":"UNEXPECTED_ERROR"},"traceId":{"type":"string","description":"Trace identifier, provide it when requesting support.","example":"4b1f0a2c9d8e7f6a5b4c3d2e1f0a9b8c"},"message":{"type":"string","description":"Error description.","minLength":1,"example":"Unexpected error"}},"additionalProperties":false,"required":["status","code","message"]},"GatewayTimeoutErrorDto":{"type":"object","properties":{"status":{"type":"number","description":"HTTP status code.","example":504},"code":{"type":"string","description":"Error identifier code.","minLength":1,"example":"REQUEST_TIMED_OUT"},"traceId":{"type":"string","description":"Trace identifier, provide it when requesting support.","example":"4b1f0a2c9d8e7f6a5b4c3d2e1f0a9b8c"},"message":{"type":"string","description":"Error description.","minLength":1,"example":"Request exceeded 30000ms timeout limit"}},"additionalProperties":false,"required":["status","code","message"]},"CompanyDto":{"type":"object","properties":{"updatedAt":{"type":"string","description":"Timestamp of the last update via Federal Revenue Service.","example":"2026-01-27T03:00:00.000Z","format":"date-time","minLength":1},"id":{"type":"string","description":"Company registration number, equivalent to the first 8 characters of the CNPJ.","example":"37335118","maxLength":8,"minLength":8},"legalName":{"type":"string","description":"Legal name.","example":"CNPJA TECNOLOGIA LTDA","minLength":1},"shareCapital":{"type":"number","description":"Share capital amount.","example":99999.99,"maximum":999999999999.99,"minimum":0},"legalNature":{"allOf":[{"$ref":"#/components/schemas/LakehouseCompanyLegalNatureDto"},{"type":"object","description":"Company legal nature."}]},"size":{"allOf":[{"$ref":"#/components/schemas/LakehouseCompanySizeDto"},{"type":"object","description":"Company size."}]},"federativeEntity":{"allOf":[{"$ref":"#/components/schemas/LakehouseCompanyFederativeEntityDto"},{"type":"object","description":"Responsible federative entity. Present when the legal nature falls under public administration."}]},"taxRegime":{"allOf":[{"$ref":"#/components/schemas/CompanyTaxRegimeDto"},{"type":"object","description":"Tax regime information."}]},"partners":{"type":"array","items":{"$ref":"#/components/schemas/LakehouseCompanyPartnerDto"},"description":"Board of partners and administrators."},"establishments":{"type":"array","items":{"$ref":"#/components/schemas/LakehouseEstablishmentBaseDto"},"description":"Establishment list."}},"required":["updatedAt","id","legalName","shareCapital","legalNature","size","taxRegime","partners","establishments"],"additionalProperties":false},"LakehouseCompanyLegalNatureDto":{"type":"object","properties":{"code":{"type":"string","description":"Legal nature code.","example":"2062","maxLength":4,"minLength":4},"label":{"type":"string","description":"Legal nature label.","example":"Limited Liability Company","minLength":1}},"additionalProperties":false,"required":["code","label"]},"LakehouseCompanySizeDto":{"type":"object","properties":{"code":{"type":"string","description":"Company size code.","example":"SMALL","enum":["MICRO","SMALL","OTHER"],"minLength":1,"x-enumDescriptions":{"MICRO":"Microenterprise","SMALL":"Small-sized Company","OTHER":"Others"}},"label":{"type":"string","description":"Company size label.","example":"Small Enterprise","minLength":1}},"additionalProperties":false,"required":["code","label"]},"LakehouseCompanyFederativeEntityDto":{"type":"object","properties":{"code":{"type":"string","description":"Responsible federative entity code. It is `BR` for the Union, the state abbreviation for states and the Federal District, or the IBGE code for municipalities.","example":"BR","minLength":1},"label":{"type":"string","description":"Responsible federative entity label.","example":"Union","minLength":1}},"additionalProperties":false,"required":["code","label"]},"CompanyTaxRegimeDto":{"type":"object","properties":{"updatedAt":{"type":"string","description":"Timestamp of the last update via Simples Nacional.","example":"2026-01-27T03:00:00.000Z","format":"date-time","minLength":1},"type":{"allOf":[{"$ref":"#/components/schemas/LakehouseCompanyTaxRegimeTypeDto"},{"type":"object","description":"Tax regime type."}]},"simplesNacionalStartDate":{"type":["null","string"],"description":"Date of inclusion of the current period in Simples Nacional. Present when the tax regime is `SIMPLES_NACIONAL`, `SIMPLES_NACIONAL_HYBRID` or `SIMPLES_NACIONAL_SIMEI`.","example":"2020-06-05","format":"date"},"simeiStartDate":{"type":["null","string"],"description":"Date of inclusion of the current period in SIMEI. Present when the tax regime is `SIMPLES_NACIONAL_SIMEI`.","example":"2020-06-05","format":"date"}},"required":["updatedAt","type"],"additionalProperties":false},"LakehouseCompanyTaxRegimeTypeDto":{"type":"object","properties":{"code":{"type":"string","description":"Tax regime type code. It is `NOT_APPLICABLE` when every establishment of the company has status `CLOSED` or `VOID`, `SIMPLES_NACIONAL_SIMEI` for companies that opt into SIMEI, `SIMPLES_NACIONAL_HYBRID` for companies that opt into Simples Nacional and into the IBS or CBS regular regime, and `SIMPLES_NACIONAL` for the remaining companies that opt into Simples Nacional. Otherwise, it follows the latest annual return filed with the Receita Federal or, without one, is adopted: `SIMPLES_NACIONAL_SIMEI` for newly opened sole proprietorships and `PRESUMED_PROFIT` for the rest.","example":"SIMPLES_NACIONAL_SIMEI","enum":["ACTUAL_PROFIT","PRESUMED_PROFIT","ARBITRATED_PROFIT","SIMPLES_NACIONAL","SIMPLES_NACIONAL_HYBRID","SIMPLES_NACIONAL_SIMEI","NOT_APPLICABLE"],"minLength":1,"x-enumDescriptions":{"ACTUAL_PROFIT":"Actual Profit","PRESUMED_PROFIT":"Presumed Profit","ARBITRATED_PROFIT":"Arbitrated Profit","SIMPLES_NACIONAL":"Simples Nacional","SIMPLES_NACIONAL_HYBRID":"Simples Nacional Hybrid","SIMPLES_NACIONAL_SIMEI":"SIMEI","NOT_APPLICABLE":"Not Applicable"}},"label":{"type":"string","description":"Tax regime type label.","example":"SIMEI","minLength":1}},"additionalProperties":false,"required":["code","label"]},"LakehouseCompanyPartnerDto":{"type":"object","properties":{"role":{"allOf":[{"$ref":"#/components/schemas/LakehouseCompanyPartnerRoleDto"},{"type":"object","description":"CompanyPartner role."}]},"admissionDate":{"type":["null","string"],"description":"Admission date.","example":"2026-01-01","format":"date","minLength":1},"legalRepresentative":{"allOf":[{"$ref":"#/components/schemas/LakehouseCompanyPartnerLegalRepresentativeDto"},{"type":"object","description":"Legal representative information. Present when the partner is represented."}]},"person":{"allOf":[{"$ref":"#/components/schemas/LakehouseCompanyPartnerPersonDto"},{"type":"object","description":"Person information."}]}},"additionalProperties":false,"required":["role","admissionDate","person"]},"LakehouseCompanyPartnerPersonDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique person identifier.","example":"ae3d1d92-bc15-4126-896f-2dbdbc6bfc97","format":"uuid","minLength":1},"type":{"allOf":[{"$ref":"#/components/schemas/LakehousePersonTypeDto"},{"type":"object","description":"Person type."}]},"legalName":{"type":"string","description":"Legal name.","example":"Francisco Silva","minLength":1},"taxId":{"type":["null","string"],"description":"CPF or CNPJ registration number. It is `null` for `FOREIGNER` and `UNKNOWN` people. The CPF of partners and legal representatives is masked by the Receita Federal, with only the fourth to ninth digits visible.","example":"***650245**","minLength":1},"domicileCountry":{"allOf":[{"$ref":"#/components/schemas/LakehouseAddressCountryDto"},{"type":"object","description":"Country of domicile."}]},"ageGroup":{"type":"string","description":"Age group. Present when the person is an individual.","example":"31-40","enum":["0-12","13-20","21-30","31-40","41-50","51-60","61-70","71-80","81+"],"x-enumDescriptions":{"0-12":"0 to 12 years old","13-20":"13 to 20 years old","21-30":"21 to 30 years old","31-40":"31 to 40 years old","41-50":"41 to 50 years old","51-60":"51 to 60 years old","61-70":"61 to 70 years old","71-80":"71 to 80 years old","81+":"81 years old or above"}}},"required":["id","type","legalName","taxId","domicileCountry"],"additionalProperties":false},"LakehousePersonTypeDto":{"type":"object","properties":{"code":{"type":"string","description":"Person type code. `UNKNOWN` indicates a partner or legal representative known only by name.","example":"INDIVIDUAL","enum":["ESTABLISHMENT","FOREIGNER","INDIVIDUAL","UNKNOWN"],"minLength":1,"x-enumDescriptions":{"ESTABLISHMENT":"Legal Entity","FOREIGNER":"Foreign Entity","INDIVIDUAL":"Individual","UNKNOWN":"Unknown"}},"label":{"type":"string","description":"Person type label.","example":"Individual","minLength":1}},"additionalProperties":false,"required":["code","label"]},"LakehouseAddressCountryDto":{"type":"object","properties":{"code":{"type":"string","description":"Alpha-2 country code.","example":"BR","maxLength":2,"minLength":2},"label":{"type":"string","description":"Country label.","example":"Brazil","minLength":1}},"additionalProperties":false,"required":["code","label"]},"LakehouseCompanyPartnerRoleDto":{"type":"object","properties":{"code":{"type":"string","description":"Role code.","example":"49","maxLength":2,"minLength":2},"label":{"type":"string","description":"Role label.","example":"Managing Partner","minLength":1}},"additionalProperties":false,"required":["code","label"]},"LakehouseCompanyPartnerLegalRepresentativeDto":{"type":"object","properties":{"person":{"allOf":[{"$ref":"#/components/schemas/LakehouseCompanyPartnerPersonDto"},{"type":"object","description":"Legal representative person information."}]},"role":{"allOf":[{"$ref":"#/components/schemas/LakehouseCompanyPartnerRoleDto"},{"type":"object","description":"Legal representative role."}]}},"additionalProperties":false,"required":["person","role"]},"LakehouseEstablishmentBaseDto":{"type":"object","properties":{"updatedAt":{"type":"string","description":"Timestamp of the last update via Federal Revenue Service.","example":"2026-01-27T03:00:00.000Z","format":"date-time","minLength":1},"id":{"type":"string","description":"Unique legal entity identifier.","example":"e41db98e-2bd2-43ef-8729-7a3152caaa08","minLength":1},"taxId":{"type":"string","description":"National Registry of Legal Entities (CNPJ) registration number.","example":"37335118000180","maxLength":14,"minLength":14},"incorporationDate":{"type":"string","description":"Incorporation date.","example":"2020-06-05","format":"date","minLength":1},"type":{"allOf":[{"$ref":"#/components/schemas/LakehouseEstablishmentTypeDto"},{"type":"object","description":"Establishment type."}]},"tradeName":{"type":["null","string"],"description":"Trade name or establishment title.","example":"Cnpja","minLength":1},"statusDate":{"type":"string","description":"Registration status date.","example":"2020-06-05","format":"date","minLength":1},"status":{"allOf":[{"$ref":"#/components/schemas/LakehouseEstablishmentStatusDto"},{"type":"object","description":"Registration status."}]},"statusReason":{"allOf":[{"$ref":"#/components/schemas/LakehouseEstablishmentStatusReasonDto"},{"type":"object","description":"Registration status reason. Present when the establishment is not active."}]},"specialStatusDate":{"type":"string","description":"Special status date. Present when the establishment is active and falls under a specific legal regime.","example":"2020-06-05","format":"date"},"specialStatus":{"allOf":[{"$ref":"#/components/schemas/LakehouseEstablishmentSpecialStatusDto"},{"type":"object","description":"Special registration status. Present when the establishment is active and falls under a specific legal regime."}]},"address":{"allOf":[{"$ref":"#/components/schemas/LakehouseAddressDto"},{"type":"object","description":"Address information."}]},"primaryActivity":{"allOf":[{"$ref":"#/components/schemas/LakehouseEconomicActivityDto"},{"type":"object","description":"Primary economic activity."}]}},"additionalProperties":false,"required":["updatedAt","id","taxId","incorporationDate","type","tradeName","statusDate","status","address","primaryActivity"]},"LakehouseEstablishmentTypeDto":{"type":"object","properties":{"code":{"type":"string","description":"Establishment type code.","example":"HEAD","enum":["HEAD","BRANCH"],"minLength":1,"x-enumDescriptions":{"HEAD":"Head Establishment","BRANCH":"Branch"}},"label":{"type":"string","description":"Establishment type label.","example":"Head office","minLength":1}},"additionalProperties":false,"required":["code","label"]},"LakehouseEstablishmentStatusDto":{"type":"object","properties":{"code":{"type":"string","description":"Registration status code.","example":"ACTIVE","enum":["ACTIVE","CLOSED","NONCOMPLIANT","SUSPENDED","VOID"],"minLength":1,"x-enumDescriptions":{"ACTIVE":"Active","CLOSED":"Closed","NONCOMPLIANT":"Noncompliant","SUSPENDED":"Suspended","VOID":"Void"}},"label":{"type":"string","description":"Registration status label.","example":"Active","minLength":1}},"additionalProperties":false,"required":["code","label"]},"LakehouseEstablishmentStatusReasonDto":{"type":"object","properties":{"code":{"type":"string","description":"Registration status reason code.","example":"01","maxLength":2,"minLength":2},"label":{"type":"string","description":"Registration status reason label.","example":"Termination due to voluntary liquidation closure","minLength":1}},"additionalProperties":false,"required":["code","label"]},"LakehouseEstablishmentSpecialStatusDto":{"type":"object","properties":{"code":{"type":"string","description":"Special registration status code.","example":"418","maxLength":3,"minLength":3},"label":{"type":"string","description":"Special registration status label.","example":"Start of Judicial Recovery","minLength":1}},"additionalProperties":false,"required":["code","label"]},"LakehouseAddressDto":{"type":"object","properties":{"street":{"type":["null","string"],"description":"Street name.","example":"Avenida Brigadeiro Faria Lima","minLength":1},"number":{"type":["null","string"],"description":"Street number.","example":"2369","minLength":1},"details":{"type":["null","string"],"description":"Address complement.","example":"Cj 1102","minLength":1},"district":{"type":["null","string"],"description":"Neighborhood or district name.","example":"Jardim Paulistano","minLength":1},"city":{"type":["null","string"],"description":"Municipality name.","example":"São Paulo","minLength":1},"state":{"type":["null","string"],"description":"State abbreviation.","example":"SP","enum":["AC","AL","AM","AP","BA","CE","DF","ES","GO","MA","MG","MS","MT","PA","PB","PE","PI","PR","RJ","RN","RO","RR","RS","SC","SE","SP","TO",null],"minLength":1,"x-enumDescriptions":{"AC":"Acre","AL":"Alagoas","AM":"Amazonas","AP":"Amapá","BA":"Bahia","CE":"Ceará","DF":"Distrito Federal","ES":"Espírito Santo","GO":"Goiás","MA":"Maranhão","MG":"Minas Gerais","MS":"Mato Grosso do Sul","MT":"Mato Grosso","PA":"Pará","PB":"Paraíba","PE":"Pernambuco","PI":"Piauí","PR":"Paraná","RJ":"Rio de Janeiro","RN":"Rio Grande do Norte","RO":"Rondônia","RR":"Roraima","RS":"Rio Grande do Sul","SC":"Santa Catarina","SE":"Sergipe","SP":"São Paulo","TO":"Tocantins"}},"postalCode":{"type":["null","string"],"description":"Postal code (CEP).","example":"01452922","maxLength":8,"minLength":8},"municipality":{"type":["null","string"],"description":"Municipality IBGE code.","example":"3550308","maxLength":7,"minLength":7},"country":{"allOf":[{"$ref":"#/components/schemas/LakehouseAddressCountryDto"},{"type":"object","description":"Country."}]}},"additionalProperties":false,"required":["street","number","details","district","city","state","postalCode","municipality","country"]},"LakehouseEconomicActivityDto":{"type":"object","properties":{"code":{"type":"string","description":"Economic activity code.","example":"463119008","maxLength":7,"minLength":7},"label":{"type":"string","description":"Economic activity label.","example":"Data processing, application service providers and internet hosting services","minLength":1}},"additionalProperties":false,"required":["code","label"]},"EstablishmentDto":{"type":"object","properties":{"updatedAt":{"type":"string","description":"Timestamp of the last update via Federal Revenue Service.","example":"2026-01-27T03:00:00.000Z","format":"date-time","minLength":1},"taxId":{"type":"string","description":"National Registry of Legal Entities (CNPJ) registration number.","example":"37335118000180","maxLength":14,"minLength":14},"incorporationDate":{"type":"string","description":"Incorporation date.","example":"2020-06-05","format":"date","minLength":1},"company":{"allOf":[{"$ref":"#/components/schemas/EstablishmentCompanyDto"},{"type":"object","description":"Company information."}]},"type":{"allOf":[{"$ref":"#/components/schemas/LakehouseEstablishmentTypeDto"},{"type":"object","description":"Establishment type."}]},"tradeName":{"type":["null","string"],"description":"Trade name or establishment title.","example":"Cnpja","minLength":1},"statusDate":{"type":"string","description":"Registration status date.","example":"2020-06-05","format":"date","minLength":1},"status":{"allOf":[{"$ref":"#/components/schemas/LakehouseEstablishmentStatusDto"},{"type":"object","description":"Registration status."}]},"statusReason":{"allOf":[{"$ref":"#/components/schemas/LakehouseEstablishmentStatusReasonDto"},{"type":"object","description":"Registration status reason. Present when the establishment is not active."}]},"specialStatusDate":{"type":"string","description":"Special status date. Present when the establishment is active and falls under a specific legal regime.","example":"2020-06-05","format":"date"},"specialStatus":{"allOf":[{"$ref":"#/components/schemas/LakehouseEstablishmentSpecialStatusDto"},{"type":"object","description":"Special registration status. Present when the establishment is active and falls under a specific legal regime."}]},"address":{"allOf":[{"$ref":"#/components/schemas/EstablishmentAddressDto"},{"type":"object","description":"Address information."}]},"phones":{"type":"array","items":{"$ref":"#/components/schemas/LakehousePhoneDto"},"description":"Phone list."},"emails":{"type":"array","items":{"$ref":"#/components/schemas/LakehouseEmailDto"},"description":"Email list."},"primaryActivity":{"allOf":[{"$ref":"#/components/schemas/LakehouseEconomicActivityDto"},{"type":"object","description":"Primary economic activity."}]},"secondaryActivities":{"type":"array","items":{"$ref":"#/components/schemas/LakehouseEconomicActivityDto"},"description":"Secondary economic activities."},"stateRegistry":{"allOf":[{"$ref":"#/components/schemas/EstablishmentStateRegistryDto"},{"type":"object","description":"State registry information."}]},"suframa":{"allOf":[{"$ref":"#/components/schemas/EstablishmentSuframaDto"},{"type":"object","description":"SUFRAMA registration information."}]}},"required":["updatedAt","taxId","incorporationDate","company","type","tradeName","statusDate","status","address","phones","emails","primaryActivity","secondaryActivities"],"additionalProperties":false},"EstablishmentCompanyDto":{"type":"object","properties":{"id":{"type":"string","description":"Company registration number, equivalent to the first 8 characters of the CNPJ.","example":"37335118","maxLength":8,"minLength":8},"legalName":{"type":"string","description":"Legal name.","example":"CNPJA TECNOLOGIA LTDA","minLength":1},"shareCapital":{"type":"number","description":"Share capital amount.","example":99999.99,"maximum":999999999999.99,"minimum":0},"legalNature":{"allOf":[{"$ref":"#/components/schemas/LakehouseCompanyLegalNatureDto"},{"type":"object","description":"Company legal nature."}]},"size":{"allOf":[{"$ref":"#/components/schemas/LakehouseCompanySizeDto"},{"type":"object","description":"Company size."}]},"federativeEntity":{"allOf":[{"$ref":"#/components/schemas/LakehouseCompanyFederativeEntityDto"},{"type":"object","description":"Responsible federative entity. Present when the legal nature falls under public administration."}]},"taxRegime":{"allOf":[{"$ref":"#/components/schemas/EstablishmentCompanyTaxRegimeDto"},{"type":"object","description":"Tax regime information."}]},"partners":{"type":"array","items":{"$ref":"#/components/schemas/LakehouseCompanyPartnerDto"},"description":"Board of partners and administrators."}},"required":["id","legalName","shareCapital","legalNature","size","partners"],"additionalProperties":false},"EstablishmentCompanyTaxRegimeDto":{"type":"object","properties":{"updatedAt":{"type":"string","description":"Timestamp of the last update via Simples Nacional.","example":"2026-01-27T03:00:00.000Z","format":"date-time","minLength":1},"type":{"allOf":[{"$ref":"#/components/schemas/LakehouseCompanyTaxRegimeTypeDto"},{"type":"object","description":"Tax regime type."}]},"simplesNacionalStartDate":{"type":["null","string"],"description":"Date of inclusion of the current period in Simples Nacional. Present when the tax regime is `SIMPLES_NACIONAL`, `SIMPLES_NACIONAL_HYBRID` or `SIMPLES_NACIONAL_SIMEI`.","example":"2020-06-05","format":"date"},"simeiStartDate":{"type":["null","string"],"description":"Date of inclusion of the current period in SIMEI. Present when the tax regime is `SIMPLES_NACIONAL_SIMEI`.","example":"2020-06-05","format":"date"},"regularIbsStartDate":{"type":["null","string"],"description":"Date of inclusion of the current period in the IBS regular regime. Present when the tax regime is `SIMPLES_NACIONAL_HYBRID`.","example":"2027-01-01","format":"date"},"regularCbsStartDate":{"type":["null","string"],"description":"Date of inclusion of the current period in the CBS regular regime. Present when the tax regime is `SIMPLES_NACIONAL_HYBRID`.","example":"2027-01-01","format":"date"},"timeline":{"type":"array","items":{"$ref":"#/components/schemas/LakehouseCompanyTaxRegimeTimelineDto"},"description":"Timeline of previous periods and upcoming events."}},"required":["updatedAt","type"],"additionalProperties":false},"LakehouseCompanyTaxRegimeTimelineDto":{"type":"object","properties":{"type":{"allOf":[{"$ref":"#/components/schemas/LakehouseCompanyTaxRegimeTimelineTypeDto"},{"type":"object","description":"Tax regime timeline entry type."}]},"startDate":{"type":"string","description":"Period start date or event date.","example":"2020-06-05","format":"date","minLength":1},"endDate":{"type":["null","string"],"description":"Period end date, null for ongoing periods and upcoming events.","example":"2026-12-31","format":"date","minLength":1},"details":{"type":["null","string"],"description":"Entry details.","example":"Excluída por Ato Administrativo praticado pela Receita Federal do Brasil","minLength":1}},"additionalProperties":false,"required":["type","startDate","endDate","details"]},"LakehouseCompanyTaxRegimeTimelineTypeDto":{"type":"object","properties":{"code":{"type":"string","description":"Tax regime timeline entry type code.","example":"SIMPLES_NACIONAL_PERIOD","enum":["ACTUAL_PROFIT_PERIOD","PRESUMED_PROFIT_PERIOD","ARBITRATED_PROFIT_PERIOD","SIMPLES_NACIONAL_PERIOD","SIMPLES_NACIONAL_INCLUSION","SIMPLES_NACIONAL_EXCLUSION","SIMEI_PERIOD","SIMEI_EXCLUSION","SIMEI_CARGO_TRANSPORTER_PERIOD","REGULAR_IBS_PERIOD","REGULAR_IBS_OPTION","REGULAR_IBS_OPTION_CANCELLATION","REGULAR_CBS_PERIOD","REGULAR_CBS_OPTION","REGULAR_CBS_OPTION_CANCELLATION"],"minLength":1,"x-enumDescriptions":{"ACTUAL_PROFIT_PERIOD":"Actual Profit Previous Period","PRESUMED_PROFIT_PERIOD":"Presumed Profit Previous Period","ARBITRATED_PROFIT_PERIOD":"Arbitrated Profit Previous Period","SIMPLES_NACIONAL_PERIOD":"Simples Nacional Previous Period","SIMPLES_NACIONAL_INCLUSION":"Simples Nacional Inclusion","SIMPLES_NACIONAL_EXCLUSION":"Simples Nacional Exclusion","SIMEI_PERIOD":"SIMEI Previous Period","SIMEI_EXCLUSION":"SIMEI Exclusion","SIMEI_CARGO_TRANSPORTER_PERIOD":"SIMEI Self-Employed Cargo Transporter Period","REGULAR_IBS_PERIOD":"IBS Regular Regime Previous Period","REGULAR_IBS_OPTION":"IBS Regular Regime Option","REGULAR_IBS_OPTION_CANCELLATION":"IBS Regular Regime Option Cancellation","REGULAR_CBS_PERIOD":"CBS Regular Regime Previous Period","REGULAR_CBS_OPTION":"CBS Regular Regime Option","REGULAR_CBS_OPTION_CANCELLATION":"CBS Regular Regime Option Cancellation"}},"label":{"type":"string","description":"Tax regime timeline entry type label.","example":"Simples Nacional Previous Period","minLength":1}},"additionalProperties":false,"required":["code","label"]},"EstablishmentAddressDto":{"type":"object","properties":{"street":{"type":["null","string"],"description":"Street name.","example":"Avenida Brigadeiro Faria Lima","minLength":1},"number":{"type":["null","string"],"description":"Street number.","example":"2369","minLength":1},"details":{"type":["null","string"],"description":"Address complement.","example":"Cj 1102","minLength":1},"district":{"type":["null","string"],"description":"Neighborhood or district name.","example":"Jardim Paulistano","minLength":1},"city":{"type":["null","string"],"description":"Municipality name.","example":"São Paulo","minLength":1},"state":{"type":["null","string"],"description":"State abbreviation.","example":"SP","enum":["AC","AL","AM","AP","BA","CE","DF","ES","GO","MA","MG","MS","MT","PA","PB","PE","PI","PR","RJ","RN","RO","RR","RS","SC","SE","SP","TO",null],"minLength":1,"x-enumDescriptions":{"AC":"Acre","AL":"Alagoas","AM":"Amazonas","AP":"Amapá","BA":"Bahia","CE":"Ceará","DF":"Distrito Federal","ES":"Espírito Santo","GO":"Goiás","MA":"Maranhão","MG":"Minas Gerais","MS":"Mato Grosso do Sul","MT":"Mato Grosso","PA":"Pará","PB":"Paraíba","PE":"Pernambuco","PI":"Piauí","PR":"Paraná","RJ":"Rio de Janeiro","RN":"Rio Grande do Norte","RO":"Rondônia","RR":"Roraima","RS":"Rio Grande do Sul","SC":"Santa Catarina","SE":"Sergipe","SP":"São Paulo","TO":"Tocantins"}},"postalCode":{"type":["null","string"],"description":"Postal code (CEP).","example":"01452922","maxLength":8,"minLength":8},"municipality":{"type":["null","string"],"description":"Municipality IBGE code.","example":"3550308","maxLength":7,"minLength":7},"country":{"allOf":[{"$ref":"#/components/schemas/LakehouseAddressCountryDto"},{"type":"object","description":"Country."}]},"coordinates":{"allOf":[{"$ref":"#/components/schemas/EstablishmentAddressCoordinateDto"},{"type":"object","description":"Address coordinates."}]}},"required":["street","number","details","district","city","state","postalCode","municipality","country"],"additionalProperties":false},"EstablishmentAddressCoordinateDto":{"type":"object","properties":{"latitude":{"type":["null","number"],"description":"Address latitude. Null when the address has not been located.","example":-23.5774497},"longitude":{"type":["null","number"],"description":"Address longitude. Null when the address has not been located.","example":-46.6864131},"precision":{"type":["null","string"],"description":"Coordinates precision: ADDRESS when the registered address was located within its municipality, or\nwithin its country when it has no municipality, DISTRICT when only its district was located, MUNICIPALITY when the\nmunicipality seat is used. Null when the address has not been located.","example":"ADDRESS","enum":["ADDRESS","DISTRICT","MUNICIPALITY",null],"minLength":1,"x-enumDescriptions":{"ADDRESS":"Address","DISTRICT":"District","MUNICIPALITY":"Municipality"}}},"additionalProperties":false,"required":["latitude","longitude","precision"]},"LakehousePhoneDto":{"type":"object","properties":{"number":{"type":"string","description":"Phone number in E.164 format.","example":"+5511971564144","pattern":"^\\+[1-9]\\d{10,14}$","minLength":1},"type":{"allOf":[{"$ref":"#/components/schemas/LakehousePhoneTypeDto"},{"type":"object","description":"Phone type."}]}},"additionalProperties":false,"required":["number","type"]},"LakehousePhoneTypeDto":{"type":"object","properties":{"code":{"type":"string","description":"Phone type code.","example":"MOBILE","enum":["LANDLINE","MOBILE"],"minLength":1,"x-enumDescriptions":{"LANDLINE":"Landline","MOBILE":"Mobile"}},"label":{"type":"string","description":"Phone type label.","example":"Mobile","minLength":1}},"additionalProperties":false,"required":["code","label"]},"LakehouseEmailDto":{"type":"object","properties":{"address":{"type":"string","description":"Email address.","example":"contato@cnpja.com","format":"email","minLength":1},"type":{"allOf":[{"$ref":"#/components/schemas/LakehouseEmailTypeDto"},{"type":"object","description":"Email type."}]}},"additionalProperties":false,"required":["address","type"]},"LakehouseEmailTypeDto":{"type":"object","properties":{"code":{"type":"string","description":"Email type code.","example":"CORPORATE","enum":["ACADEMIC","ACCOUNTING","CORPORATE","CONSUMER","GOVERNMENT"],"minLength":1,"x-enumDescriptions":{"ACADEMIC":"Academic","ACCOUNTING":"Accounting","CORPORATE":"Corporate","CONSUMER":"Consumer","GOVERNMENT":"Government"}},"label":{"type":"string","description":"Email type label.","example":"Business","minLength":1}},"additionalProperties":false,"required":["code","label"]},"EstablishmentStateRegistryDto":{"type":"object","properties":{"updatedAt":{"type":"string","description":"Timestamp of the last update via Centralized Taxpayer Registry. Reflects the latest live query of\nthe CNPJ in any state, not only in the requested states.","example":"2026-01-27T03:00:00.000Z","format":"date-time","minLength":1},"registrations":{"type":"array","items":{"$ref":"#/components/schemas/EstablishmentStateRegistryRegistrationDto"},"description":"State taxpayer registrations list, limited to the states requested in `stateRegistry.states`."},"taxRestrictions":{"type":"array","items":{"$ref":"#/components/schemas/LakehouseStateRegistrationTaxRestrictionBaseDto"},"description":"Interstate tax invoice issuance restriction list."}},"additionalProperties":false,"required":["updatedAt","registrations","taxRestrictions"]},"EstablishmentStateRegistryRegistrationDto":{"type":"object","properties":{"updatedAt":{"type":"string","description":"Timestamp of the last update via Centralized Taxpayer Registry.","example":"2026-01-27T03:00:00.000Z","format":"date-time","minLength":1},"number":{"type":"string","description":"State registration number.","example":"936389130","maxLength":14,"minLength":8},"state":{"type":"string","description":"State registration unit.","example":"SP","enum":["AC","AL","AM","AP","BA","CE","DF","ES","GO","MA","MG","MS","MT","PA","PB","PE","PI","PR","RJ","RN","RO","RR","RS","SC","SE","SP","TO"],"minLength":1,"x-enumDescriptions":{"AC":"Acre","AL":"Alagoas","AM":"Amazonas","AP":"Amapá","BA":"Bahia","CE":"Ceará","DF":"Distrito Federal","ES":"Espírito Santo","GO":"Goiás","MA":"Maranhão","MG":"Minas Gerais","MS":"Mato Grosso do Sul","MT":"Mato Grosso","PA":"Pará","PB":"Paraíba","PE":"Pernambuco","PI":"Piauí","PR":"Paraná","RJ":"Rio de Janeiro","RN":"Rio Grande do Norte","RO":"Rondônia","RR":"Roraima","RS":"Rio Grande do Sul","SC":"Santa Catarina","SE":"Sergipe","SP":"São Paulo","TO":"Tocantins"}},"type":{"allOf":[{"$ref":"#/components/schemas/LakehouseStateRegistrationTypeDto"},{"type":"object","description":"State registration type."}]},"statusDate":{"type":"string","description":"Registration status date.","example":"2020-06-05","format":"date","minLength":1},"isEnabled":{"type":"boolean","description":"State registration enabled as taxpayer indicator.","example":true},"hasRestriction":{"type":"boolean","description":"Person has restriction as recipient at the state indicator.","example":true},"activityStartDate":{"type":"string","description":"Taxpayer activity start date.","example":"2020-06-05","format":"date","minLength":1},"activityEndDate":{"type":["null","string"],"description":"Taxpayer activity end date.","example":"2021-06-05","format":"date","minLength":1},"hasExceededSublimit":{"type":"boolean","description":"Simples Nacional optant exceeding gross revenue sublimit indicator.","example":true},"address":{"allOf":[{"$ref":"#/components/schemas/LakehouseAddressDto"},{"type":"object","description":"Address information."}]},"primaryActivity":{"allOf":[{"$ref":"#/components/schemas/LakehouseEconomicActivityDto"},{"type":"object","description":"Primary economic activity."}]},"authorizedTaxDocuments":{"type":"array","items":{"$ref":"#/components/schemas/LakehouseStateRegistrationTaxDocumentDto"},"description":"Authorized tax documents for issuance."}},"required":["updatedAt","number","state","type","statusDate","isEnabled","hasRestriction"],"additionalProperties":false},"LakehouseStateRegistrationTypeDto":{"type":"object","properties":{"code":{"type":"string","description":"State registration type code.","example":"STATE_TAXPAYER","enum":["STATE_TAXPAYER","TAX_SUBSTITUTION","NON_TAXPAYER","INTERSTATE_TAXPAYER","RURAL_PRODUCER"],"minLength":1,"x-enumDescriptions":{"STATE_TAXPAYER":"State Taxpayer","TAX_SUBSTITUTION":"Tax Substitution","NON_TAXPAYER":"Non Taxpayer","INTERSTATE_TAXPAYER":"Interstate Taxpayer","RURAL_PRODUCER":"Rural Producer"}},"label":{"type":"string","description":"State registration type label.","example":"State Taxpayer","minLength":1}},"additionalProperties":false,"required":["code","label"]},"LakehouseStateRegistrationTaxDocumentDto":{"type":"object","properties":{"code":{"type":"string","description":"State registration tax document code.","example":"NFE","enum":["NFE","NFCE","CTE_ROAD","CTE_AIR","CTE_WATERWAY","CTE_RAIL","CTE_PIPELINE","CTE_MULTIMODAL","CTE_OTHER","NFCOM","BPE","BPE_AIR","BPE_METROPOLITAN","NF3E","NFAG","NFGAS"],"minLength":1,"x-enumDescriptions":{"NFE":"NF-e","NFCE":"NFC-e","CTE_ROAD":"CT-e Road","CTE_AIR":"CT-e Air","CTE_WATERWAY":"CT-e Waterway","CTE_RAIL":"CT-e Rail","CTE_PIPELINE":"CT-e Pipeline","CTE_MULTIMODAL":"CT-e Multimodal","CTE_OTHER":"CT-e Other","NFCOM":"NFCom","BPE":"BP-e","BPE_AIR":"BP-e Air","BPE_METROPOLITAN":"BP-e Metropolitan","NF3E":"NF3-e","NFAG":"NFAg","NFGAS":"NFGas"}},"label":{"type":"string","description":"State registration tax document label.","example":"NF-e","minLength":1}},"additionalProperties":false,"required":["code","label"]},"LakehouseStateRegistrationTaxRestrictionBaseDto":{"type":"object","properties":{"issuer":{"type":"string","description":"Unit that issue the blockage.","example":"BA","enum":["AC","AL","AM","AP","BA","CE","DF","ES","GO","MA","MG","MS","MT","PA","PB","PE","PI","PR","RJ","RN","RO","RR","RS","SC","SE","SP","TO"],"minLength":1,"x-enumDescriptions":{"AC":"Acre","AL":"Alagoas","AM":"Amazonas","AP":"Amapá","BA":"Bahia","CE":"Ceará","DF":"Distrito Federal","ES":"Espírito Santo","GO":"Goiás","MA":"Maranhão","MG":"Minas Gerais","MS":"Mato Grosso do Sul","MT":"Mato Grosso","PA":"Pará","PB":"Paraíba","PE":"Pernambuco","PI":"Piauí","PR":"Paraná","RJ":"Rio de Janeiro","RN":"Rio Grande do Norte","RO":"Rondônia","RR":"Roraima","RS":"Rio Grande do Sul","SC":"Santa Catarina","SE":"Sergipe","SP":"São Paulo","TO":"Tocantins"}},"recipient":{"type":"string","description":"Unit blocked as recipient.","example":"SP","enum":["AC","AL","AM","AP","BA","CE","DF","ES","GO","MA","MG","MS","MT","PA","PB","PE","PI","PR","RJ","RN","RO","RR","RS","SC","SE","SP","TO"],"minLength":1,"x-enumDescriptions":{"AC":"Acre","AL":"Alagoas","AM":"Amazonas","AP":"Amapá","BA":"Bahia","CE":"Ceará","DF":"Distrito Federal","ES":"Espírito Santo","GO":"Goiás","MA":"Maranhão","MG":"Minas Gerais","MS":"Mato Grosso do Sul","MT":"Mato Grosso","PA":"Pará","PB":"Paraíba","PE":"Pernambuco","PI":"Piauí","PR":"Paraná","RJ":"Rio de Janeiro","RN":"Rio Grande do Norte","RO":"Rondônia","RR":"Roraima","RS":"Rio Grande do Sul","SC":"Santa Catarina","SE":"Sergipe","SP":"São Paulo","TO":"Tocantins"}}},"additionalProperties":false,"required":["issuer","recipient"]},"EstablishmentSuframaDto":{"type":"object","properties":{"updatedAt":{"type":"string","description":"Timestamp of the last update via SUFRAMA.","example":"2026-01-27T03:00:00.000Z","format":"date-time","minLength":1},"registrations":{"type":"array","items":{"$ref":"#/components/schemas/LakehouseSuframaRegistrationBaseDto"},"description":"SUFRAMA registrations list."}},"additionalProperties":false,"required":["updatedAt","registrations"]},"LakehouseSuframaRegistrationBaseDto":{"type":"object","properties":{"updatedAt":{"type":"string","description":"Timestamp of the last update via SUFRAMA.","example":"2026-01-27T03:00:00.000Z","format":"date-time","minLength":1},"number":{"type":"string","description":"SUFRAMA registration number.","example":"200000000","maxLength":9,"minLength":9},"registrationDate":{"type":"string","description":"Registration date.","example":"2020-06-05","format":"date","minLength":1},"status":{"allOf":[{"$ref":"#/components/schemas/LakehouseSuframaRegistrationStatusDto"},{"type":"object","description":"Registration status."}]},"hasApprovedProject":{"type":"boolean","description":"Approved project presence indicador.","example":true},"approvalDate":{"type":["null","string"],"description":"Project approval date.","example":"2020-06-05","format":"date","minLength":1},"address":{"allOf":[{"$ref":"#/components/schemas/LakehouseAddressDto"},{"type":"object","description":"Address information."}]},"phones":{"type":"array","items":{"$ref":"#/components/schemas/LakehousePhoneDto"},"description":"Phone list."},"emails":{"type":"array","items":{"$ref":"#/components/schemas/LakehouseEmailDto"},"description":"Email list."},"primaryActivity":{"allOf":[{"$ref":"#/components/schemas/LakehouseEconomicActivityDto"},{"type":"object","description":"Primary economic activity."}]},"secondaryActivities":{"type":"array","items":{"$ref":"#/components/schemas/LakehouseEconomicActivityDto"},"description":"Secondary economic activities."}},"additionalProperties":false,"required":["updatedAt","number","registrationDate","status","hasApprovedProject","approvalDate","address","phones","emails","primaryActivity","secondaryActivities"]},"LakehouseSuframaRegistrationStatusDto":{"type":"object","properties":{"code":{"type":"string","description":"Registration status code.","example":"ACTIVE","enum":["ACTIVE","INACTIVE","BLOCKED","CANCELLED"],"minLength":1,"x-enumDescriptions":{"ACTIVE":"Active","INACTIVE":"Inactive","BLOCKED":"Blocked","CANCELLED":"Cancelled"}},"label":{"type":"string","description":"Registration status label.","example":"Active","minLength":1}},"additionalProperties":false,"required":["code","label"]},"EstablishmentPageDto":{"type":"object","properties":{"total":{"type":"number","description":"Number of records available.","example":250,"minimum":0},"limit":{"type":"number","description":"Number of records read.","example":100,"maximum":1000,"minimum":1},"nextCursor":{"type":["null","string"],"description":"Cursor to read read the next page.","example":"9ed11ce29dc14f9c78304c1a403e9f85","minLength":1},"records":{"type":"array","items":{"$ref":"#/components/schemas/EstablishmentPageRecordDto"}}},"required":["total","limit","nextCursor","records"],"additionalProperties":false},"EstablishmentPageRecordDto":{"type":"object","properties":{"updatedAt":{"type":"string","description":"Timestamp of the last update via Federal Revenue Service.","example":"2026-01-27T03:00:00.000Z","format":"date-time","minLength":1},"taxId":{"type":"string","description":"National Registry of Legal Entities (CNPJ) registration number.","example":"37335118000180","maxLength":14,"minLength":14},"incorporationDate":{"type":"string","description":"Incorporation date.","example":"2020-06-05","format":"date","minLength":1},"company":{"allOf":[{"$ref":"#/components/schemas/EstablishmentCompanyPageDto"},{"type":"object","description":"Company information."}]},"type":{"allOf":[{"$ref":"#/components/schemas/LakehouseEstablishmentTypeDto"},{"type":"object","description":"Establishment type."}]},"tradeName":{"type":["null","string"],"description":"Trade name or establishment title.","example":"Cnpja","minLength":1},"statusDate":{"type":"string","description":"Registration status date.","example":"2020-06-05","format":"date","minLength":1},"status":{"allOf":[{"$ref":"#/components/schemas/LakehouseEstablishmentStatusDto"},{"type":"object","description":"Registration status."}]},"statusReason":{"allOf":[{"$ref":"#/components/schemas/LakehouseEstablishmentStatusReasonDto"},{"type":"object","description":"Registration status reason. Present when the establishment is not active."}]},"specialStatusDate":{"type":"string","description":"Special status date. Present when the establishment is active and falls under a specific legal regime.","example":"2020-06-05","format":"date"},"specialStatus":{"allOf":[{"$ref":"#/components/schemas/LakehouseEstablishmentSpecialStatusDto"},{"type":"object","description":"Special registration status. Present when the establishment is active and falls under a specific legal regime."}]},"address":{"allOf":[{"$ref":"#/components/schemas/LakehouseAddressDto"},{"type":"object","description":"Address information."}]},"phones":{"type":"array","items":{"$ref":"#/components/schemas/LakehousePhoneDto"},"description":"Phone list."},"emails":{"type":"array","items":{"$ref":"#/components/schemas/LakehouseEmailDto"},"description":"Email list."},"primaryActivity":{"allOf":[{"$ref":"#/components/schemas/LakehouseEconomicActivityDto"},{"type":"object","description":"Primary economic activity."}]},"secondaryActivities":{"type":"array","items":{"$ref":"#/components/schemas/LakehouseEconomicActivityDto"},"description":"Secondary economic activities."}},"required":["updatedAt","taxId","incorporationDate","company","type","tradeName","statusDate","status","address","phones","emails","primaryActivity","secondaryActivities"],"additionalProperties":false},"EstablishmentCompanyPageDto":{"type":"object","properties":{"id":{"type":"string","description":"Company registration number, equivalent to the first 8 characters of the CNPJ.","example":"37335118","maxLength":8,"minLength":8},"legalName":{"type":"string","description":"Legal name.","example":"CNPJA TECNOLOGIA LTDA","minLength":1},"shareCapital":{"type":"number","description":"Share capital amount.","example":99999.99,"maximum":999999999999.99,"minimum":0},"legalNature":{"allOf":[{"$ref":"#/components/schemas/LakehouseCompanyLegalNatureDto"},{"type":"object","description":"Company legal nature."}]},"size":{"allOf":[{"$ref":"#/components/schemas/LakehouseCompanySizeDto"},{"type":"object","description":"Company size."}]},"federativeEntity":{"allOf":[{"$ref":"#/components/schemas/LakehouseCompanyFederativeEntityDto"},{"type":"object","description":"Responsible federative entity. Present when the legal nature falls under public administration."}]},"taxRegime":{"allOf":[{"$ref":"#/components/schemas/EstablishmentCompanyTaxRegimePageDto"},{"type":"object","description":"Tax regime information."}]},"partners":{"type":"array","items":{"$ref":"#/components/schemas/LakehouseCompanyPartnerDto"},"description":"Board of partners and administrators."}},"required":["id","legalName","shareCapital","legalNature","size","taxRegime","partners"],"additionalProperties":false},"EstablishmentCompanyTaxRegimePageDto":{"type":"object","properties":{"updatedAt":{"type":"string","description":"Timestamp of the last update via Simples Nacional.","example":"2026-01-27T03:00:00.000Z","format":"date-time","minLength":1},"type":{"allOf":[{"$ref":"#/components/schemas/LakehouseCompanyTaxRegimeTypeDto"},{"type":"object","description":"Tax regime type."}]},"simplesNacionalStartDate":{"type":["null","string"],"description":"Date of inclusion of the current period in Simples Nacional. Present when the tax regime is `SIMPLES_NACIONAL`, `SIMPLES_NACIONAL_HYBRID` or `SIMPLES_NACIONAL_SIMEI`.","example":"2020-06-05","format":"date"},"simeiStartDate":{"type":["null","string"],"description":"Date of inclusion of the current period in SIMEI. Present when the tax regime is `SIMPLES_NACIONAL_SIMEI`.","example":"2020-06-05","format":"date"}},"required":["updatedAt","type"],"additionalProperties":false},"IndividualDto":{"type":"object","properties":{"updatedAt":{"type":"string","description":"Timestamp of the last update via Federal Revenue Service.","example":"2026-01-27T03:00:00.000Z","format":"date-time","minLength":1},"taxId":{"type":"string","description":"National Registry of Individual Entities (CPF) registration number.","example":"96419512034","maxLength":11,"minLength":11},"legalName":{"type":"string","description":"Legal name.","example":"Marcos Almeida Gomes","minLength":1},"stateRegistry":{"allOf":[{"$ref":"#/components/schemas/IndividualStateRegistryDto"},{"type":"object","description":"State registry information."}]},"suframa":{"allOf":[{"$ref":"#/components/schemas/IndividualSuframaDto"},{"type":"object","description":"SUFRAMA registration information."}]}},"required":["updatedAt","taxId","legalName"],"additionalProperties":false},"IndividualStateRegistryDto":{"type":"object","properties":{"updatedAt":{"type":"string","description":"Timestamp of the last update via Centralized Taxpayer Registry.","example":"2026-01-27T03:00:00.000Z","format":"date-time","minLength":1},"registrations":{"type":"array","items":{"$ref":"#/components/schemas/IndividualStateRegistryRegistrationDto"},"description":"State taxpayer registrations list, limited to the states in `stateRegistry.states`."},"taxRestrictions":{"type":"array","items":{"$ref":"#/components/schemas/LakehouseStateRegistrationTaxRestrictionBaseDto"},"description":"Interstate tax invoice issuance restriction list."}},"additionalProperties":false,"required":["updatedAt","registrations","taxRestrictions"]},"IndividualStateRegistryRegistrationDto":{"type":"object","properties":{"updatedAt":{"type":"string","description":"Timestamp of the last update via Centralized Taxpayer Registry.","example":"2026-01-27T03:00:00.000Z","format":"date-time","minLength":1},"number":{"type":"string","description":"State registration number.","example":"936389130","maxLength":14,"minLength":8},"state":{"type":"string","description":"State registration unit.","example":"SP","enum":["AC","AL","AM","AP","BA","CE","DF","ES","GO","MA","MG","MS","MT","PA","PB","PE","PI","PR","RJ","RN","RO","RR","RS","SC","SE","SP","TO"],"minLength":1,"x-enumDescriptions":{"AC":"Acre","AL":"Alagoas","AM":"Amazonas","AP":"Amapá","BA":"Bahia","CE":"Ceará","DF":"Distrito Federal","ES":"Espírito Santo","GO":"Goiás","MA":"Maranhão","MG":"Minas Gerais","MS":"Mato Grosso do Sul","MT":"Mato Grosso","PA":"Pará","PB":"Paraíba","PE":"Pernambuco","PI":"Piauí","PR":"Paraná","RJ":"Rio de Janeiro","RN":"Rio Grande do Norte","RO":"Rondônia","RR":"Roraima","RS":"Rio Grande do Sul","SC":"Santa Catarina","SE":"Sergipe","SP":"São Paulo","TO":"Tocantins"}},"type":{"allOf":[{"$ref":"#/components/schemas/LakehouseStateRegistrationTypeDto"},{"type":"object","description":"State registration type."}]},"statusDate":{"type":"string","description":"Registration status date.","example":"2020-06-05","format":"date","minLength":1},"isEnabled":{"type":"boolean","description":"State registration enabled as taxpayer indicator.","example":true},"hasRestriction":{"type":"boolean","description":"Person has restriction as recipient at the state indicator.","example":true},"activityStartDate":{"type":"string","description":"Taxpayer activity start date.","example":"2020-06-05","format":"date","minLength":1},"activityEndDate":{"type":["null","string"],"description":"Taxpayer activity end date.","example":"2021-06-05","format":"date","minLength":1},"hasExceededSublimit":{"type":"boolean","description":"Simples Nacional optant exceeding gross revenue sublimit indicator.","example":true},"address":{"allOf":[{"$ref":"#/components/schemas/LakehouseAddressDto"},{"type":"object","description":"Address information."}]},"primaryActivity":{"allOf":[{"$ref":"#/components/schemas/LakehouseEconomicActivityDto"},{"type":"object","description":"Primary economic activity."}]},"authorizedTaxDocuments":{"type":"array","items":{"$ref":"#/components/schemas/LakehouseStateRegistrationTaxDocumentDto"},"description":"Authorized tax documents for issuance."}},"required":["updatedAt","number","state","type","statusDate","isEnabled","hasRestriction"],"additionalProperties":false},"IndividualSuframaDto":{"type":"object","properties":{"updatedAt":{"type":"string","description":"Timestamp of the last update via SUFRAMA.","example":"2026-01-27T03:00:00.000Z","format":"date-time","minLength":1},"registrations":{"type":"array","items":{"$ref":"#/components/schemas/LakehouseSuframaRegistrationBaseDto"},"description":"SUFRAMA registrations list."}},"additionalProperties":false,"required":["updatedAt","registrations"]},"ListDto":{"type":"object","properties":{"id":{"type":"string","description":"List unique identifier.","example":"3014e069-dd7f-429e-9649-484a424d5614","format":"uuid","minLength":1},"type":{"type":"string","description":"Type of the entities held by the list.","example":"ESTABLISHMENT","enum":["ESTABLISHMENT"],"minLength":1,"x-enumDescriptions":{"ESTABLISHMENT":"Establishments identified by CNPJ"}},"name":{"type":"string","description":"List name.","example":"Customers","maxLength":255,"minLength":1},"size":{"type":"number","description":"Number of items held by the list.","example":250,"minimum":0},"createdAt":{"type":"string","description":"Date and time the list was created.","format":"date-time","minLength":1},"updatedAt":{"type":"string","description":"Date and time the list was last updated.","format":"date-time","minLength":1}},"required":["id","type","name","size","createdAt","updatedAt"],"additionalProperties":false},"ListCreateDto":{"type":"object","properties":{"type":{"type":"string","description":"Type of the entities held by the list.","example":"ESTABLISHMENT","enum":["ESTABLISHMENT"],"minLength":1,"x-enumDescriptions":{"ESTABLISHMENT":"Establishments identified by CNPJ"}},"name":{"type":"string","description":"List name.","example":"Customers","maxLength":255,"minLength":1},"items":{"type":"array","items":{"format":"cnpj","type":"string"},"description":"Identifiers of the items held by the list, duplicated values are discarded.","example":["37335118000180"],"maxItems":1000000}},"required":["type","name"],"additionalProperties":false},"ListPageDto":{"type":"object","properties":{"total":{"type":"number","description":"Number of records available.","example":250,"minimum":0},"limit":{"type":"number","description":"Number of records read.","example":100,"maximum":1000,"minimum":1},"nextCursor":{"type":["null","string"],"description":"Cursor to read read the next page.","example":"9ed11ce29dc14f9c78304c1a403e9f85","minLength":1},"records":{"type":"array","items":{"$ref":"#/components/schemas/ListDto"}}},"required":["total","limit","nextCursor","records"],"additionalProperties":false},"ListUpdateDto":{"type":"object","properties":{"name":{"type":"string","description":"List name.","example":"Customers","maxLength":255,"minLength":1},"operation":{"type":"string","description":"Operation to be applied over the informed items.","example":"ADD","enum":["ADD","REMOVE","REPLACE"],"x-enumDescriptions":{"ADD":"Adds the informed items to the list, ignoring the ones already in it","REMOVE":"Removes the informed items from the list, ignoring the ones not in it","REPLACE":"Replaces every list item by the informed ones"}},"items":{"type":"array","items":{"format":"cnpj","type":"string"},"description":"Identifiers of the items held by the list, duplicated values are discarded.","example":["37335118000180"],"maxItems":1000000}},"dependencies":{"items":{"properties":{"operation":{}},"errorMessage":"requires operation to be present","required":["operation"]},"operation":{"properties":{"items":{}},"errorMessage":"requires items to be present","required":["items"]}},"additionalProperties":false},"PersonDto":{"type":"object","properties":{"updatedAt":{"type":"string","description":"Timestamp of the last update via Federal Revenue Service.","example":"2026-01-27T03:00:00.000Z","format":"date-time","minLength":1},"id":{"type":"string","description":"Unique person identifier.","example":"ae3d1d92-bc15-4126-896f-2dbdbc6bfc97","format":"uuid","minLength":1},"type":{"allOf":[{"$ref":"#/components/schemas/LakehousePersonTypeDto"},{"type":"object","description":"Person type."}]},"legalName":{"type":"string","description":"Legal name.","example":"Francisco Silva","minLength":1},"taxId":{"type":["null","string"],"description":"CPF or CNPJ registration number. It is `null` for `FOREIGNER` and `UNKNOWN` people. The CPF of partners and legal representatives is masked by the Receita Federal, with only the fourth to ninth digits visible.","example":"***650245**","minLength":1},"domicileCountry":{"allOf":[{"$ref":"#/components/schemas/LakehouseAddressCountryDto"},{"type":"object","description":"Country of domicile."}]},"ageGroup":{"type":"string","description":"Age group. Present when the person is an individual.","example":"31-40","enum":["0-12","13-20","21-30","31-40","41-50","51-60","61-70","71-80","81+"],"x-enumDescriptions":{"0-12":"0 to 12 years old","13-20":"13 to 20 years old","21-30":"21 to 30 years old","31-40":"31 to 40 years old","41-50":"41 to 50 years old","51-60":"51 to 60 years old","61-70":"61 to 70 years old","71-80":"71 to 80 years old","81+":"81 years old or above"}},"participations":{"type":"array","items":{"$ref":"#/components/schemas/LakehousePersonParticipationDto"},"description":"Corporate participations list."}},"required":["updatedAt","id","type","legalName","taxId","domicileCountry","participations"],"additionalProperties":false},"LakehousePersonParticipationDto":{"type":"object","properties":{"role":{"allOf":[{"$ref":"#/components/schemas/LakehouseCompanyPartnerRoleDto"},{"type":"object","description":"CompanyPartner role."}]},"admissionDate":{"type":["null","string"],"description":"Admission date.","example":"2026-01-01","format":"date","minLength":1},"legalRepresentative":{"allOf":[{"$ref":"#/components/schemas/LakehouseCompanyPartnerLegalRepresentativeDto"},{"type":"object","description":"Legal representative information. Present when the partner is represented."}]},"company":{"allOf":[{"$ref":"#/components/schemas/LakehousePersonParticipationCompanyDto"},{"type":"object","description":"Company information."}]}},"additionalProperties":false,"required":["role","admissionDate","company"]},"LakehousePersonParticipationCompanyDto":{"type":"object","properties":{"updatedAt":{"type":"string","description":"Timestamp of the last update via Federal Revenue Service.","example":"2026-01-27T03:00:00.000Z","format":"date-time","minLength":1},"id":{"type":"string","description":"Company registration number, equivalent to the first 8 characters of the CNPJ.","example":"37335118","maxLength":8,"minLength":8},"legalName":{"type":"string","description":"Legal name.","example":"CNPJA TECNOLOGIA LTDA","minLength":1},"shareCapital":{"type":"number","description":"Share capital amount.","example":99999.99,"maximum":999999999999.99,"minimum":0},"legalNature":{"allOf":[{"$ref":"#/components/schemas/LakehouseCompanyLegalNatureDto"},{"type":"object","description":"Company legal nature."}]},"size":{"allOf":[{"$ref":"#/components/schemas/LakehouseCompanySizeDto"},{"type":"object","description":"Company size."}]},"federativeEntity":{"allOf":[{"$ref":"#/components/schemas/LakehouseCompanyFederativeEntityDto"},{"type":"object","description":"Responsible federative entity. Present when the legal nature falls under public administration."}]}},"additionalProperties":false,"required":["updatedAt","id","legalName","shareCapital","legalNature","size"]},"PersonPageDto":{"type":"object","properties":{"total":{"type":"number","description":"Number of records available.","example":250,"minimum":0},"limit":{"type":"number","description":"Number of records read.","example":100,"maximum":1000,"minimum":1},"nextCursor":{"type":["null","string"],"description":"Cursor to read read the next page.","example":"9ed11ce29dc14f9c78304c1a403e9f85","minLength":1},"records":{"type":"array","items":{"$ref":"#/components/schemas/PersonDto"}}},"required":["total","limit","nextCursor","records"],"additionalProperties":false},"PostalCodeDto":{"type":"object","properties":{"updatedAt":{"type":"string","description":"Timestamp of the last update via Correios.","example":"2026-01-27T03:00:00.000Z","format":"date-time","minLength":1},"code":{"type":"string","description":"Postal code (CEP).","example":"01452922","maxLength":8,"minLength":8},"type":{"allOf":[{"$ref":"#/components/schemas/LakehousePostalCodeTypeDto"},{"type":"object","description":"Postal code type."}]},"status":{"allOf":[{"$ref":"#/components/schemas/LakehousePostalCodeStatusDto"},{"type":"object","description":"Registration status."}]},"name":{"type":["null","string"],"description":"Large recipient, operational unit or community post office box name.","example":"Edifício Barão de Iguatemi","minLength":1},"street":{"type":["null","string"],"description":"Street name.","example":"Avenida Brigadeiro Faria Lima","minLength":1},"number":{"type":["null","string"],"description":"Street number.","example":"2369","minLength":1},"details":{"type":["null","string"],"description":"Address complement.","example":"Cj 1102","minLength":1},"district":{"type":["null","string"],"description":"Neighborhood or district name.","example":"Jardim Paulistano","minLength":1},"city":{"type":"string","description":"Municipality name.","example":"São Paulo","minLength":1},"state":{"type":"string","description":"State abbreviation.","example":"SP","enum":["AC","AL","AM","AP","BA","CE","DF","ES","GO","MA","MG","MS","MT","PA","PB","PE","PI","PR","RJ","RN","RO","RR","RS","SC","SE","SP","TO"],"minLength":1,"x-enumDescriptions":{"AC":"Acre","AL":"Alagoas","AM":"Amazonas","AP":"Amapá","BA":"Bahia","CE":"Ceará","DF":"Distrito Federal","ES":"Espírito Santo","GO":"Goiás","MA":"Maranhão","MG":"Minas Gerais","MS":"Mato Grosso do Sul","MT":"Mato Grosso","PA":"Pará","PB":"Paraíba","PE":"Pernambuco","PI":"Piauí","PR":"Paraná","RJ":"Rio de Janeiro","RN":"Rio Grande do Norte","RO":"Rondônia","RR":"Roraima","RS":"Rio Grande do Sul","SC":"Santa Catarina","SE":"Sergipe","SP":"São Paulo","TO":"Tocantins"}},"municipality":{"type":"string","description":"Municipality IBGE code.","example":"3550308","maxLength":7,"minLength":7}},"required":["updatedAt","code","type","status","name","street","number","details","district","city","state","municipality"],"additionalProperties":false},"LakehousePostalCodeTypeDto":{"type":"object","properties":{"code":{"type":"string","description":"Postal code type code.","example":"LARGE_RECIPIENT","enum":["COMMUNITY_PO_BOX","LARGE_RECIPIENT","LOCALITY","OPERATIONAL_UNIT","STREET"],"minLength":1,"x-enumDescriptions":{"COMMUNITY_PO_BOX":"Community PO Box","LARGE_RECIPIENT":"Large Recipient","LOCALITY":"Locality","OPERATIONAL_UNIT":"Operational Unit","STREET":"Street"}},"label":{"type":"string","description":"Postal code type label.","example":"Large Recipient","minLength":1}},"additionalProperties":false,"required":["code","label"]},"LakehousePostalCodeStatusDto":{"type":"object","properties":{"code":{"type":"string","description":"Registration status code.","example":"ACTIVE","enum":["ACTIVE","DEACTIVATED"],"minLength":1,"x-enumDescriptions":{"ACTIVE":"Active","DEACTIVATED":"Deactivated"}},"label":{"type":"string","description":"Registration status label.","example":"Active","minLength":1}},"additionalProperties":false,"required":["code","label"]},"PostalCodePageDto":{"type":"object","properties":{"total":{"type":"number","description":"Number of records available.","example":250,"minimum":0},"limit":{"type":"number","description":"Number of records read.","example":100,"maximum":1000,"minimum":1},"nextCursor":{"type":["null","string"],"description":"Cursor to read read the next page.","example":"9ed11ce29dc14f9c78304c1a403e9f85","minLength":1},"records":{"type":"array","items":{"$ref":"#/components/schemas/PostalCodeDto"}}},"required":["total","limit","nextCursor","records"],"additionalProperties":false}}},"x-tagGroups":[{"name":"Business data","tags":["Establishments","Companies","People","Individuals","Postal codes"]},{"name":"Utilities","tags":["Lists"]}]}