> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aiinsurance.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Quote

> Returns a single quote with all details.

**Required permission:** `company.quote:read`




## OpenAPI

````yaml /openapi/generated-external-api.yaml get /api/external/companies/{companyId}/quotes/{quoteId}
openapi: 3.0.3
info:
  title: AI Insurance External API
  description: External API for AI Insurance platform
  version: 1.0.0
  contact:
    email: support@aiinsurance.io
servers:
  - url: https://app.aiinsurance.io
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /api/external/companies/{companyId}/quotes/{quoteId}:
    get:
      tags:
        - Quotes
      summary: Get Quote
      description: |
        Returns a single quote with all details.

        **Required permission:** `company.quote:read`
      operationId: getQuote
      parameters:
        - $ref: '#/components/parameters/companyId'
        - name: quoteId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Quote identifier
      responses:
        '200':
          description: Quote details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Quote'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Quote not found
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    companyId:
      name: companyId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Company identifier
  schemas:
    Quote:
      allOf:
        - $ref: '#/components/schemas/QuoteInfo'
        - type: object
          properties:
            wizardType:
              type: string
              enum:
                - quote
                - endorsement
                - cancellation
                - reinstatement
                - renewal
                - forms
            applicant:
              type: object
              properties:
                id:
                  type: string
                name:
                  type: string
                email:
                  type: string
                  format: email
            data:
              $ref: '#/components/schemas/QuoteData'
            bindErrors:
              type: array
              items:
                type: object
            previewData:
              $ref: '#/components/schemas/PreviewData'
            ratingEngineRevisionId:
              type: string
            ratingEngineVersionShortName:
              type: string
            billingEmail:
              type: string
              format: email
    QuoteInfo:
      type: object
      properties:
        id:
          type: string
          format: uuid
        number:
          type: string
          example: Q00000001-01
        status:
          $ref: '#/components/schemas/QuoteStatus'
        submissionId:
          type: string
          format: uuid
        applicationId:
          type: string
          format: uuid
        policyId:
          type: string
          format: uuid
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        description:
          type: string
        policyCurrency:
          type: string
          example: USD
        grandTotal:
          type: number
          example: 2500
    QuoteData:
      type: object
      description: Full quote data structure
      properties:
        currentStepKey:
          type: string
          description: Current wizard step
        hasPassedDetailsStep:
          type: boolean
        hasReachedReviewStep:
          type: boolean
        policyInfo:
          $ref: '#/components/schemas/PolicyInfo'
        noRatingPremium:
          type: number
        policyAggregateLimits:
          type: object
        policyInsureds:
          type: array
          items:
            $ref: '#/components/schemas/PolicyInsured'
        coverages:
          type: array
          items:
            type: object
          description: Line of coverage configurations
        useDefaultCoverages:
          type: boolean
        editingCustomAdjustments:
          type: array
          items:
            $ref: '#/components/schemas/QuoteCustomAdjustment'
        billType:
          type: string
          enum:
            - annual
            - monthly
            - quarterly
            - semi-annual
        billConfig:
          type: object
          description: Billing configuration
        customBillItems:
          type: array
          items:
            type: object
        previousCustomBillItems:
          type: array
          items:
            type: object
        files:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              filename:
                type: string
        displayUploadFilesStep:
          type: boolean
        selectedForms:
          type: object
          description: Selected forms by step
        bindingSettings:
          type: object
        recipients:
          type: array
          items:
            type: object
        enteredEffectiveDate:
          type: string
          format: date
        importPolicyId:
          type: string
          format: uuid
    PreviewData:
      type: object
      description: Calculated values for displaying quote
      properties:
        premium:
          type: number
        taxes:
          type: number
        fees:
          type: number
        total:
          type: number
        billItems:
          type: array
          items:
            type: object
        insuredRatings:
          type: array
          items:
            type: object
    ErrorResponse:
      type: object
      description: Standard error response for all external API endpoints
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable error code
              example: VALIDATION_ERROR
            message:
              type: string
              description: Human-readable error message
              example: 'submissionId: Required field is missing'
            details:
              type: array
              description: Additional details for validation errors (field-level errors)
              items:
                type: object
                properties:
                  field:
                    type: string
                    description: The field that caused the error
                    example: submissionId
                  message:
                    type: string
                    description: Description of the field error
                    example: Required field is missing
    QuoteStatus:
      type: string
      enum:
        - in_progress
        - complete
        - sent
        - accepted
        - bound
        - cancelled
        - archived
        - applied_to_policy
    PolicyInfo:
      type: object
      properties:
        number:
          type: string
          description: Policy number
        type:
          type: string
          description: Policy type code
        startsAtDate:
          type: string
          format: date
          description: Policy effective date (ISO 8601)
        endsAtDate:
          type: string
          format: date
          description: Policy expiration date (ISO 8601)
        coverageTimezone:
          type: string
          description: Timezone for coverage dates
        broker:
          type: object
          description: Broker information
        description:
          type: string
          description: Policy description
        currency:
          type: string
          example: USD
        ratingData:
          type: object
          description: Custom rating data for the rating engine
        ratingInfo:
          type: object
          description: Rating calculation results
    PolicyInsured:
      type: object
      properties:
        policyInsuredId:
          type: integer
        coveragePeriods:
          type: array
          items:
            $ref: '#/components/schemas/CoveragePeriod'
        isNewInsured:
          type: boolean
        isAddedInFlow:
          type: boolean
        isEditedInFlow:
          type: boolean
        coveragePeriodModification:
          type: boolean
    QuoteCustomAdjustment:
      type: object
      properties:
        id:
          type: string
        description:
          type: string
        amount:
          type: string
        insuredId:
          type: string
        sectionRank:
          type: integer
        format:
          type: string
          enum:
            - percent
            - currency
    CoveragePeriod:
      type: object
      properties:
        id:
          type: string
        joinDate:
          type: string
          format: date
          description: ISO 8601 date
        terminationDate:
          type: string
          format: date
        initialTerminationDate:
          type: string
          format: date
        policyInsuredId:
          type: integer
  responses:
    Unauthorized:
      description: Unauthorized - Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingApiKey:
              summary: Missing API key
              value:
                error:
                  code: UNAUTHORIZED
                  message: Authorization header is required
            bearerTokenNotAllowed:
              summary: Bearer token used instead of API key
              value:
                error:
                  code: UNAUTHORIZED
                  message: External API endpoints require API key authentication
    Forbidden:
      description: Forbidden - Insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            insufficientPermissions:
              summary: Insufficient permissions
              value:
                error:
                  code: FORBIDDEN
                  message: Insufficient permissions to perform this action
    InternalServerError:
      description: Internal Server Error - Unexpected error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            internalError:
              summary: Unexpected server error
              value:
                error:
                  code: INTERNAL_ERROR
                  message: An unexpected error occurred. Please try again later.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        API key authentication. Include your API key in the Authorization
        header.

````