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

# List legal entities

> This endpoint allows fetching a list of the tenant's legal entities, the registered companies that issue its invoices, newest first by creation time. A contract names one of them through `legalEntityId`.



## OpenAPI

````yaml /api-reference/openapi.yaml get /v1/legal-entities/
openapi: 3.1.0
info:
  title: API Reference
  version: '1.0'
  description: Aira API Reference
  x-logo:
    url: https://static.useaira.com/images/airalogo.svg
    backgroundColor: '#FFFFFF'
    altText: Aira Logo
servers:
  - url: https://api.useaira.com
    description: API base URL
security:
  - ApiKey: []
paths:
  /v1/legal-entities/:
    get:
      tags:
        - Legal Entities
      summary: List legal entities
      description: >-
        This endpoint allows fetching a list of the tenant's legal entities, the
        registered companies that issue its invoices, newest first by creation
        time. A contract names one of them through `legalEntityId`.
      parameters:
        - schema:
            type: integer
            default: 0
            minimum: 0
            maximum: 2147483647
          in: query
          name: offset
          required: false
          description: Number of items to skip before collecting the page.
        - schema:
            type: integer
            minimum: 1
            default: 100
            maximum: 100
          in: query
          name: limit
          required: false
          description: Maximum number of items to return per page.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      description: >-
                        Schema representing a legal entity of the tenant in a
                        list: a registered company of the tenant that issues its
                        invoices. A contract names one of them through
                        `legalEntityId`.
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: >-
                            The unique identifier of the legal entity in our
                            system.
                        businessName:
                          type: string
                          description: >-
                            Registered business name (razão social) of the legal
                            entity.
                        taxId:
                          type: string
                          pattern: ^(^\d{14}$|^\d{11}$)$
                          description: >-
                            Tax identification number of the legal entity,
                            digits only.
                          example: '01234567000189'
                        taxIdType:
                          type: string
                          enum:
                            - cnpj
                            - cpf
                          description: >-
                            The kind of tax identification number in taxId (e.g.
                            CNPJ for Brazilian companies, CPF for individuals).
                        tradeName:
                          description: >-
                            Trade name (nome fantasia) of the legal entity, or
                            null when it has none.
                          type:
                            - 'null'
                            - string
                      required:
                        - id
                        - businessName
                        - tradeName
                        - taxId
                        - taxIdType
                      additionalProperties: false
                    description: A list of items.
                  hasMore:
                    description: Indicates if there are more items to fetch.
                    type: boolean
                required:
                  - items
                  - hasMore
                additionalProperties: false
        '429':
          description: >-
            The tenant reached one of its limits of reads: 20 reads in flight or
            50 reads per second.
          headers:
            Retry-After:
              schema:
                type: integer
              description: The seconds to wait before the next read.
            RateLimit-Limit:
              schema:
                type: integer
              description: >-
                The limit that the read hit: 20 for the reads in flight, 50 for
                the reads per second.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The reads left under that limit, which is 0.
            RateLimit-Reset:
              schema:
                type: integer
              description: >-
                The seconds to wait before the next read, as in Retry-After. The
                limit of reads per second takes new reads in the next second,
                but the limit of reads in flight takes a new read only once one
                of the reads in flight ends.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: >-
                      A human-readable description of the limit that the read
                      hit
                  code:
                    type: string
                    enum:
                      - too_many_reads_in_flight
                      - too_many_reads_per_second
                    description: The limit that the read hit
                required:
                  - code
                  - message
                additionalProperties: false
components:
  securitySchemes:
    ApiKey:
      type: apiKey
      description: API Key Authentication.
      name: X-API-KEY
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.