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

# List documents on brokerage firm

> Lists documents that belong to the brokerage firm. Supports pagination and filters via query params.



## OpenAPI

````yaml /openapi.json get /brokerage-firms/{brokerageFirmId}/documents
openapi: 3.0.0
info:
  title: Korint Documentation
  description: Korint API Documentation
  version: 1.0.0
  contact: {}
servers: []
security:
  - bearerAuth: []
tags: []
paths:
  /brokerage-firms/{brokerageFirmId}/documents:
    get:
      tags:
        - brokerage-firms
      summary: List documents on brokerage firm
      description: >-
        Lists documents that belong to the brokerage firm. Supports pagination
        and filters via query params.
      operationId: BrokerageFirmController_listDocuments
      parameters:
        - name: brokerageFirmId
          required: true
          in: path
          description: the brokerageFirm id
          schema:
            type: string
        - name: pageInfo
          required: false
          in: query
          description: the page info
          schema:
            $ref: '#/components/schemas/PageInfo'
        - name: order
          required: false
          in: query
          description: the sort options
          schema:
            $ref: '#/components/schemas/OrderDto'
        - name: categories
          required: false
          in: query
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          description: Documents listed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerageFirmListDocumentsOutput'
        '400':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/InvalidEventCreationDateErrorDto'
              examples:
                INVALID_EVENT_CREATION_DATE:
                  $ref: '#/components/schemas/InvalidEventCreationDateErrorDto'
          description: ''
        '403':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ForbiddenErrorDto'
              examples:
                FORBIDDEN:
                  $ref: '#/components/schemas/ForbiddenErrorDto'
          description: ''
        '404':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/PolicyNotFoundErrorDto'
              examples:
                POLICY_NOT_FOUND:
                  $ref: '#/components/schemas/PolicyNotFoundErrorDto'
          description: ''
components:
  schemas:
    PageInfo:
      type: object
      properties:
        count:
          type: number
          description: the number of items to return
          default: 10
        page:
          type: number
          description: the page to retrieve
          default: 1
    OrderDto:
      type: object
      properties:
        by:
          type: string
          description: the sort key
        direction:
          type: string
          description: the sort direction
      required:
        - by
        - direction
    BrokerageFirmListDocumentsOutput:
      type: object
      properties:
        data:
          description: the list of items in the page
          type: array
          items:
            $ref: '#/components/schemas/DocumentWithSignedUrl'
        pageInfo:
          description: the page info
          allOf:
            - $ref: '#/components/schemas/ResponsePageInfo'
        totalCount:
          type: number
          description: the total number of items
        currentPage:
          type: number
          description: the current page
        totalPages:
          type: number
          description: the total number of pages
      required:
        - data
        - pageInfo
        - totalCount
        - currentPage
        - totalPages
    InvalidEventCreationDateErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - INVALID_EVENT_CREATION_DATE
        message:
          type: string
          example: >-
            You are trying to push an event that is created on {createdAt}, but
            the creation date should be after the latest event which was created
            on {latestCreatedAt}
        details:
          $ref: '#/components/schemas/InvalidEventCreationDateDetailsDto'
      required:
        - code
        - message
        - details
    ForbiddenErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - FORBIDDEN
        message:
          type: string
          example: Forbidden
        details:
          $ref: '#/components/schemas/ForbiddenDetailsDto'
      required:
        - code
        - message
        - details
    PolicyNotFoundErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - POLICY_NOT_FOUND
        message:
          type: string
          example: Policy {policyId} ({branchId}) not found
        details:
          $ref: '#/components/schemas/PolicyNotFoundDetailsDto'
      required:
        - code
        - message
        - details
    DocumentWithSignedUrl:
      type: object
      properties:
        metadata:
          description: metadata assigned to the object
          type: array
          items:
            $ref: '#/components/schemas/Metadata'
        id:
          type: string
          description: the id of the document
        name:
          type: string
          description: the name of the document
        path:
          type: string
          description: the path from Korint CDNof the document
        createdAt:
          format: date-time
          type: string
          description: the date of creation of the document
        signedUrl:
          type: string
          description: the signed url to download the document
      required:
        - metadata
        - id
        - name
        - path
        - createdAt
        - signedUrl
    ResponsePageInfo:
      type: object
      properties:
        first:
          type: boolean
          description: whether this is the first page
        last:
          type: boolean
          description: whether this is the last page
    InvalidEventCreationDateDetailsDto:
      type: object
      properties:
        createdAt:
          format: date-time
          type: string
        latestCreatedAt:
          format: date-time
          type: string
      required:
        - createdAt
        - latestCreatedAt
    ForbiddenDetailsDto:
      type: object
      properties:
        message:
          type: string
        documentKey:
          type: string
        userId:
          type: string
        ownerId:
          type: string
      required:
        - message
        - documentKey
        - userId
        - ownerId
    PolicyNotFoundDetailsDto:
      type: object
      properties:
        policyId:
          type: string
        branchId:
          type: string
        whenAt:
          type: string
        simulatedAt:
          type: string
      required:
        - policyId
    Metadata:
      type: object
      properties:
        key:
          type: string
          description: the key of the metadata
        value:
          type: string
          description: the value of the metadata
      required:
        - key
        - value

````