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

# Create brokerage firm

> Creates a brokerage firm for the tenant using the provided configuration. Requires a valid authenticated user. The body contains company, product, and commission configuration.



## OpenAPI

````yaml /openapi.json post /brokerage-firms
openapi: 3.0.0
info:
  title: Korint Documentation
  description: Korint API Documentation
  version: 1.0.0
  contact: {}
servers: []
security:
  - bearerAuth: []
tags: []
paths:
  /brokerage-firms:
    post:
      tags:
        - brokerage-firms
      summary: Create brokerage firm
      description: >-
        Creates a brokerage firm for the tenant using the provided
        configuration. Requires a valid authenticated user. The body contains
        company, product, and commission configuration.
      operationId: BrokerageFirmController_createBrokerageFirm
      parameters: []
      requestBody:
        required: true
        description: Brokerage firm creation payload
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBrokerageFirmInputBody'
      responses:
        '200':
          description: Brokerage firm created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateBrokerageFirmOutput'
        '400':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/MissingProductErrorDto'
                  - $ref: '#/components/schemas/InvalidProductTypeErrorDto'
                  - $ref: '#/components/schemas/InvalidCommissionRangeErrorDto'
                  - $ref: '#/components/schemas/ImpossibleCommissionRangeErrorDto'
              examples:
                MISSING_PRODUCT:
                  $ref: '#/components/schemas/MissingProductErrorDto'
                INVALID_PRODUCT_TYPE:
                  $ref: '#/components/schemas/InvalidProductTypeErrorDto'
                INVALID_COMMISSION_RANGE:
                  $ref: '#/components/schemas/InvalidCommissionRangeErrorDto'
                IMPOSSIBLE_COMMISSION_RANGE:
                  $ref: '#/components/schemas/ImpossibleCommissionRangeErrorDto'
          description: ''
        '404':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/CompanyNotFoundErrorDto'
                  - $ref: '#/components/schemas/ProductNotFoundErrorDto'
              examples:
                COMPANY_NOT_FOUND:
                  $ref: '#/components/schemas/CompanyNotFoundErrorDto'
                PRODUCT_NOT_FOUND:
                  $ref: '#/components/schemas/ProductNotFoundErrorDto'
          description: ''
components:
  schemas:
    CreateBrokerageFirmInputBody:
      type: object
      properties:
        customFields:
          description: custom fields per product
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldDto'
        firmType:
          type: string
          description: Brokerage firm type
          enum:
            - WHOLESALE
            - RETAIL
            - TEAM
        parentBrokerageFirmId:
          type: string
          description: Brokerage firm id
      required:
        - firmType
    CreateBrokerageFirmOutput:
      type: object
      properties:
        type:
          type: string
          description: type of entity
        id:
          type: string
          description: id of the entity
      required:
        - type
        - id
    MissingProductErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - MISSING_PRODUCT
        message:
          type: string
          example: Missing product header
        details:
          $ref: '#/components/schemas/MissingProductDetailsDto'
      required:
        - code
        - message
        - details
    InvalidProductTypeErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - INVALID_PRODUCT_TYPE
        message:
          type: string
          example: Invalid product {product} type (expected {expectedProductType})
        details:
          $ref: '#/components/schemas/InvalidProductTypeDetailsDto'
      required:
        - code
        - message
        - details
    InvalidCommissionRangeErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - INVALID_COMMISSION_RANGE
        message:
          type: string
          example: >-
            Invalid commission range for {product}, allowed range must be
            between {min} and {max}
        details:
          $ref: '#/components/schemas/InvalidCommissionFeeDetailsDto'
      required:
        - code
        - message
        - details
    ImpossibleCommissionRangeErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - IMPOSSIBLE_COMMISSION_RANGE
        message:
          type: string
          example: >-
            Impossible commission range for {product}. Make sure that
            {currentMin} >= 0 and {currentMax} <= 100, {currentMin} is less than
            {currentMax}, and that {currentDefault} is between them
        details:
          $ref: '#/components/schemas/ImpossibleCommissionFeeDetailsDto'
      required:
        - code
        - message
        - details
    CompanyNotFoundErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - COMPANY_NOT_FOUND
        message:
          type: string
          example: No company found for siret number {siret}
        details:
          $ref: '#/components/schemas/CompanyNotFoundDetailsDto'
      required:
        - code
        - message
        - details
    ProductNotFoundErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - PRODUCT_NOT_FOUND
        message:
          type: string
          example: No product found for product id {productId}
        details:
          $ref: '#/components/schemas/ProductNotFoundDetailsDto'
      required:
        - code
        - message
        - details
    CustomFieldDto:
      type: object
      properties:
        key:
          type: string
        value:
          oneOf:
            - type: string
            - type: number
            - type: boolean
      required:
        - key
        - value
    MissingProductDetailsDto:
      type: object
      properties: {}
    InvalidProductTypeDetailsDto:
      type: object
      properties:
        product:
          type: string
        expectedProductType:
          type: string
      required:
        - product
    InvalidCommissionFeeDetailsDto:
      type: object
      properties:
        product:
          type: string
        min:
          type: number
        max:
          type: number
      required:
        - product
        - min
        - max
    ImpossibleCommissionFeeDetailsDto:
      type: object
      properties:
        product:
          type: string
        currentMin:
          type: number
        currentMax:
          type: number
        currentDefault:
          type: number
      required:
        - product
        - currentMin
        - currentMax
    CompanyNotFoundDetailsDto:
      type: object
      properties:
        siret:
          type: string
      required:
        - siret
    ProductNotFoundDetailsDto:
      type: object
      properties:
        tenantId:
          type: string
        productId:
          type: string
      required:
        - productId

````