> ## 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 Customers On Policy



## OpenAPI

````yaml /openapi.json get /view-specific/{policyId}/customers
openapi: 3.0.0
info:
  title: Korint Documentation
  description: Korint API Documentation
  version: 1.0.0
  contact: {}
servers: []
security:
  - bearerAuth: []
tags: []
paths:
  /view-specific/{policyId}/customers:
    get:
      tags:
        - view-specific
      summary: List Customers On Policy
      operationId: ViewSpecificController_listPolicyCustomers
      parameters:
        - name: policyId
          required: true
          in: path
          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: 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
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPolicyCustomersOutput'
        '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:
    ListPolicyCustomersOutput:
      type: object
      properties:
        data:
          description: the list of items in the page
          type: array
          items:
            $ref: '#/components/schemas/CustomerDto'
        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
    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
    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:
          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
        policies:
          description: Policies associated with the customer
          type: array
          items:
            type: string
        invoices:
          description: Array of invoice identifiers associated with the customer
          type: array
          items:
            type: string
        role:
          type: string
          description: Customer business role
        preferredPaymentMethodId:
          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
        - invoices
        - role
        - paymentMode
    ResponsePageInfo:
      type: object
      properties:
        first:
          type: boolean
          description: whether this is the first page
        last:
          type: boolean
          description: whether this is the last page
    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
    CustomFieldDto:
      type: object
      properties:
        key:
          type: string
        value:
          oneOf:
            - type: string
            - type: number
            - type: boolean
      required:
        - key
        - value

````