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

# Calculate policy quote

> Calculate quote information for a policy without actually quoting it. The quote contains the full pricing details, i.e. base prices for assets or policy, the multipliers applied, peril breakdown, etc.



## OpenAPI

````yaml /openapi.json post /policies/{policyId}/calculate-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}/calculate-quote:
    post:
      tags:
        - policy
      summary: Calculate policy quote
      description: >-
        Calculate quote information for a policy without actually quoting it.
        The quote contains the full pricing details, i.e. base prices for assets
        or policy, the multipliers applied, peril breakdown, etc.
      operationId: PolicyController_calculatePolicyQuote
      parameters:
        - name: policyId
          required: true
          in: path
          description: the policy id
          schema:
            type: string
        - 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
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CalculatePolicyQuoteInputBody'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CalculatePolicyQuoteOutput'
        '400':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: >-
                      #/components/schemas/InvalidQuoteOptionsInvalidPerilOptionErrorDto
                  - $ref: >-
                      #/components/schemas/InvalidQuoteOptionsMissingRequiredPerilsErrorDto
                  - $ref: >-
                      #/components/schemas/InvalidQuoteOptionsTierAndExcessErrorDto
                  - $ref: '#/components/schemas/MissingAssetOptionsErrorDto'
              examples:
                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
                MISSING_ASSET_OPTIONS:
                  $ref: '#/components/schemas/MissingAssetOptionsErrorDto'
          description: ''
        '404':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/PolicyNotFoundErrorDto'
                  - $ref: '#/components/schemas/BranchNotFoundErrorDto'
              examples:
                POLICY_NOT_FOUND:
                  $ref: '#/components/schemas/PolicyNotFoundErrorDto'
                BRANCH_NOT_FOUND:
                  $ref: '#/components/schemas/BranchNotFoundErrorDto'
          description: ''
        '409':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ConflictingPolicyStatusErrorDto'
                  - $ref: '#/components/schemas/ConflictingFieldDefinitionErrorDto'
                  - $ref: '#/components/schemas/ConflictingContractTypeErrorDto'
                  - $ref: '#/components/schemas/QuoteFailedErrorDto'
              examples:
                CONFLICTING_POLICY_STATUS:
                  $ref: '#/components/schemas/ConflictingPolicyStatusErrorDto'
                CONFLICTING_FIELD_DEFINITION:
                  $ref: '#/components/schemas/ConflictingFieldDefinitionErrorDto'
                CONFLICTING_CONTRACT_TYPE:
                  $ref: '#/components/schemas/ConflictingContractTypeErrorDto'
                QUOTE_FAILED:
                  $ref: '#/components/schemas/QuoteFailedErrorDto'
          description: ''
components:
  schemas:
    CalculatePolicyQuoteInputBody:
      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'
        brokerageFeesOverride:
          description: Brokerage fees to calculate quote with
          type: array
          items:
            $ref: '#/components/schemas/BrokerageFeeOnPolicy'
        periodDurationOverride:
          description: Policy period duration value to calculate quote with
          allOf:
            - $ref: '#/components/schemas/Duration'
        customFieldsToOverride:
          description: Custom fields you want to calculate quote with
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldDto'
        assetIds:
          description: The assets ids to quote
          type: array
          items:
            type: string
        prorated:
          type: boolean
          description: >-
            Decide if the quote should be prorated according to the invoicing
            frequency
    CalculatePolicyQuoteOutput:
      type: object
      properties:
        policy:
          $ref: '#/components/schemas/PolicyQuoteDto'
        assets:
          type: array
          items:
            $ref: '#/components/schemas/AssetQuoteDto'
    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
    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
    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
    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
    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
    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
    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
    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
    BrokerageFeeOnPolicy:
      type: object
      properties:
        brokerageFirmId:
          type: string
          description: Brokerage firm id
          maximum: 100
          minimum: 0
        fee:
          type: number
          description: Fee
          maximum: 100
          minimum: 0
      required:
        - brokerageFirmId
        - fee
    Duration:
      type: object
      properties:
        amount:
          type: number
        unit:
          type: string
          enum:
            - YEAR
            - MONTH
            - WEEK
            - DAY
            - HOUR
            - MINUTE
            - SECOND
      required:
        - amount
        - unit
    CustomFieldDto:
      type: object
      properties:
        key:
          type: string
        value:
          oneOf:
            - type: string
            - type: number
            - type: boolean
      required:
        - key
        - value
    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
    AssetQuoteDto:
      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'
        options:
          description: Quote options chosen by client
          allOf:
            - $ref: '#/components/schemas/AssetQuoteOptionsDto'
      required:
        - id
        - entityId
        - provider
        - rates
        - totalPremium
        - components
        - options
    InvalidQuoteOptionsInvalidPerilOptionDetailsDto:
      type: object
      properties: {}
    InvalidQuoteOptionsMissingPerilsDetailsDto:
      type: object
      properties: {}
    InvalidQuoteOptionsTierAndExcessDetailsDto:
      type: object
      properties: {}
    MissingAssetOptionsDetailsDto:
      type: object
      properties:
        assetId:
          type: string
      required:
        - assetId
    PolicyNotFoundDetailsDto:
      type: object
      properties:
        policyId:
          type: string
        branchId:
          type: string
        whenAt:
          type: string
        simulatedAt:
          type: string
      required:
        - policyId
    BranchNotFoundDetailsDto:
      type: object
      properties:
        branchId:
          type: string
      required:
        - branchId
    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
    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
    ConflictContractTypeDetailsDto:
      type: object
      properties:
        contractType:
          type: string
        requirement:
          allOf:
            - $ref: '#/components/schemas/OperationRequirement'
        action:
          allOf:
            - $ref: '#/components/schemas/Action'
      required:
        - contractType
        - requirement
        - action
    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
    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
    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
    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
    AssetQuoteOptionsDto:
      type: object
      properties:
        tier:
          type: string
        excess:
          type: string
        perils:
          type: array
          items:
            $ref: '#/components/schemas/ConfigQuoteChosenWarrantyDto'
        assetId:
          type: string
        brokerageFees:
          type: array
          items:
            $ref: '#/components/schemas/BrokerageFeeOnPolicy'
      required:
        - tier
        - excess
        - assetId
    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
    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
    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
    RateInputDto:
      type: object
      properties:
        id:
          type: string
          description: id
        value:
          description: value
          oneOf:
            - type: string
            - type: number
      required:
        - id
        - value
    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

````