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

# List Quotes

> Returns complete Quote objects with all data fields, including nested quote data,
preview data, coverages, and billing information.

For lightweight quote information (faster response), use List Quote Info instead.

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




## OpenAPI

````yaml /openapi/generated-external-api.yaml get /api/external/companies/{companyId}/quotes
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:
    get:
      tags:
        - Quotes
      summary: List Quotes
      description: >
        Returns complete Quote objects with all data fields, including nested
        quote data,

        preview data, coverages, and billing information.


        For lightweight quote information (faster response), use List Quote Info
        instead.


        **Required permission:** `company.quote:read`
      operationId: listQuotes
      parameters:
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/submissionId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/status'
        - $ref: '#/components/parameters/filterText'
        - $ref: '#/components/parameters/dateFrom'
        - $ref: '#/components/parameters/dateTo'
        - $ref: '#/components/parameters/sortBy'
        - $ref: '#/components/parameters/sortDirection'
        - $ref: '#/components/parameters/page'
      responses:
        '200':
          description: Paginated list of quotes
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/Quote'
                  totalCount:
                    type: integer
              example:
                items:
                  - id: 550e8400-e29b-41d4-a716-446655440002
                    number: Q00000001-01
                    wizardType: quote
                    status: complete
                    submissionId: 550e8400-e29b-41d4-a716-446655440001
                    createdAt: '2024-01-15T10:30:00Z'
                    data:
                      policyInfo:
                        description: General Liability Coverage
                        currency: USD
                    previewData:
                      premium: 2500
                      taxes: 150
                      fees: 50
                      total: 2700
                totalCount: 42
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  parameters:
    companyId:
      name: companyId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Company identifier
    submissionId:
      name: submissionId
      in: query
      schema:
        type: string
        format: uuid
      description: Filter by submission ID
    applicationId:
      name: applicationId
      in: query
      schema:
        type: string
        format: uuid
      description: Filter by application ID
    status:
      name: status
      in: query
      schema:
        oneOf:
          - type: string
          - type: array
            items:
              type: string
      description: Filter by quote status (single value or array)
    filterText:
      name: filterText
      in: query
      schema:
        type: string
      description: Search across quote number, description, and other text fields
    dateFrom:
      name: dateFrom
      in: query
      schema:
        type: string
        format: date
      description: Filter quotes created on or after this date (ISO 8601)
    dateTo:
      name: dateTo
      in: query
      schema:
        type: string
        format: date
      description: Filter quotes created on or before this date (ISO 8601)
    sortBy:
      name: sortBy
      in: query
      schema:
        type: string
        enum:
          - createdAt
          - updatedAt
          - status
          - number
        default: createdAt
      description: Field to sort by (default createdAt)
    sortDirection:
      name: sortDirection
      in: query
      schema:
        type: string
        enum:
          - asc
          - desc
        default: desc
      description: Sort direction (default desc)
    page:
      name: page
      in: query
      schema:
        type: integer
        minimum: 1
        default: 1
      description: Page number (1-based, default 1, page size 50)
  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
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        API key authentication. Include your API key in the Authorization
        header.

````