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

# Get quote approvals

> Retrieve quote approvals in newest-first order, currently containing one preview for draft or changes-requested quotes or one execution for other statuses.



## OpenAPI

````yaml get /v1/quotes/{id}/approvals
openapi: 3.1.0
info:
  title: Hyperline API
  version: 0.0.0
servers:
  - url: https://api.hyperline.co
  - url: https://sandbox.api.hyperline.co
security: []
paths:
  /v1/quotes/{id}/approvals:
    get:
      tags:
        - Quotes
      summary: Get quote approvals
      description: >-
        Retrieve quote approvals in newest-first order, currently containing one
        preview for draft or changes-requested quotes or one execution for other
        statuses.
      operationId: getQuoteApprovals
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/QuoteApproval'
        '404':
          description: Quote not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
      security:
        - bearer: []
components:
  schemas:
    QuoteApproval:
      oneOf:
        - type: object
          properties:
            quote_id:
              type: string
              description: ID of the quote.
              example: quo_abc123
            mode:
              type: string
              enum:
                - preview
              description: >

                Quote approval mode.


                - `preview`: Current approval routing for draft or
                changes-requested quotes.

                - `execution`: Recorded approval execution for every other quote
                status.
            requested_by_user_id:
              type: string
              description: >-
                Effective submitter, matching public quote finalization:
                authenticated user or account owner for API keys.
            approval_required:
              type: boolean
              description: >-
                Whether approval would be required for the effective submitter
                under current configuration; this does not validate finalization
                readiness.
            reason:
              type: string
              enum:
                - workflow_required
                - no_matching_workflow
                - self_approval
                - legacy_permissions
              description: >-
                Reason approval is required or bypassed; legacy_permissions
                means workflow-based approval is disabled.
            workflow:
              type:
                - object
                - 'null'
              properties:
                id:
                  type: string
                  description: Approval workflow ID.
                  example: apw_DKL4Xcb5VSa8CQ
                name:
                  type: string
                  description: Approval workflow name.
                  example: Enterprise quote approval
                version:
                  type: integer
                  description: Workflow version number.
                  example: 1
                original_workflow_id:
                  type:
                    - string
                    - 'null'
                  description: >-
                    Original workflow ID when this workflow is an archived
                    version.
                  example: null
                steps:
                  type: array
                  items:
                    $ref: '#/components/schemas/ApprovalWorkflowStep'
                  description: Approval steps required by the workflow.
              required:
                - id
                - name
                - version
                - original_workflow_id
                - steps
              description: >-
                Selected or recorded workflow reference and ordered step
                definitions; its name can reflect later edits.
            skipped_step_ids:
              type: array
              items:
                type: string
              description: >-
                Step IDs that would be skipped because their dynamic approver
                sources currently resolve to nobody.
            resolved_manager_user_id:
              type:
                - string
                - 'null'
              description: >-
                Current owner manager used to resolve manager_of_owner steps in
                this preview, or null.
            evaluation:
              type:
                - object
                - 'null'
              properties:
                evaluated_at:
                  type: string
                  format: date-time
                  description: Time the rules were evaluated.
                  example: '2024-12-20T16:04:11Z'
                selected_workflow_id:
                  type:
                    - string
                    - 'null'
                  description: >-
                    Workflow ID selected during evaluation, which may differ
                    from the archived workflow ID referenced by the request.
                reason:
                  type: string
                  description: Explanation recorded by the workflow evaluator.
                workflows_evaluated:
                  type: array
                  items:
                    type: object
                    properties:
                      workflow_id:
                        type: string
                        description: ID of the workflow at evaluation time.
                      workflow_name:
                        type: string
                        description: Name of the workflow at evaluation time.
                      priority:
                        type: integer
                        description: Workflow priority; lower values are evaluated first.
                      matched:
                        type: boolean
                        description: Whether this condition, rule, or workflow matched.
                      rules:
                        type: array
                        items:
                          type: object
                          properties:
                            rule_id:
                              type: string
                              description: ID of the evaluated rule.
                            operator:
                              type: string
                              enum:
                                - and
                                - or
                              description: >-
                                Logical or comparison operator used in
                                evaluation.
                            matched:
                              type: boolean
                              description: >-
                                Whether this condition, rule, or workflow
                                matched.
                            conditions:
                              type: array
                              items:
                                type: object
                                properties:
                                  field:
                                    type: string
                                    description: >-
                                      Public condition field name; custom field
                                      identifiers retain their original spelling
                                      after custom_field.
                                  operator:
                                    type: string
                                    description: >-
                                      Logical or comparison operator used in
                                      evaluation.
                                  expected:
                                    anyOf:
                                      - type: string
                                      - type: number
                                      - type: boolean
                                      - type: 'null'
                                      - type: array
                                        items:
                                          type: string
                                      - type: array
                                        items:
                                          type: number
                                      - type: object
                                        properties:
                                          period:
                                            type: string
                                            enum:
                                              - weeks
                                              - months
                                              - years
                                            description: Product interval period.
                                            example: months
                                          count:
                                            type: integer
                                            exclusiveMinimum: 0
                                            description: >-
                                              Number of periods in the product
                                              interval.
                                            example: 12
                                        required:
                                          - period
                                          - count
                                      - type: object
                                        properties:
                                          period:
                                            type: string
                                            enum:
                                              - once
                                            description: Product interval period.
                                            example: once
                                          count:
                                            type: 'null'
                                            description: >-
                                              Number of periods in the product
                                              interval.
                                            example: null
                                        required:
                                          - period
                                          - count
                                      - type: array
                                        items:
                                          anyOf:
                                            - type: object
                                              properties:
                                                period:
                                                  type: string
                                                  enum:
                                                    - weeks
                                                    - months
                                                    - years
                                                  description: Product interval period.
                                                  example: months
                                                count:
                                                  type: integer
                                                  exclusiveMinimum: 0
                                                  description: >-
                                                    Number of periods in the product
                                                    interval.
                                                  example: 12
                                              required:
                                                - period
                                                - count
                                            - type: object
                                              properties:
                                                period:
                                                  type: string
                                                  enum:
                                                    - once
                                                  description: Product interval period.
                                                  example: once
                                                count:
                                                  type: 'null'
                                                  description: >-
                                                    Number of periods in the product
                                                    interval.
                                                  example: null
                                              required:
                                                - period
                                                - count
                                          description: >-
                                            Product interval condition value. Use
                                            `once` with a null count for one-time
                                            products.
                                      - type: 'null'
                                    description: >-
                                      Evaluated JSON value; decimals are
                                      serialized as strings and missing values
                                      as null.
                                  actual:
                                    anyOf:
                                      - type: string
                                      - type: number
                                      - type: boolean
                                      - type: 'null'
                                      - type: array
                                        items:
                                          type: string
                                      - type: array
                                        items:
                                          type: number
                                      - type: object
                                        properties:
                                          period:
                                            type: string
                                            enum:
                                              - weeks
                                              - months
                                              - years
                                            description: Product interval period.
                                            example: months
                                          count:
                                            type: integer
                                            exclusiveMinimum: 0
                                            description: >-
                                              Number of periods in the product
                                              interval.
                                            example: 12
                                        required:
                                          - period
                                          - count
                                      - type: object
                                        properties:
                                          period:
                                            type: string
                                            enum:
                                              - once
                                            description: Product interval period.
                                            example: once
                                          count:
                                            type: 'null'
                                            description: >-
                                              Number of periods in the product
                                              interval.
                                            example: null
                                        required:
                                          - period
                                          - count
                                      - type: array
                                        items:
                                          anyOf:
                                            - type: object
                                              properties:
                                                period:
                                                  type: string
                                                  enum:
                                                    - weeks
                                                    - months
                                                    - years
                                                  description: Product interval period.
                                                  example: months
                                                count:
                                                  type: integer
                                                  exclusiveMinimum: 0
                                                  description: >-
                                                    Number of periods in the product
                                                    interval.
                                                  example: 12
                                              required:
                                                - period
                                                - count
                                            - type: object
                                              properties:
                                                period:
                                                  type: string
                                                  enum:
                                                    - once
                                                  description: Product interval period.
                                                  example: once
                                                count:
                                                  type: 'null'
                                                  description: >-
                                                    Number of periods in the product
                                                    interval.
                                                  example: null
                                              required:
                                                - period
                                                - count
                                          description: >-
                                            Product interval condition value. Use
                                            `once` with a null count for one-time
                                            products.
                                      - type: 'null'
                                    description: >-
                                      Evaluated JSON value; decimals are
                                      serialized as strings and missing values
                                      as null.
                                  scope:
                                    allOf:
                                      - $ref: >-
                                          #/components/schemas/ApprovalConditionScope
                                      - description: >-
                                          Product scope used for a discount
                                          condition, when present.
                                  matched:
                                    type: boolean
                                    description: >-
                                      Whether this condition, rule, or workflow
                                      matched.
                                required:
                                  - field
                                  - operator
                                  - expected
                                  - actual
                                  - matched
                              description: Condition evaluation results.
                          required:
                            - rule_id
                            - operator
                            - matched
                            - conditions
                        description: Rule evaluation results recorded for this workflow.
                    required:
                      - workflow_id
                      - workflow_name
                      - priority
                      - matched
                      - rules
                  description: Workflows evaluated in priority order.
              required:
                - evaluated_at
                - selected_workflow_id
                - reason
                - workflows_evaluated
              description: >-
                Rule evaluation at preview time or saved at submission; null
                when no evaluation was recorded. Excludes the internal
                evaluation context.
          required:
            - quote_id
            - mode
            - requested_by_user_id
            - approval_required
            - reason
            - workflow
            - skipped_step_ids
            - resolved_manager_user_id
            - evaluation
        - type: object
          properties:
            quote_id:
              type: string
              description: ID of the quote.
            mode:
              type: string
              enum:
                - execution
              description: >

                Quote approval mode.


                - `preview`: Current approval routing for draft or
                changes-requested quotes.

                - `execution`: Recorded approval execution for every other quote
                status.
            request:
              type:
                - object
                - 'null'
              properties:
                id:
                  type: string
                  description: ID of the recorded approval request.
                status:
                  type: string
                  enum:
                    - pending
                    - approved
                    - rejected
                    - cancelled
                  description: >-
                    Recorded approval request status, independent of the quote
                    status.
                requested_by_user_id:
                  type: string
                  description: >-
                    Effective submitter, matching public quote finalization:
                    authenticated user or account owner for API keys.
                current_step_id:
                  type:
                    - string
                    - 'null'
                  description: >-
                    Current step for pending requests; null for completed
                    requests.
                workflow:
                  type: object
                  properties:
                    id:
                      type: string
                      description: Approval workflow ID.
                      example: apw_DKL4Xcb5VSa8CQ
                    name:
                      type: string
                      description: Approval workflow name.
                      example: Enterprise quote approval
                    version:
                      type: integer
                      description: Workflow version number.
                      example: 1
                    original_workflow_id:
                      type:
                        - string
                        - 'null'
                      description: >-
                        Original workflow ID when this workflow is an archived
                        version.
                      example: null
                  required:
                    - id
                    - name
                    - version
                    - original_workflow_id
                  description: >-
                    Selected or recorded workflow reference and ordered step
                    definitions; its name can reflect later edits.
                steps:
                  type: array
                  items:
                    allOf:
                      - $ref: '#/components/schemas/ApprovalWorkflowStep'
                      - type: object
                        properties:
                          decisions:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  description: ID of the recorded decision.
                                approver_id:
                                  type: string
                                  description: >-
                                    User whose approval was recorded, including
                                    the represented user for delegated
                                    decisions.
                                actor_user_id:
                                  type: string
                                  description: >-
                                    User who performed the action, falling back
                                    to the approver for non-delegated decisions.
                                approval_delegation_id:
                                  type:
                                    - string
                                    - 'null'
                                  description: >-
                                    Approval delegation used for this decision,
                                    or null.
                                decision:
                                  type: string
                                  enum:
                                    - approved
                                    - rejected
                                  description: Recorded approval or rejection.
                                comment:
                                  type:
                                    - string
                                    - 'null'
                                  description: Comment supplied with the decision, or null.
                                created_at:
                                  type: string
                                  format: date-time
                                  description: Time the request or decision was created.
                                  example: '2024-12-20T16:04:11Z'
                              required:
                                - id
                                - approver_id
                                - actor_user_id
                                - approval_delegation_id
                                - decision
                                - comment
                                - created_at
                            description: >-
                              Recorded decisions for this step, in chronological
                              order.
                        required:
                          - decisions
                  description: >-
                    Workflow steps in execution order, including undecided
                    steps; historical skips are not inferred from current
                    organization settings.
                evaluation:
                  type:
                    - object
                    - 'null'
                  properties:
                    evaluated_at:
                      type: string
                      format: date-time
                      description: Time the rules were evaluated.
                      example: '2024-12-20T16:04:11Z'
                    selected_workflow_id:
                      type:
                        - string
                        - 'null'
                      description: >-
                        Workflow ID selected during evaluation, which may differ
                        from the archived workflow ID referenced by the request.
                    reason:
                      type: string
                      description: Explanation recorded by the workflow evaluator.
                    workflows_evaluated:
                      type: array
                      items:
                        type: object
                        properties:
                          workflow_id:
                            type: string
                            description: ID of the workflow at evaluation time.
                          workflow_name:
                            type: string
                            description: Name of the workflow at evaluation time.
                          priority:
                            type: integer
                            description: >-
                              Workflow priority; lower values are evaluated
                              first.
                          matched:
                            type: boolean
                            description: Whether this condition, rule, or workflow matched.
                          rules:
                            type: array
                            items:
                              type: object
                              properties:
                                rule_id:
                                  type: string
                                  description: ID of the evaluated rule.
                                operator:
                                  type: string
                                  enum:
                                    - and
                                    - or
                                  description: >-
                                    Logical or comparison operator used in
                                    evaluation.
                                matched:
                                  type: boolean
                                  description: >-
                                    Whether this condition, rule, or workflow
                                    matched.
                                conditions:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      field:
                                        type: string
                                        description: >-
                                          Public condition field name; custom
                                          field identifiers retain their original
                                          spelling after custom_field.
                                      operator:
                                        type: string
                                        description: >-
                                          Logical or comparison operator used in
                                          evaluation.
                                      expected:
                                        anyOf:
                                          - type: string
                                          - type: number
                                          - type: boolean
                                          - type: 'null'
                                          - type: array
                                            items:
                                              type: string
                                          - type: array
                                            items:
                                              type: number
                                          - type: object
                                            properties:
                                              period:
                                                type: string
                                                enum:
                                                  - weeks
                                                  - months
                                                  - years
                                                description: Product interval period.
                                                example: months
                                              count:
                                                type: integer
                                                exclusiveMinimum: 0
                                                description: >-
                                                  Number of periods in the product
                                                  interval.
                                                example: 12
                                            required:
                                              - period
                                              - count
                                          - type: object
                                            properties:
                                              period:
                                                type: string
                                                enum:
                                                  - once
                                                description: Product interval period.
                                                example: once
                                              count:
                                                type: 'null'
                                                description: >-
                                                  Number of periods in the product
                                                  interval.
                                                example: null
                                            required:
                                              - period
                                              - count
                                          - type: array
                                            items:
                                              anyOf:
                                                - type: object
                                                  properties:
                                                    period:
                                                      type: string
                                                      enum:
                                                        - weeks
                                                        - months
                                                        - years
                                                      description: Product interval period.
                                                      example: months
                                                    count:
                                                      type: integer
                                                      exclusiveMinimum: 0
                                                      description: >-
                                                        Number of periods in the product
                                                        interval.
                                                      example: 12
                                                  required:
                                                    - period
                                                    - count
                                                - type: object
                                                  properties:
                                                    period:
                                                      type: string
                                                      enum:
                                                        - once
                                                      description: Product interval period.
                                                      example: once
                                                    count:
                                                      type: 'null'
                                                      description: >-
                                                        Number of periods in the product
                                                        interval.
                                                      example: null
                                                  required:
                                                    - period
                                                    - count
                                              description: >-
                                                Product interval condition value. Use
                                                `once` with a null count for one-time
                                                products.
                                          - type: 'null'
                                        description: >-
                                          Evaluated JSON value; decimals are
                                          serialized as strings and missing values
                                          as null.
                                      actual:
                                        anyOf:
                                          - type: string
                                          - type: number
                                          - type: boolean
                                          - type: 'null'
                                          - type: array
                                            items:
                                              type: string
                                          - type: array
                                            items:
                                              type: number
                                          - type: object
                                            properties:
                                              period:
                                                type: string
                                                enum:
                                                  - weeks
                                                  - months
                                                  - years
                                                description: Product interval period.
                                                example: months
                                              count:
                                                type: integer
                                                exclusiveMinimum: 0
                                                description: >-
                                                  Number of periods in the product
                                                  interval.
                                                example: 12
                                            required:
                                              - period
                                              - count
                                          - type: object
                                            properties:
                                              period:
                                                type: string
                                                enum:
                                                  - once
                                                description: Product interval period.
                                                example: once
                                              count:
                                                type: 'null'
                                                description: >-
                                                  Number of periods in the product
                                                  interval.
                                                example: null
                                            required:
                                              - period
                                              - count
                                          - type: array
                                            items:
                                              anyOf:
                                                - type: object
                                                  properties:
                                                    period:
                                                      type: string
                                                      enum:
                                                        - weeks
                                                        - months
                                                        - years
                                                      description: Product interval period.
                                                      example: months
                                                    count:
                                                      type: integer
                                                      exclusiveMinimum: 0
                                                      description: >-
                                                        Number of periods in the product
                                                        interval.
                                                      example: 12
                                                  required:
                                                    - period
                                                    - count
                                                - type: object
                                                  properties:
                                                    period:
                                                      type: string
                                                      enum:
                                                        - once
                                                      description: Product interval period.
                                                      example: once
                                                    count:
                                                      type: 'null'
                                                      description: >-
                                                        Number of periods in the product
                                                        interval.
                                                      example: null
                                                  required:
                                                    - period
                                                    - count
                                              description: >-
                                                Product interval condition value. Use
                                                `once` with a null count for one-time
                                                products.
                                          - type: 'null'
                                        description: >-
                                          Evaluated JSON value; decimals are
                                          serialized as strings and missing values
                                          as null.
                                      scope:
                                        allOf:
                                          - $ref: >-
                                              #/components/schemas/ApprovalConditionScope
                                          - description: >-
                                              Product scope used for a discount
                                              condition, when present.
                                      matched:
                                        type: boolean
                                        description: >-
                                          Whether this condition, rule, or
                                          workflow matched.
                                    required:
                                      - field
                                      - operator
                                      - expected
                                      - actual
                                      - matched
                                  description: Condition evaluation results.
                              required:
                                - rule_id
                                - operator
                                - matched
                                - conditions
                            description: >-
                              Rule evaluation results recorded for this
                              workflow.
                        required:
                          - workflow_id
                          - workflow_name
                          - priority
                          - matched
                          - rules
                      description: Workflows evaluated in priority order.
                  required:
                    - evaluated_at
                    - selected_workflow_id
                    - reason
                    - workflows_evaluated
                  description: >-
                    Rule evaluation at preview time or saved at submission; null
                    when no evaluation was recorded. Excludes the internal
                    evaluation context.
                created_at:
                  type: string
                  format: date-time
                  description: Time the request or decision was created.
                  example: '2024-12-20T16:04:11Z'
                completed_at:
                  type:
                    - string
                    - 'null'
                  format: date-time
                  description: Time the request completed, or null while pending.
                  example: '2024-12-20T16:04:11Z'
              required:
                - id
                - status
                - requested_by_user_id
                - current_step_id
                - workflow
                - steps
                - evaluation
                - created_at
                - completed_at
              description: >-
                Latest recorded request, independent of asynchronous quote
                status updates; null when none exists, including automatic or
                legacy approval.
          required:
            - quote_id
            - mode
            - request
    ApprovalWorkflowStep:
      type: object
      properties:
        id:
          type: string
          description: Approval workflow step ID.
          example: aps_DKL4Xcb5VSa8CQ
        name:
          type: string
          description: Approval workflow step name.
          example: Finance approval
        order:
          type: integer
          description: Step order. Orders must be sequential starting from 1.
          example: 1
        approver_requirement:
          type: string
          enum:
            - any
            - all
          description: Whether any approver or all approvers must approve the step.
          example: any
        approver_role_ids:
          type: array
          items:
            type: string
          description: User role IDs that can approve the step.
          example:
            - rol_DKL4Xcb5VSa8CQ
        approver_user_ids:
          type: array
          items:
            type: string
          description: User IDs that can approve the step.
          example:
            - usr_DKL4Xcb5VSa8CQ
        approver_sources:
          type: array
          items:
            type: string
            enum:
              - manager_of_owner
          description: >-
            Dynamic approver sources resolved per request. `manager_of_owner`
            resolves to the manager of the user who owns the entity under
            approval — for a quote, its owner, meaning the user who created it
            or whoever it was later reassigned to — falling back to the user who
            requested the approval. The manager is the one set on their
            membership, and the source resolves to nobody when that user has no
            active manager in the account.
          example:
            - manager_of_owner
      required:
        - id
        - name
        - order
        - approver_requirement
        - approver_role_ids
        - approver_user_ids
        - approver_sources
    ApprovalConditionScope:
      type: object
      properties:
        operator:
          type: string
          enum:
            - and
            - or
          description: Whether all or any scope filters must match each product.
        conditions:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
                enum:
                  - product_ids
                description: >-
                  Product filter applied to each product before discount
                  aggregation.
              operator:
                type: string
                enum:
                  - in
                  - not_in
                description: Comparison operator used by the approval condition.
              value:
                type: array
                items:
                  type: string
                  minLength: 1
                minItems: 1
                description: >-
                  Product IDs to include or exclude from the discount
                  calculation.
            required:
              - field
              - operator
              - value
            additionalProperties: false
          minItems: 1
          description: >-
            Non-empty product filters. Selected products contribute their
            combined discount amount; percentage uses the greater of their
            effective discount rate and highest applicable configured
            percentage.
      required:
        - operator
        - conditions
      additionalProperties: false
      description: >-
        Optional product scope for total_discount_amount and discount_percent.
        Filters products before combining their discounts; omitted scope
        evaluates the whole document. No matching products means the condition
        does not match.
      example:
        operator: and
        conditions:
          - field: product_ids
            operator: in
            value:
              - itm_DKL4Xcb5VSa8CQ
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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