> ## 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 invoicing schedule



## OpenAPI

````yaml /openapi.json get /customers/{customerId}/invoicing-schedule
openapi: 3.0.0
info:
  title: Korint Documentation
  description: Korint API Documentation
  version: 1.0.0
  contact: {}
servers: []
security:
  - bearerAuth: []
tags: []
paths:
  /customers/{customerId}/invoicing-schedule:
    get:
      tags:
        - customer
      summary: Get invoicing schedule
      operationId: CustomerController_getInvoicingSchedule
      parameters:
        - name: whenAt
          required: false
          in: query
          description: 'Optional: the whenAt datetime'
          schema:
            type: string
        - name: simulatedAt
          required: false
          in: query
          description: 'Optional: the simulatedAt datetime'
          schema:
            type: string
        - name: branchId
          required: false
          in: query
          description: 'Optional: the branchId'
          schema:
            type: string
        - name: excludeInvoiceIds
          required: false
          in: query
          description: >-
            Invoice IDs to exclude from currentInvoiceIds when calculating the
            schedule
          schema:
            type: array
            items:
              type: string
        - name: customerId
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerGetInvoicingScheduleOutput'
        '400':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/InvalidProductErrorDto'
              examples:
                INVALID_PRODUCT:
                  $ref: '#/components/schemas/InvalidProductErrorDto'
          description: ''
        '404':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/CustomerNotFoundErrorDto'
                  - $ref: '#/components/schemas/PolicyNotFoundErrorDto'
              examples:
                CUSTOMER_NOT_FOUND:
                  $ref: '#/components/schemas/CustomerNotFoundErrorDto'
                POLICY_NOT_FOUND:
                  $ref: '#/components/schemas/PolicyNotFoundErrorDto'
          description: ''
components:
  schemas:
    CustomerGetInvoicingScheduleOutput:
      type: object
      properties:
        total:
          type: number
          description: 'Optional: Total number of invoice details'
        offset:
          type: number
          description: 'Optional: Number of invoice details the array has to star after'
        limit:
          type: number
          description: 'Optional: Number of invoice details in the array'
        data:
          description: Array invoice details
          type: array
          items:
            $ref: '#/components/schemas/InvoiceDetails'
      required:
        - data
    InvalidProductErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - INVALID_PRODUCT
        message:
          type: string
          example: Invalid product {product}
        details:
          $ref: '#/components/schemas/InvalidProductDetailsDto'
      required:
        - code
        - message
        - details
    CustomerNotFoundErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - CUSTOMER_NOT_FOUND
        message:
          type: string
          example: Customer {customerId} ({branchId}) not found
        details:
          $ref: '#/components/schemas/CustomerNotFoundDetailsDto'
      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
    InvoiceDetails:
      type: object
      properties:
        issuedAt:
          type: string
          description: invoice issuance date
        period:
          $ref: '#/components/schemas/Period'
        components:
          type: array
          items:
            $ref: '#/components/schemas/BillingComponentDto'
        lines:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineDto'
        total:
          $ref: '#/components/schemas/AmountDto'
        reconciledInvoiceIds:
          description: Invoice ids that have been reconciled
          type: array
          items:
            type: array
      required:
        - issuedAt
        - period
        - components
        - lines
        - total
    InvalidProductDetailsDto:
      type: object
      properties:
        tenant:
          type: string
        product:
          type: string
        expectedProduct:
          type: string
      required:
        - product
    CustomerNotFoundDetailsDto:
      type: object
      properties:
        customerId:
          type: string
        branchId:
          type: string
        whenAt:
          type: string
        simulatedAt:
          type: string
      required:
        - customerId
    PolicyNotFoundDetailsDto:
      type: object
      properties:
        policyId:
          type: string
        branchId:
          type: string
        whenAt:
          type: string
        simulatedAt:
          type: string
      required:
        - policyId
    Period:
      type: object
      properties:
        startedAt:
          type: string
          description: the start date of the period
        endedAt:
          type: string
          description: the end date of the period
      required:
        - startedAt
        - endedAt
    BillingComponentDto:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - PREMIUM
            - PERIL
            - FEE
            - TAX
            - SPECIAL
        premium:
          $ref: '#/components/schemas/AmountDto'
        reconciliation:
          type: boolean
      required:
        - id
        - type
        - premium
        - reconciliation
    InvoiceLineDto:
      type: object
      properties:
        label:
          type: string
        total:
          $ref: '#/components/schemas/AmountDto'
      required:
        - label
        - total
    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
    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

````