> ## 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 brokerage firm policies



## OpenAPI

````yaml /openapi.json post /view-specific/{brokerageFirmId}/policies
openapi: 3.0.0
info:
  title: Korint Documentation
  description: Korint API Documentation
  version: 1.0.0
  contact: {}
servers: []
security:
  - bearerAuth: []
tags: []
paths:
  /view-specific/{brokerageFirmId}/policies:
    post:
      tags:
        - view-specific
      summary: List brokerage firm policies
      operationId: ViewSpecificController_listBrokerageFirmPolicies
      parameters:
        - name: brokerageFirmId
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListBrokerageFirmPoliciesInputBody'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListBrokerageFirmPoliciesOutput'
components:
  schemas:
    ListBrokerageFirmPoliciesInputBody:
      type: object
      properties:
        pageInfo:
          description: the page info
          allOf:
            - $ref: '#/components/schemas/PageInfo'
        order:
          description: the sort options
          allOf:
            - $ref: '#/components/schemas/OrderDto'
        viewType:
          type: string
          description: View type
          enum:
            - newBusiness
            - derogation
            - live
        statuses:
          type: array
          description: Statuses to filter by
          items:
            type: string
            enum:
              - POLICY_CREATED
              - POLICY_QUOTED
              - POLICY_CONFIRMED
              - POLICY_STARTED
              - POLICY_STOPPED
              - POLICY_SUSPENDED
        customStatuses:
          description: Custom statuses to filter by
          type: array
          items:
            type: string
        businessIntroducers:
          description: Business introducers to filter by
          type: array
          items:
            type: string
        startedAt:
          description: Started at range
          allOf:
            - $ref: '#/components/schemas/DateRange'
        stoppedAt:
          description: Stopped at range
          allOf:
            - $ref: '#/components/schemas/DateRange'
        endedAt:
          description: Ended at range (contract end date / due date)
          allOf:
            - $ref: '#/components/schemas/DateRange'
        createdAt:
          description: Created at range
          allOf:
            - $ref: '#/components/schemas/DateRange'
        hasAcknowledgedAlerts:
          type: boolean
          description: >-
            Optional: if filled, returns policies with at least one alert which
            acknowledgement matches this attribute
        expandCustomers:
          type: boolean
        expandAssets:
          type: boolean
        expandBrokerageFirm:
          type: boolean
        expandDerogations:
          type: boolean
        queryString:
          type: string
          description: Full text search
        brokerageFirmName:
          type: string
          description: Brokerage firm name
        derogationStatuses:
          type: array
          description: Filter by derogation status
          items:
            type: string
            enum:
              - PENDING
              - DECLINED
              - APPROVED
        productIds:
          description: List of product ids
          type: array
          items:
            type: string
        stopReasons:
          description: List of stop reasons to filter by
          type: array
          items:
            type: string
      required:
        - viewType
    ListBrokerageFirmPoliciesOutput:
      type: object
      properties:
        data:
          description: the list of items in the page
          type: array
          items:
            $ref: '#/components/schemas/PolicyForBrokerEntity'
        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
    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
    DateRange:
      type: object
      properties:
        start:
          type: string
          description: Start date
        end:
          type: string
          description: End date
    PolicyForBrokerEntity:
      type: object
      properties:
        customerIds:
          description: Customer ids
          type: array
          items:
            type: string
        policyId:
          type: string
          description: Policy id
        branches:
          type: array
          items:
            $ref: '#/components/schemas/PolicyBranchesForBrokerEntity'
      required:
        - customerIds
        - policyId
        - branches
    ResponsePageInfo:
      type: object
      properties:
        first:
          type: boolean
          description: whether this is the first page
        last:
          type: boolean
          description: whether this is the last page
    PolicyBranchesForBrokerEntity:
      type: object
      properties:
        branch:
          $ref: '#/components/schemas/PolicyBranchDto'
        customers:
          type: array
          items:
            $ref: '#/components/schemas/SimplifiedCustomerDto'
        policy:
          $ref: '#/components/schemas/SimplifiedPolicyDto'
        assets:
          type: array
          items:
            $ref: '#/components/schemas/SimplifiedAssetDto'
        brokerageFirm:
          $ref: '#/components/schemas/SimplifiedBrokerageFirmDto'
        parentBrokerageFirm:
          $ref: '#/components/schemas/SimplifiedBrokerageFirmDto'
        derogations:
          type: array
          items:
            $ref: '#/components/schemas/SimplifiedDerogationDto'
      required:
        - policy
    PolicyBranchDto:
      type: object
      properties:
        branchId:
          type: string
        createdAt:
          type: string
          description: Creation date of the branch
        renewalStatus:
          type: string
          description: 'Optional: Branch renewal status'
          enum:
            - RENEWAL_ACCEPTED
            - RENEWAL_REFUSED
        branchType:
          type: string
          enum:
            - BASE
            - NEW_BUSINESS
            - MTA
            - RENEWAL
            - REPRICING
        branchSubType:
          description: 'Optional: Branch sub type'
          allOf:
            - $ref: '#/components/schemas/BranchSubType'
        availability:
          type: string
          enum:
            - BRANCH_OPEN
            - BRANCH_MERGED
            - BRANCH_CLOSED
        closeReason:
          type: string
          description: 'Optional: Branch close reason'
          enum:
            - BROKER_REQUEST
            - CUSTOMER_REQUEST
            - FORKED
            - ASSET_START_PASSED
            - CONCURRENT_BRANCH_MERGED
            - QUOTE_INVALIDATED
            - PARTITION_DROPPED
            - RENEWAL_REFUSED
            - CRM_ABOVE_LIMIT
            - TELEMATICS_SCORE_MISSING
        mergedAt:
          type: string
          description: 'Optional: Merge date of the branch'
        derogations:
          description: 'Optional: Branch derogations'
          type: array
          items:
            $ref: '#/components/schemas/DerogationDto'
      required:
        - branchId
        - createdAt
        - branchType
    SimplifiedCustomerDto:
      type: object
      properties:
        customFields:
          description: custom fields per product
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldDto'
        name:
          type: string
          description: 'Optional: Name of the entity'
        type:
          type: string
          description: Type of the customer
        id:
          type: string
          description: Unique identifier for the customer
        createdAt:
          type: string
          description: Date and time when the customer was created
        lastModifiedAt:
          type: string
          description: Date and time when the customer was last modified
        status:
          type: string
          description: Status of the customer
          enum:
            - CUSTOMER_CREATED
            - CUSTOMER_CONFIRMED
        role:
          type: string
          description: Customer business role
        paymentMode:
          type: string
          enum:
            - DIRECT_DEBIT
            - BANK_TRANSFER
      required:
        - type
        - id
        - createdAt
        - lastModifiedAt
        - status
        - role
        - paymentMode
    SimplifiedPolicyDto:
      type: object
      properties:
        customFields:
          description: custom fields per product
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldDto'
        id:
          type: string
          description: Unique identifier for the policy
        productId:
          type: string
          description: Product ID
        externalId:
          type: string
          description: External policy id
        createdAt:
          type: string
          description: Date and time when the policy was created
        lastModifiedAt:
          type: string
          description: Date and time when the policy was last modified
        status:
          type: string
          description: Status of the policy
          enum:
            - POLICY_CREATED
            - POLICY_QUOTED
            - POLICY_CONFIRMED
            - POLICY_STARTED
            - POLICY_STOPPED
            - POLICY_SUSPENDED
        author:
          description: Author of the policy
          allOf:
            - $ref: '#/components/schemas/BrokerDto'
        startedAt:
          type: string
          description: Date and time when the policy started
        stoppedAt:
          type: string
          description: Date and time when the policy stopped
        signedAt:
          type: string
          description: Date and time when the policy was signed
        stop:
          description: stop reason, details and createdAt
          allOf:
            - $ref: '#/components/schemas/StopDto'
        hasOpenedClientAccount:
          type: boolean
          description: Has anyone has a DRIVER relationship with the policy's customer
        totalPremium:
          $ref: '#/components/schemas/SimplifiedAmountDto'
      required:
        - id
        - productId
        - createdAt
        - lastModifiedAt
        - status
        - hasOpenedClientAccount
    SimplifiedAssetDto:
      type: object
      properties:
        customFields:
          description: custom fields per product
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldDto'
        id:
          type: string
          description: assetId
        lastModifiedAt:
          type: string
          description: Last modified date of the asset
        createdAt:
          type: string
          description: Creation date of the asset
        status:
          type: string
          description: Status of the asset
          enum:
            - ASSET_CREATED
            - ASSET_REMOVED
            - ASSET_QUOTED
            - ASSET_CONFIRMED
            - ASSET_STARTED
            - ASSET_STOPPED
            - ASSET_CANCELLED
        startedAt:
          type: string
          description: Date the asset starts
        stoppedAt:
          type: string
          description: Date the asset stops
        totalPremium:
          $ref: '#/components/schemas/SimplifiedAmountDto'
      required:
        - id
        - lastModifiedAt
        - createdAt
        - status
    SimplifiedBrokerageFirmDto:
      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
        id:
          type: string
          description: Brokerage firm id
        companyInfo:
          description: Company info
          allOf:
            - $ref: '#/components/schemas/FormattedSirenDataDto'
      required:
        - firmType
        - id
        - companyInfo
    SimplifiedDerogationDto:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - PENDING
            - DECLINED
            - APPROVED
        policyId:
          type: string
      required:
        - id
        - status
        - policyId
    BranchSubType:
      type: string
      enum:
        - CREATE_ADDITIONAL_COMPONENTS
        - DRIVEQUANT
      description: Branch sub type
    DerogationDto:
      type: object
      properties:
        derogationId:
          type: string
          description: Unique identifier for the derogation
        action:
          description: Action for the derogation
          allOf:
            - $ref: '#/components/schemas/DerogationAction'
        status:
          description: Status of the derogation
          allOf:
            - $ref: '#/components/schemas/DerogationStatus'
        createdAt:
          type: string
          description: Derogation creation date
      required:
        - derogationId
        - action
        - status
        - createdAt
    CustomFieldDto:
      type: object
      properties:
        key:
          type: string
        value:
          oneOf:
            - type: string
            - type: number
            - type: boolean
      required:
        - key
        - value
    BrokerDto:
      type: object
      properties:
        firstName:
          type: string
          description: First name
        lastName:
          type: string
          description: Last name
        userId:
          type: string
          description: User id
        email:
          type: string
        brokerRole:
          type: string
      required:
        - firstName
        - lastName
        - userId
    StopDto:
      type: object
      properties:
        reason:
          type: string
          description: Stop reason
        details:
          description: Stop details
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldDto'
        createdAt:
          type: string
          description: Date and time when the stop was created
      required:
        - reason
    SimplifiedAmountDto:
      type: object
      properties:
        amountPreFeesAndTaxes:
          type: integer
        totalFees:
          type: integer
        amountWithFeesPreTaxes:
          type: integer
        totalTaxes:
          type: integer
        amountWithFeesAndTaxes:
          type: integer
      required:
        - amountPreFeesAndTaxes
        - totalFees
        - amountWithFeesPreTaxes
        - totalTaxes
        - amountWithFeesAndTaxes
    FormattedSirenDataDto:
      type: object
      properties:
        siren:
          type: string
          description: 'Optional: Siren number'
        siret:
          type: string
          description: Siret number
        nafCode:
          type: string
          description: 'Optional: Naf code'
        nafLabel:
          type: string
          description: 'Optional: Naf label'
        name:
          type: string
          description: 'Optional: Company name'
        creationDate:
          type: string
          description: 'Optional: Creation date'
        location:
          description: 'Optional: Location'
          allOf:
            - $ref: '#/components/schemas/LocationDto'
        legalStatus:
          description: 'Optional: legal status by level'
          allOf:
            - $ref: '#/components/schemas/LegalStatusDto'
        headcount:
          type: string
          description: 'Optional: Number of employees'
      required:
        - siret
    DerogationAction:
      type: string
      enum:
        - QUOTE
        - CONFIRM
        - SIGN
    DerogationStatus:
      type: string
      enum:
        - CREATED
        - APPROVED
        - DENIED
      description: Status of the derogation
    LocationDto:
      type: object
      properties:
        address:
          type: string
          description: Address
        postCode:
          type: string
          description: Post code
        city:
          type: string
          description: City
        country:
          type: string
          description: Country
      required:
        - city
        - country
    LegalStatusDto:
      type: object
      properties:
        '1':
          type: string
          description: First legal status
        '2':
          type: string
          description: Second legal status
        '3':
          type: string
          description: Third legal status
      required:
        - '1'
        - '2'
        - '3'

````