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

# Delete documents on brokerage firm

> Deletes documents belonging to the brokerage firm matching the provided query filter.



## OpenAPI

````yaml /openapi.json delete /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:
    delete:
      tags:
        - brokerage-firms
      summary: Delete documents on brokerage firm
      description: >-
        Deletes documents belonging to the brokerage firm matching the provided
        query filter.
      operationId: BrokerageFirmController_deleteDocuments
      parameters:
        - name: brokerageFirmId
          required: true
          in: path
          description: the brokerageFirm id
          schema:
            type: string
        - name: ids
          required: true
          in: query
          description: the document ids to delete
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          description: Documents deleted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerageFirmDeleteDocumentsOutput'
        '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:
    BrokerageFirmDeleteDocumentsOutput:
      type: object
      properties: {}
    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
    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

````