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

# Documents

> Given an ISIN and document type, returns the unique file IDs and metadata for the documents associated with that municipal bond. For `official_statement`, returns official statements for the specific bond. For `disclosure_document`, returns disclosure documents for the bond's obligor. The file IDs can be used to download the documents using the download_document endpoint.



## OpenAPI

````yaml post /api/v1/muni_documents
openapi: 3.0.0
info:
  title: Terrapin API
  version: 1.0.0
servers:
  - url: https://terrapinfinance.com
    variables: {}
security:
  - authorization: []
tags: []
paths:
  /api/v1/muni_documents:
    post:
      tags: []
      summary: Get documents for a municipal bond
      description: >-
        Given an ISIN and document type, returns the unique file IDs and
        metadata for the documents associated with that municipal bond. For
        `official_statement`, returns official statements for the specific bond.
        For `disclosure_document`, returns disclosure documents for the bond's
        obligor. The file IDs can be used to download the documents using the
        download_document endpoint.
      operationId: post_muni_documents
      parameters: []
      requestBody:
        content:
          application/json:
            example:
              document_type: official_statement
              isin: US002842EZ11
            schema:
              additionalProperties: false
              properties:
                document_type:
                  description: >-
                    Type of document to retrieve. `official_statement` returns
                    the official statements for the specific bond.
                    `disclosure_document` returns disclosure documents for the
                    bond's obligor.
                  enum:
                    - disclosure_document
                    - official_statement
                  type: string
                  x-struct: null
                  x-validate: null
                isin:
                  description: >-
                    International Securities Identification Number (ISIN),
                    unique 12-character code for the security.
                  maxLength: 12
                  minLength: 12
                  nullable: false
                  type: string
                  x-check: valid_check_digit
                  x-check-error: Invalid ISIN check digit
                  x-struct: null
                  x-transform: upcase
                  x-validate: null
              required:
                - document_type
                - isin
              type: object
              x-struct: null
              x-validate: null
        required: true
      responses:
        '200':
          content:
            application/json:
              example:
                data:
                  - document_name: Official Statement posted 08/15/2023 (1.6 MB)
                    document_type: official_statement
                    file_id: ROaomzq-lhfQ-LMSd8Zvow.pdf
                    filing_type: null
                    isin: US002842EZ11
                    publish_date: '2023-08-15'
                    text_file_id: ROaomzq-lhfQ-LMSd8Zvow.txt
                total: 1
              schema:
                additionalProperties: false
                properties:
                  data:
                    description: List of response data objects, often capped to 1000.
                    items:
                      additionalProperties: false
                      properties:
                        document_name:
                          description: Name of the document.
                          nullable: false
                          type: string
                          x-struct: null
                          x-validate: null
                        document_type:
                          description: >-
                            Type of document (e.g. official_statement,
                            disclosure_document).
                          enum:
                            - disclosure_document
                            - official_statement
                          nullable: false
                          type: string
                          x-struct: null
                          x-validate: null
                        file_id:
                          description: Terrapin file ID for the document.
                          nullable: false
                          type: string
                          x-struct: null
                          x-validate: null
                        filing_type:
                          description: >-
                            Filing type of the document (e.g.
                            annual_financial_information), if applicable.
                          nullable: true
                          type: string
                          x-struct: null
                          x-validate: null
                        isin:
                          example: US64966HW301
                          maxLength: 12
                          minLength: 12
                          nullable: false
                          type: string
                          x-check: valid_check_digit
                          x-check-error: Invalid ISIN check digit
                          x-struct: null
                          x-transform: upcase
                          x-validate: null
                        publish_date:
                          description: >-
                            Date the document was published, in ISO-8601 format
                            (YYYY-MM-DD).
                          format: date
                          nullable: false
                          type: string
                          x-struct: null
                          x-validate: null
                        text_file_id:
                          description: >-
                            Terrapin file ID for the plain-text version of the
                            document, if available.
                          nullable: true
                          type: string
                          x-struct: null
                          x-validate: null
                      required:
                        - document_name
                        - document_type
                        - file_id
                        - filing_type
                        - isin
                        - publish_date
                        - text_file_id
                      type: object
                      x-struct: null
                      x-validate: null
                    type: array
                    x-struct: null
                    x-validate: null
                  total:
                    description: >-
                      Total number of results in the database that match the
                      query filters.
                    type: integer
                    x-struct: null
                    x-validate: null
                required:
                  - data
                  - total
                title: MuniDocumentsResponse
                type: object
                x-struct: null
                x-validate: null
          description: >-
            File IDs and metadata for documents associated with the municipal
            bond
        '401':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  errors:
                    items:
                      additionalProperties: false
                      properties:
                        detail:
                          example: Unauthorized
                          type: string
                          x-struct: null
                          x-validate: null
                        reason:
                          example: >-
                            Your account tier does not allow this operation.
                            Contact team@terrapinfinance.com for an upgrade.
                          type: string
                          x-struct: null
                          x-validate: null
                      required:
                        - detail
                      type: object
                      x-struct: null
                      x-validate: null
                    type: array
                    x-struct: null
                    x-validate: null
                required:
                  - errors
                type: object
                x-struct: null
                x-validate: null
          description: Unauthorized
        '402':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  errors:
                    items:
                      additionalProperties: false
                      properties:
                        detail:
                          example: Payment Required
                          type: string
                          x-struct: null
                          x-validate: null
                        reason:
                          example: >-
                            You have run out of your granted quota for this
                            resource as defined by your account tier. Contact
                            team@terrapinfinance.com for an upgrade.
                          type: string
                          x-struct: null
                          x-validate: null
                      required:
                        - detail
                      type: object
                      x-struct: null
                      x-validate: null
                    type: array
                    x-struct: null
                    x-validate: null
                required:
                  - errors
                type: object
                x-struct: null
                x-validate: null
          description: Payment Required
        '403':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  errors:
                    items:
                      additionalProperties: false
                      properties:
                        detail:
                          example: Forbidden
                          type: string
                          x-struct: null
                          x-validate: null
                        reason:
                          example: >-
                            Your account tier does not allow this operation.
                            Contact team@terrapinfinance.com for an upgrade.
                          type: string
                          x-struct: null
                          x-validate: null
                      required:
                        - detail
                      type: object
                      x-struct: null
                      x-validate: null
                    type: array
                    x-struct: null
                    x-validate: null
                required:
                  - errors
                type: object
                x-struct: null
                x-validate: null
          description: Forbidden
        '422':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        detail:
                          example: 'Invalid string. Got: integer'
                          type: string
                          x-struct: null
                          x-validate: null
                        source:
                          properties:
                            pointer:
                              example: /isins/0
                              type: string
                              x-struct: null
                              x-validate: null
                          required:
                            - pointer
                          type: object
                          x-struct: null
                          x-validate: null
                        title:
                          example: Invalid value
                          type: string
                          x-struct: null
                          x-validate: null
                      required:
                        - detail
                        - source
                        - title
                      type: object
                      x-struct: null
                      x-validate: null
                    type: array
                    x-struct: null
                    x-validate: null
                required:
                  - errors
                type: object
                x-struct: null
                x-validate: null
          description: Unprocessable Entity
        '429':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  errors:
                    items:
                      additionalProperties: false
                      properties:
                        detail:
                          example: Too Many Requests
                          type: string
                          x-struct: null
                          x-validate: null
                        reason:
                          type: string
                          x-struct: null
                          x-validate: null
                      required:
                        - detail
                      type: object
                      x-struct: null
                      x-validate: null
                    type: array
                    x-struct: null
                    x-validate: null
                required:
                  - errors
                type: object
                x-struct: null
                x-validate: null
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  errors:
                    items:
                      additionalProperties: false
                      properties:
                        detail:
                          example: Internal Server Error
                          type: string
                          x-struct: null
                          x-validate: null
                        reason:
                          type: string
                          x-struct: null
                          x-validate: null
                      required:
                        - detail
                      type: object
                      x-struct: null
                      x-validate: null
                    type: array
                    x-struct: null
                    x-validate: null
                required:
                  - errors
                type: object
                x-struct: null
                x-validate: null
          description: Internal Server Error
      callbacks: {}
components:
  securitySchemes:
    authorization:
      scheme: bearer
      type: http

````