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

# Quote the policy



## OpenAPI

````yaml /openapi.json post /policies/{policyId}/quote
openapi: 3.0.0
info:
  title: Korint Documentation
  description: Korint API Documentation
  version: 1.0.0
  contact: {}
servers: []
security:
  - bearerAuth: []
tags: []
paths:
  /policies/{policyId}/quote:
    post:
      tags:
        - policy
      summary: Quote the policy
      operationId: PolicyController_quotePolicy
      parameters:
        - name: policyId
          required: true
          in: path
          description: the policy's id
          schema:
            type: string
        - name: whenAt
          required: false
          in: query
          description: 'Optional: the whenAt datetime'
          schema:
            type: string
        - name: branchId
          required: true
          in: query
          description: the branchId
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PolicyQuoteBodyInput'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyQuoteOutput'
        '400':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/InvalidProductErrorDto'
                  - $ref: '#/components/schemas/InvalidEventCreationDateErrorDto'
                  - $ref: '#/components/schemas/InvalidCustomFieldsErrorDto'
                  - $ref: '#/components/schemas/MissingAssetOptionsErrorDto'
                  - $ref: '#/components/schemas/InvalidPricingDetailsErrorDto'
                  - $ref: >-
                      #/components/schemas/InvalidQuoteOptionsInvalidPerilOptionErrorDto
                  - $ref: >-
                      #/components/schemas/InvalidQuoteOptionsMissingRequiredPerilsErrorDto
                  - $ref: >-
                      #/components/schemas/InvalidQuoteOptionsTierAndExcessErrorDto
              examples:
                INVALID_PRODUCT:
                  $ref: '#/components/schemas/InvalidProductErrorDto'
                INVALID_EVENT_CREATION_DATE:
                  $ref: '#/components/schemas/InvalidEventCreationDateErrorDto'
                INVALID_CUSTOM_FIELDS:
                  $ref: '#/components/schemas/InvalidCustomFieldsErrorDto'
                MISSING_ASSET_OPTIONS:
                  $ref: '#/components/schemas/MissingAssetOptionsErrorDto'
                INVALID_PRICING_DETAILS:
                  $ref: '#/components/schemas/InvalidPricingDetailsErrorDto'
                INVALID_QUOTE_OPTIONS_INVALID_PERIL_OPTION:
                  $ref: >-
                    #/components/schemas/InvalidQuoteOptionsInvalidPerilOptionErrorDto
                INVALID_QUOTE_OPTIONS_MISSING_REQUIRED_PERILS:
                  $ref: >-
                    #/components/schemas/InvalidQuoteOptionsMissingRequiredPerilsErrorDto
                INVALID_QUOTE_OPTIONS_TIER_AND_EXCESS:
                  $ref: >-
                    #/components/schemas/InvalidQuoteOptionsTierAndExcessErrorDto
          description: ''
        '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'
                  - $ref: '#/components/schemas/QuoteNotFoundErrorDto'
                  - $ref: '#/components/schemas/BrokerageFirmNotFoundErrorDto'
                  - $ref: '#/components/schemas/BranchNotFoundErrorDto'
                  - $ref: '#/components/schemas/BranchNotFoundErrorDto'
              examples:
                POLICY_NOT_FOUND:
                  $ref: '#/components/schemas/PolicyNotFoundErrorDto'
                QUOTE_NOT_FOUND:
                  $ref: '#/components/schemas/QuoteNotFoundErrorDto'
                BROKERAGE_FIRM_NOT_FOUND:
                  $ref: '#/components/schemas/BrokerageFirmNotFoundErrorDto'
                BRANCH_NOT_FOUND:
                  $ref: '#/components/schemas/BranchNotFoundErrorDto'
          description: ''
        '409':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ConflictingContractTypeErrorDto'
                  - $ref: '#/components/schemas/ConflictingPolicyStatusErrorDto'
                  - $ref: '#/components/schemas/ConflictingBranchStatusErrorDto'
                  - $ref: '#/components/schemas/ConflictingFieldDefinitionErrorDto'
                  - $ref: '#/components/schemas/FieldsDoNotMeetRequirementsErrorDto'
                  - $ref: '#/components/schemas/QuoteFailedErrorDto'
              examples:
                CONFLICTING_CONTRACT_TYPE:
                  $ref: '#/components/schemas/ConflictingContractTypeErrorDto'
                CONFLICTING_POLICY_STATUS:
                  $ref: '#/components/schemas/ConflictingPolicyStatusErrorDto'
                CONFLICTING_BRANCH_STATUS:
                  $ref: '#/components/schemas/ConflictingBranchStatusErrorDto'
                CONFLICTING_FIELD_DEFINITION:
                  $ref: '#/components/schemas/ConflictingFieldDefinitionErrorDto'
                FIELDS_DO_NOT_MEET_REQUIREMENTS:
                  $ref: '#/components/schemas/FieldsDoNotMeetRequirementsErrorDto'
                QUOTE_FAILED:
                  $ref: '#/components/schemas/QuoteFailedErrorDto'
          description: ''
components:
  schemas:
    PolicyQuoteBodyInput:
      type: object
      properties:
        options:
          type: array
          items:
            $ref: '#/components/schemas/PolicyQuoteBodyInputOptions'
        additionalQuoteComponentsAndPercentages:
          description: Additional quote components and percentages
          allOf:
            - $ref: '#/components/schemas/ManualQuoteComponentsAndPercentagesDto'
        skipValidation:
          type: boolean
          description: 'Debug: force a quote to happen even if there are no changes to quote'
    PolicyQuoteOutput:
      type: object
      properties: {}
    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
    InvalidEventCreationDateErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - INVALID_EVENT_CREATION_DATE
        message:
          type: string
          example: >-
            You are trying to push an event that is created on {createdAt}, but
            the creation date should be after the latest event which was created
            on {latestCreatedAt}
        details:
          $ref: '#/components/schemas/InvalidEventCreationDateDetailsDto'
      required:
        - code
        - message
        - details
    InvalidCustomFieldsErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - INVALID_CUSTOM_FIELDS
        message:
          type: string
          example: Invalid custom fields
        details:
          $ref: '#/components/schemas/InvalidCustomFieldsDetailsDto'
      required:
        - code
        - message
        - details
    MissingAssetOptionsErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - MISSING_ASSET_OPTIONS
        message:
          type: string
          example: Missing asset options for {assetId}
        details:
          $ref: '#/components/schemas/MissingAssetOptionsDetailsDto'
      required:
        - code
        - message
        - details
    InvalidPricingDetailsErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - INVALID_PRICING_DETAILS
        message:
          type: string
          example: Pricing details failed validation
        details:
          $ref: '#/components/schemas/InvalidPricingDetailsDetailsDto'
      required:
        - code
        - message
        - details
    InvalidQuoteOptionsInvalidPerilOptionErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - INVALID_QUOTE_OPTIONS_INVALID_PERIL_OPTION
        message:
          type: string
          example: >-
            Invalid quote options: invalid peril {perilId} option
            {chosenPerilOption}
        details:
          $ref: '#/components/schemas/InvalidQuoteOptionsInvalidPerilOptionDetailsDto'
      required:
        - code
        - message
        - details
    InvalidQuoteOptionsMissingRequiredPerilsErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - INVALID_QUOTE_OPTIONS_MISSING_REQUIRED_PERILS
        message:
          type: string
          example: 'Invalid quote options: missing required perils {missingPerils}'
        details:
          $ref: '#/components/schemas/InvalidQuoteOptionsMissingPerilsDetailsDto'
      required:
        - code
        - message
        - details
    InvalidQuoteOptionsTierAndExcessErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - INVALID_QUOTE_OPTIONS_TIER_AND_EXCESS
        message:
          type: string
          example: 'Invalid quote options: tier and excess'
        details:
          $ref: '#/components/schemas/InvalidQuoteOptionsTierAndExcessDetailsDto'
      required:
        - code
        - message
        - details
    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
    QuoteNotFoundErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - QUOTE_NOT_FOUND
        message:
          type: string
          example: Quote not found for {id}
        details:
          $ref: '#/components/schemas/QuoteNotFoundDetailsDto'
      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
    BranchNotFoundErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - BRANCH_NOT_FOUND
        message:
          type: string
          example: Branch {branchId} not found
        details:
          $ref: '#/components/schemas/BranchNotFoundDetailsDto'
      required:
        - code
        - message
        - details
    ConflictingContractTypeErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - CONFLICTING_CONTRACT_TYPE
        message:
          type: string
          example: Contract type {requirement} {contractType} to perform {action}
        details:
          $ref: '#/components/schemas/ConflictContractTypeDetailsDto'
      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
    ConflictingBranchStatusErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - CONFLICTING_BRANCH_STATUS
        message:
          type: string
          example: Branch status {requirement} {branchStatus} to perform {action}
        details:
          $ref: '#/components/schemas/ConflictingBranchStatusDetailsDto'
      required:
        - code
        - message
        - details
    ConflictingFieldDefinitionErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - CONFLICTING_FIELD_DEFINITION
        message:
          type: string
          example: '{entity} {id} {field} {requirement} {qualifier}'
        details:
          $ref: >-
            #/components/schemas/ConflictingBusinessEntityFieldDefinitionDetailsDto
      required:
        - code
        - message
        - details
    FieldsDoNotMeetRequirementsErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - FIELDS_DO_NOT_MEET_REQUIREMENTS
        message:
          type: string
          example: >-
            Fields on this branch do not meet requirements defined in product
            configuration
        details:
          $ref: '#/components/schemas/FieldsRequirementsConflictDto'
      required:
        - code
        - message
        - details
    QuoteFailedErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - QUOTE_FAILED
        message:
          type: string
          example: Quote failed
        details:
          $ref: '#/components/schemas/QuoteFailedDetailsDto'
      required:
        - code
        - message
        - details
    PolicyQuoteBodyInputOptions:
      type: object
      properties:
        tier:
          type: string
        excess:
          type: string
        perils:
          type: array
          items:
            $ref: '#/components/schemas/ConfigQuoteChosenWarrantyDto'
        assetId:
          type: string
      required:
        - tier
        - excess
        - assetId
    ManualQuoteComponentsAndPercentagesDto:
      type: object
      properties:
        components:
          type: array
          items:
            $ref: '#/components/schemas/ManualQuoteComponentDto'
        percentages:
          type: array
          items:
            $ref: '#/components/schemas/ManualQuotePercentageDto'
      required:
        - components
        - percentages
    InvalidProductDetailsDto:
      type: object
      properties:
        tenant:
          type: string
        product:
          type: string
        expectedProduct:
          type: string
      required:
        - product
    InvalidEventCreationDateDetailsDto:
      type: object
      properties:
        createdAt:
          format: date-time
          type: string
        latestCreatedAt:
          format: date-time
          type: string
      required:
        - createdAt
        - latestCreatedAt
    InvalidCustomFieldsDetailsDto:
      type: object
      properties:
        productId:
          type: string
        errors:
          type: array
          items:
            $ref: '#/components/schemas/InvalidCustomFieldsDetailsErrorsDto'
      required:
        - errors
    MissingAssetOptionsDetailsDto:
      type: object
      properties:
        assetId:
          type: string
      required:
        - assetId
    InvalidPricingDetailsDetailsDto:
      type: object
      properties:
        product:
          type: string
        businessEntity:
          allOf:
            - $ref: '#/components/schemas/BusinessEntity'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/InvalidPricingDetailsErrorsDto'
      required:
        - product
        - businessEntity
        - errors
    InvalidQuoteOptionsInvalidPerilOptionDetailsDto:
      type: object
      properties: {}
    InvalidQuoteOptionsMissingPerilsDetailsDto:
      type: object
      properties: {}
    InvalidQuoteOptionsTierAndExcessDetailsDto:
      type: object
      properties: {}
    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
    QuoteNotFoundDetailsDto:
      type: object
      properties:
        id:
          type: string
      required:
        - id
    BrokerageFirmNotFoundDetailsDto:
      type: object
      properties:
        brokerageFirmId:
          type: string
        source:
          type: string
        policyId:
          type: string
      required:
        - brokerageFirmId
    BranchNotFoundDetailsDto:
      type: object
      properties:
        branchId:
          type: string
      required:
        - branchId
    ConflictContractTypeDetailsDto:
      type: object
      properties:
        contractType:
          type: string
        requirement:
          allOf:
            - $ref: '#/components/schemas/OperationRequirement'
        action:
          allOf:
            - $ref: '#/components/schemas/Action'
      required:
        - contractType
        - 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
    ConflictingBranchStatusDetailsDto:
      type: object
      properties:
        branchStatus:
          allOf:
            - $ref: '#/components/schemas/BranchStatus'
        requirement:
          allOf:
            - $ref: '#/components/schemas/OperationRequirement'
        action:
          allOf:
            - $ref: '#/components/schemas/Action'
      required:
        - branchStatus
        - requirement
        - action
    ConflictingBusinessEntityFieldDefinitionDetailsDto:
      type: object
      properties:
        entity:
          allOf:
            - $ref: '#/components/schemas/BusinessEntity'
        id:
          type: string
        field:
          type: string
        requirement:
          allOf:
            - $ref: '#/components/schemas/OperationRequirement'
        qualifier:
          allOf:
            - $ref: '#/components/schemas/FieldQualifier'
        additionalData:
          type: string
        rawData:
          type: object
          additionalProperties: true
      required:
        - entity
        - field
        - requirement
        - qualifier
    FieldsRequirementsConflictDto:
      type: object
      properties: {}
    QuoteFailedDetailsDto:
      type: object
      properties:
        failedReason:
          type: string
          enum:
            - CRM_ABOVE_LIMIT
            - NEGATIVE_PREMIUM
    ConfigQuoteChosenWarrantyDto:
      type: object
      properties:
        id:
          type: string
        option:
          type: string
        available:
          type: boolean
        unavailabilityMessage:
          type: string
      required:
        - id
    ManualQuoteComponentDto:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - PREMIUM
            - PERIL
            - FEE
            - TAX
            - SPECIAL
        chargeType:
          type: string
          description: Charge type of component
          enum:
            - ONE_TIME
            - SPOT
            - RECURRING
        calculatePremiumBrokerFees:
          type: boolean
        premium:
          $ref: '#/components/schemas/ManualQuotePolicyInputComponentPremiumDto'
      required:
        - id
        - type
        - chargeType
        - premium
    ManualQuotePercentageDto:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - PREMIUM
            - PERIL
            - FEE
            - TAX
            - SPECIAL
        chargeType:
          type: string
          description: Charge type of component
          enum:
            - ONE_TIME
            - SPOT
            - RECURRING
        componentIds:
          description: Component identifiers from who the percentage is calculated
          type: array
          items:
            type: string
        amountPropertiesFrom:
          type: array
          description: Amount properties to calculate the percentage from
          items:
            $ref: '#/components/schemas/ManualQuotePercentageAmountProperty'
        percentage:
          type: number
          description: Percentage
          minimum: 0
          maximum: 100
      required:
        - id
        - type
        - chargeType
        - componentIds
        - amountPropertiesFrom
        - percentage
    InvalidCustomFieldsDetailsErrorsDto:
      type: object
      properties:
        key:
          type: string
        errorDetails:
          type: array
          items:
            type: string
        value:
          type: object
      required:
        - key
        - errorDetails
    BusinessEntity:
      type: string
      enum:
        - PAYMENT_METHOD
        - PAYMENT
        - POLICY
        - CUSTOMER
        - ASSET
        - INVOICE
        - DOCUMENT
        - SIGNATURE
        - TENANT
        - PRODUCT
        - QUOTE
        - BROKERAGE_FIRM
        - CLAIM
        - EXTERNAL_SERVICE
        - NOTIFICATION
        - PREMIUM_SCHEDULE
        - CHECK
        - ALERT
        - DISTRIBUTION_REQUEST
        - DEROGATION
        - BROKERAGE_FEE
        - COMMENT
        - CONVERSATION
        - CONVERSATION_MESSAGE
    InvalidPricingDetailsErrorsDto:
      type: object
      properties:
        key:
          type: string
        errorDetails:
          type: array
          items:
            type: string
        value:
          type: object
      required:
        - key
        - errorDetails
    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
    BranchStatus:
      type: string
      enum:
        - BRANCH_OPEN
        - BRANCH_MERGED
        - BRANCH_CLOSED
    FieldQualifier:
      type: string
      enum:
        - DEFINED
        - AFTER
        - BEFORE
        - ON or AFTER
        - BEFORE or ON
        - 'ON'
        - EMPTY
        - in
    ManualQuotePolicyInputComponentPremiumDto:
      type: object
      properties:
        amountPreFeesAndTaxes:
          type: integer
        totalFees:
          type: integer
        totalTaxes:
          type: integer
      required:
        - amountPreFeesAndTaxes
        - totalFees
        - totalTaxes
    ManualQuotePercentageAmountProperty:
      type: string
      enum:
        - amountPreFeesAndTaxes
        - totalFees
        - totalTaxes
      description: Amount properties to calculate the percentage from

````