> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# CNPJ Office Lookup

> Look up the registered profile of a Brazilian company office (establishment) by its 14-digit CNPJ tax ID.

Resolve the full registered profile of a Brazilian company office (establishment) from its 14-digit CNPJ tax ID. The response includes the legal name (razão social) via `company.name`, the trade name (`alias`, which may be `null`), registration `status`, `founded` date, the full registered `address`, the shareholder/partner structure (`company.members`), registered `phones` / `emails`, and the primary/secondary economic activities (`mainActivity` / `sideActivities`).

Pass the CNPJ as the `taxId` path parameter (digits only, no punctuation) and authenticate with your AIsa API key as a bearer token — the same key used across every AIsa `/apis/*` endpoint.

Example: `GET /apis/v1/cnpja/office/06990590000123` returns the office registered under that CNPJ, including `company.name`, `alias`, `status`, `address`, `company.members`, and `mainActivity`.

**Error responses:** a malformed CNPJ that fails the check-digit (checksum) algorithm returns **HTTP 400** (`request validation failed`) — a client-side input error. A well-formed CNPJ that is simply not registered returns **HTTP 404** (`tax id not registered at revenue service`).

**Billing: \$0.00528 per call (1 credit per lookup).** The "not registered" **HTTP 404** result returns a valid JSON body and is still billed 1 credit; only 429, 5xx, and network errors are not billed. (A **400** validation error is a client-side rejection.)


## OpenAPI

````yaml openapi/cnpja.json GET /cnpja/office/{taxId}
openapi: 3.0.3
info:
  title: CNPJá API
  version: 1.0.0
  description: >-
    Brazilian company registry (CNPJ) lookup routed through the AIsa gateway.
    Resolve the full registered profile of a Brazilian company office
    (establishment) from its 14-digit CNPJ tax ID: legal name, trade name,
    registration status, address, shareholder structure, and economic
    activities. Flat pricing at $0.00528 per call (1 credit per lookup). A
    "company not found" (HTTP 404) still returns a valid API response and is
    billed 1 credit; only 429, 5xx, and network errors are not billed.
servers:
  - url: https://api.aisa.one/apis/v1
security:
  - BearerAuth: []
paths:
  /cnpja/office/{taxId}:
    get:
      summary: CNPJ Office Lookup
      description: >-
        Look up the registered profile of a Brazilian company office
        (establishment) by its 14-digit CNPJ tax ID. Returns the office's
        legal/company name, trade name (`alias`), registration status, founding
        date, full address, shareholder/member structure, and primary/secondary
        economic activities (CNAE).


        Billed $0.00528 per call (1 credit per lookup). A "company not found"
        result returns HTTP 404 with a valid JSON body and is still billed 1
        credit; only 429, 5xx, and network errors are not billed.
      operationId: get_cnpja_office_lookup
      parameters:
        - name: taxId
          in: path
          required: true
          description: >-
            The 14-digit Brazilian CNPJ number of the office to look up (digits
            only, no punctuation). Punctuated input fails routing. Example:
            `06990590000123`.
          schema:
            type: string
            example: '06990590000123'
      responses:
        '200':
          description: The registered office profile for the given CNPJ.
          content:
            application/json:
              schema:
                type: object
                properties:
                  updated:
                    type: string
                    description: >-
                      Timestamp of the last update of this record at the revenue
                      service (ISO 8601).
                  taxId:
                    type: string
                    description: The 14-digit CNPJ of this office.
                  alias:
                    type: string
                    nullable: true
                    description: >-
                      Trade name (nome fantasia) of the office, when registered.
                      Returns `null` for offices without a registered trade
                      name.
                  founded:
                    type: string
                    description: Registration/opening date of the office (YYYY-MM-DD).
                  head:
                    type: boolean
                    description: Whether this office is the company headquarters (matriz).
                  statusDate:
                    type: string
                    description: Date of the current registration status (YYYY-MM-DD).
                  status:
                    type: object
                    description: Registration status of the office (e.g. Ativa / Baixada).
                    properties:
                      id:
                        type: integer
                      text:
                        type: string
                  company:
                    type: object
                    description: The parent legal entity.
                    properties:
                      id:
                        type: string
                        description: >-
                          Company identifier (8 digits, may include leading
                          zeros).
                      name:
                        type: string
                        description: Legal name (razão social) of the company.
                      equity:
                        type: number
                        description: Registered share capital.
                      nature:
                        type: object
                        description: Legal nature (natureza jurídica) of the company.
                        properties:
                          id:
                            type: integer
                          text:
                            type: string
                      size:
                        type: object
                        description: Company size classification (porte).
                        properties:
                          id:
                            type: integer
                          acronym:
                            type: string
                          text:
                            type: string
                      members:
                        type: array
                        description: >-
                          Shareholder / partner structure (quadro societário).
                          Each entry describes a member and, when applicable,
                          their legal representative (agent).
                        items:
                          type: object
                          properties:
                            since:
                              type: string
                              description: Date the member joined (YYYY-MM-DD).
                            role:
                              type: object
                              properties:
                                id:
                                  type: integer
                                text:
                                  type: string
                            person:
                              type: object
                              properties:
                                id:
                                  type: string
                                name:
                                  type: string
                                type:
                                  type: string
                                  description: LEGAL or NATURAL.
                                taxId:
                                  type: string
                                  description: Partially masked for natural persons.
                                age:
                                  type: string
                                  description: Age band for natural persons.
                                  nullable: true
                                country:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                    name:
                                      type: string
                            agent:
                              type: object
                              nullable: true
                              description: >-
                                Legal representative of the member, when the
                                member is a foreign or legal entity.
                              properties:
                                role:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                    text:
                                      type: string
                                person:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                    name:
                                      type: string
                                    type:
                                      type: string
                                    taxId:
                                      type: string
                                    age:
                                      type: string
                                      nullable: true
                                    country:
                                      type: object
                                      properties:
                                        id:
                                          type: integer
                                        name:
                                          type: string
                  address:
                    type: object
                    description: Registered address of the office.
                    properties:
                      municipality:
                        type: integer
                        description: IBGE municipality code.
                      street:
                        type: string
                      number:
                        type: string
                      details:
                        type: string
                        description: Address complement (complemento).
                        nullable: true
                      district:
                        type: string
                      city:
                        type: string
                      state:
                        type: string
                      zip:
                        type: string
                      country:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                  phones:
                    type: array
                    description: Registered phone numbers.
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          description: e.g. LANDLINE / MOBILE.
                        area:
                          type: string
                          description: Area code (DDD).
                        number:
                          type: string
                  emails:
                    type: array
                    description: Registered email addresses.
                    items:
                      type: object
                      properties:
                        ownership:
                          type: string
                          description: e.g. CORPORATE / PERSONAL.
                        domain:
                          type: string
                        address:
                          type: string
                  mainActivity:
                    type: object
                    description: Primary economic activity (CNAE) of the office.
                    properties:
                      id:
                        type: integer
                      text:
                        type: string
                  sideActivities:
                    type: array
                    description: Secondary economic activities (CNAE).
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        text:
                          type: string
              example:
                updated: '2026-09-08T20:11:15.000Z'
                taxId: '06990590000123'
                company:
                  id: '06990590'
                  name: GOOGLE BRASIL INTERNET LTDA.
                  equity: 200000000
                  nature:
                    id: 2062
                    text: Sociedade Empresária Limitada
                  size:
                    id: 5
                    acronym: DEMAIS
                    text: Demais
                  members:
                    - since: '2004-09-01'
                      role:
                        id: 37
                        text: Sócio Pessoa Jurídica Domiciliado no Exterior
                      person:
                        id: f172f1f6-46f5-5a10-9fb9-8d7c2dbdc2f9
                        name: GOOGLE LLC
                        type: LEGAL
                        taxId: '06947284000104'
                        country:
                          id: 840
                          name: Estados Unidos
                      agent:
                        role:
                          id: 17
                          text: Procurador
                        person:
                          id: 1cf6c284-8400-5c85-89e3-b20e0093be5a
                          name: Yun Ki Lee
                          type: NATURAL
                          taxId: '***746608**'
                          age: 51-60
                          country:
                            id: 76
                            name: Brasil
                    - since: '2014-08-26'
                      role:
                        id: 5
                        text: Administrador
                      person:
                        id: dc20e638-a27c-547c-bb7d-5ee7cbd917b7
                        name: Fabio Jose Silva Coelho
                        type: NATURAL
                        taxId: '***133807**'
                        age: 61-70
                        country:
                          id: 76
                          name: Brasil
                alias: null
                founded: '2004-09-01'
                head: true
                statusDate: '2004-09-01'
                status:
                  id: 2
                  text: Ativa
                address:
                  municipality: 3550308
                  street: Avenida Brig Faria Lima
                  number: '3477'
                  details: Andar 17A20 Tsul 2 17A20
                  district: Itaim Bibi
                  city: São Paulo
                  state: SP
                  zip: '04538133'
                  country:
                    id: 76
                    name: Brasil
                phones:
                  - type: LANDLINE
                    area: '11'
                    number: '23958400'
                emails:
                  - ownership: CORPORATE
                    domain: google.com
                    address: googlebrasil@google.com
                mainActivity:
                  id: 6319400
                  text: >-
                    Portais, provedores de conteúdo e outros serviços de
                    informação na Internet
                sideActivities:
                  - id: 4751201
                    text: >-
                      Comércio varejista especializado de equipamentos e
                      suprimentos de informática
                  - id: 6201501
                    text: Desenvolvimento de programas de computador sob encomenda
                  - id: 6202300
                    text: >-
                      Desenvolvimento e licenciamento de programas de computador
                      customizáveis
                  - id: 6311900
                    text: >-
                      Tratamento de dados, provedores de serviços de aplicação e
                      serviços de hospedagem na Internet
                  - id: 6462000
                    text: Holdings de instituições não financeiras
                  - id: 7319004
                    text: Consultoria em publicidade
                  - id: 8299799
                    text: >-
                      Outras atividades de serviços prestados principalmente às
                      empresas não especificadas anteriormente
        '400':
          description: >-
            The supplied taxId failed the CNPJ verification (checksum) algorithm
            — a malformed number that is not a valid CNPJ. Distinct from 404 (a
            well-formed CNPJ that is simply not registered). A 400 indicates a
            client-side input error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  constraints:
                    type: array
                    items:
                      type: string
              example:
                code: 400
                message: request validation failed
                constraints:
                  - >-
                    taxId must be a string that obeys cnpj verification
                    algorithm
        '404':
          description: >-
            A well-formed CNPJ that is not registered at the revenue service.
            Returns a valid JSON error body and is still billed 1 credit
            ($0.00528).
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              example:
                code: 404
                message: tax id not registered at revenue service
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: AISA API Key

````