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

# Get your tax issuer

> Returns the tax issuer of the organization, with its test and live configurations.

The tax issuer is the registration of your organization that issues its service invoices (NFSe). The response carries the organization's registration data (name, CNPJ, address, taken from Portão 3), the `TEST` (homologation) and `LIVE` (production) configurations, and whether a digital certificate and a logotype have been uploaded. Use its `id` as `{taxIssuer}` in the upload routes.

Only an active tax issuer is returned: one you deactivated, or that never finished its creation, is answered as not found.


## OpenAPI

````yaml /api-reference/accounting.openapi.json get /realms/{realmId}/organizations/{organizationId}/tax-issuer
openapi: 3.0.3
info:
  title: Accounting
  version: 1.0.0
  description: >-
    Portão 3 accounting API. Every endpoint requires a bearer token in the
    Authorization header (Authorization: Bearer <token>) unless its page states
    otherwise; see the Authentication guide. That requirement is not repeated
    per endpoint. Generated by tools/openapi from code (routes + security) and
    the hand-written spec (request/response bodies). NFSe issuance: the
    organization's tax issuer (setup, certificate, logo), its tax documents
    (issue, list, download, cancel, CSV batches) and the city special-tax-regime
    lookup. Every route validates path, query, body and multipart form through a
    zod Input class (`accounting/app/use-case/*/inputs`), which documents it;
    responses are the named interfaces in
    `accounting/app/use-case/*/outputs/*Response.ts`. Confidence tiers:
    generated:typed=24 copied:manual=0 unknown=0.
servers:
  - url: https://api.accounting.v2.portao3.com.br/
    description: production
  - url: https://api.accounting.dev.3pers.com.br/
    description: development
security: []
tags:
  - name: Tax Issuers
  - name: Tax Documents (NFSe)
  - name: Tax Codes
paths:
  /realms/{realmId}/organizations/{organizationId}/tax-issuer:
    get:
      tags:
        - Tax Issuers
      summary: Get your tax issuer
      description: >-
        Returns the tax issuer of the organization, with its test and live
        configurations.
      operationId: getRealmsByRealmIdOrganizationsByOrganizationIdTaxIssuer
      parameters:
        - name: realmId
          in: path
          required: true
          description: |-
            ID of your realm.

            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: f495ff0c-ab54-4f99-8e92-ca8682e4de9b
        - name: organizationId
          in: path
          required: true
          description: |-
            ID of the organization.

            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: c4bd3f21-dfbd-44e8-8055-68ba15bed410
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: >-
                      ID of the tax issuer. Use it as `{taxIssuer}` in the
                      upload routes.
                    example: 9b2f4c1e-7a3d-4e8b-b6f0-2d5c8a1e3f47
                    format: uuid
                  realm:
                    type: string
                    description: ID of your realm.
                    example: f495ff0c-ab54-4f99-8e92-ca8682e4de9b
                    format: uuid
                  organization:
                    type: string
                    description: ID of the organization.
                    example: c4bd3f21-dfbd-44e8-8055-68ba15bed410
                    format: uuid
                  tradingName:
                    type: string
                    description: Trade name of the organization.
                    example: Acme Tecnologia
                  legalName:
                    type: string
                    description: Legal name of the organization.
                    example: Acme Tecnologia Ltda
                  document:
                    type: string
                    description: CNPJ of the organization, digits only.
                    example: '12345678000195'
                  email:
                    type: string
                    description: E-mail of the organization.
                    example: fiscal@acme.com.br
                  municipalDocument:
                    type: string
                    description: >-
                      Municipal registration (`inscrição municipal`) of the
                      organization.
                    example: '123456'
                  stateDocument:
                    type: string
                    description: >-
                      State registration (`inscrição estadual`) of the
                      organization.
                    example: '654321'
                  phoneNumber:
                    type: string
                    description: Phone number of the organization, in international format.
                    example: '+5534984325252'
                  mainActivity:
                    type: string
                    description: Main business activity of the organization.
                    example: Desenvolvimento de programas de computador sob encomenda
                  status:
                    type: string
                    enum:
                      - ACTIVE
                      - INACTIVE
                      - ERROR
                    description: >-
                      Status of the tax issuer. Only an `ACTIVE` issuer is
                      returned.
                    example: ACTIVE
                  hasLogotype:
                    type: boolean
                    description: Whether a logotype has been uploaded.
                    example: true
                  address:
                    type: object
                    properties:
                      city:
                        type: string
                        description: City.
                        example: Uberlândia
                      neighborhood:
                        type: string
                        description: Neighborhood.
                        example: Centro
                      number:
                        type: string
                        description: Street number.
                        example: '1000'
                      state:
                        type: string
                        description: State, as its two-letter code.
                        example: MG
                      street:
                        type: string
                        description: Street name.
                        example: Avenida Getúlio Vargas
                      postalCode:
                        type: string
                        description: Postal code (CEP).
                        example: 38400-000
                      complement:
                        type: string
                        description: >-
                          Address complement, such as the floor or suite. Empty
                          when there is none.
                        example: Sala 12
                      stateCode:
                        type: number
                        nullable: true
                        description: >-
                          IBGE code of the state. `null` when the organization
                          has none registered.
                        example: 31
                      cityCode:
                        type: number
                        nullable: true
                        description: >-
                          IBGE code of the city. `null` when the organization
                          has none registered.
                        example: 3170206
                    required:
                      - city
                      - neighborhood
                      - number
                      - state
                      - street
                      - postalCode
                      - complement
                    description: Registered address of the organization.
                  homologationProperties:
                    type: object
                    properties:
                      id:
                        type: string
                        description: ID of this configuration.
                        example: 7c1e5a90-3b2d-4f68-8a14-d9e0b6c2f375
                        format: uuid
                      environment:
                        type: string
                        enum:
                          - LIVE
                          - TEST
                        description: 'Environment this configuration is for: always `TEST`.'
                        example: TEST
                      specialTaxCode:
                        type: string
                        description: Code of the special taxation regime of the city.
                        example: '1'
                      municipalServiceCode:
                        type: string
                        description: >-
                          Municipal service code, as the city hall defines it.
                          Used on every invoice that does not send its own.
                        example: '0107'
                      serviceListItem:
                        type: string
                        description: >-
                          Item of the federal service list (LC 116/2003), such
                          as `1.07`. Empty when none was registered.
                        example: '1.07'
                      cnae:
                        type: number
                        description: CNAE subclass code of the main activity, as a number.
                        example: 6201501
                      issTax:
                        type: number
                        description: >-
                          ISS (municipal service tax) rate in percent: `2.5`
                          means 2.5%.
                        example: 2.5
                      serviceDescription:
                        type: string
                        description: Description of the service provided.
                        example: Licenciamento de software como serviço (SaaS)
                      hasCulturalIncentive:
                        type: boolean
                        description: >-
                          Whether the organization is a cultural incentivizer
                          (`incentivador cultural`).
                        example: false
                      isSimplesNacional:
                        type: boolean
                        description: >-
                          Whether the organization is under the Simples Nacional
                          tax regime.
                        example: true
                      nfeSequencialCode:
                        type: number
                        description: >-
                          RPS (provisional service receipt) number set for this
                          environment when the tax issuer was created or last
                          updated: where the tax provider's numbering started.
                          It is NOT advanced as documents are issued, so it is
                          not the next number — never send it back unchanged in
                          an update.
                        example: 1
                      nfeSeries:
                        type: string
                        description: Series of the RPS this environment issues.
                        example: '1'
                      nfeSequencialBatch:
                        type: number
                        description: >-
                          RPS batch number set for this environment when the tax
                          issuer was created or last updated. Like
                          `nfeSequencialCode`, it is not advanced as documents
                          are issued.
                        example: 1
                      hasCertificate:
                        type: boolean
                        description: >-
                          Whether a digital certificate has been uploaded (see
                          Upload your digital certificate).
                        example: true
                      taxConfiguration:
                        type: object
                        properties:
                          nbsCode:
                            type: string
                            description: >-
                              NBS code (`Nomenclatura Brasileira de Serviços`)
                              of the service.
                            example: '115090000'
                          nationalTaxCode:
                            type: string
                            description: >-
                              National tax code (`código de tributação
                              nacional`) of the service.
                            example: '010701'
                          taxClassification:
                            type: string
                            description: >-
                              Tax classification (`classificação tributária`) of
                              the operation.
                            example: '000001'
                          operationIndicatorCode:
                            type: string
                            description: >-
                              Operation indicator (`indicador de operação`)
                              code.
                            example: '100301'
                        description: >-
                          National NFSe tax fields of the LC 214/2025 reform.
                          Absent when none were registered.
                    required:
                      - cnae
                      - hasCertificate
                      - hasCulturalIncentive
                      - id
                      - isSimplesNacional
                      - issTax
                      - municipalServiceCode
                      - nfeSequencialBatch
                      - nfeSequencialCode
                      - nfeSeries
                      - serviceDescription
                      - serviceListItem
                      - specialTaxCode
                    description: >-
                      Configuration of the test (homologation) environment:
                      documents issued here have no fiscal value.
                  productionProperties:
                    type: object
                    properties:
                      id:
                        type: string
                        description: ID of this configuration.
                        example: a4d8e2f1-6b3c-4e9a-8f05-1c7b9d2e6a30
                        format: uuid
                      environment:
                        type: string
                        enum:
                          - LIVE
                          - TEST
                        description: 'Environment this configuration is for: always `LIVE`.'
                        example: LIVE
                      specialTaxCode:
                        type: string
                        description: Code of the special taxation regime of the city.
                        example: '1'
                      municipalServiceCode:
                        type: string
                        description: >-
                          Municipal service code, as the city hall defines it.
                          Used on every invoice that does not send its own.
                        example: '0107'
                      serviceListItem:
                        type: string
                        description: >-
                          Item of the federal service list (LC 116/2003), such
                          as `1.07`. Empty when none was registered.
                        example: '1.07'
                      cnae:
                        type: number
                        description: CNAE subclass code of the main activity, as a number.
                        example: 6201501
                      issTax:
                        type: number
                        description: >-
                          ISS (municipal service tax) rate in percent: `2.5`
                          means 2.5%.
                        example: 2.5
                      serviceDescription:
                        type: string
                        description: Description of the service provided.
                        example: Licenciamento de software como serviço (SaaS)
                      hasCulturalIncentive:
                        type: boolean
                        description: >-
                          Whether the organization is a cultural incentivizer
                          (`incentivador cultural`).
                        example: false
                      isSimplesNacional:
                        type: boolean
                        description: >-
                          Whether the organization is under the Simples Nacional
                          tax regime.
                        example: true
                      nfeSequencialCode:
                        type: number
                        description: >-
                          RPS (provisional service receipt) number set for this
                          environment when the tax issuer was created or last
                          updated: where the tax provider's numbering started.
                          It is NOT advanced as documents are issued, so it is
                          not the next number — never send it back unchanged in
                          an update.
                        example: 1
                      nfeSeries:
                        type: string
                        description: Series of the RPS this environment issues.
                        example: '1'
                      nfeSequencialBatch:
                        type: number
                        description: >-
                          RPS batch number set for this environment when the tax
                          issuer was created or last updated. Like
                          `nfeSequencialCode`, it is not advanced as documents
                          are issued.
                        example: 1
                      hasCertificate:
                        type: boolean
                        description: >-
                          Whether a digital certificate has been uploaded (see
                          Upload your digital certificate).
                        example: true
                      taxConfiguration:
                        type: object
                        properties:
                          nbsCode:
                            type: string
                            description: >-
                              NBS code (`Nomenclatura Brasileira de Serviços`)
                              of the service.
                            example: '115090000'
                          nationalTaxCode:
                            type: string
                            description: >-
                              National tax code (`código de tributação
                              nacional`) of the service.
                            example: '010701'
                          taxClassification:
                            type: string
                            description: >-
                              Tax classification (`classificação tributária`) of
                              the operation.
                            example: '000001'
                          operationIndicatorCode:
                            type: string
                            description: >-
                              Operation indicator (`indicador de operação`)
                              code.
                            example: '100301'
                        description: >-
                          National NFSe tax fields of the LC 214/2025 reform.
                          Absent when none were registered.
                    required:
                      - cnae
                      - hasCertificate
                      - hasCulturalIncentive
                      - id
                      - isSimplesNacional
                      - issTax
                      - municipalServiceCode
                      - nfeSequencialBatch
                      - nfeSequencialCode
                      - nfeSeries
                      - serviceDescription
                      - serviceListItem
                      - specialTaxCode
                    description: >-
                      Configuration of the live (production) environment:
                      documents issued here are legally valid.
                required:
                  - id
                  - realm
                  - organization
                  - tradingName
                  - legalName
                  - document
                  - email
                  - status
                  - hasLogotype
                  - address
                  - homologationProperties
                  - productionProperties
                description: >-
                  The tax issuer of an organization: who issues its NFSe, and
                  how, in the test and live environments.
        '404':
          description: >-
            `TAX_ISSUER_NOT_FOUND` — The organization has no active tax issuer.


            `ORGANIZATION_NOT_FOUND` — The organization does not exist in your
            realm.


            `ISSUER_PROPERTIES_NOT_FOUND` — The tax issuer is missing its test
            or its live configuration.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - TAX_ISSUER_NOT_FOUND
                      - ORGANIZATION_NOT_FOUND
                      - ISSUER_PROPERTIES_NOT_FOUND
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - ACCOUNTING
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: TAX_ISSUER_NOT_FOUND
                origin: ACCOUNTING
                message: Tax issuer not found
        '422':
          description: >-
            `BAD_REQUEST` — A path parameter is not a valid ID; `fields` lists
            each one.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - BAD_REQUEST
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - ACCOUNTING
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                  fields:
                    type: array
                    description: >-
                      One entry per invalid request field (validation errors
                      only).
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: >-
                            Path of the invalid field, e.g. `label` or
                            `values[0].value`.
                          example: label
                        message:
                          type: string
                          description: Why the field was rejected.
                          example: label is required
                        code:
                          type: string
                          description: >-
                            `<FIELD>_<REASON>` — e.g. `LABEL_REQUIRED`,
                            `TYPE_ONE_OF`, `VALUES_VALUE_TYPE_ERROR`.
                          example: LABEL_REQUIRED
                        values:
                          type: array
                          items:
                            type: string
                          description: >-
                            The accepted values, when the field is an
                            enumeration.
                      required:
                        - field
                        - message
                        - code
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: BAD_REQUEST
                origin: ACCOUNTING
                message: >-
                  Bad Request: Your request is invalid or incomplete. Please
                  make sure you are requesting with the right fields.
                fields:
                  - field: organizationId
                    message: Invalid UUID
                    code: ORGANIZATIONID_UUID

````

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