> ## 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/download-batch



## OpenAPI

````yaml /api-reference/accounting.openapi.json post /realms/{realmId}/organizations/{organizationId}/tax-document/download-batch
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=11 copied:manual=0 unknown=11.
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
paths:
  /realms/{realmId}/organizations/{organizationId}/tax-document/download-batch:
    post:
      tags:
        - Tax Documents (NFSe)
      summary: >-
        /realms/{realmId}/organizations/{organizationId}/tax-document/download-batch
      operationId: postRealmsByRealmIdOrganizationsByOrganizationIdTaxDocumentDownloadBatch
      parameters:
        - name: realmId
          in: path
          required: true
          schema:
            type: string
        - name: organizationId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - PDF
                    - XML
                taxDocumentIds:
                  minItems: 1
                  type: array
                  items:
                    type: string
                    minLength: 1
                filters:
                  type: object
                  properties:
                    status:
                      type: array
                      items:
                        type: string
                        enum:
                          - WAITINGFORAUTHORIZATION
                          - REQUESTINGAUTHORIZATION
                          - AUTHORIZATIONREQUESTED
                          - AUTHORIZATIONPROCESS
                          - AWAITINGFILEGENERATION
                          - AUTHORIZED
                          - DENIED
                          - REQUESTINGCANCELLATION
                          - CANCELLATIONREQUESTED
                          - CANCELLATIONPROCESS
                          - AWAITINGFILECANCELATION
                          - CANCELED
                          - CANCELLATIONDENIED
                    type:
                      type: array
                      items:
                        type: string
                        enum:
                          - NFSE
                    environment:
                      type: string
                      enum:
                        - LIVE
                        - TEST
                    issuedAtStart:
                      type: string
                      format: date-time
                    issuedAtEnd:
                      type: string
                      format: date-time
                    competenceDateStart:
                      type: string
                      format: date-time
                    competenceDateEnd:
                      type: string
                      format: date-time
                    rpsNumberStart:
                      type: number
                    rpsNumberEnd:
                      type: number
                    customerDocument:
                      type: string
                    customerName:
                      type: string
                  additionalProperties: false
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  fileName:
                    type: string
                    description: >-
                      Suggested name of the zip (also signed into the URL's
                      Content-Disposition).
                  url:
                    type: string
                    description: >-
                      Presigned S3 GET of the zip; expires — see
                      `expiresInSeconds`.
                  expiresInSeconds:
                    type: number
                  total:
                    type: number
                    description: >-
                      Documents the request resolved to (matched by filter, or
                      requested by id).
                  included:
                    type: number
                    description: Files actually inside the zip.
                  missing:
                    type: array
                    items:
                      type: object
                      properties:
                        taxDocumentId:
                          type: string
                        reason:
                          type: string
                          enum:
                            - NOT_FOUND
                            - FILE_NOT_AVAILABLE
                        nfseNumber:
                          type: string
                        rpsNumber:
                          type: string
                        status:
                          type: string
                      required:
                        - taxDocumentId
                        - reason
                    description: >-
                      Everything requested/matched that is NOT in the zip, and
                      why. Also listed in the zip's manifest.csv.
                required:
                  - fileName
                  - url
                  - expiresInSeconds
                  - total
                  - included
                  - missing
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````