Vital · Arazzo Workflow

Vital Create a Lab Order and Poll Until Resolved

Version 1.0.0

Place an order set lab order for a user and poll its lifecycle status until it completes, cancels, or fails.

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

create-order-poll-status
Create a lab order and poll until it reaches a terminal status.
Creates a lab order for a user from an order set, then polls the order's latest event status, looping while in progress and ending on a terminal status.
2 steps inputs: apiKey, orderSet, patientAddress, patientDetails, physician, userId outputs: finalStatus, orderId
1
createOrder
Create a lab order for the user from the supplied order set and capture the new order id.
2
getOrder
Read the order and capture the status of its latest lifecycle event. Branches back to poll while the order is still in progress and ends when a terminal status is reached.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Vital Create a Lab Order and Poll Until Resolved
  summary: Place an order set lab order for a user and poll its lifecycle status until it completes, cancels, or fails.
  description: >-
    The core ordering loop for Vital lab testing. The workflow creates an order
    for a user against an order set, then repeatedly reads the order and inspects
    the latest lifecycle event, branching back to poll while the order is still
    in flight and ending once the order reaches a terminal state (completed,
    cancelled, or failed). 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: create-order-poll-status
  summary: Create a lab order and poll until it reaches a terminal status.
  description: >-
    Creates a lab order for a user from an order set, then polls the order's
    latest event status, looping while in progress and ending on a terminal
    status.
  inputs:
    type: object
    required:
    - apiKey
    - userId
    - patientDetails
    - patientAddress
    - orderSet
    properties:
      apiKey:
        type: string
        description: Your Vital API key, sent in the x-vital-api-key header.
      userId:
        type: string
        description: The Vital user_id the order is placed for.
      patientDetails:
        type: object
        description: Patient details object (name, dob, gender, etc.) per PatientDetailsWithValidation.
      patientAddress:
        type: object
        description: Patient address object per PatientAddressWithValidation.
      orderSet:
        type: object
        description: The OrderSetRequest describing the panels/markers to order.
      physician:
        type: object
        description: Optional physician details for the order.
  steps:
  - stepId: createOrder
    description: >-
      Create a lab order for the user from the supplied order set and capture the
      new order id.
    operationId: create_order_v3_order_post
    parameters:
    - name: x-vital-api-key
      in: header
      value: $inputs.apiKey
    requestBody:
      contentType: application/json
      payload:
        user_id: $inputs.userId
        patient_details: $inputs.patientDetails
        patient_address: $inputs.patientAddress
        order_set: $inputs.orderSet
        physician: $inputs.physician
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      orderId: $response.body#/order/id
      status: $response.body#/status
      message: $response.body#/message
  - stepId: getOrder
    description: >-
      Read the order and capture the status of its latest lifecycle event.
      Branches back to poll while the order is still in progress and ends when a
      terminal status is reached.
    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: $steps.createOrder.outputs.orderId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      orderId: $response.body#/id
      lastEventStatus: $response.body#/last_event/status
      updatedAt: $response.body#/updated_at
    onSuccess:
    - name: orderInProgress
      type: goto
      stepId: getOrder
      criteria:
      - context: $response.body
        condition: $.last_event.status != 'completed' && $.last_event.status != 'cancelled' && $.last_event.status != 'failed'
        type: jsonpath
    - name: orderResolved
      type: end
      criteria:
      - context: $response.body
        condition: $.last_event.status == 'completed' || $.last_event.status == 'cancelled' || $.last_event.status == 'failed'
        type: jsonpath
  outputs:
    orderId: $steps.createOrder.outputs.orderId
    finalStatus: $steps.getOrder.outputs.lastEventStatus

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-create-order-poll-status-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.