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

# Compute and save a quote comparison

> Compute and save a quote comparison



## OpenAPI

````yaml /openapi.generated.json post /records/quote-comparisons
openapi: 3.1.0
info:
  description: >-
    Public API reference. Generated from apps/engine/openapi.yaml by make
    docs-openapi-write. Do not edit.
  title: Nexio platform API
  version: '1'
servers:
  - url: https://api.usenexio.com
security: []
tags:
  - name: Access
  - name: Catalog
  - name: Conversations
  - name: Documents
  - name: Engines
  - name: Events
  - name: Feedback
  - name: Graph
  - name: Records
  - name: Roadmap
  - name: Runs
  - name: Webhooks
  - name: accounts
  - name: actions
  - name: activities
  - name: activity-feed
  - name: attachments
  - name: audit
  - name: benefit-plans
  - name: billing-transactions
  - name: carrier_documents
  - name: certificate-holders
  - name: certificate_drafts
  - name: certificates
  - name: change_feed
  - name: claims
  - name: classes
  - name: codes
  - name: commission_facts
  - name: connections
  - name: contacts
  - name: contingencies
  - name: conversations
  - name: customer
  - name: customer_contacts
  - name: deals
  - name: dependents
  - name: document_extractions
  - name: documents
  - name: drivers
  - name: eforms
  - name: employees
  - name: events
  - name: feature_requests
  - name: form-templates
  - name: invoices
  - name: leads
  - name: line_schedules_other
  - name: loss_history
  - name: machines
  - name: markets
  - name: motor-carriers
  - name: notes
  - name: opportunities
  - name: opportunity-signals
  - name: pages
  - name: personal_lines_detail
  - name: placement_choices
  - name: placement_feedback
  - name: placements
  - name: policies
  - name: policy_parties
  - name: policy_personnel
  - name: policy_transactions
  - name: premium_rows
  - name: procedures
  - name: proposals
  - name: quote_comparisons
  - name: quotes
  - name: records
  - name: register-views
  - name: renewal-entries
  - name: risk_review_choices
  - name: rollups
  - name: seats
  - name: sec-filings
  - name: service_agreements
  - name: submissions
  - name: suspenses
  - name: tasks
  - name: umbrella_underlying
  - name: underwriting_questions
  - name: uploaded_documents
  - name: vehicles
  - name: workflows
paths:
  /records/quote-comparisons:
    post:
      tags:
        - Records
      summary: Compute and save a quote comparison
      description: Compute and save a quote comparison
      operationId: compareQuotes
      parameters:
        - description: >-
            The member the read is made for (a WorkOS user id). Unset keeps the
            org-wide posture the key alone grants.
          in: header
          name: Nexio-Act-As
          schema:
            description: >-
              The member the read is made for (a WorkOS user id). Unset keeps
              the org-wide posture the key alone grants.
            type: string
        - description: >-
            The acting member's verified email, lowercased. Ignored without
            Nexio-Act-As.
          in: header
          name: Nexio-Act-As-Email
          schema:
            description: >-
              The acting member's verified email, lowercased. Ignored without
              Nexio-Act-As.
            type: string
        - description: The calling application (workbench).
          in: header
          name: Nexio-Consumer
          schema:
            description: The calling application (workbench).
            type: string
        - description: The calling application's build.
          in: header
          name: Nexio-Consumer-Build
          schema:
            description: The calling application's build.
            type: string
        - description: The access vocabulary hash the calling build was generated against.
          in: header
          name: Nexio-Consumer-Vocabulary
          schema:
            description: >-
              The access vocabulary hash the calling build was generated
              against.
            type: string
        - description: >-
            A caller-chosen request id, echoed in the Nexio-Request-Id response
            header.
          in: header
          name: Nexio-Request-Id
          schema:
            description: >-
              A caller-chosen request id, echoed in the Nexio-Request-Id
              response header.
            type: string
        - description: >-
            The caller's remaining budget for this request, in whole
            milliseconds (1 to 10 digits, greater than zero), relative to
            receipt. The engine stops work at the shorter of this and the
            route's own budget, and answers 504 request_timeout when it expires.
            A value above the route budget is capped to it; a malformed value is
            ignored.
          in: header
          name: Nexio-Timeout
          schema:
            description: >-
              The caller's remaining budget for this request, in whole
              milliseconds (1 to 10 digits, greater than zero), relative to
              receipt. The engine stops work at the shorter of this and the
              route's own budget, and answers 504 request_timeout when it
              expires. A value above the route budget is capped to it; a
              malformed value is ignored.
            type: string
        - in: header
          name: Idempotency-Key
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - additionalProperties: true
                  anyOf:
                    - properties:
                        accountId:
                          minLength: 1
                      required:
                        - accountId
                    - properties:
                        optionsUnderReview:
                          minItems: 1
                      required:
                        - optionsUnderReview
                  not:
                    required:
                      - sourceComparisonId
                  properties:
                    accountId:
                      type: string
                    accountNotes:
                      type: string
                    expiringProgram:
                      additionalProperties: {}
                      type: object
                    lines:
                      items:
                        type: string
                      type: array
                    optionsUnderReview:
                      default: []
                      items:
                        additionalProperties: true
                        properties:
                          annualCost:
                            anyOf:
                              - type: number
                              - type: string
                          autoSymbols:
                            items:
                              additionalProperties: true
                              properties:
                                coverage:
                                  type: string
                                page:
                                  anyOf:
                                    - type: number
                                    - type: string
                                symbols:
                                  anyOf:
                                    - items:
                                        type: string
                                      type: array
                                    - type: string
                              required:
                                - coverage
                                - symbols
                              type: object
                            type: array
                          carrier:
                            type: string
                          deductibles:
                            items:
                              additionalProperties: true
                              properties:
                                amount:
                                  anyOf:
                                    - type: number
                                    - type: string
                                appliesTo:
                                  type: string
                                basis:
                                  enum:
                                    - per_occurrence
                                    - per_claim
                                    - aggregate
                                    - per_vehicle
                                  type: string
                                lineOfBusiness:
                                  type: string
                                page:
                                  anyOf:
                                    - type: number
                                    - type: string
                                type:
                                  type: string
                              required:
                                - type
                                - amount
                              type: object
                            type: array
                          exclusions:
                            items:
                              additionalProperties: true
                              properties:
                                formNumber:
                                  type: string
                                lineOfBusiness:
                                  type: string
                                page:
                                  anyOf:
                                    - type: number
                                    - type: string
                                title:
                                  type: string
                              required:
                                - title
                              type: object
                            type: array
                          feesIncluded:
                            type: number
                          forms:
                            items:
                              additionalProperties: true
                              properties:
                                edition:
                                  type: string
                                formNumber:
                                  type: string
                                lineOfBusiness:
                                  type: string
                                page:
                                  anyOf:
                                    - type: number
                                    - type: string
                                title:
                                  type: string
                              type: object
                            type: array
                          premiumByLine:
                            additionalProperties:
                              anyOf:
                                - type: number
                                - type: string
                            type: object
                          quoteNumber:
                            type: string
                          rates:
                            items:
                              additionalProperties: true
                              properties:
                                baseRate:
                                  type: number
                                classCode:
                                  type: string
                                description:
                                  type: string
                                exposureBasis:
                                  type: string
                                lineOfBusiness:
                                  type: string
                                netRate:
                                  type: number
                                page:
                                  anyOf:
                                    - type: number
                                    - type: string
                              type: object
                            type: array
                          scheduleItems:
                            items:
                              additionalProperties: true
                              properties:
                                kind:
                                  enum:
                                    - vehicle
                                    - driver
                                    - location
                                  type: string
                                name:
                                  type: string
                                page:
                                  anyOf:
                                    - type: number
                                    - type: string
                                vin:
                                  type: string
                              required:
                                - kind
                                - name
                              type: object
                            type: array
                          taxesIncluded:
                            type: number
                          terms:
                            additionalProperties:
                              anyOf:
                                - additionalProperties: true
                                  properties:
                                    appliesTo:
                                      type: string
                                    compareOn:
                                      enum:
                                        - limit
                                        - retention
                                      type: string
                                    figures:
                                      additionalProperties: true
                                      properties:
                                        excluded:
                                          type: boolean
                                        limit:
                                          type: number
                                        retention:
                                          type: number
                                      type: object
                                    group:
                                      enum:
                                        - deal
                                        - coverage
                                        - symbols
                                      type: string
                                    label:
                                      type: string
                                    mattersBecause:
                                      type: string
                                    text:
                                      type: string
                                  type: object
                                - type: string
                            type: object
                          warranties:
                            items:
                              type: string
                            type: array
                        type: object
                      type: array
                    requiredLimits:
                      items:
                        additionalProperties: true
                        properties:
                          basis:
                            type: string
                          dimension:
                            type: string
                          limit:
                            type: number
                          source:
                            enum:
                              - producer-stated
                              - inferred
                            type: string
                        required:
                          - dimension
                          - limit
                          - source
                        type: object
                      type: array
                    submissionId:
                      type: string
                  type: object
                - additionalProperties: false
                  properties:
                    accountId:
                      minLength: 1
                      type: string
                    createNew:
                      type: boolean
                    sourceComparisonId:
                      minLength: 1
                      type: string
                    submissionId:
                      type: string
                  required:
                    - sourceComparisonId
                    - accountId
                  type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuoteComparisonResponse'
          description: OK
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Bad Request
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Unauthorized
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Forbidden
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Not Found
        '409':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Conflict
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Internal Server Error
        '503':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Service Unavailable
        '504':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Gateway Timeout
      security:
        - bearer: []
components:
  schemas:
    QuoteComparisonResponse:
      additionalProperties: false
      properties:
        error:
          type: string
        output:
          oneOf:
            - not:
                required:
                  - kind
              type: object
            - additionalProperties: false
              properties:
                accountId:
                  type: string
                accountName:
                  type: string
                comparisonId:
                  type: string
                destinations:
                  items:
                    $ref: '#/components/schemas/ComparisonDestination'
                  type:
                    - array
                    - 'null'
                events:
                  items:
                    $ref: '#/components/schemas/FiledComparisonEvent'
                  type:
                    - array
                    - 'null'
                kind:
                  enum:
                    - filed
                    - choose_destination
                  type: string
                nextCursor:
                  type: string
                quoteIds:
                  items:
                    type: string
                  type:
                    - array
                    - 'null'
                scopeKey:
                  type: string
                submissionId:
                  type: string
              required:
                - events
                - kind
                - accountId
                - accountName
              type: object
        snapshot_quotes: {}
        source_status:
          enum:
            - current
            - changed
            - historical
            - unavailable
          type: string
        source_status_as_of:
          type: string
        source_status_reason:
          type: string
        sources: {}
      required:
        - output
      type: object
    Problem:
      additionalProperties: false
      properties:
        code:
          description: >-
            The stable machine-readable error code, UPPER_SNAKE_CASE, one
            meaning forever.
          enum:
            - INVALID_ARGUMENT
            - UNAUTHENTICATED
            - CAPABILITY_DENIED
            - NOT_VISIBLE_OR_ABSENT
            - IDEMPOTENT_REQUEST_IN_FLIGHT
            - ETAG_MISMATCH
            - VALIDATION_FAILED
            - IDEMPOTENCY_KEY_PAYLOAD_MISMATCH
            - SOURCE_UNAVAILABLE
            - RATE_LIMITED
            - INTERNAL
            - DEADLINE_EXCEEDED
            - UNAVAILABLE
            - CLIENT_CLOSED_REQUEST
          type: string
        detail:
          description: A human-readable sentence about this occurrence.
          type: string
        details:
          description: >-
            Structured detail for the reason (for example which owner selection
            rule failed). A Records refusal names its reason code in
            details.reason; a projection refusal (SOURCE_UNAVAILABLE) also names
            its closed subtype in details.subtype (admission_pending, no_build,
            binding_changed, agency_admission_unbounded,
            authority_coordinates_changed, guard_absent, derivation_unaccepted),
            and only admission_pending, which clears by itself, also carries
            details.retry_after_ms, equal to retry_after_ms and the Retry-After
            header.
        errors:
          description: Each invalid parameter, for INVALID_ARGUMENT.
          items:
            $ref: '#/components/schemas/ProblemError'
          type:
            - array
            - 'null'
        instance:
          description: The request path this occurrence answered.
          type: string
        reason:
          description: >-
            The finer cause within the code, UPPER_SNAKE_CASE (for example
            SCOPE_UNAVAILABLE under CAPABILITY_DENIED).
          type: string
        request_id:
          description: The request id, as echoed in the Nexio-Request-Id response header.
          type: string
        retry_after_ms:
          description: When a retry may succeed, the wait before it.
          format: int64
          type: integer
        status:
          description: The HTTP status code.
          format: int64
          type: integer
        title:
          description: The HTTP status phrase.
          type: string
        type:
          description: A URI naming the problem type, derived from the code.
          type: string
      required:
        - type
        - title
        - status
        - code
        - request_id
      type: object
    ComparisonDestination:
      additionalProperties: false
      properties:
        effectiveDate:
          type: string
        id:
          type: string
        linesOfBusiness:
          items:
            type: string
          type:
            - array
            - 'null'
        open:
          type: boolean
        status:
          type: string
        type:
          type: string
      required:
        - id
        - type
        - status
        - linesOfBusiness
        - effectiveDate
        - open
      type: object
    FiledComparisonEvent:
      additionalProperties: false
      properties:
        event:
          $ref: '#/components/schemas/FiledEventWire'
        id:
          type: string
        kind:
          type: string
        rule_owner:
          enum:
            - app
            - app_shadow
            - platform
          type: string
      required:
        - event
        - id
        - kind
        - rule_owner
      type: object
    ProblemError:
      additionalProperties: false
      properties:
        location:
          description: Where the input was, for example query.limit.
          type: string
        message:
          type: string
        value: {}
      required:
        - message
      type: object
    FiledEventWire:
      additionalProperties: false
      properties:
        account_id:
          type: string
        acted_by:
          $ref: '#/components/schemas/FiledEventOperator'
        actor:
          $ref: '#/components/schemas/FiledEventActor'
        actor_user_id:
          type: string
        app:
          type: string
        id:
          type: string
        occurred_at:
          format: date-time
          type: string
        org_id:
          type: string
        payload: {}
        policy_id:
          type: string
        refs:
          items:
            $ref: '#/components/schemas/FiledEventRef'
          type:
            - array
            - 'null'
        rule_owner:
          enum:
            - app
            - app_shadow
            - platform
          type: string
        source:
          type: string
        subject:
          $ref: '#/components/schemas/FiledEventRef'
        submission_id:
          type: string
        type:
          type: string
      required:
        - id
        - type
        - org_id
        - app
        - source
        - occurred_at
        - payload
        - rule_owner
      type: object
    FiledEventOperator:
      additionalProperties: false
      properties:
        email:
          type: string
        userId:
          type: string
      required:
        - userId
      type: object
    FiledEventActor:
      additionalProperties: false
      properties:
        name:
          type: string
        role:
          type: string
        userId:
          type: string
      required:
        - userId
        - name
        - role
      type: object
    FiledEventRef:
      additionalProperties: false
      properties:
        accountId:
          type: string
        id:
          type: string
        label:
          type: string
        type:
          type: string
      required:
        - type
        - id
      type: object
  securitySchemes:
    bearer:
      description: The org's platform API key.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.