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

# Get a brokerage firm's accounting summary



## OpenAPI

````yaml /openapi.json get /brokerage-firms/{brokerageFirmId}/accounting-summary
openapi: 3.0.0
info:
  title: Korint API
  description: >-
    Quoting, policy issuance, billing, claims, documents and compliance for
    insurance distribution.
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.korint.io
    description: Production
  - url: https://api.sandbox.korint.io
    description: Sandbox
security:
  - oauth2: []
  - bearerAuth: []
tags: []
paths:
  /brokerage-firms/{brokerageFirmId}/accounting-summary:
    get:
      tags:
        - billing
      summary: Get a brokerage firm's accounting summary
      operationId: BillingReadsController_getBrokerageFirmAccountingSummary
      parameters:
        - name: tenant
          in: header
          required: true
          description: Your tenant identifier. Requests without it are rejected.
          schema:
            type: string
        - name: count
          required: false
          in: query
          description: the number of items to return
          schema:
            default: 10
            type: number
        - name: page
          required: false
          in: query
          description: the page to retrieve
          schema:
            default: 1
            type: number
        - name: unpaidInvoiceIssuedBefore
          required: false
          in: query
          schema:
            type: string
        - name: unpaidInvoiceIssuedAfter
          required: false
          in: query
          schema:
            type: string
        - name: productIds
          required: false
          in: query
          description: Product ids
          schema:
            type: array
            items:
              type: string
        - name: queryString
          required: false
          in: query
          description: Full text search
          schema:
            type: string
        - name: order
          required: false
          in: query
          description: the sort options
          schema:
            $ref: '#/components/schemas/OrderDto'
        - name: statuses
          required: false
          in: query
          description: Statuses to filter by
          schema:
            type: array
            items:
              type: string
              enum:
                - POLICY_CREATED
                - POLICY_QUOTED
                - POLICY_CONFIRMED
                - POLICY_SIGNED
                - POLICY_STARTED
                - POLICY_STOPPED
                - POLICY_SUSPENDED
        - name: terminationReasons
          required: false
          in: query
          description: Termination reasons to filter by
          schema:
            type: array
            items:
              type: string
        - name: hasFormalNotice
          required: false
          in: query
          description: Filter by whether a formal notice has been sent
          schema:
            type: boolean
        - name: unpaidDurationDays
          required: false
          in: query
          description: Filter policies by unpaid duration in days (greater than or equal)
          schema:
            type: number
        - name: brokerageFirmId
          required: true
          in: path
          schema:
            pattern: >-
              ^brokerage_firm(_test)?_[346789ABCDEFGHJKLMNPQRTUVWXYabcdefghijkmnpqrtwxyz]{21}$
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountingSummaryOutput'
components:
  schemas:
    OrderDto:
      type: object
      properties:
        by:
          type: string
          description: the sort key
        direction:
          type: string
          description: the sort direction
      required:
        - by
        - direction
    AccountingSummaryOutput:
      type: object
      properties:
        data:
          description: the list of items in the page
          type: array
          items:
            $ref: '#/components/schemas/AccountingSummaryOutputEntity'
        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
    AccountingSummaryOutputEntity:
      type: object
      properties:
        customer:
          description: Parent customer data
          allOf:
            - $ref: '#/components/schemas/CustomerDto'
        policy:
          description: Policy data
          allOf:
            - $ref: '#/components/schemas/PolicyDto'
        numberOfUnpaidInvoices:
          type: number
        unpaidDurationInDay:
          type: number
        oldestUnpaidInvoiceIssuedAt:
          type: string
        lastFormalNoticeSentAt:
          type: string
      required:
        - customer
        - policy
        - numberOfUnpaidInvoices
        - unpaidDurationInDay
        - oldestUnpaidInvoiceIssuedAt
    ResponsePageInfo:
      type: object
      properties:
        first:
          type: boolean
          description: whether this is the first page
        last:
          type: boolean
          description: whether this is the last page
    CustomerDto:
      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:
          pattern: >-
            ^customer(_test)?_[346789ABCDEFGHJKLMNPQRTUVWXYabcdefghijkmnpqrtwxyz]{21}$
          type: string
          description: Unique identifier for the customer
        createdAt:
          format: date-time
          type: string
          description: Date and time when the customer was created
        lastModifiedAt:
          format: date-time
          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
        policies:
          description: Policies associated with the customer
          type: array
          items:
            pattern: >-
              ^policy(_test)?_[346789ABCDEFGHJKLMNPQRTUVWXYabcdefghijkmnpqrtwxyz]{21}$
            type: string
        role:
          type: string
          description: Customer business role
        preferredPaymentMethodId:
          pattern: >-
            ^payment_method(_test)?_[346789ABCDEFGHJKLMNPQRTUVWXYabcdefghijkmnpqrtwxyz]{21}$
          type: string
          description: 'Optional: Preferred payment method of the customer'
        paymentMode:
          type: string
          enum:
            - DIRECT_DEBIT
            - BANK_TRANSFER
      required:
        - type
        - id
        - createdAt
        - lastModifiedAt
        - status
        - policies
        - role
        - paymentMode
    PolicyDto:
      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: Entity type
        id:
          pattern: >-
            ^policy(_test)?_[346789ABCDEFGHJKLMNPQRTUVWXYabcdefghijkmnpqrtwxyz]{21}$
          type: string
          description: Unique identifier for the policy
        parent:
          pattern: >-
            ^policy(_test)?_[346789ABCDEFGHJKLMNPQRTUVWXYabcdefghijkmnpqrtwxyz]{21}$
          type: string
          description: Unique identifier for the parent policy
        brokerageFirm:
          pattern: >-
            ^brokerage_firm(_test)?_[346789ABCDEFGHJKLMNPQRTUVWXYabcdefghijkmnpqrtwxyz]{21}$
          type: string
          description: Unique identifier for the brokerage firm
        productId:
          type: string
          description: Product ID
        incrementalId:
          type: number
          description: Incremental policy id
        externalId:
          type: string
          description: External policy id
        createdAt:
          format: date-time
          type: string
          description: Date and time when the policy was created
        lastModifiedAt:
          format: date-time
          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_SIGNED
            - POLICY_STARTED
            - POLICY_STOPPED
            - POLICY_SUSPENDED
        branchType:
          type: string
          description: Type of branch associated with the policy
          enum:
            - BASE
            - NEW_BUSINESS
            - MTA
            - RENEWAL
            - REPRICING
        author:
          description: Author of the policy
          allOf:
            - $ref: '#/components/schemas/BrokerDto'
        signedAt:
          format: date-time
          type: string
          description: Date and time when the policy was signed
        startedAt:
          format: date-time
          type: string
          description: Date and time when the policy started
        isAwaitingFirstPayment:
          type: boolean
          description: >-
            Derived: signed but not yet active because the product gates
            activation on first payment and that payment is still outstanding
            (status CONFIRMED, signed, start date passed).
        endedAt:
          format: date-time
          type: string
          description: Date and time when the policy will end
        nextRenewalAt:
          format: date-time
          type: string
          description: Next renewal anniversary date, even for stopped policies
        stoppedAt:
          format: date-time
          type: string
          description: Date and time when the policy stopped
        suspendedAt:
          format: date-time
          type: string
          description: Date and time when the policy  was suspended
        reactivatedAt:
          format: date-time
          type: string
          description: Date and time when the policy was reactivated after suspension
        assets:
          description: Array of asset identifiers associated with the policy
          type: array
          items:
            type: string
        customers:
          description: Identifiers of the customers associated with the policy
          type: array
          items:
            pattern: >-
              ^customer(_test)?_[346789ABCDEFGHJKLMNPQRTUVWXYabcdefghijkmnpqrtwxyz]{21}$
            type: string
        periodDuration:
          description: Policy period duration
          allOf:
            - $ref: '#/components/schemas/Duration'
        invoicingConfig:
          description: Nested DTO for invoicing configuration
          allOf:
            - $ref: '#/components/schemas/InvoicingConfigDto'
        additionalQuoteComponents:
          $ref: '#/components/schemas/QuoteComponentDto'
        quote:
          description: policy quote
          allOf:
            - $ref: '#/components/schemas/PolicyQuoteDto'
        proratedQuote:
          description: Prorated policy quote based on the invoicing frequency of the policy
          allOf:
            - $ref: '#/components/schemas/PolicyQuoteDto'
        selectedTier:
          type: object
          description: Selected pricing tier with perils and breakdown
        stop:
          description: stop reason, details and createdAt
          allOf:
            - $ref: '#/components/schemas/StopDto'
        brokerageFees:
          description: Brokerage fees
          type: array
          items:
            $ref: '#/components/schemas/BrokerageFeeOnPolicy'
        billingAssignment:
          description: Billing assignment for multi-payer policies
          allOf:
            - $ref: '#/components/schemas/BillingAssignmentDto'
      required:
        - type
        - id
        - productId
        - createdAt
        - lastModifiedAt
        - status
        - assets
        - customers
        - periodDuration
        - invoicingConfig
    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:
          format: email
          type: string
        brokerRole:
          type: string
      required:
        - firstName
        - lastName
        - userId
    Duration:
      type: object
      properties:
        amount:
          type: number
        unit:
          type: string
          enum:
            - YEAR
            - MONTH
            - WEEK
            - DAY
            - HOUR
            - MINUTE
            - SECOND
      required:
        - amount
        - unit
    InvoicingConfigDto:
      type: object
      properties:
        frequency:
          allOf:
            - $ref: '#/components/schemas/InvoiceFrequency'
        timing:
          allOf:
            - $ref: '#/components/schemas/InvoiceTiming'
        firstPayment:
          allOf:
            - $ref: '#/components/schemas/FirstPayment'
        earlyPayment:
          $ref: '#/components/schemas/Duration'
      required:
        - frequency
        - timing
        - firstPayment
    QuoteComponentDto:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - PREMIUM
            - PERIL
            - FEE
            - TAX
            - SPECIAL
        premium:
          $ref: '#/components/schemas/AmountDto'
        chargeType:
          type: string
          description: Charge type of component
          enum:
            - ONE_TIME
            - SPOT
            - RECURRING
      required:
        - id
        - type
        - premium
        - chargeType
    PolicyQuoteDto:
      type: object
      properties:
        id:
          type: string
          description: Quote id
        entityId:
          type: string
          description: Entity the quote is for
        provider:
          $ref: '#/components/schemas/QuoteProviderDto'
        basePrice:
          type: integer
        rates:
          type: array
          items:
            $ref: '#/components/schemas/RateDto'
        totalPremium:
          $ref: '#/components/schemas/AmountDto'
        components:
          description: components of the quote
          type: array
          items:
            $ref: '#/components/schemas/QuoteComponentDto'
      required:
        - id
        - entityId
        - provider
        - rates
        - totalPremium
        - components
    StopDto:
      type: object
      properties:
        reason:
          type: string
          description: >-
            Stop reason. The accepted values are defined per product; read them
            from `stopReasons` in `GET /config/{productId}`. An unlisted value
            fails with INVALID_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
    BrokerageFeeOnPolicy:
      type: object
      properties:
        brokerageFirmId:
          pattern: >-
            ^brokerage_firm(_test)?_[346789ABCDEFGHJKLMNPQRTUVWXYabcdefghijkmnpqrtwxyz]{21}$
          type: string
          description: Brokerage firm id
          maximum: 100
          minimum: 0
        fee:
          type: number
          description: Fee
          maximum: 100
          minimum: 0
      required:
        - brokerageFirmId
        - fee
    BillingAssignmentDto:
      type: object
      properties:
        configId:
          type: string
          description: ID of the billing assignment config to apply
        defaultPayerId:
          type: string
          description: Default payer ID
        componentOverrides:
          type: array
          items:
            $ref: '#/components/schemas/BillingAssignmentComponentOverrideDto'
      required:
        - configId
        - defaultPayerId
    InvoiceFrequency:
      type: string
      enum:
        - YEARLY
        - HALF_YEARLY
        - QUARTERLY
        - MONTHLY
        - BIENNIAL
        - WEEKLY
    InvoiceTiming:
      type: string
      enum:
        - IN_ADVANCE
        - IN_ARREAR
    FirstPayment:
      type: string
      enum:
        - NONE
        - EARLY_PAYMENT_AT_SIGNATURE
        - FULL_AT_SIGNATURE
        - EARLY_PAYMENT_AT_START_DATE
        - FULL_AT_START_DATE
    AmountDto:
      type: object
      properties:
        amountPreFeesAndTaxes:
          type: integer
        fees:
          type: array
          items:
            $ref: '#/components/schemas/FeeDto'
        totalFees:
          type: integer
        amountWithFeesPreTaxes:
          type: integer
        taxes:
          type: array
          items:
            $ref: '#/components/schemas/TaxDto'
        totalTaxes:
          type: integer
        amountWithFeesAndTaxes:
          type: integer
      required:
        - amountPreFeesAndTaxes
        - fees
        - totalFees
        - amountWithFeesPreTaxes
        - taxes
        - totalTaxes
        - amountWithFeesAndTaxes
    QuoteProviderDto:
      type: object
      properties:
        id:
          type: string
        version:
          type: string
      required:
        - id
        - version
    RateDto:
      type: object
      properties:
        id:
          type: string
        rate:
          type: integer
        inputs:
          type: array
          items:
            $ref: '#/components/schemas/RateInputDto'
      required:
        - id
        - rate
        - inputs
    BillingAssignmentComponentOverrideDto:
      type: object
      properties:
        componentId:
          type: string
          description: Component ID
        payerCustomerId:
          type: string
          description: Payer customer ID
      required:
        - componentId
        - payerCustomerId
    FeeDto:
      type: object
      properties:
        id:
          type: string
        brokerageFirmId:
          type: string
        chargeType:
          type: string
          enum:
            - ONE_TIME
            - SPOT
            - RECURRING
        amount:
          type: integer
      required:
        - id
        - chargeType
        - amount
    TaxDto:
      type: object
      properties:
        id:
          type: string
        chargeType:
          type: string
          enum:
            - ONE_TIME
            - SPOT
            - RECURRING
        amount:
          type: integer
      required:
        - id
        - chargeType
        - amount
    RateInputDto:
      type: object
      properties:
        id:
          type: string
          description: id
        value:
          description: value
          oneOf:
            - type: string
            - type: number
      required:
        - id
        - value
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://korint-tenant.auth.eu-west-3.amazoncognito.com/oauth2/token
          scopes:
            korint.io/account: Read account information
            korint.io/analytics: Access analytics endpoints
            korint.io/assets: Access asset endpoints
            korint.io/billing: Access billing endpoints
            korint.io/branches: Access branch endpoints
            korint.io/broker: Access broker endpoints
            korint.io/claims: Access claim endpoints
            korint.io/comments: Access comment endpoints
            korint.io/customers: Access customer endpoints
            korint.io/derogations: Access derogation endpoints
            korint.io/documents: Access document endpoints
            korint.io/external: Access external lookup endpoints
            korint.io/external-claims: Declare claims from an external system
            korint.io/internal-notes: Access internal note endpoints
            korint.io/invitations: Access invitation endpoints
            korint.io/payments: Access payment endpoints
            korint.io/permissions: Access permission management endpoints
            korint.io/policies: Access policy endpoints
            korint.io/quotes: Access quote endpoints
            korint.io/reportings: Access reporting endpoints
            korint.io/signature: Access signature endpoints
      description: >-
        Machine-to-machine clients use the OAuth 2.0 client credentials grant.
        Each tenant has its own authorization server: in the token URL below,
        replace `tenant` with your tenant identifier.
    bearerAuth:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: An access token obtained from your tenant authorization server.

````