> ## 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.

# /realms/{realmId}/organizations/{organizationId}/tax-document



## OpenAPI

````yaml /api-reference/accounting.openapi.json post /realms/{realmId}/organizations/{organizationId}/tax-document
openapi: 3.0.3
info:
  title: Accounting
  version: 1.0.0
  description: >-
    Portão 3 accounting API. Generated by tools/openapi from code (routes +
    security) and the hand-written spec (request/response bodies). Confidence
    tiers: generated:typed=9 copied:manual=0 unknown=12.
servers:
  - url: https://api.accounting.v2.portao3.com.br/
    description: production
  - url: https://api.accounting.dev.3pers.com.br/
    description: development
security:
  - bearerAuth: []
tags:
  - name: Tax Documents (NFSe)
  - name: Tax Issuers
  - name: Tax Codes
  - name: Internal & Support
paths:
  /realms/{realmId}/organizations/{organizationId}/tax-document:
    post:
      tags:
        - Tax Documents (NFSe)
      summary: /realms/{realmId}/organizations/{organizationId}/tax-document
      operationId: postRealmsByRealmIdOrganizationsByOrganizationIdTaxDocument
      parameters:
        - name: realmId
          in: path
          required: true
          schema:
            type: string
        - name: organizationId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                type: {}
                environment:
                  type: string
                  minLength: 1
                competenceDate:
                  type: string
                  format: date-time
                operationNature:
                  type: string
                deductions:
                  type: number
                discounts:
                  type: number
                totalValue:
                  type: number
                observation:
                  type: string
                externalId:
                  anyOf:
                    - type: string
                      format: uuid
                      pattern: >-
                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
                    - type: string
                      enum:
                        - ''
                taxDocumentCustomer:
                  type: object
                  properties:
                    type:
                      type: string
                      minLength: 1
                    name:
                      type: string
                      minLength: 1
                    email:
                      type: string
                      minLength: 1
                    federalDocument:
                      type: string
                      minLength: 1
                    municipalDocument:
                      type: string
                    stateDocument:
                      type: string
                    phone:
                      type: string
                      minLength: 1
                    addressState:
                      type: string
                      minLength: 1
                    addressCity:
                      type: string
                      minLength: 1
                    addressStreet:
                      type: string
                      minLength: 1
                    addressNumber:
                      type: string
                      minLength: 1
                    addressComplement:
                      type: string
                    addressNeighbourhood:
                      type: string
                      minLength: 1
                    addressPostalCode:
                      type: string
                      minLength: 1
                  required:
                    - type
                    - name
                    - email
                    - federalDocument
                    - phone
                    - addressState
                    - addressCity
                    - addressStreet
                    - addressNumber
                    - addressNeighbourhood
                    - addressPostalCode
                  additionalProperties: false
                taxDocumentServiceProperty:
                  type: object
                  properties:
                    serviceProvisionState:
                      type: string
                      minLength: 1
                    serviceProvisionCity:
                      type: string
                      minLength: 1
                    description:
                      type: string
                      minLength: 1
                    issRate:
                      type: number
                    issWithheldAtSource:
                      type: boolean
                    serviceMunicipalCode:
                      type: string
                    serviceMunicipalDescription:
                      type: string
                      minLength: 1
                    serviceListItemLC116:
                      type: string
                    cnae:
                      type: string
                    cofinsAmount:
                      type: number
                    csllAmount:
                      type: number
                    inssAmount:
                      type: number
                    irAmount:
                      type: number
                    pisAmount:
                      type: number
                    taxConfiguration:
                      type: object
                      properties:
                        nbsCode:
                          type: string
                          minLength: 1
                        nationalTaxCode:
                          type: string
                          minLength: 1
                        taxClassification:
                          type: string
                          minLength: 1
                        operationIndicatorCode:
                          type: string
                          minLength: 1
                      required:
                        - nbsCode
                        - nationalTaxCode
                        - taxClassification
                        - operationIndicatorCode
                      additionalProperties: false
                  required:
                    - serviceProvisionState
                    - serviceProvisionCity
                    - description
                    - issWithheldAtSource
                    - serviceMunicipalDescription
                  additionalProperties: false
              required:
                - environment
                - competenceDate
                - taxDocumentCustomer
      responses:
        default:
          description: Undocumented response (no code type, no existing spec).
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````