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

# Initialize customer



## OpenAPI

````yaml /openapi.json post /customers
openapi: 3.0.0
info:
  title: Korint Documentation
  description: Korint API Documentation
  version: 1.0.0
  contact: {}
servers: []
security:
  - bearerAuth: []
tags: []
paths:
  /customers:
    post:
      tags:
        - customer
      summary: Initialize customer
      operationId: CustomerController_initializeCustomer
      parameters:
        - name: whenAt
          required: false
          in: query
          description: 'Optional: the whenAt datetime'
          schema:
            type: string
        - name: productId
          required: true
          in: query
          description: The productId
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InitializeCustomerInputBody'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InitializeCustomerOutput'
        '400':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/InvalidProductErrorDto'
                  - $ref: '#/components/schemas/InvalidBrokerageFirmErrorDto'
              examples:
                INVALID_PRODUCT:
                  $ref: '#/components/schemas/InvalidProductErrorDto'
                INVALID_BROKERAGE_FIRM:
                  $ref: '#/components/schemas/InvalidBrokerageFirmErrorDto'
          description: ''
        '404':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/PolicyNotFoundErrorDto'
                  - $ref: '#/components/schemas/BrokerageFirmNotFoundErrorDto'
                  - $ref: '#/components/schemas/BrokerageFirmFeesNotFoundErrorDto'
              examples:
                POLICY_NOT_FOUND:
                  $ref: '#/components/schemas/PolicyNotFoundErrorDto'
                BROKERAGE_FIRM_NOT_FOUND:
                  $ref: '#/components/schemas/BrokerageFirmNotFoundErrorDto'
                BROKERAGE_FIRM_FEES_NOT_FOUND:
                  $ref: '#/components/schemas/BrokerageFirmFeesNotFoundErrorDto'
          description: ''
        '409':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ConflictingPolicyTypeErrorDto'
                  - $ref: '#/components/schemas/ConflictingPolicyTypeErrorDto'
                  - $ref: '#/components/schemas/ConflictingPolicyStatusErrorDto'
              examples:
                CONFLICTING_POLICY_TYPE:
                  $ref: '#/components/schemas/ConflictingPolicyTypeErrorDto'
                CONFLICTING_POLICY_STATUS:
                  $ref: '#/components/schemas/ConflictingPolicyStatusErrorDto'
          description: ''
components:
  schemas:
    InitializeCustomerInputBody:
      type: object
      properties:
        parentPolicyId:
          type: string
          description: >-
            Policy id of the parent collective policy if current policy is a
            child of it
        brokerageFirmId:
          type: string
          description: >-
            Brokerage firm id to associate with the customer (used in anonymous
            funnels)
    InitializeCustomerOutput:
      type: object
      properties:
        type:
          type: string
          description: Type of the customer
        id:
          type: string
          description: Unique identifier for the customer
        initializedWith:
          description: Policy and branch id created with the customer
          allOf:
            - $ref: '#/components/schemas/InitializedWithDto'
      required:
        - type
        - id
        - initializedWith
    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
    InvalidBrokerageFirmErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - INVALID_BROKERAGE_FIRM
        message:
          type: string
          example: Invalid brokerageFirm with id {brokerageFirmId}
        details:
          $ref: '#/components/schemas/InvalidBrokerageFirmDetailsDto'
      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
    BrokerageFirmNotFoundErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - BROKERAGE_FIRM_NOT_FOUND
        message:
          type: string
          example: No brokerage firm found for brokerage firm id {brokerageFirmId}
        details:
          $ref: '#/components/schemas/BrokerageFirmNotFoundDetailsDto'
      required:
        - code
        - message
        - details
    BrokerageFirmFeesNotFoundErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - BROKERAGE_FIRM_FEES_NOT_FOUND
        message:
          type: string
          example: No brokerage firm fees found for product id {productId}
        details:
          $ref: '#/components/schemas/BrokerageFirmFeesNotFoundDetailsDto'
      required:
        - code
        - message
        - details
    ConflictingPolicyTypeErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - CONFLICTING_POLICY_TYPE
        message:
          type: string
          example: >-
            Policy {policyId} type {requirement} {policyType} to perform
            {action}
        details:
          $ref: '#/components/schemas/ConflictingPolicyTypeDetailsDto'
      required:
        - code
        - message
        - details
    ConflictingPolicyStatusErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - CONFLICTING_POLICY_STATUS
        message:
          type: string
          example: '{policyId} status {requirement} {policyStatus} to perform {action}'
        details:
          $ref: '#/components/schemas/ConflictingPolicyStatusDetailsDto'
      required:
        - code
        - message
        - details
    InitializedWithDto:
      type: object
      properties:
        policy:
          type: string
          description: Unique identifier for the policy
        branch:
          type: string
          description: Unique identifier for the branch
      required:
        - policy
        - branch
    InvalidProductDetailsDto:
      type: object
      properties:
        tenant:
          type: string
        product:
          type: string
        expectedProduct:
          type: string
      required:
        - product
    InvalidBrokerageFirmDetailsDto:
      type: object
      properties:
        brokerageFirmId:
          type: string
      required:
        - brokerageFirmId
    PolicyNotFoundDetailsDto:
      type: object
      properties:
        policyId:
          type: string
        branchId:
          type: string
        whenAt:
          type: string
        simulatedAt:
          type: string
      required:
        - policyId
    BrokerageFirmNotFoundDetailsDto:
      type: object
      properties:
        brokerageFirmId:
          type: string
        source:
          type: string
        policyId:
          type: string
      required:
        - brokerageFirmId
    BrokerageFirmFeesNotFoundDetailsDto:
      type: object
      properties:
        productId:
          type: string
        brokerageFirmId:
          type: string
      required:
        - productId
        - brokerageFirmId
    ConflictingPolicyTypeDetailsDto:
      type: object
      properties:
        policyId:
          type: string
        policyType:
          type: string
        requirement:
          allOf:
            - $ref: '#/components/schemas/OperationRequirement'
        action:
          allOf:
            - $ref: '#/components/schemas/Action'
      required:
        - policyId
        - policyType
        - requirement
        - action
    ConflictingPolicyStatusDetailsDto:
      type: object
      properties:
        policyStatus:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        policyId:
          type: string
        requirement:
          allOf:
            - $ref: '#/components/schemas/OperationRequirement'
        action:
          allOf:
            - $ref: '#/components/schemas/Action'
        additionalData:
          type: object
          additionalProperties: true
      required:
        - policyStatus
        - policyId
        - requirement
        - action
    OperationRequirement:
      type: string
      enum:
        - must be
        - must NOT be
        - must contain
        - must NOT contain
    Action:
      type: string
      enum:
        - PERFORM THIS ACTION
        - CREATE POLICY
        - CREATE ASSET
        - CREATE ASSET WITH START DATE
        - REPLACE ASSET
        - REMOVE ASSET
        - CHOOSE ASSET OPTIONS
        - STOP ASSET
        - EDIT ASSET
        - EDIT ASSET WITH START DATE
        - CREATE BRANCH
        - CREATE DEROGATION
        - CREATE MTA BRANCH
        - FORK TO NEW MTA BRANCH
        - FORK TO NEW NB BRANCH
        - FORK TO NEW RENEWAL BRANCH
        - FORK TO NEW REPRICING BRANCH
        - DEFINE PARENT POLICY ID
        - INITIALIZE CUSTOMER
        - EDIT CUSTOMER
        - DELETE CUSTOMER FROM POLICY
        - DECLARE CLAIMS HISTORY
        - SIGN
        - EDIT POLICY
        - EDIT POLICY EXTERNAL ID
        - CONFIRM POLICY
        - QUOTE POLICY
        - RETRIEVING QUOTE
        - STOP POLICY
        - SUSPEND POLICY
        - ACTIVATE POLICY
        - GENERATE MANDATE SIGNATURE REQUEST
        - GENERATE PAYMENT METHOD SECRET
        - CREATE CLAIM
        - FINALIZE RENEWAL
        - SEND CONTRACT TO SIGNATURE
        - GENERATE SIGNATURE REQUEST
        - GENERATE DOCUMENTS FOR SIGNATURE
        - APPROVE DISTRIBUTION REQUEST
        - DENY DISTRIBUTION REQUEST
        - REVOKED_DISTRIBUTION_REQUEST
        - DELETE DISTRIBUTION REQUEST
        - WAITING FOR SIGNATURE DISTRIBUTION REQUEST
        - UPDATE POLICY QUOTE

````