Vital · Arazzo Workflow

Vital Await Lab Order Completion and Retrieve Results

Version 1.0.0

Poll an existing order until it completes, then pull its result metadata and raw results.

1 workflow 1 source API 1 provider
View Spec View on GitHub Health DataWearablesLab TestingDigital HealthHealth TechHealthcareHIPAAHealthKitHealth ConnectEHREMRBiomarkersDiagnosticsContinuous Glucose MonitoringSleepActivityHeart RateWebhookPhlebotomyLab OrdersArazzoWorkflows

Provider

vital-io

Workflows

await-order-results
Poll an order to completion and retrieve its metadata and raw results.
Polls an order until completed, then retrieves result metadata and raw result data. Stops early if the order is cancelled or failed.
3 steps inputs: apiKey, orderId outputs: finalStatus, metadata, results
1
pollOrder
Read the order and inspect the latest event. Loops while in progress, ends the workflow if cancelled or failed, and proceeds to results once completed.
2
getResultMetadata
Fetch metadata about the order's results, such as lab metadata, provider, and sample dates.
3
getRawResult
Fetch both the metadata and the raw JSON test data for the order.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Vital Await Lab Order Completion and Retrieve Results
  summary: Poll an existing order until it completes, then pull its result metadata and raw results.
  description: >-
    Picks up an already-placed lab order and drives it to results. The workflow
    polls the order's latest lifecycle event until it reaches completed (or stops
    on a cancelled/failed terminal state), then fetches the result metadata
    (lab, provider, sample dates) and the full raw JSON results. Every step
    spells out its request inline, including the x-vital-api-key header, so the
    flow can be read and executed without opening the underlying OpenAPI
    description.
  version: 1.0.0
  x-realizes-capability-ids:
  - BC-2860.10
  x-capability-derivation:
    method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
    min_confidence: 0.7
    sources:
    - capability_id: BC-2860.10
      capability_name: Laboratory Services Management
      spec: vital-io-order-api-openapi.yml
      confidence: 0.7
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: orderApi
  url: ../openapi/vital-io-order-api-openapi.yml
  type: openapi
workflows:
- workflowId: await-order-results
  summary: Poll an order to completion and retrieve its metadata and raw results.
  description: >-
    Polls an order until completed, then retrieves result metadata and raw
    result data. Stops early if the order is cancelled or failed.
  inputs:
    type: object
    required:
    - apiKey
    - orderId
    properties:
      apiKey:
        type: string
        description: Your Vital API key, sent in the x-vital-api-key header.
      orderId:
        type: string
        description: The Vital Order ID to await results for.
  steps:
  - stepId: pollOrder
    description: >-
      Read the order and inspect the latest event. Loops while in progress, ends
      the workflow if cancelled or failed, and proceeds to results once completed.
    operationId: get_order_v3_order__order_id__get
    parameters:
    - name: x-vital-api-key
      in: header
      value: $inputs.apiKey
    - name: order_id
      in: path
      value: $inputs.orderId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      lastEventStatus: $response.body#/last_event/status
    onSuccess:
    - name: stillRunning
      type: goto
      stepId: pollOrder
      criteria:
      - context: $response.body
        condition: $.last_event.status != 'completed' && $.last_event.status != 'cancelled' && $.last_event.status != 'failed'
        type: jsonpath
    - name: orderCompleted
      type: goto
      stepId: getResultMetadata
      criteria:
      - context: $response.body
        condition: $.last_event.status == 'completed'
        type: jsonpath
    - name: orderTerminated
      type: end
      criteria:
      - context: $response.body
        condition: $.last_event.status == 'cancelled' || $.last_event.status == 'failed'
        type: jsonpath
  - stepId: getResultMetadata
    description: >-
      Fetch metadata about the order's results, such as lab metadata, provider,
      and sample dates.
    operationId: get_lab_test_result_metadata_v3_order__order_id__result_metadata_get
    parameters:
    - name: x-vital-api-key
      in: header
      value: $inputs.apiKey
    - name: order_id
      in: path
      value: $inputs.orderId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      metadata: $response.body
  - stepId: getRawResult
    description: Fetch both the metadata and the raw JSON test data for the order.
    operationId: get_lab_test_result_raw_v3_order__order_id__result_get
    parameters:
    - name: x-vital-api-key
      in: header
      value: $inputs.apiKey
    - name: order_id
      in: path
      value: $inputs.orderId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      results: $response.body
  outputs:
    finalStatus: $steps.pollOrder.outputs.lastEventStatus
    metadata: $steps.getResultMetadata.outputs.metadata
    results: $steps.getRawResult.outputs.results

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/vital-io-await-order-results-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.