Qualiphy APIDeveloper Docs
DocumentationQuick start
Run quick startGet API access →
⌘K
Postman ready

Import and start firing real requests in 30 seconds.

PostmanOpenAPI
01Getting Started
  • Code walkthrough
  • Authentication
  • Testing your integration
02Basic API integrations
  • Integration flow
  • Hosts & authentication
  • Registering clinics
  • Exam catalog & invite
  • Questions & answers
  • Status & webhooks
  • Sandbox decision harness
  • End-to-end examples
03API Reference
  • /exam_list
  • /exam_invitecore
  • webhook
  • /exam_upload_attachment
  • /exam_questions
  • /exam_submit_answers
  • /exam_invite_resend
  • /exam_invite_cancel
  • /patient_exam_status
  • /patient_exam_status_set
  • /patient_exam_webhook_payload
  • /webhook_destination_register
  • /webhook_destination_list
  • /webhook_destination_remove
  • /partner_pharmacy_list
  • /partner_pharmacy_treatment_packages
  • /custom_pharmacy_search
04External APIs
  • Overview
  • /v1/pharmacies
  • /v1/packages
  • /v1/locations
  • /v1/locations/{location_id}
  • /v1/settings/notifications
  • PATCH /v1/settings/notifications
05Recipes
  • GFE for Aesthetic Treatment
  • Partner Pharmacy Medication Shipping
  • Urgent Care Visit & Custom Pharmacies
  • Pull Your Full Exam Configuration
  • Pre-fill Patient Answers
  • Patient Notification Settings
06Core Concepts
  • How an Exam Works
  • Exam Types
  • States & Telehealth
  • Pharmacy Routing
  • Field Glossary
07Operations
  • Webhook Best Practices
  • Errors & Status Codes
  • Going to Production
Need a custom plan?Run our quick start. Answer a few questions and we'll generate a tailored integration plan for your dev team.Run wizard
Qualiphy API · v1

Build telehealth into anything you ship.

The Qualiphy API lets clinics, medspas, and software teams launch licensed provider consultations, treatments, and pharmacy fulfillment under their own brand. Programmatic access to the same network that powers Qualiphy's products. Comprehensive reference below.

Get a tailored API plan for your team →

Answer 5 quick questions, get a custom integration plan with the exact endpoints, sample call, and checklist your dev team needs.

Prefer no code?

Run your site on WordPress?

Quidget is our drop-in WordPress plugin that wraps the Qualiphy API in a polished WooCommerce experience. Ship telehealth on your store without writing a line of code.

Explore Quidget

Code walkthrough

The fastest path from zero to a successfully approved exam.

i
Not technical? Run the Quick start instead. It generates a custom plan you can hand to your dev team, with the exact endpoints and sample payload tailored to your use case.

1. Get an API key

Sign in to the Qualiphy portal and find your API key under Settings → API. If you don't have a portal account yet, sign up free - it takes a minute.

2. Find an exam ID

Each treatment your clinic offers has a numeric exam ID. You can either browse them in the portal under Exam List, or fetch them programmatically:

POST/api/exam_list
curl -X POST https://staging-api.qualiphy.me/api/exam_list \ -H "Content-Type: application/json" \ -d '{"api_key":"YOUR_API_KEY"}'
const res = await fetch('https://staging-api.qualiphy.me/api/exam_list', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({api_key: process.env.QUALIPHY_KEY})});const exams = await res.json();
import requests, os r = requests.post( 'https://staging-api.qualiphy.me/api/exam_list', json={'api_key': os.environ['QUALIPHY_KEY']})exams = r.json()

3. Send an exam invite

Build a payload with the patient's details, the exam ID from step 2, and a webhook URL where you want to receive the result. The sample below uses Test mode (state: "TE", name Test Approve) and exam 5359, Qualiphy's dedicated no-charge test exam, so it is safe to run as-is and costs you nothing. Swap in your own exam ID and real patient values when you are ready to ship.

POST/api/exam_invite
curl -X POST https://staging-api.qualiphy.me/api/exam_invite \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY", "exams": [5359], "first_name": "Test", "last_name": "Approve", "email": "test@example.com", "dob": "1990-06-30", "phone_number": "+15555550100", "state": "TE", "tele_state": "TE", "webhook_url": "https://your-app.com/webhooks/qualiphy"}'
const res = await fetch('https://staging-api.qualiphy.me/api/exam_invite', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ api_key: process.env.QUALIPHY_KEY, exams: [5359], first_name: 'Test', last_name: 'Approve', email: 'test@example.com', dob: '1990-06-30', phone_number: '+15555550100', state: 'TE', tele_state: 'TE', webhook_url: 'https://your-app.com/webhooks/qualiphy' })}); const {meeting_url, patient_exams} = await res.json();
import requests, os r = requests.post( 'https://staging-api.qualiphy.me/api/exam_invite', json={ 'api_key': os.environ['QUALIPHY_KEY'], 'exams': [5359], 'first_name': 'Test', 'last_name': 'Approve', 'email': 'test@example.com', 'dob': '1990-06-30', 'phone_number': '+15555550100', 'state': 'TE', 'tele_state': 'TE', 'webhook_url': 'https://your-app.com/webhooks/qualiphy' })data = r.json()meeting_url = data['meeting_url']
i
Test with exam 5359. It is a no-charge exam Qualiphy maintains for exactly this purpose, so you can run the loop as many times as you need without an invoice. Every other exam is billed at your normal rate when it is approved, including one you sent only to check your wiring. If 5359 is not in your /exam_list response, ask your Qualiphy representative to enable it. If a test genuinely needs a specific exam instead, ask your representative or sales@qualiphy.me before you send it.

4. Wait for the webhook

A licensed provider reviews the patient and approves in 2-24 hours (for test exams; real exams are processed within seconds). When approved, your webhook_url receives a POST with the result payload. See webhook reference for the schema.

✓
That's it. Once your webhook handler logs an approval, you've completed the full standard GFE integration loop. Scroll down for all RX and whitelabeling settings.

Authentication

Every Qualiphy API request outside /api/v1/ includes your api_key in the JSON request body. The External APIs (every endpoint under /api/v1/) take the same key only as an Authorization: Bearer YOUR_API_KEY header and reject a key in the body or query string with 401. There are no OAuth tokens or refresh flows to manage.

!
Never expose your API key in client-side code. All API calls should be made from your server. Treat your key like a database password: store it in a secrets manager or environment variable.

Where to find your key

  1. Sign in to the Qualiphy portal Settings
  2. Copy your API key

One key per location

Your API key identifies one location (clinic) on your account, and each location has its own key. /exam_invite has no field to select a location, so the key you send decides which location an exam belongs to; /v1/locations lists your locations and their ids. To run multiple brands on one location, separate the records instead: pass a brand identifier in additional_data (returned unchanged on every webhook) and use a per-call webhook_url and redirect URLs per brand. The provider key is reserved - see /exam_invite.

Testing your integration

Qualiphy provides a dedicated Test state so you can validate exam submissions, webhooks, prescription workflows, and order set configurations without touching live patients or production providers.

✓
No real consultations run in test mode. No providers are paged, no patients are contacted, no prescriptions are filled (unless you want them to — in which case you'll have to pay for the medication). All /exam_invite samples in this documentation default to test-mode values, so copying and running one pages no provider and contacts no patient. Billing is separate: only exam 5359 is no-charge. The Good Faith Exam samples use it; the Rx recipes use real exams and are billed on approval.

1. Route to the test state

On any /exam_invite request, set both state and tele_state to TE. This routes the request to the test environment and prevents any live workflow from running.

Test routing
{ "state": "TE", "tele_state": "TE"}

2. Use a test patient name that names your expected outcome

Test providers read the patient's name to decide how to process the exam — the name is your test instruction. Variations are fine as long as the intent is unambiguous (e.g. Test GFE Approve).

Test Approve
Provider approves the exam (use for GFE / non-Rx flows).
Test Reject
Provider rejects the exam.
Test N/A
Provider marks the exam not applicable.
Test Prescription Approve
Provider approves an Rx exam (use for partner pharmacy or urgent care flows).
Test Prescription Reject
Provider rejects an Rx exam.

3. Validate end-to-end

  • Submit the test invite and capture patient_exam_id from the response.
  • Watch your webhook endpoint for the lifecycle events.
  • Confirm the outcome matches the name you used.
!
Test exams process asynchronously. Expect 2–24 hours for a webhook (excluding weekends). If you need faster processing, contact your Qualiphy representative and they'll be able to push your exam through sooner. Don't block deployments waiting on the response — verify wiring with the immediate /exam_invite 200 response, then poll the webhook log.
!
Test state does not exempt you from billing, but exam 5359 does. Routing to TE stops live workflows; it does not stop the charge. Any exam other than 5359 is billed at your normal rate the moment it is approved, exactly as a live exam is. Use exam 5359, Qualiphy's dedicated no-charge test exam, and nothing is billed no matter how many times you run the loop. If a validation pass genuinely needs a different exam, arrange it with your Qualiphy representative or sales@qualiphy.me before you send it rather than after the invoice.
i
The exam itself has to be enabled for the Test state. Setting state and tele_state to TE is only half of it - the exam you're calling also needs the Test state enabled on your account. If a test invite goes quiet, confirm that with your Qualiphy representative before you start debugging your own code.
i
Don't include real patient data in test requests. Use the example email, phone_number, and dob values from our samples, or any clearly-fictional values. When you're ready to ship, switch state and tele_state to the patient's real state and use real patient details — see Going to Production.

Integration flow

Qualiphy runs good-faith exams (GFE) and prescription consultations for clinics. Your system creates the exam on the patient's behalf, optionally pre-fills the medical questionnaire, and learns the outcome by webhook or by polling. The clinic's providers make every clinical decision; the API never decides an exam.

The calls, in order

  1. 1POST /exam_list - which exam templates your clinic may invite for. Cache the static ids. Details
  2. 2POST /exam_invite - creates the patient (or matches by email), one patient exam per template, and a meeting that groups them. Returns meeting_url, meeting_uuid and one patient_exam_id per exam. The patient is emailed and texted the link unless the clinic disabled notifications.
  3. 3Optional: POST /exam_questions then POST /exam_submit_answers to pre-fill the questionnaire with history you already hold. Details
  4. 4The exam is decided. Synchronous exams: the patient opens meeting_url and has a video visit; the provider decides. Asynchronous (prefill-only) exams: once every question is answered the exam enters the provider review queue.
  5. 5Qualiphy POSTs the completion webhook (event 1 or 2) to your webhook_url; you can also poll POST /patient_exam_status at any time, or call POST /patient_exam_webhook_payload to pull the full completion Event 1/2 JSON if a webhook was missed. Details

On the sandbox host, step 4 can be your own code: the sandbox decision harness Sandbox only moves an exam to a terminal status through the real decision path, so the webhook fires and the status poll changes exactly as they will in production.

Two kinds of exam

Synchronous (video)Asynchronous (prefill-only)
Patient doesOpens the meeting link, completes any unanswered questions, has a live video visitAnswers the questionnaire only; no visit
Provider doesDecides during or after the visitReviews the completed questionnaire from a queue and decides
When it is readyAs soon as the invite existsWhen every patient-facing question is answered (a partial pre-fill keeps it waiting for the patient)
Sandbox outcomes Sandbox onlyapproved, rejected, narelease into the review queue, then approved / rejected / na

Whether a template is synchronous or asynchronous is set on the exam by Qualiphy; ask which of yours are asynchronous. An exam can also be asked to run as an async review on the invite itself, with visit_type: "async": where the rules don't allow it, the invite is a video visit and the response says why. See /exam_invite, "Asking for an async review".

What you need before you start

  • A clinic account on the sandbox host with an API key (api_key). Qualiphy sets this up; sandbox test clinics create no charges. If your platform serves many businesses, each location can register itself and have its key delivered to you by webhook: see Registering clinics.
  • A webhook endpoint you control that accepts POST JSON and answers 2xx quickly (optional; polling works without it).
  • The exam static ids you intend to offer, from exam_list.

For production only the host and the api_key change.

Hosts & authentication

The two environments, how requests are authenticated, and the response conventions the core API shares. The External APIs under /api/v1/ follow their own; each rule below says which it covers.

Hosts

EnvironmentBase URLUse it for
Sandboxhttps://staging-api.qualiphy.me/api/All integration development and testing: test clinics, test patients, no charges, and the sandbox decision harness Sandbox only.
Productionhttps://staging-api.qualiphy.me/api/Live patients. The sandbox decision harness does not exist here.
!
Both rows point at the same host on this deployment. It was built with a single API base, so the distinction above does not hold here: read the production guidance on the deployment that actually serves production.

Every endpoint outside /api/v1/ is POST with a JSON body (Content-Type: application/json); the External APIs under /api/v1/ work differently (see the note under Authentication). Paths in these guides are relative to the base URL. The sandbox is a separate deployment with its own database: a patient_exam_id, meeting_uuid or api_key from one environment means nothing in the other.

Authentication

Requests outside /api/v1/ are authenticated by the clinic's API key, sent in the JSON body as api_key. Those endpoints take no header token.

json
{ "api_key": "…40-character key issued for your clinic…", "patient_exam_id": 272 }
  • The key identifies one clinic; everything you create or read is scoped to it. Another clinic's exam answers 403.
  • Keys are issued per environment by Qualiphy. Keep them server-side; rotate on request.
  • A wrong or inactive key answers {"http_code": 401, "error_message": "Unauthorized access."}.
!
The External APIs (every endpoint under /api/v1/) are GET (Notification Settings also takes PATCH with a JSON body) and take the same API key only as Authorization: Bearer YOUR_API_KEY; a key in the body or query string is rejected. They return real HTTP status codes with {"success": true, "data": …} or {"success": false, "error": {"code", "message", "field_errors", "correlation_id"}}, and no http_code, so the envelope rules below do not apply to them. Check the HTTP status.

The response envelope

Outside /api/v1/, the API returns HTTP 200 for almost every response and puts the real status in the body as http_code. Read http_code, not the transport status. Treat a body with http_code: 200, or with no http_code at all, as success: exam_list omits the field on success and returns just { clinic_id, exams } (clinic_id is always present for API-key callers; it is omitted only for Qualiphy's own embedded widget). Every error carries http_code and error_message. A few answer with the matching real HTTP status as well: exam_invite's webhook-URL refusals (HTTP 422 invalid_webhook_url, and once the webhook-registration rollout completes HTTP 422 webhook_url_not_registered and HTTP 503 webhook_registry_unavailable) and the webhook destination endpoints' own errors. Their bodies are JSON with error_code, so read the body on those statuses rather than treating them as transport failures.

json
{ "http_code": 200, "meeting_url": "…", "meeting_uuid": "…", "exams": [ … ] }{ "clinic_id": 832, "exams": [ … ] } ← exam_list success: no http_code{ "http_code": 401, "error_message": "First Name is required!, Email is invalid!" }{ "http_code": 403, "error_message": "Forbidden: patient exam does not belong to this clinic" }{ "http_code": 404, "error_message": "Patient exam not found." }{ "http_code": 422, "error_message": "Invitation not created.", "errors": [ … ] }
http_codeMeaning
200 or absentSuccess; payload fields are endpoint-specific.
400Malformed request, or a business rule refused it (error_message says which).
401Authentication failed, or request validation failed (validation errors are reported as 401 on the older endpoints).
403Authenticated, but the resource belongs to another clinic or the action is not allowed to partners.
404The patient_exam_id does not exist.
422The invite was valid but could not be created; errors lists the causes.

A transport-level 404 with an HTML body means the path does not exist on that host (for example the sandbox harness on production, or a typo). A transport 5xx means the service is unavailable: retry with backoff.

Idempotency and retries

  • exam_invite is not idempotent: two calls create two exams and two patient notifications. Record the returned ids before retrying a timed-out call, or use exam_invite_resend for an exam that already exists.
  • Reads (exam_list, exam_questions, patient_exam_status, patient_exam_webhook_payload) are safe to retry.
  • Sandbox decisions refuse to run twice on the same exam.

Data handling

Requests, webhook payloads, and responses that return the webhook body (for example patient_exam_webhook_payload) carry protected health information. Use HTTPS to the hosts above only, do not log bodies in plaintext, and never put patient data in URLs or query strings.

Identifiers you will see

FieldWhat it is
exam_idThe exam template's static id (exam_list, exam_invite, exam_questions).
clinic_idA clinic (location) id: your API key's clinic in exam_list, the exam's clinic in webhooks. The location id from /api/v1/locations is this same value.
patient_exam_idOne patient's instance of an exam: the key for questions, answers, status, cancel, webhooks and the sandbox.
meeting_uuid / meeting_urlThe visit that groups the patient exams created by one invite; the URL the patient opens.
question_id, exam_question_response_idA question in a template and one of its selectable responses; used when submitting answers.

Registering clinics (signed link)

If your platform serves many businesses, each with its own locations, you can send each location to Qualiphy to register as a clinic, and receive that clinic's API key automatically when it is ready. You build a signed link; the user signs up or logs in on Qualiphy; Qualiphy sends your system one signed webhook carrying the new clinic's api_key together with your own tenant and location identifiers. Nothing here is an endpoint you call: you build a URL and you receive a webhook.

This is enabled per integration. Qualiphy gives you a partner code and two secrets: a link secret (you sign links with it) and a webhook secret (you verify our webhook with it). Both are exchanged through a password manager share, never by email. Tell Qualiphy the https endpoint that should receive the webhook, or send it on every link (see "Where the webhook goes" below).

The flow

  1. 1A location wants Qualiphy. Your system builds a signed link for that location and sends the user to it.
  2. 2The link opens a Qualiphy page that offers Log in (for an existing Qualiphy user) or Sign up (a new clinic). A new user goes through the usual clinic signup: email verification, clinic details, agreement and payment. An existing user logs in and picks which of their clinics is this location.
  3. 3When the clinic is ready (the agreement is signed, and a payment method is valid or billing is skipped for the clinic), Qualiphy sends the location_registered webhook to your endpoint.
  4. 4Your system stores the api_key against that tenant and location and uses it like any other clinic key (see Hosts & authentication).

The API key is delivered only by the webhook. It is never placed in a URL or shown on a page.

1. Build the signed link

the link
https://staging-app.qualiphy.me/partner?partner=<partner code>&tenant_id=<id>&location_id=<id>&exp=<unix seconds>[&emr=<name>][&callback=<https url>]&sig=<hex>

The host is the Qualiphy web app for the environment you are integrating with: this page shows the one for the environment it was built for. The sandbox and production web apps are separate deployments; a link only works on the one whose secret signed it.

ParameterRule
partnerYour partner code.
tenant_idYour identifier for the business: 1–128 characters from A-Z a-z 0-9 _ . : -, starting with a letter or digit.
location_idYour identifier for the location. Same rule as tenant_id.
expWhen the link stops working, unix seconds (UTC). Must be in the future and no more than 7 days ahead.
emr (optional)The EMR the clinic uses. 1–64 characters from letters, digits, space and . _ & -. Prefills the EMR field on the signup form when it is one of Qualiphy's EMR options; otherwise the person chooses. The clinic's recorded EMR is the value you signed.
callback (optional)An https URL where this link's webhook is sent, instead of your default endpoint. Public https only (no private or internal addresses), 490 characters at most, no spaces.
sigLowercase hex HMAC-SHA256, 64 characters (below).

The signature

signed string
sig = hex( HMAC_SHA256( link_secret, "v1\n" + partner + "\n" + tenant_id + "\n" + location_id + "\n" + exp ) )
  • Fields are joined with a single newline (\n), with no trailing newline. exp is its decimal digits exactly as it appears in the URL.
  • Optional fields are signed as labeled lines after those five, emr first, then callback: …\nemr=<emr>\ncallback=<callback>. Leave out the line for any field you do not send. A link with neither signs exactly the five fields.
  • Leave a parameter off entirely rather than sending it empty. An emr or callback that was added, changed or removed after signing makes the link invalid.
  • Sign the plain values, then URL-encode them when you build the query string.
const crypto = require("crypto"); // base: the Qualiphy web app host for the environment (shown above). secret: the LINK secret Qualiphy gave you.function registrationLink(base, partner, tenantId, locationId, secret, { emr, callback, ttlSeconds = 3600 } = {}) { const exp = Math.floor(Date.now() / 1000) + ttlSeconds; // unix seconds; at most 7 days ahead const signed = ["v1", partner, tenantId, locationId, String(exp), ...(emr ? ["emr=" + emr] : []), // optional fields are signed as labeled lines, emr first ...(callback ? ["callback=" + callback] : []), ].join("\n"); // single newline, no trailing newline const sig = crypto.createHmac("sha256", secret).update(signed).digest("hex"); const query = new URLSearchParams({ partner, tenant_id: tenantId, location_id: locationId, exp: String(exp), ...(emr ? { emr } : {}), ...(callback ? { callback } : {}), // leave a parameter off entirely rather than sending it empty sig, }); return base + "/partner?" + query;}
import hashlib, hmac, timefrom urllib.parse import urlencode # base: the Qualiphy web app host for the environment (shown above). secret: the LINK secret Qualiphy gave you.def registration_link(base, partner, tenant_id, location_id, secret, emr=None, callback=None, ttl_seconds=3600): exp = int(time.time()) + ttl_seconds # unix seconds; at most 7 days ahead lines = ["v1", partner, tenant_id, location_id, str(exp)] if emr: lines.append("emr=" + emr) # optional fields are signed as labeled lines, emr first if callback: lines.append("callback=" + callback) sig = hmac.new(secret.encode(), "\n".join(lines).encode(), hashlib.sha256).hexdigest() query = {"partner": partner, "tenant_id": tenant_id, "location_id": location_id, "exp": exp} if emr: query["emr"] = emr # leave a parameter off entirely rather than sending it empty if callback: query["callback"] = callback query["sig"] = sig return base + "/partner?" + urlencode(query)
!
Treat a link like a password until it expires. Whoever holds it can start a signup for that location. Build it at the moment the user clicks, with a short expiry (hours, not days). Qualiphy checks the signature at every step, so a changed tenant, location or expiry is refused, and every kind of failure shows one generic This link isn't working page. One clinic per location: once a location has a clinic attached, a second signup for it is refused.

2. Receive the webhook

When the clinic is ready, Qualiphy sends POST with Content-Type: application/json to your endpoint (https only, a public host; private and cloud-metadata addresses are refused, and redirects are not followed).

HeaderValue
X-Qualiphy-TimestampUnix seconds when Qualiphy signed the delivery.
X-Qualiphy-Signaturev1= followed by the hex HMAC-SHA256 of "<timestamp>.<raw body>", keyed with your webhook secret.
body
{ "event": "location_registered", "event_id": "plr_42", "partner": "<partner code>", "tenant_id": "your tenant id", "location_id": "your location id", "clinic_id": 1234, "clinic_name": "Glow Spa Downtown", "api_key": "<40 hex characters>", "registered_at": "2026-10-19T14:05:11.000Z"}
FieldMeaning
eventAlways location_registered today. Ignore events you do not recognize.
event_idStable across retries and replays. Use it to make your handler idempotent.
tenant_id, location_idExactly the values you signed into the link.
clinic_idThe Qualiphy clinic created or attached for this location.
api_keyThe clinic's API key for the environment that sent the webhook. Store it like any secret and never log it.
registered_atWhen the clinic became ready.
  • Verify before you trust it. Compute the HMAC over the raw bytes of the body (before any JSON parsing), compare in constant time, and reject a timestamp more than 5 minutes old.
  • Answer 2xx to acknowledge. Anything else, or no answer within 15 seconds, is retried after 1, 2, 5, 15, 30 and 60 minutes, then 2, 4 and 6 hours, up to 12 attempts. After that Qualiphy support is alerted and replays the delivery by hand, so a replay can also arrive after a manual fix.
  • Be idempotent on event_id. A retry or a replay carries the same one.
const crypto = require("crypto"); // Express: keep the raw bytes, e.g. app.post(path, express.raw({ type: 'application/json' }), handler)// secret: the WEBHOOK secret Qualiphy gave you.function verifyQualiphy(rawBody /* Buffer or string */, headers, secret) { const ts = headers["x-qualiphy-timestamp"] || ""; const sig = (headers["x-qualiphy-signature"] || "").replace(/^v1=/, ""); if (!secret || !/^\d+$/.test(ts) || Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false; // 5-minute replay window const expected = crypto.createHmac("sha256", secret).update(ts + ".").update(rawBody).digest(); const given = Buffer.from(sig, "hex"); return given.length === expected.length && crypto.timingSafeEqual(given, expected);} function handleRegistration(rawBody, headers) { if (!verifyQualiphy(rawBody, headers, process.env.QUALIPHY_REGISTRATION_WEBHOOK_SECRET)) return 401; const body = JSON.parse(rawBody); if (body.event !== "location_registered") return 200; // ignore events you do not know // idempotent on event_id: a retry or a replay carries the same one if (alreadyHandled(body.event_id)) return 200; saveApiKey(body.tenant_id, body.location_id, body.clinic_id, body.api_key); // store the key like any secret; never log it return 200;}
import hashlib, hmac, json, os, time # secret: the WEBHOOK secret Qualiphy gave you. raw_body is the request body as bytes, before any JSON parsing.def verify_qualiphy(raw_body: bytes, headers: dict, secret: str) -> bool: h = {k.lower(): v for k, v in headers.items()} # header names are case-insensitive; many frameworks lowercase them ts = h.get("x-qualiphy-timestamp", "") sig = h.get("x-qualiphy-signature", "").removeprefix("v1=") if not secret or not (ts.isascii() and ts.isdigit()) or len(ts) > 12 or abs(time.time() - int(ts)) > 300: # 5-minute replay window; isdigit() alone accepts superscripts; the length cap stops int() raising return False expected = hmac.new(secret.encode(), ts.encode() + b"." + raw_body, hashlib.sha256).hexdigest() return hmac.compare_digest(expected.encode(), sig.encode()) # bytes: a non-ASCII header cannot raise def handle_registration(raw_body: bytes, headers: dict) -> int: if not verify_qualiphy(raw_body, headers, os.environ.get("QUALIPHY_REGISTRATION_WEBHOOK_SECRET", "")): return 401 body = json.loads(raw_body) if body.get("event") != "location_registered": # ignore events you do not know return 200 if already_handled(body["event_id"]): # idempotent on event_id: a retry or a replay carries the same one return 200 save_api_key(body["tenant_id"], body["location_id"], body["clinic_id"], body["api_key"]) # store the key like any secret; never log it return 200

Where the webhook goes

  1. The callback signed into the link, if the link has one.
  2. Otherwise the default endpoint Qualiphy configured for your integration.

If your integration has no default endpoint (for example because each of your customers has its own), every link must carry a callback: a link without one is refused. Qualiphy can also restrict callback to hosts you name (hooks.example.com or *.example.com); a link pointing anywhere else is refused, and the check is repeated when the webhook is sent. The destination always comes from the signed link or from Qualiphy's configuration, never from an unsigned parameter, and it is locked once a clinic is attached to the location, so a later link cannot redirect a delivery already underway.

Existing Qualiphy users and edge cases

  • A user who already has a Qualiphy clinic logs in and chooses which clinic is this location; the same webhook is sent when it is ready. A user with an unfinished signup who logs in is taken to the signup wizard and should reopen the link afterwards.
  • If a location's webhook cannot be delivered after all attempts, the clinic and its key are unaffected: Qualiphy support replays the delivery once your endpoint is healthy. You can also read the key from the clinic's portal Settings.

Testing on the sandbox

Ask Qualiphy for a sandbox partner code and secrets, and give us a sandbox endpoint (or send a callback on your test links). Build links against the sandbox web app host: signing up through one registers a sandbox clinic (no charges), and the webhook carries a sandbox API key that works on the sandbox API host only. Use test tenant and location identifiers, and test addresses and phone numbers for the signup. A good test run covers: a new user, an existing user, an expired link, a link with a tampered parameter, a repeated delivery (answer 2xx twice, change nothing) and a delivery your endpoint answers 500 to once.

Exam catalog & invite

Discover which exams a clinic may offer, create a patient exam (the invite), and resend or cancel it. The per-field reference lives on the Exam List and Exam Invite endpoint pages; this guide is the flow.

1. POST /exam_list - which exams may this clinic invite for?

request
{ "api_key": "…", "patient_state": "TX" }
response (no http_code on success; errors carry one). clinic_id is always present for API-key callers; it is omitted only for Qualiphy's own embedded widget.
{ "clinic_id": 832, "exams": [ { "id": 106, "title": "P Shot", "price": "27.99", "rx_type": 1, "attachments_required": 1, "attachments": [] }, { "id": 5441, "title": "Sant (RX) 01", "price": "27.99", "rx_type": 2, "attachments_required": 1, "attachments": [] } ]}
FieldMeaning
idThe exam's static id: the value you send as exam_id in exam_invite and exam_questions.
rx_type2 = a prescription (Rx) exam, 1 = a good-faith exam. Rx exams require address fields on the invite and, where the clinic uses its own pharmacies, the pharmacy fields.
attachments_required / attachments2 means the exam needs uploaded documents; attachments names them. Upload with exam_upload_attachment after the invite; note the completion step is not API-callable (see Questions & answers).

patient_state (optional, two-letter abbreviation) filters to exams available in that state. The clinic must have signed its service agreement (and the Rx agreement for Rx exams), otherwise exam_list answers {"http_code": 400, "error_message": "Unauthorized access"}. Whether an exam is synchronous or asynchronous is set on the template and is not flagged here; on the sandbox host, release in the decision harness Sandbox only is accepted only for asynchronous exams, which is a reliable test.

2. POST /exam_invite - create the exam

Creates the patient (or matches an existing one by email), one patient exam per requested template, and a meeting that groups them; sends the patient an email and/or SMS with the meeting link unless the clinic has disabled those notifications.

request (minimum for a GFE exam at a telehealth clinic)
{ "api_key": "…", "first_name": "Jane", "last_name": "Doe", "email": "jane.doe@example.com", "phone_number": "+15552223344", "dob": "1990-06-30", "gender": 2, "tele_state": "TX", "exams": [ { "exam_id": 106 } ], "webhook_url": "https://partner.example.com/qualiphy/webhook", "additional_data": "{\"your_ref\":\"ORD-2231\"}"}
FieldRequiredNotes
api_keyyesClinic key.
first_name, last_nameyesPatient name as the provider sees it.
emailyesMust be valid; the invite email goes here. Whitespace is trimmed.
phone_numberyes10 digits, or +1 followed by 10 digits; the invite SMS goes here.
dobyesYYYY-MM-DD. Patients under 13 are refused ("Invalid DOB!").
examsyesArray of exam static ids: legacy form [106, 5441] or object form [{ "exam_id": 106, "order_set_ids": […], "provider_note": "…", "skip_intake": true }] (skip_intake is described under Questions & answers). Every id must be one the clinic may use or the whole call is refused ("Unauthorized Exam Access!"). All exams in one call share one meeting.
tele_statetelehealth clinics: yesTwo-letter state the patient is in during the visit; drives licensing and provider matching. Non-telehealth clinics default to the clinic's state.
gendernoSex assigned at birth: 1 male, 2 female; defaults to 3 (not provided). Some pharmacy flows require it and a missing value blocks prescribing.
visit_typeno"async" or "video", for the exams on the invite (your existing "ASYNC" exams stay async whatever you send). Leave it off for today's behaviour. Async the rules don't allow becomes a video visit (never an error), and the response's visit says which and why; any other value returns HTTP 200 with http_code 400 and "Invalid visit type.". See /exam_invite.
webhook_urlnoWhere completion webhooks for these exams are sent. Defaults to the URL configured on the clinic. See Status & webhooks.
additional_datanoA string (commonly stringified JSON) echoed back verbatim in the webhook; carry your own order or patient reference here. One reserved key: if the JSON has a provider key naming an EMR handled by Qualiphy's integration hub (for example zenoti), the partner webhook for that exam is suppressed and the result routes through that integration instead.
redirect_approve, redirect_reject, redirect_na, redirect_missednoURLs the patient is sent to after the visit, by outcome.
address and shipping_* fieldsRx exams and address-requiring exams: yesAll required together when required; states are two-letter abbreviations.
pharmacy fields (pharmacy_id, custom_pharmacy, ncpdpid, pharmacy_*, provider_pos_selection, custom_pharmacy_*)Rx exams with a partner or patient-chosen pharmacyRoute the prescription; use custom_pharmacy_search to find NCPDP ids. Omit for GFE-only exams.
cc1_email, cc2_emailnoExtra recipients for the invite.

Response

{ "http_code": 200, "meeting_url": "https://staging-app.qualiphy.me/meeting/ff1b75a9-2c55-4e27-953e-a131d08acebe", "meeting_uuid": "ff1b75a9-2c55-4e27-953e-a131d08acebe", "exams": [ { "index": 0, "exam_id": 106, "patient_exam_id": 272, "rx_type": 1, "pharmacy_id": null, "order_set_ids": [] } ]}

Legacy [106] requests return the same envelope with patient_exams instead of exams. Keep patient_exam_id and meeting_uuid: every later call is keyed on them, and the webhook carries patient_exam_id so you can match it to your record.

Errors to handle

http_codeerror_message (examples)Cause
401First Name is required!, Email is invalid!, Date of Birth is required!Field validation; several messages joined with commas.
401Unauthorized Exam Access!An exam_id the clinic may not use.
401Invalid DOB!Under 13.
401Invalid, you must include a state!Telehealth clinic without tele_state.
401Need to sign contract!Clinic agreement (or Rx agreement) unsigned.
422Invitation not created. with errors[]Downstream creation failed; safe to retry after fixing what errors names.

What happens next

  • The patient receives the meeting link by email and SMS (subject to the clinic's notification settings; a previously bounced address is not emailed again).
  • Synchronous exams: the patient opens the link, answers what you did not pre-fill, and has the visit; the exam is pending until a provider decides.
  • Asynchronous exams: the patient (or you, via exam_submit_answers) completes the questionnaire; once complete the exam enters the provider review queue.
  • Completion is reported by webhook and visible to patient_exam_status; if a webhook was missed, pull the full completion Event 1/2 JSON with POST /patient_exam_webhook_payload.

3. POST /exam_invite_resend

Re-sends the invite notification for an existing exam. Body: { "api_key", "patient_exam_id" }. There is a resend limit per exam (currently three).

4. POST /exam_invite_cancel

Cancels an exam the patient has not completed. Body: { "api_key", "patient_exam_id" }. Refused with 400 when the patient is in an active session, when the exam is already cancelled, or when it already has a terminal status. patient_exam_status_set with status: 6 also cancels, but without those guards (it will overwrite an approved exam), so use exam_invite_cancel; cancellation is the only status a partner may set either way. Clinical outcomes come from providers, or from the sandbox decision harness on the sandbox host Sandbox only.

Questions & answers (prefill)

Fetch an exam's questionnaire and submit answers on the patient's behalf. Anything you submit shows as already answered; anything you leave out the patient answers on the meeting page. For asynchronous exams, a complete set of answers is what moves the exam into the provider's queue.

1. POST /exam_questions - fetch the questionnaire

Two modes, depending on what you send.

template mode — before or without an invite; exam_id is the static id from exam_list
{ "api_key": "…", "exam_id": 106 }
live-exam mode — after an invite; returns the questions plus the answers already stored (exam must still be open)
{ "api_key": "…", "meeting_uuid": "ff1b75a9-…", "patient_exam_id": 272 }
response
{ "http_code": 200, "exam_id": 106, "patient_exam_id": 272, "meeting_uuid": "ff1b75a9-…", "answers": [], "questions": [ { "question_id": 18395, "question": "In the treatment area, do you have any of the following?", "response_type": 3, "position": 1, "note_id": null, "note": null, "is_visible": null, "responses": [ { "exam_question_response_id": 90311, "response": "Active infection", "input_field": 1, "position": 1 }, { "exam_question_response_id": 90312, "response": "Other", "input_field": 2, "position": 7 } ] }, { "question_id": 18470, "question": "What is your weight?", "response_type": 1, "position": 9, "responses": [] } ]}

patient_exam_id, meeting_uuid and answers are present only in live-exam mode. Questions the template hides from pre-fill are not returned.

response_typeKindHow to answer
1Free text or a number (weight, height, medication lists)Send answer as text. Weight is pounds ("212"). Height: 5' 11", 5 ft 11 in, total inches or centimetres; see height_inches below and /exam_submit_answers.
2Single selectSend one answer carrying the chosen exam_question_response_id.
3Multi selectSend one answer per selected option, each with its exam_question_response_id.

On a response option, input_field 1 is a plain choice; 2 marks a choice that expects accompanying free text (the "Other, please specify" pattern): send it with answer_text.

2. POST /exam_submit_answers - store answers

{ "api_key": "…", "meeting_uuid": "ff1b75a9-…", "patient_exam_id": 272, "answers": [ { "question_id": 18395, "exam_question_response_id": 90311, "answer": "Active infection" }, { "question_id": 18395, "exam_question_response_id": 90312, "answer": "Other", "answer_text": "Recent bruising" }, { "question_id": 18470, "answer": "185" }, { "question_id": 18471, "answer": "5", "height_inches": 11 } ]}
FieldNotes
patient_exam_id, meeting_uuidFrom the invite response. The exam must belong to your clinic ("Unauthorized access" otherwise).
answers[].question_idFrom exam_questions. (eq_static_id is accepted as an alias.)
answers[].exam_question_response_idThe chosen option for select questions. (eqr_static_id is accepted as an alias.) Omit for free-text questions.
answers[].answerThe text shown as the answer: the option's response text for selects, the value for free text.
answers[].answer_textFree text attached to an option with input_field: 2.
answers[].height_inchesHeight questions only. 0-11: the inches part, with feet in answer ("5" + 11). 12 or more: total inches (71), with answer empty or the matching feet. Not needed when answer already holds the whole height (5' 11", 71 in, 180 cm). A height that can't be read is not stored and is listed in the response's warnings; the rest of the request is stored.

Response: { "http_code": 200 }, plus a warnings list when a height couldn't be read and wasn't stored. Answers are stored per question; re-submitting a question replaces its stored answer. Weight, height and certain medical-history answers also update the patient's profile (a weight that isn't a number of pounds doesn't); weight and height recompute the profile BMI. Height is stored as 5' 11" whichever form you send.

3. How this affects asynchronous exams

An asynchronous (prefill-only) exam waits in prefill_only_patient_ready until every patient-facing question has an answer. When your exam_submit_answers call completes the set, the exam is promoted to prefill_only_operator_ready and enters the provider queue in the same call. A partial set leaves it waiting for the patient, who sees only the unanswered questions on the meeting page. A height returned in warnings wasn't stored: if no earlier call stored one for that question, it counts as unanswered. This gate is deliberate: providers must never receive a blank questionnaire.

Synchronous exams have no such gate; pre-filled answers simply shorten what the patient does before the visit. Both asynchronous states report as pending to patient_exam_status. On the sandbox host, release in the decision harness Sandbox only runs the same completeness check and tells you whether the set is complete.

4. Skipping the questionnaire (skip_intake)

If your platform has already taken the patient's intake, you can ask Qualiphy not to offer the pre-fill questionnaire at all. Without this, a patient who finishes your intake still lands on a half-empty Qualiphy questionnaire, because only some of your questions map to Qualiphy's by question id, and has to press Skip by hand every time.

Set skip_intake: true on the exam in the invite, using the object form of exams[]:

{ "exams": [ { "exam_id": 106, "skip_intake": true } ], …}
  • What the patient sees: consent, then the waiting room, with no questionnaire step. It is the same outcome as the patient pressing Skip, without the click.
  • Your answers are kept. Whatever you submitted with exam_submit_answers still reaches the provider screen. A question left unanswered is asked by the provider during the visit, exactly as after a manual Skip.
  • Per exam, default false. In an invite with several exams, only the ones you flag skip the questionnaire. Leave the key off for the normal path.
  • Object form only. The list-of-IDs shape and the Qualiphy portal cannot set it. A skip_intake key at the top of the request is ignored: the patient still sees the questionnaire, and that is not a 422. A value that is not a boolean on the exam object returns 422 INVALID_SKIP_INTAKE and nothing is created, including on an asynchronous exam. The response is HTTP 200 with http_code 422 and an errors[] entry carrying that exam's index and exam_id.
  • Not for asynchronous exams. There the questionnaire is the exam, so a boolean flag is accepted and ignored: the patient is still asked for the answers you did not send (see section 3). A value that is not a boolean is still refused.
  • It is chosen when you create the invite. exam_submit_answers does not take it.

5. Attachments

Exams with attachments_required: 2 need documents before a provider can act. You can upload each document with POST /exam_upload_attachment, but marking the set complete is not something a partner integration can do: that step needs a signed-in user session, so today the patient completes it on the meeting page and the exam stays in pending_attachment until they do. Plan for that in your flow, or upload nothing and let the patient handle attachments end to end. The question flow above is unchanged either way.

Status & webhooks

Three ways to learn an exam's outcome: receiving the completion webhook (primary), polling patient_exam_status (reconciliation - startup, missed deliveries, dashboards), and POST /patient_exam_webhook_payload to pull the full completion Event 1/2 JSON when a delivery was missed. All three report the same state.

1. POST /patient_exam_status - poll

{ "api_key": "…", "patient_exam_id": 272 }→ { "http_code": 200, "status": "approved" }
statusMeaning
pendingNot decided yet: waiting for the patient (questionnaire or visit), waiting for attachments, or an asynchronous exam in the provider queue.
approvedThe provider approved the exam.
rejectedThe provider did not approve and deferred the case to the medical director (the webhook calls this Deferred to Medical Director).
naNot applicable (for example the patient did not attend).
cancelledCancelled by you or by the clinic.
expiredThe visit window expired without a decision.
prescribedRx exams: a prescription was issued (reported in preference to approved).
rejected_prescriptionRx exams: the provider declined to prescribe.

Errors: 401 bad key, 403 another clinic's exam, 404 unknown id. Poll no more often than every few minutes per exam.

2. The completion webhook

When an exam reaches a terminal status (approved, deferred to the medical director, or not applicable) Qualiphy POSTs to the exam's webhook_url: the URL you passed on exam_invite, or the URL configured on the clinic if you passed none. Exams with no URL anywhere get no webhook. The per-field reference is on the Exam Webhook page.

Expect more than one delivery per decision. Two Qualiphy components post to the same URL: the completion sender (at the moment the provider decides) and the result-document sender (when the chart PDF is generated, about a minute later, and again whenever it is regenerated, for example when the prescription is written). They carry the same event numbers and the same core identifiers but not the same shape; the differences are listed below. Key idempotency on (patient_exam_id, event) and read only the fields you need.

Events

eventSent whenExtra payload
1A good-faith exam (no prescription attached) reaches a terminal statusnone
2An exam carrying one or more prescriptions reaches a terminal statusprescriptions[]
3A prescription ships (pharmacy fulfillment; Rx exams only)a different, smaller body: { event: 3, patient_exam_id, clinic_id, prescription_id, tracking_number, delivery_service, pharmacy_location, order_id }. It has no exam_status, exam_id or questions_answers; branch on event before reading those.

Payload (events 1 and 2)

This is the completion sender's payload. The prescription list is prescriptions (plural) and questions_answers entries are { no, question, answer } with answer a string. Event 1 has no prescriptions and an empty rx_status; event 2 has both.

event 1 — good-faith exam, as the sandbox emits it today
{ "event": 1, "exam_status": "approved", "rx_status": "", "patient_exam_id": 272, "exam_id": 106, "exam_name": "P Shot", "exam_url": null, "clinic_id": 832, "clinic_name": "Dev QA Test", "provider_name": "Sandbox Provider", "reason": "SANDBOX DECISION (approved) via /sandbox_exam_decision", "patient_email": "jane.doe@example.com", "patient_phone_number": "4155550100", "additional_data": "{\"your_ref\":\"ORD-2231\"}", "questions_answers": [ { "no": 1, "question": "In the treatment area, do you have any of the following?", "answer": "Active infection" } ]}
event 2 — exam with a prescription (fields shared with event 1 elided)
{ "event": 2, "exam_status": "approved", "rx_status": "approved", "patient_exam_id": 301, "exam_id": 5441, "exam_name": "Sant (RX) 01", "…": "same fields as event 1", "prescriptions": [ { "prescription_id": 3320, "drug_name": "…", "directions": "…", "quantity": 2, "quantity_units": "…", "refill_amount": 0, "prescription_date": "2026-09-08" } ]}

The exam_status vocabulary and how it maps to polling

The documented webhook labels are Approved, Deferred to Medical Director and N/A (ENG-101, the same strings the result-document sender has always used). Until ENG-101 reaches an environment, the completion sender there emits the lower-case enum keys shown in the samples above; on the sandbox that is the case today (ENG-101 is on Qualiphy's dev branch). Compare case-insensitively and use this mapping:

patient_exam_status (poll)completion sender, before ENG-101completion sender after ENG-101 and result-document senderMeaning
approvedapprovedApprovedThe provider approved the exam.
rejectedrejectedDeferred to Medical DirectorThe provider did not approve; the case is deferred to the medical director.
nanaN/ANot applicable (for example the patient did not attend).

One server message is worth knowing when you read exam_invite_cancel errors: that endpoint spells the three terminal states as approved, Deferred to Medical Director and rejected, where its rejected is the na state above.

FieldNotes
event1, 2 or 3 as above.
exam_statusSee the mapping table above: Approved / Deferred to Medical Director / N/A once ENG-101 is deployed, lower-case approved / rejected / na from the completion sender before that. Not the polling vocabulary.
rx_statusCompletion sender: approved, rejected, pending, or "" when the exam has no prescription component. The result-document sender uses Prescribed, Pharmacy Confirmed, Prescription Denied, Prescription On Hold or "".
patient_exam_id, exam_id, exam_nameMatch these to your record; exam_id is the template static id.
exam_urlA time-limited link to the result PDF when one exists at send time; otherwise null. The document is produced on demand, so null is common on the first webhook and is not an error.
clinic_idThe clinic (location) the exam belongs to - the same id exam_list returns. Use this, not clinic_name, to attribute an event to a location: if you point several clinics' webhooks at one endpoint, this is the only stable key that tells them apart. Present on events 1, 2 and 3, and on the result-document sender, even when clinic_name is null.
clinic_name, provider_nameDisplay names - free text, neither unique nor stable, so do not key on them. On the sandbox host, decisions made through the harness Sandbox only show Sandbox Provider.
reasonThe provider's note, if any. Sandbox decisions carry a fixed SANDBOX DECISION (…) note so test data is always recognizable.
patient_email, patient_phone_numberAs stored on the patient. PHI: handle accordingly.
additional_dataYour exam_invite string, echoed verbatim, with one reserved key: if it is JSON whose provider names an EMR handled by Qualiphy's integration hub (for example zenoti), the partner webhook is suppressed and the result is delivered through that integration instead. Do not use provider for your own data.
questions_answersEvery question with its stored answer, numbered in order; text is sanitized (control characters removed, length-capped).
prescriptionsEvent 2 only.

The result-document sender's copy

The second delivery is produced by the PDF pipeline (qualiphy-cron-download) and predates the completion sender. It posts to the same URL with the same event (1, or 2 once a pharmacy confirmation exists) and the same patient_exam_id, exam_id, exam_name, clinic_id, clinic_name, provider_name, reason, additional_data and questions_answers, but differs in these ways:

  • exam_status is always the documented label (Approved / Deferred to Medical Director / N/A).
  • rx_status uses the pharmacy vocabulary above (Pharmacy Confirmed and friends).
  • The prescription list is prescription (singular) with richer per-line fields; prescriptions is absent.
  • exam_url is a signed link to the generated PDF (this sender exists to deliver it).
  • It carries additional PHI: patient_name, patient_dob, patient_gender, patient_home_address, patient_shipping_address, plus prescriber fields (rx_provider_name, rx_provider_npi, rx_provider_licenses) and order-set ids. Treat and store accordingly.

Unifying the two senders into one contract is tracked on Qualiphy's side; until then a receiver should tolerate both shapes: read prescriptions ?? prescription, compare exam_status case-insensitively, and never assume a field outside the core set is present.

Delivery guarantees

  • Best effort, per sender. The completion sender tries 3 times (0.5 s, then 2 s between attempts) with a 10-second timeout per attempt and retries any non-2xx. The result-document sender tries 3 times (immediately, then after 2 s and 8 s) with a 15-second timeout and retries only network errors and 5xx; a 4xx from you is taken as a deliberate rejection and not retried. Neither replays a failed delivery later: reconcile with patient_exam_status.
  • Signed. Every delivery to a registered destination (section 3) carries X-Qualiphy-Signature and X-Qualiphy-Timestamp; verify them before trusting the body (recipe below). During the rollout a URL you have not registered still receives deliveries, unsigned: until you register, authenticate by matching patient_exam_id (and your additional_data reference) to exams you created, and keep the URL unguessable. After the rollout's final step, nothing is delivered unsigned (section 3); the only exemption is Qualiphy's own Zenoti integration endpoint.
  • At least two deliveries per decision, with no upper bound: the completion sender posts once; the result-document sender posts at PDF generation and again on every regeneration (a provider editing the note, a prescription change, an admin regenerating the record). The two senders' payloads differ as described above: make the handler idempotent on (patient_exam_id, event) for the decision itself, but let a later delivery update exam_url. The result-document copy is the one that reliably carries it - the completion sender includes one only if a PDF already exists when it fires - so a receiver that drops repeats outright may never see the PDF link. The receiver samples do exactly this.
  • Redirects are not followed. A 3xx from your endpoint is a failed delivery for every sender (it used to be followed). Register and send the final URL; if you move or upgrade http→https, re-register rather than redirecting.
  • Order is not guaranteed relative to your own polling.
  • Event 3 is sent by the pharmacy tracking handlers, not the completion sender, with a single attempt and its own smaller body (above). Handlers that index exam_status unconditionally will fail on it; the receiver samples branch on event.

Verifying deliveries

Two headers ride on every signed delivery. X-Qualiphy-Timestamp is the send time in Unix seconds. X-Qualiphy-Signature is v1= followed by hex HMAC-SHA256, keyed with the destination's signing_secret (returned once when you register the URL), over the string <timestamp>.<raw request body>. The body is signed as sent: hash the raw bytes you received, never a re-serialised object.

  1. Read both headers and the raw body. Reject if either header is missing or the timestamp is not an integer.
  2. Reject if |now − timestamp| is more than 300 seconds (replay window).
  3. Compute "v1=" + hex(HMAC_SHA256(secret, timestamp + "." + rawBody)) and compare to the header with a constant-time comparison.
  4. Only then parse the JSON. Answer 401 to anything that fails; the result-document sender does not retry a 4xx, and a failed signature is not a transient condition.
Node — verify before parsing (express.json's verify hook keeps the raw bytes)
const crypto = require("crypto");const SECRET = process.env.QUALIPHY_WEBHOOK_SECRET; // from POST /webhook_destination_registerapp.use(express.json({ limit: "1mb", verify: (req, _res, buf) => { req.rawBody = buf; } })); // a Buffer: hash the bytes as received, never a decoded string function verifyQualiphySignature(req) { const ts = req.get("X-Qualiphy-Timestamp") || ""; const sig = req.get("X-Qualiphy-Signature") || ""; if (!SECRET || !req.rawBody || !/^\d+$/.test(ts) || Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false; const expected = Buffer.from("v1=" + crypto.createHmac("sha256", SECRET).update(ts + ".").update(req.rawBody).digest("hex")); const given = Buffer.from(sig); // compare BUFFER lengths: a non-ASCII header has more bytes than characters return expected.length === given.length && crypto.timingSafeEqual(expected, given);}
Python (Flask)
import hmac, hashlib, os, timeSECRET = os.environ.get("QUALIPHY_WEBHOOK_SECRET", "") def verify_qualiphy_signature(request): ts = request.headers.get("X-Qualiphy-Timestamp", "") sig = request.headers.get("X-Qualiphy-Signature", "") if not SECRET or not (ts.isascii() and ts.isdigit()) or len(ts) > 12 or abs(time.time() - int(ts)) > 300: # isdigit() alone accepts "²"; the length cap stops int()/float() raising on a huge value return False expected = "v1=" + hmac.new(SECRET.encode(), (ts + ".").encode() + request.get_data(), hashlib.sha256).hexdigest() return hmac.compare_digest(expected.encode(), sig.encode()) # bytes, so a non-ASCII header cannot raise
PHP (WordPress plugins: read php://input before anything decodes it)
$ts = $_SERVER['HTTP_X_QUALIPHY_TIMESTAMP'] ?? '';$sig = $_SERVER['HTTP_X_QUALIPHY_SIGNATURE'] ?? '';$raw = file_get_contents('php://input');$ok = defined('QUALIPHY_WEBHOOK_SECRET') && QUALIPHY_WEBHOOK_SECRET !== '' && ctype_digit($ts) && abs(time() - (int) $ts) <= 300 && hash_equals('v1=' . hash_hmac('sha256', $ts . '.' . $raw, QUALIPHY_WEBHOOK_SECRET), $sig);if (!$ok) { http_response_code(401); exit; }

Rotate a secret with rotate_secret: true on webhook_destination_register. The rotation takes effect immediately: every delivery signed after the call uses the new secret, and the new value exists only in that response, so your receiver cannot hold it beforehand. Store and deploy it right away. Deliveries signed between the rotation and your deploy fail verification, the completion sender's retries span only about 2.5 seconds and the result-document sender does not retry a 4xx, so rotate at a quiet time (a missed completion body can be pulled with patient_exam_webhook_payload). Keeping the previous secret accepted for a few minutes after the deploy still helps, for a delivery already signed with it just before the rotation:

Node — accept the current and the previous secret during a rotation
// verifyQualiphySignature from above, with the secret as a parameter instead of the SECRET constant:function verifyWithSecret(req, secret) { const ts = req.get("X-Qualiphy-Timestamp") || ""; const sig = req.get("X-Qualiphy-Signature") || ""; if (!secret || !req.rawBody || !/^\d+$/.test(ts) || Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false; const expected = Buffer.from("v1=" + crypto.createHmac("sha256", secret).update(ts + ".").update(req.rawBody).digest("hex")); const given = Buffer.from(sig); return expected.length === given.length && crypto.timingSafeEqual(expected, given);}// _SECRET = the new value from the rotate_secret response, deployed right away (it is already in force);// _SECRET_PREVIOUS = the one it replaced, for deliveries signed just before the rotation. Drop it after a few minutes.const SECRETS = [process.env.QUALIPHY_WEBHOOK_SECRET, process.env.QUALIPHY_WEBHOOK_SECRET_PREVIOUS].filter(Boolean); app.post("/qualiphy/webhook", (req, res) => { if (!SECRETS.some((secret) => verifyWithSecret(req, secret))) return res.status(401).end(); // neither secret matches // ...then the rest of your receiver, unchanged});

Building the receiver

  1. Accept POST JSON; respond 200 immediately and process asynchronously. Slow responses eat into the 10-second timeout and cause retries.
  2. Key idempotency on patient_exam_id + event.
  3. Verify the signature (above) before parsing, then verify the exam is one you created.
  4. Log the delivery without the PHI fields, or encrypt at rest.
  5. On the sandbox host, register the tunnel URL you control with /webhook_destination_register, export the returned secret as QUALIPHY_WEBHOOK_SECRET for the receiver samples, then point webhook_url at that URL; a harness decision Sandbox only produces a signed event: 1 delivery within seconds. (The samples answer 401 to an unsigned delivery, so an unregistered tunnel URL shows nothing.)

Receiver examples in Node and Python are in End-to-end examples.

3. Webhook destinations - register the URL first

A registered destination is the https:// URL configured on the clinic profile (the fallback when exam_invite carries no webhook_url) plus any URL added through the endpoints below. Registration is what issues the signing_secret the verification recipe needs, and signed deliveries go only to registered URLs. Today an unregistered webhook_url on an invite is still delivered to, unsigned; once the rollout below completes, deliveries go only to registered URLs, signed - including the later webhooks (result document, shipment) of exams created before the switch, which are then not sent until that URL is registered, rather than sent unsigned. The one exemption is Qualiphy's own Zenoti integration endpoint, which is Qualiphy-operated, holds no partner secret and is delivered unsigned by design. Same authentication as every partner endpoint: the clinic api_key in the JSON body.

EndpointBodyReturns
POST /webhook_destination_registerwebhook_url (https, public host, ≤ 500 chars; plain http only for your clinic's own profile URL); optional rotate_secret: trueNew URL: http_code 201, created: true and destination.signing_secret, shown once. Already registered: 200; the secret is included the first time it is ever handed out (an https:// clinic profile URL registered for you), otherwise only with rotate_secret. A removed URL: reactivated with a new secret, shown once (200, created: false, reactivated: true). Invalid URL: 422 invalid_webhook_url. More than 10 active URLs: 422 too_many_webhook_destinations. A concurrent registration of the same URL was undone: 409 registration_conflict, retry. Too many calls: 429 rate_limited.
POST /webhook_destination_list—The clinic's configured URL plus every active destination: id, webhook_url, is_clinic_default, signing_secret_hint (last 4 characters), created_at. Full secrets are never listed.
POST /webhook_destination_removedestination_id200; 404 destination_not_found when your clinic has no active destination with that id (already removed, mistyped, or another clinic's); 409 destination_is_clinic_default if the URL is the clinic profile's - change that in the profile first. Registering a removed URL again reactivates it with a new signing_secret, shown once (200, created: false, reactivated: true); the old secret is never revived.
register, then store the secret
POST /webhook_destination_register{ "api_key": "…", "webhook_url": "https://store2.example.com/qualiphy/webhook" }→ { "http_code": 201, "created": true, "reactivated": false, "destination": { "id": 9, "webhook_url": "https://store2.example.com/qualiphy/webhook", "is_clinic_default": false, "signing_secret_hint": "…b21c", "signing_secret": "<64 hex chars — store it now, it is not shown again>" } }

What happens to webhook_url on exam_invite

A supplied webhook_url must match a registered destination or the clinic's configured URL. The check is rolling out in two steps so existing integrations are not cut off:

  • Now: an unregistered webhook_url (or a plain http:// one) is logged and the invite is still created and delivered to it, unsigned. Register your URL to get signatures and to be ready for the next step. A URL that could never be a partner endpoint is refused already: not parseable, embedded credentials, a non-http scheme, or a private, loopback or cloud-metadata host answer http_code 422 today.
  • Next: an unregistered webhook_url is refused with HTTP status and http_code 422 (a real HTTP status, unlike the invite's other 422s), error_code webhook_url_not_registered and an error_message naming the register endpoint (an unregistered plain http:// URL that is not your profile URL gets error_code invalid_webhook_url instead: registration refuses it, so it must use https://). Your clinic's own profile URL - sent as webhook_url, or used because the invite omits it - is accepted when it is https:// (registered for you), unless its registration was removed (422 webhook_url_not_registered; register it again), or when you registered it yourself through webhook_destination_register, which is how a plain http:// profile URL stays usable. A plain http:// profile URL you have not registered refuses the invite with http_code 422, error_code invalid_webhook_url ("must use https:// or be registered first"), even when the invite sends no webhook_url at all. If the destination registry cannot be read while the invite is checked, the invite answers HTTP status and http_code 503, error_code webhook_registry_unavailable: nothing was created, retry shortly. And the senders stop delivering unsigned altogether: an exam created earlier with an unregistered URL gets no further webhooks until that URL is registered. The switch date will be announced once the mismatch log is quiet.

Omitting webhook_url sends the exam's webhooks to the clinic's configured profile URL. If the clinic has no profile URL, nothing is delivered for that exam; poll patient_exam_status instead. An https:// profile URL is registered for you (at rollout, or on its first delivery), so it is accepted and its deliveries are signed even though you never called register, unless its registration was removed (422 webhook_url_not_registered once the rollout completes; register it again) - but you only learn that secret by registering the same URL: the first webhook_destination_register call for it includes destination.signing_secret, once (200, created: false when the row already exists; 201, created: true if nothing was delivered to it yet). Later calls omit it; send rotate_secret: true to issue a new one. A plain http:// profile URL is never registered for you: its deliveries go out unsigned, and once the rollout completes they are not sent at all and an invite that would use it is refused (422 invalid_webhook_url, above). Move it to https://, or register that same http:// URL yourself to receive a secret and signed deliveries.

Changing the clinic's webhook URL in the portal deregisters the old profile URL only if it was registered for you (at rollout or on its first delivery) and you never collected its secret; a URL you registered yourself, or whose secret you collected, stays registered. Exams already created with a deregistered old URL then get unsigned deliveries now, and none once the rollout completes, unless you register the old URL yourself. Remove a URL that stays registered with webhook_destination_remove if you no longer want it. The new profile URL follows the rules above: an https:// one is registered for you, and you collect its secret by registering it. Switching back to a profile URL that was registered for you before registers it again with a new secret (the old one is not revived); collect it the same way.

4. POST /patient_exam_webhook_payload - pull the completion body

{ "api_key": "…", "patient_exam_id": 301 }→ { "http_code": 200, "event": 2, "exam_status": "approved", "prescriptions": [ … ], … }

Rebuilds the completion sender's Event 1/2 JSON from current exam data when a webhook was missed. It does not re-POST to your webhook_url, and it only answers for exams that already reached a terminal status. Same auth and ownership rules as status polling. exam_status uses the completion sender's vocabulary above, so compare case-insensitively - environments that predate ENG-101, including production today, still emit lower-case approved / rejected / na. Field reference: Exam Webhook; endpoint page: patient_exam_webhook_payload.

Errors: 401 bad key, 403 another clinic's exam, 404 unknown id, 400 the exam has not reached a terminal status yet - poll and retry, that one is not a bad id.

5. POST /patient_exam_status_set - the one status you may set

{ "api_key": "…", "patient_exam_id": 272, "status": 6 }

Only 6 (cancelled) is accepted; any other value answers 403. Clinical statuses are set by providers, never by partners.

Prefer exam_invite_cancel. Unlike cancel, this endpoint has no guard for an exam that is in an active session or already decided: it will overwrite an approved exam to cancelled. A server-side terminal guard is tracked; until it ships, call this only for exams you know are still pending, and use exam_invite_cancel everywhere else.

Sandbox decision harness

On production only a licensed provider can approve, reject or N/A an exam, and synchronous exams need a live video visit first, which makes end-to-end testing impossible for an integrator. The sandbox host exposes one extra endpoint that plays the provider's part.

Sandbox onlyAvailable on the sandbox (staging) host only. It does not exist on production and cannot be enabled there by a request.
sandbox only
POST https://staging-api.qualiphy.me/api/sandbox_exam_decision

The same path on production returns a plain HTML 404, indistinguishable from an unknown route, and cannot be enabled by a request parameter. If it ever returns that 404 on the sandbox host, tell Qualiphy support.

What it does

The decision runs through the same code path a provider's submission uses, as a dedicated sandbox provider whose licenses are seeded per state on the sandbox (52 active license rows as of 2026-09-08; a state that has not been seeded refuses the decision with the license error in the table below), so everything downstream fires exactly as in production:

  • the exam's status changes (approved / rejected / na), visible to patient_exam_status;
  • the completion webhook (event 1 or 2) is sent to the exam's webhook_url;
  • pharmacy and EMR write-back integrations configured on the clinic run as they would for a real decision;
  • the exam's provider note is stamped SANDBOX DECISION (<outcome>) via /sandbox_exam_decision, so sandbox data is always recognizable.

It does not create a visit and does not need the patient to have opened the meeting link.

Request

{ "api_key": "…", "patient_exam_id": 272, "outcome": "approved" }
FieldNotes
api_keyYour sandbox clinic key. The exam must belong to that clinic.
patient_exam_idFrom the exam_invite response.
outcomeOne of approved, rejected, na, release. No other fields are accepted; there is no free-text note (the note is fixed).
outcomeApplies toEffect
approvedany open examProvider approval. Rx exams then continue into the prescription flow as configured on the sandbox.
rejectedany open examProvider declines.
naany open examNot applicable (the production equivalent of a no-show).
releaseasynchronous exams only, in prefill_only_patient_readyRuns the real completeness check and, if every patient-facing question is answered, moves the exam into the provider queue (prefill_only_operator_ready). An incomplete set is refused with a message. A released exam can then be decided with one of the three outcomes above.

Responses

success
{ "http_code": 200, "patient_exam_id": 272, "status": "approved", "sandbox": true }{ "http_code": 200, "patient_exam_id": 301, "status": "prefill_only_operator_ready", "sandbox": true }
http_codeerror_messageWhen
400patient_exam_id is required.Missing id.
400outcome must be one of: approved, rejected, na, releaseBad outcome.
401Unauthorized access.Bad or inactive key.
403Forbidden: patient exam does not belong to this clinicAnother clinic's exam.
404Patient exam not found.Unknown id (on the sandbox host).
400outcome 'release' applies only to async (prefill-only) exams.release on a synchronous exam.
400Exam is 'pending', not 'prefill_only_patient_ready' — nothing to release.release when the exam is not waiting on the patient.
400Async exam is not operator-ready yet — use outcome 'release' first (requires complete answers).approved / rejected / na on an asynchronous exam that has not been released.
400Patient answers are incomplete — submit the remaining answers via /exam_submit_answers, then release.release on an asynchronous exam whose questionnaire still has unanswered patient-facing questions.
400Release did not land — exam is '…' (a concurrent status change won).Something else changed the exam at the same moment; read the status and retry if appropriate.
400Decision refused as unauthorized — the sandbox operator likely lacks an unexpired license for this exam's state (state N). Seed operator_licenses for it.The sandbox provider has no valid license row for the patient's state. A provisioning gap on Qualiphy's side: report it with the state.
400Patient exam has no meeting — cannot run the decision path.The exam was created without a meeting; recreate via exam_invite.
400Decision did not land — exam is '…'. See server logs.The decision path ran but the status did not change; report the exam id.
400Sandbox decision failed — see server logs.Unexpected server error inside the decision path; report the exam id.
400Sandbox is enabled but … is not configured in this environment.The sandbox provider is not configured on Qualiphy's side (the message names the missing setting). Report it.
400This exam has already been submitted and can no longer be updated.Deciding an exam that already has a terminal status. Decisions are one-shot, like a provider's.
transport 404, HTML bodyThe harness is off, or you are calling production.

A typical test loop

  1. exam_invite: note patient_exam_id and meeting_uuid.
  2. Optional: exam_questions + exam_submit_answers to pre-fill.
  3. Asynchronous exam: sandbox_exam_decision with release, which confirms your pre-fill is complete.
  4. sandbox_exam_decision with approved (or rejected / na).
  5. Your webhook receives event 1 (or 2 for Rx exams) within seconds; patient_exam_status reports the new status.
  6. Repeat with a fresh invite: an exam cannot be decided twice.

Every step is runnable code in End-to-end examples.

End-to-end examples

Runnable walkthroughs of the whole loop against the sandbox host - catalog, invite, questions, answers, decision, status - plus two webhook receivers. Set QUALIPHY_API and QUALIPHY_KEY first. To receive the webhooks, also register the receiver's public URL and export it as QUALIPHY_WEBHOOK_URL (the walkthroughs send it as webhook_url; left unset, the invite omits it and deliveries go to the clinic profile URL) and its signing_secret as QUALIPHY_WEBHOOK_SECRET (the receivers answer 401 to anything not signed with it).

environment
export QUALIPHY_API="https://staging-api.qualiphy.me/api"export QUALIPHY_KEY="…your sandbox clinic api_key…"# export QUALIPHY_WEBHOOK_URL="https://…your-tunnel…/qualiphy/webhook" # optional: uncomment and set to YOUR receiver's public URL, then register it with the next block; the walkthroughs send it as webhook_url. Leave it unset to use the clinic profile URL
register the receiver URL (once per URL, per environment), then store the secret
curl -sS -X POST "$QUALIPHY_API/webhook_destination_register" -H 'content-type: application/json' \ -d "$(jq -n --arg k "$QUALIPHY_KEY" --arg u "$QUALIPHY_WEBHOOK_URL" '{api_key:$k, webhook_url:$u}')" | jq .# copy destination.signing_secret whenever it is in the response: it is shown once (201 created: true, or 200 the first time a URL registered for you / a removed URL is registered). No secret in a 200 = already handed out; rotate_secret: true issues a new oneexport QUALIPHY_WEBHOOK_SECRET="…destination.signing_secret…"

Exam static id 106 is a global synchronous good-faith template on the sandbox host (not clinic-specific), so it normally appears in a sandbox clinic's exam_list; if it does not, swap in one that does from exam_list. Remember the envelope: HTTP is 200, the result is http_code in the body (absent on exam_list success, so the helpers treat a missing field as success). Step 4 in every sample calls the sandbox decision harness Sandbox only; on production, stop after step 3 and wait for the webhook, poll patient_exam_status, or retrieve the completion body with POST /patient_exam_webhook_payload.

The whole loop

#!/usr/bin/env bashset -euo pipefailAPI="${QUALIPHY_API:-https://staging-api.qualiphy.me/api}"; KEY="${QUALIPHY_KEY:?set QUALIPHY_KEY}"post() { curl -sS -X POST "$API/$1" -H 'content-type: application/json' -d "$2"; } # 1. catalogpost exam_list "{\"api_key\":\"$KEY\"}" | jq '.exams[] | {id, title, rx_type}' # 2. invite (telehealth clinics must send tele_state). webhook_url = your REGISTERED URL from QUALIPHY_WEBHOOK_URL; unset = the clinic profile URLSTAMP=$(date +%s)INVITE=$(post exam_invite "$(jq -n --arg k "$KEY" --arg e "jane.probe+$STAMP@example.com" --arg wh "${QUALIPHY_WEBHOOK_URL:-}" --arg ad '{"your_ref":"ORD-2231"}' \ '{api_key:$k, first_name:"Jane", last_name:"Probe", email:$e, phone_number:"4155550100", dob:"1990-06-30", gender:2, tele_state:"TX", exams:[{exam_id:106}], additional_data:$ad} + (if $wh != "" then {webhook_url:$wh} else {} end)')")echo "$INVITE" | jq .PE=$(echo "$INVITE" | jq -r '.exams[0].patient_exam_id'); MU=$(echo "$INVITE" | jq -r '.meeting_uuid') # 3. questions for the live exam, then answer every select question with its first optionQ=$(post exam_questions "$(jq -n --arg k "$KEY" --arg mu "$MU" --argjson pe "$PE" '{api_key:$k, meeting_uuid:$mu, patient_exam_id:$pe}')")echo "$Q" | jq '.questions[] | {question_id, response_type, question, options: [.responses[].response]}'# select questions: first option; an input_field 2 option ("Other...") also needs answer_textANSWERS=$(echo "$Q" | jq '[.questions[] | select(.response_type != 1 and (.responses|length) > 0) | {question_id, exam_question_response_id: .responses[0].exam_question_response_id, answer: .responses[0].response} + (if .responses[0].input_field == 2 then {answer_text: "entered by integration test"} else {} end)] + [.questions[] | select(.response_type == 1) | {question_id, answer: "n/a"}]')post exam_submit_answers "$(jq -n --arg k "$KEY" --arg mu "$MU" --argjson pe "$PE" --argjson a "$ANSWERS" '{api_key:$k, meeting_uuid:$mu, patient_exam_id:$pe, answers:$a}')" | jq . # 4. SANDBOX ONLY: decide as the sandbox provider (this route does not exist on production)post sandbox_exam_decision "$(jq -n --arg k "$KEY" --argjson pe "$PE" '{api_key:$k, patient_exam_id:$pe, outcome:"approved"}')" | jq . # 5. pollpost patient_exam_status "$(jq -n --arg k "$KEY" --argjson pe "$PE" '{api_key:$k, patient_exam_id:$pe}')" | jq .
import os, time, requests API = os.environ.get("QUALIPHY_API", "https://staging-api.qualiphy.me/api")KEY = os.environ["QUALIPHY_KEY"]WEBHOOK_URL = os.environ.get("QUALIPHY_WEBHOOK_URL") # a URL registered with webhook_destination_register; unset = the clinic profile URL class QualiphyError(Exception): pass def call(path, **body): """POST to the Qualiphy API and unwrap the envelope.""" r = requests.post(f"{API}/{path}", json={"api_key": KEY, **body}, timeout=30) is_json = r.headers.get("content-type", "").lower().startswith("application/json") if not (r.status_code in (422, 503) and is_json): # a 422/503 webhook_url refusal is a JSON body with error_code: read it below r.raise_for_status() # other transport errors (5xx, a gateway's HTML 503, or a real 404 = route absent) data = r.json() # success is http_code 200, or no http_code at all (exam_list omits it); anything else is an error if data.get("http_code", 200) != 200: raise QualiphyError(f"{path}: {data.get('http_code')} {data.get('error_code','')} {data.get('error_message')} {data.get('errors','')}") return data # 1. catalogexams = call("exam_list")["exams"]print([(e["id"], e["title"], e["rx_type"]) for e in exams]) # 2. invitestamp = int(time.time())invite = call("exam_invite", first_name="Jane", last_name="Probe", email=f"jane.probe+{stamp}@example.com", phone_number="4155550100", dob="1990-06-30", gender=2, tele_state="TX", exams=[{"exam_id": 106}], **({"webhook_url": WEBHOOK_URL} if WEBHOOK_URL else {}), additional_data='{"your_ref":"ORD-2231"}')pe, mu = invite["exams"][0]["patient_exam_id"], invite["meeting_uuid"]print("patient_exam_id", pe, "meeting", invite["meeting_url"]) # 3. questions -> answers (first option of every select question; free text for the rest)q = call("exam_questions", meeting_uuid=mu, patient_exam_id=pe)answers = []for question in q["questions"]: if question["response_type"] == 1: # free text / numeric answers.append({"question_id": question["question_id"], "answer": "n/a"}) elif question["responses"]: # single (2) or multi (3) select opt = question["responses"][0] a = {"question_id": question["question_id"], "exam_question_response_id": opt["exam_question_response_id"], "answer": opt["response"]} if opt["input_field"] == 2: # "Other..." style option carries free text a["answer_text"] = "entered by integration test" answers.append(a)call("exam_submit_answers", meeting_uuid=mu, patient_exam_id=pe, answers=answers) # 4. SANDBOX ONLY: the sandbox provider decides (this route does not exist on production)decision = call("sandbox_exam_decision", patient_exam_id=pe, outcome="approved")print(decision) # {'http_code': 200, 'patient_exam_id': ..., 'status': 'approved', 'sandbox': True} # 5. poll (in production this loop waits on a real visit or review)for _ in range(10): status = call("patient_exam_status", patient_exam_id=pe)["status"] print("status:", status) if status != "pending": break time.sleep(30)
const API = process.env.QUALIPHY_API || "https://staging-api.qualiphy.me/api";const KEY = process.env.QUALIPHY_KEY; async function call(path, body = {}) { const res = await fetch(`${API}/${path}`, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ api_key: KEY, ...body }), }); // a 422/503 webhook_url refusal is a JSON body with error_code: read it below; other non-2xx are transport errors const isJson = (res.headers.get("content-type") || "").toLowerCase().startsWith("application/json"); if (!res.ok && !((res.status === 422 || res.status === 503) && isJson)) throw new Error(`${path}: transport ${res.status}`); // a gateway's HTML 503 stays a transport error const data = await res.json(); // success is http_code 200, or no http_code at all (exam_list omits it); anything else is an error if (data.http_code !== undefined && data.http_code !== 200) throw new Error(`${path}: ${data.http_code} ${data.error_code ?? ""} ${data.error_message ?? ""} ${JSON.stringify(data.errors ?? "")}`); return data;} (async () => { const { exams } = await call("exam_list"); console.log(exams.map((e) => [e.id, e.title, e.rx_type])); const stamp = Date.now(); const invite = await call("exam_invite", { first_name: "Jane", last_name: "Probe", email: `jane.probe+${stamp}@example.com`, phone_number: "4155550100", dob: "1990-06-30", gender: 2, tele_state: "TX", exams: [{ exam_id: 106 }], ...(process.env.QUALIPHY_WEBHOOK_URL ? { webhook_url: process.env.QUALIPHY_WEBHOOK_URL } : {}), // a REGISTERED url; unset = the clinic profile URL additional_data: JSON.stringify({ your_ref: "ORD-2231" }), }); const pe = invite.exams[0].patient_exam_id, mu = invite.meeting_uuid; const q = await call("exam_questions", { meeting_uuid: mu, patient_exam_id: pe }); const answers = q.questions.flatMap((question) => { if (question.response_type === 1) return [{ question_id: question.question_id, answer: "n/a" }]; const opt = question.responses[0]; if (!opt) return []; const a = { question_id: question.question_id, exam_question_response_id: opt.exam_question_response_id, answer: opt.response }; if (opt.input_field === 2) a.answer_text = "entered by integration test"; return [a]; }); await call("exam_submit_answers", { meeting_uuid: mu, patient_exam_id: pe, answers }); // SANDBOX ONLY: this route does not exist on production console.log(await call("sandbox_exam_decision", { patient_exam_id: pe, outcome: "approved" })); console.log(await call("patient_exam_status", { patient_exam_id: pe }));})().catch((e) => { console.error(e.message); process.exit(1); });

Webhook receivers

Respond 200 fast, then process. Idempotency key: patient_exam_id + event. Both receivers branch on event: events 1 and 2 carry the decision body, event 3 (prescription shipped) carries a smaller tracking body with no exam_status. They also tolerate the two decision-body shapes described in Status & webhooks: exam_status is compared case-insensitively (Approved and the pre-ENG-101 approved both count), and the prescription list is read as prescriptions ?? prescription.

const express = require("express");const crypto = require("crypto");const app = express();app.use(express.json({ limit: "1mb", verify: (req, _res, buf) => { req.rawBody = buf; } })); // keep the raw bytes as a Buffer: the signature covers them, and a string round-trip alters non-UTF-8 bytes const SECRET = process.env.QUALIPHY_WEBHOOK_SECRET; // signing_secret from POST /webhook_destination_register (register your URL first, or every delivery is 401 below)function verifyQualiphySignature(req) { // X-Qualiphy-Signature = v1=hex(HMAC-SHA256(secret, timestamp + '.' + rawBody)) const ts = req.get("X-Qualiphy-Timestamp") || "", sig = req.get("X-Qualiphy-Signature") || ""; if (!SECRET || !req.rawBody || !/^\d+$/.test(ts) || Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false; // 5-minute replay window const expected = Buffer.from("v1=" + crypto.createHmac("sha256", SECRET).update(ts + ".").update(req.rawBody).digest("hex")); const given = Buffer.from(sig); // compare BUFFER lengths: a non-ASCII header has more bytes than characters return expected.length === given.length && crypto.timingSafeEqual(expected, given);} const seen = new Set(); // replace with your storeapp.post("/qualiphy/webhook", (req, res) => { if (!verifyQualiphySignature(req)) return res.status(401).end(); // unsigned or tampered: not from Qualiphy (register the URL to receive signed deliveries) const body = req.body || {}; const { event, patient_exam_id } = body; if (!patient_exam_id || !event) return res.status(400).end(); res.status(200).end(); // acknowledge first; Qualiphy retries anything that is not 2xx if (body.exam_url) storeExamUrl(patient_exam_id, body.exam_url); // result-document carries the reliable signed PDF link; completion may include one later if a PDF already exists — let every delivery refresh it const key = `${patient_exam_id}:${event}`; if (seen.has(key)) return; // repeat delivery (PDF regenerated): the decision is already handled seen.add(key); setImmediate(() => { // look the exam up by patient_exam_id in your records before trusting the payload if (event === 1 || event === 2) { // exam decided (2 = with a prescription list) // Two senders post this event with slightly different shapes: normalize before use. const decision = String(body.exam_status || "").toLowerCase(); // "approved" | "deferred to medical director" | "n/a" (or pre-ENG-101 "rejected"/"na") const approved = decision === "approved"; const rxList = (body.prescriptions && body.prescriptions.length ? body.prescriptions : body.prescription) || []; // plural: completion sender; singular: result-document sender const ref = safeParse(body.additional_data)?.your_ref; console.log("qualiphy exam decided", { patient_exam_id, event, approved, exam_status: body.exam_status, rx_status: body.rx_status, prescriptions: rxList.length, ref }); // never log patient_email / patient_phone_number / questions_answers in plaintext } else if (event === 3) { // prescription shipped: a different, smaller body console.log("qualiphy rx shipped", { patient_exam_id, prescription_id: body.prescription_id, tracking_number: body.tracking_number, delivery_service: body.delivery_service }); } else { console.warn("qualiphy webhook: unknown event", event); } });});function safeParse(s) { try { return JSON.parse(s); } catch { return null; } }function storeExamUrl(patientExamId, url) { /* persist against your exam record; the link is time-limited */ }app.listen(8080);
from flask import Flask, requestimport hashlib, hmac, json, os, threading, timeapp = Flask(__name__)seen = set() # replace with your storeSECRET = os.environ.get("QUALIPHY_WEBHOOK_SECRET", "") # signing_secret from POST /webhook_destination_register (register your URL first, or every delivery is 401 below) def verify_qualiphy_signature(req): # X-Qualiphy-Signature = v1=hex(HMAC-SHA256(secret, timestamp + '.' + raw_body)) ts = req.headers.get("X-Qualiphy-Timestamp", "") sig = req.headers.get("X-Qualiphy-Signature", "") if not SECRET or not (ts.isascii() and ts.isdigit()) or len(ts) > 12 or abs(time.time() - int(ts)) > 300: # 5-minute replay window; isdigit() alone accepts superscripts; the length cap stops int()/float() raising on a huge value return False expected = "v1=" + hmac.new(SECRET.encode(), (ts + ".").encode() + req.get_data(), hashlib.sha256).hexdigest() return hmac.compare_digest(expected.encode(), sig.encode()) # bytes: a non-ASCII header cannot raise @app.post("/qualiphy/webhook")def qualiphy_webhook(): if not verify_qualiphy_signature(request): # unsigned or tampered: not from Qualiphy (register the URL to receive signed deliveries) return "", 401 body = request.get_json(silent=True) or {} pe, event = body.get("patient_exam_id"), body.get("event") if not pe or not event: return "", 400 if body.get("exam_url"): store_exam_url(pe, body["exam_url"]) # result-document carries the reliable signed PDF link; completion may include one later if a PDF already exists — let every delivery refresh it key = (pe, event) if key not in seen: # repeat delivery (PDF regenerated): the decision is already handled seen.add(key) threading.Thread(target=handle, args=(body,), daemon=True).start() return "", 200 # acknowledge quickly; retries follow any non-2xx def handle(body): # verify body["patient_exam_id"] is an exam you created before acting on it event = body.get("event") if event in (1, 2): # exam decided (2 = with a prescription list) # Two senders post this event with slightly different shapes: normalize before use. decision = str(body.get("exam_status") or "").lower() # "approved" | "deferred to medical director" | "n/a" (or pre-ENG-101 "rejected"/"na") approved = decision == "approved" rx_list = body.get("prescriptions") or body.get("prescription") or [] # plural: completion sender; singular: result-document sender try: extra = json.loads(body.get("additional_data") or "{}") ref = extra.get("your_ref") if isinstance(extra, dict) else None # additional_data may be any string, incl. a bare number except (ValueError, TypeError): ref = None print("decided", body["patient_exam_id"], event, approved, body.get("exam_status"), body.get("rx_status"), len(rx_list), ref) elif event == 3: # prescription shipped: different, smaller body print("rx shipped", body["patient_exam_id"], body.get("prescription_id"), body.get("tracking_number"), body.get("delivery_service")) else: print("unknown event", event) def store_exam_url(pe, url): pass # persist against your exam record; the link is time-limited

For local testing against the sandbox host, expose the receiver with a tunnel (for example ngrok http 8080), register that public URL with /webhook_destination_register (above), and start the receiver with QUALIPHY_WEBHOOK_SECRET set to the signing_secret it returned. Then run a walkthrough with QUALIPHY_WEBHOOK_URL set to the same URL; the harness decision Sandbox only produces a signed event: 1 delivery within seconds. An unregistered URL gets unsigned deliveries (refused outright after the rollout's final step), which these receivers answer with 401. A new tunnel URL is a new destination: register it again and use its new secret.

API Reference

Quick reference for every endpoint. The most-used parameters are documented here inline. For the complete parameter schema (every optional field, every edge case), each endpoint links to its canonical reference page.

All /exam_invite samples below use Test mode by default (state and tele_state both "TE", name Test Approve), so Try now in the right rail pages no provider and contacts no patient. Test mode does not stop the charge: only exam 5359 is no-charge, which the Good Faith Exam samples use. The Rx recipes use real exams and are billed on approval. Testing has the detail.

POST/api/exam_list

Returns every exam configured on your clinic. Use this to discover the id values you'll pass to /exam_invite. Each exam record tells you whether it's a GFE or an Rx (rx_type), what attachments the patient must upload (attachments), and any preset price.

Parameters

api_keystringRequired
Your location's API key.

Response fields

clinic_idinteger
The Qualiphy clinic ID associated with the API key.
examsarray
Every exam configured on this clinic. See fields below for each item.
exams[].idinteger
Exam ID. Pass this to /exam_invite in the exams array.
exams[].titlestring
Human-readable exam name as configured in the Qualiphy portal.
exams[].rx_typeinteger
1 = non-Rx (GFE). 2 = Rx, including QualiphyRx Packages, Urgent Care, and Choose-Your-Own-Pharmacy flows. There is no separate "Urgent" type — urgent-care exams are rx_type: 2 and are distinguished only by their title.
exams[].pricestring | null
Preset price as a decimal string (e.g. "27.99") when one is configured for the exam. null for exams that don't carry a fixed Qualiphy-side price.
exams[].attachments_requiredinteger
Number of files the patient must upload before the consultation. Always at least 1.
exams[].attachmentsstring[]
Names of the additional attachments required beyond the default ID upload — e.g. ["Lab"], ["ID", "Lab"], or ["Picture of hair loss area"]. Empty array means only the standard ID is required.

Sample response

200 OK
{ "clinic_id": 1234, "exams": [ { "id": 2228, "title": "Embrace Aging GFE (Dermal Fillers, Botox, PDO, Microneedling PRP)", "rx_type": 1, "price": null, "attachments_required": 1, "attachments": [] }, { "id": 1822, "title": "Clinical Evaluation for Injectables & Lifting", "rx_type": 1, "price": "27.99", "attachments_required": 1, "attachments": [] }, { "id": 2769, "title": "3 Month Supply: Semaglutide with Medication Shipping (No Labwork Required)", "rx_type": 2, "price": null, "attachments_required": 2, "attachments": ["ID"] }, { "id": 3702, "title": "3 Month Supply: Semaglutide with Medication Shipping (With Lab-work Upload)", "rx_type": 2, "price": null, "attachments_required": 2, "attachments": ["ID", "Lab"] }, { "id": 1486, "title": "Urgent Care - Acne (Doxycycline, Clindamycin, Benzoyl Peroxide) Treatment", "rx_type": 2, "price": null, "attachments_required": 2, "attachments": ["ID"] } ]}
POST/api/exam_invite

The core endpoint. Creates a patient exam invite, returns a meeting URL, and (by default) emails and texts the patient. Most integrations only call this one endpoint.

Four possible scenarios

Qualiphy supports four distinct scenarios through the /exam_invite endpoint, each achieved by passing a specific combination of parameters. While the endpoint remains the same, the parameter sets determine the behavior, as detailed below:

Good Faith Exam & Orders
GFEs for in-clinic procedures or medication clearance only, offered at a flat fee of $27.99 (does not include a prescription). Requires exam selection and patient identity. No pharmacy fields are needed since no prescription is issued.
QualiphyRx Packages
Prescriptions fulfilled through Qualiphy's network of partner pharmacies. This is an all-inclusive option covering the initial consultation, prescription, medication, and shipping (prices vary depending on the medication chosen). After sending the exam invite and completing the consultation, Qualiphy handles prescription routing and provides tracking updates via webhook events. Pickup is not available - shipping only. Comes in two request shapes, one Rx exam per meeting or up to three. When a meeting carries more than one, only the most expensive consultation is charged in full. The others are charged at half.
Urgent Care Visit
Prescriptions sent to a retail pharmacy for urgent medications, available for pickup or delivery. Priced at $49.99, this includes both the consultation and prescription. Once the prescription is sent, the pharmacy manages fulfillment and notifications - no tracking updates are provided via webhook from Qualiphy.
Choose Your Own Pharmacy
Prescriptions sent to a retail pharmacy selected by you or the patient. Functions similarly to the Urgent Care Visit flow, but supports a broader range of non-emergency medications.

Each tab below is a complete request: its payload, and every field it accepts. Pick yours and read only that tab - QualiphyRx Packages has two, one per request shape. Your exam must be configured for the routing you ask for, so check it in /exam_list first.

POST/api/exam_invite
{ "api_key": "YOUR_API_KEY", "exams": [5359], "first_name": "Test", "last_name": "Approve", "email": "test@example.com", "dob": "1985-03-12", "phone_number": "+15555550100", "state": "TE", "tele_state": "TE", "webhook_url": "https://yourstore.com/webhooks/qualiphy", "additional_data": "{\"order_id\":\"WC-12847\"}", "redirect_approve": "https://yourstore.com/cleared", "redirect_reject": "https://yourstore.com/needs-followup"}
Required parameters
api_keystringRequired
Your location's API key.
examsarrayRequired
The exams to run, as an array of IDs from /exam_list. Use an exam whose rx_type is 1 - see Exam types. You can stack any number of non-Rx exams in one meeting. To set a per-exam option, send objects instead: [{ "exam_id": 106, "skip_intake": true }]. skip_intake: true skips Qualiphy's questionnaire for that exam. See Skipping the questionnaire. The Rx scenarios re-word this; see their tabs.
first_namelast_namestringRequired
Patient name as it should appear on the consultation record.
emailstringRequired
Patient email. Used for invite delivery and as the patient identifier.
dobstringRequired
Date of birth as YYYY-MM-DD. Example: 1990-06-30.
phone_numberstringRequired
Patient phone. Two formats accepted: +15552223232 or 1234567890.
tele_statestringRequired
Two-letter state abbreviation of the patient (not your clinic). Determines provider matching.
Common optional parameters
webhook_urlstringOptional
Where to POST the result. Highly recommended - without it, you have no way to know when the exam completes. Applies to this exam only. If your clinic also has a webhook URL saved in the portal, the value you send here wins - see Where your webhook URL comes from. Register the URL first (/webhook_destination_register) to receive signed deliveries. A value that could never be a partner endpoint - not parseable, embedded credentials, a non-http scheme, a private, loopback or cloud-metadata host - is refused now with http_code 422, error_code invalid_webhook_url (a real HTTP 422 status, unlike the validation errors below). A URL you have not registered is logged and still delivered to today. Once the rollout completes (registration enforced), an unregistered URL is refused with 422 webhook_url_not_registered (an unregistered plain http:// one that is not your profile URL with 422 invalid_webhook_url: it must use https://). Also once the rollout completes, your clinic's profile URL - sent here, or used because you omit this field - is accepted only if it is https:// or you registered it, and not if its registration was removed (422 webhook_url_not_registered; register it again); a plain http:// profile URL you have not registered then refuses the invite with 422 invalid_webhook_url (must use https:// or be registered first); and if the registry cannot be checked, the invite answers HTTP 503 webhook_registry_unavailable: nothing was created, retry shortly. Until then, the profile URL is delivered to as today. See Status & webhooks, section 3.
additional_datastringOptional
Stringified JSON. Returned unchanged in the webhook payload. Use it to round-trip your internal IDs (order ID, subscription ID, etc.). One reserved key: if the JSON has a provider key naming an EMR handled by Qualiphy's integration hub (for example zenoti), the partner webhook for that exam is suppressed and the result is delivered through that integration instead - so do not use provider for your own data.
visit_typestringOptional
"async" for an asynchronous review, "video" for a video visit. Leave it off and the invite behaves exactly as it does today. Async that the rules don't allow becomes a video visit, never an error; the response says which visit type the invite got and why. Any other value returns HTTP 200 with http_code 400 and "Invalid visit type.", and nothing is created. See Asking for an async review below this table.
provider_notestringOptional
A note for the provider, carried with the consultation. This one applies to the whole invitation and is stored on the meeting. Max 500 characters - longer returns 422 NOTE_TOO_LONG. Accepted with both shapes of exams[]; the object form adds a second, per-exam note alongside it. See the QualiphyRx Packages (Multi-Rx) tab below.
redirect_approveredirect_rejectredirect_naredirect_missedstringOptional
URLs to send the patient to after their meeting completes, segmented by outcome. redirect_missed fires after a 3-minute provider-availability timeout.
genderintegerOptional
1=Male, 2=Female, 3=Prefer not to say. Integer, not a string.
dmv_license_numberstringOptional
Patient's DMV license number for ID verification.
address_line_1address_line_2citystatezip_codestringOptional
Patient's home address. Note state here is the address field; provider matching uses tele_state. Test mode needs both set to TE.
shipping_address_line_1shipping_address_line_2shipping_cityshipping_stateshipping_zip_codestringOptional
No effect on this flow. Nothing is prescribed, so there is nothing to ship.
!
No pharmacy fields at all. The required parameters are the whole payload, plus whichever optional ones you want. Use an exam whose rx_type is 1 - see Exam types. Runnable version: GFE for an Aesthetic Treatment.
Response
200 OK
{ "http_code": 200, "meeting_url": "https://app.qualiphy.me/meeting/...", "meeting_uuid": "abc-123-def-456", "patient_exams": [ { "patient_exam_id": 4844, "exam_title": "GFE Aesthetic", "exam_id": 5359 } ]}

One entry in patient_exams per exam you sent. patient_exam_id is the handle the rest of the API takes - resend, cancel and status all key off it.

Two request shapes. Single Rx keeps the pharmacy and medication at the request level and carries one Rx exam. Multi-Rx moves those choices onto each exam entry, and is the only way to send more than one Rx exam in a meeting: up to 3, each with its own medications, its own pharmacy and its own note. Both are fully supported, neither is deprecated, and you pick one per request.

POST/api/exam_invite
{ "api_key": "YOUR_API_KEY", "exams": [1292], "first_name": "Test", "last_name": "Prescription Approve", "email": "test@example.com", "dob": "1982-09-04", "phone_number": "+15555550100", "state": "TE", "tele_state": "TE", "pharmacy_id": 16, "order_set_id": 610, "webhook_url": "https://yourapp.com/webhooks/qualiphy", "additional_data": "{\"subscription_id\":\"SUB-9912\"}"}
{ "api_key": "YOUR_API_KEY", "exams": [ { "exam_id": 73, "order_set_ids": [12, 15], "provider_note": "Start at 2.5mg." }, { "exam_id": 88, "order_set_ids": [31] } ], "first_name": "Test", "last_name": "Prescription Approve", "email": "test@example.com", "dob": "1990-06-30", "phone_number": "+15555550100", "state": "TE", "tele_state": "TE", "provider_note": "Follow-up from last visit."}

Runnable version of the Single Rx payload: Partner Pharmacy Medication Shipping. In the Multi-Rx payload 73 and 88 are placeholders - substitute two Rx exams from your own /exam_list, and note that Test mode does not make an exam free: only exam 5359 is no-charge.

Required parameters
api_keystringRequired
Your location's API key.
examsarrayRequired
The exams to run in this meeting. Two shapes are accepted and they cannot be mixed - an array holding both returns 422 MIXED_EXAMS_FORM.
Single RxAn array of exam IDs from /exam_list. Stack non-Rx exams freely; this shape carries one Rx exam, whose pharmacy and medication are the request-level fields below.
Multi-RxAn array of objects. Each entry takes the fields below, including skip_intake, which any partner can set. A partner pharmacy also uses this shape for up to 3 Rx exams, each with its own order sets and its own note. exam_id is the same static ID the other shape takes.
Fields
exam_idintegerRequired
The exam's static ID, exactly the value the array-of-IDs form takes.
order_set_idsarrayOptional
Up to 3 order set IDs for this exam, from /partner_pharmacy_treatment_packages. Rx exams only - supplying them on a non-Rx exam returns 422 ORDER_SETS_ON_NON_RX. Omit to leave the choice to the provider.
provider_notestringOptional
A note stored against this exam, max 500 characters. Separate from the invite-level provider_note: they are different fields on different records, neither overrides the other, and both may be sent in the same request. API only - the Qualiphy portal has no field for it.
skip_intakebooleanOptional
true when you already collected the patient's intake and do not want them offered Qualiphy's pre-fill questionnaire for this exam: after consent they go straight to the waiting room. Default false. It must be a real boolean: "true" or 1 returns 422 INVALID_SKIP_INTAKE and nothing is created, including on an asynchronous exam. That response is HTTP 200 with http_code 422 and an errors[] entry carrying this exam's index and exam_id. Object form only (the list-of-IDs shape cannot set it, and a skip_intake key at the top of the request is ignored), set per exam. A boolean true has no effect on an asynchronous exam, where the questionnaire is the exam. Answers you submitted with exam_submit_answers still reach the provider; see Questions & answers.
first_namelast_namestringRequired
Patient name as it should appear on the consultation record.
emailstringRequired
Patient email. Used for invite delivery and as the patient identifier.
dobstringRequired
Date of birth as YYYY-MM-DD. Example: 1990-06-30.
phone_numberstringRequired
Patient phone. Two formats accepted: +15552223232 or 1234567890.
tele_statestringRequired
Two-letter state abbreviation of the patient (not your clinic). Determines provider matching.
Common optional parameters
webhook_urlstringOptional
Where to POST the result. Highly recommended - without it, you have no way to know when the exam completes. Applies to this exam only. If your clinic also has a webhook URL saved in the portal, the value you send here wins - see Where your webhook URL comes from. Register the URL first (/webhook_destination_register) to receive signed deliveries. A value that could never be a partner endpoint - not parseable, embedded credentials, a non-http scheme, a private, loopback or cloud-metadata host - is refused now with http_code 422, error_code invalid_webhook_url (a real HTTP 422 status, unlike the validation errors below). A URL you have not registered is logged and still delivered to today. Once the rollout completes (registration enforced), an unregistered URL is refused with 422 webhook_url_not_registered (an unregistered plain http:// one that is not your profile URL with 422 invalid_webhook_url: it must use https://). Also once the rollout completes, your clinic's profile URL - sent here, or used because you omit this field - is accepted only if it is https:// or you registered it, and not if its registration was removed (422 webhook_url_not_registered; register it again); a plain http:// profile URL you have not registered then refuses the invite with 422 invalid_webhook_url (must use https:// or be registered first); and if the registry cannot be checked, the invite answers HTTP 503 webhook_registry_unavailable: nothing was created, retry shortly. Until then, the profile URL is delivered to as today. See Status & webhooks, section 3.
additional_datastringOptional
Stringified JSON. Returned unchanged in the webhook payload. Use it to round-trip your internal IDs (order ID, subscription ID, etc.). One reserved key: if the JSON has a provider key naming an EMR handled by Qualiphy's integration hub (for example zenoti), the partner webhook for that exam is suppressed and the result is delivered through that integration instead - so do not use provider for your own data.
visit_typestringOptional
"async" for an asynchronous review, "video" for a video visit. Leave it off and the invite behaves exactly as it does today. Async that the rules don't allow becomes a video visit, never an error; the response says which visit type the invite got and why. Any other value returns HTTP 200 with http_code 400 and "Invalid visit type.", and nothing is created. See Asking for an async review below this table.
provider_notestringOptional
A note for the provider, carried with the consultation. This one applies to the whole invitation and is stored on the meeting. Max 500 characters - longer returns 422 NOTE_TOO_LONG. Accepted with both shapes of exams[]; the object form adds a second, per-exam note alongside it. See the QualiphyRx Packages (Multi-Rx) tab below.
redirect_approveredirect_rejectredirect_naredirect_missedstringOptional
URLs to send the patient to after their meeting completes, segmented by outcome. redirect_missed fires after a 3-minute provider-availability timeout.
genderintegerOptional
1=Male, 2=Female, 3=Prefer not to say. Integer, not a string.
dmv_license_numberstringOptional
Patient's DMV license number for ID verification.
address_line_1address_line_2citystatezip_codestringOptional
Patient's home address. Note state here is the address field; provider matching uses tele_state. Test mode needs both set to TE.
shipping_address_line_1shipping_address_line_2shipping_cityshipping_stateshipping_zip_codestringOptional
Where to ship Rx treatments. Different from home address when shipping to clinic, P.O. box, or alternate location.
Pharmacy routing

These five sit at the request level. Single Rx sends them; Multi-Rx must not, because the server derives the same information from the order sets on each entry.

pharmacy_idintegerOptional
The partner pharmacy to route to. Get the ID from /partner_pharmacy_list.
Single RxSend it at the request level. It applies to the Rx exam in the invite.
Multi-RxMust not be sent. The server derives it from the order sets on each entry, and sending it returns 422 MIXED_REQUEST_SHAPE.
order_set_idintegerOptional
Preselect a specific drug + dosage package. Get the ID from /partner_pharmacy_treatment_packages.
Single RxSend it at the request level, or omit it to leave the medication to the provider.
Multi-RxMust not be sent. The server derives it from the order sets on each entry, and sending it returns 422 MIXED_REQUEST_SHAPE.
order_set_idsarrayOptional
Several treatment packages at once, as an array of order set IDs. Max 3 - more returns 422 MED_LIMIT_EXCEEDED.
Single RxAt the request level, applying to the Rx exam in the invite.
Multi-RxMust not be sent at the top level. It goes inside each exams[] entry instead, as shown under exams above. A top-level array returns 422 MIXED_REQUEST_SHAPE.
exam_pos_idintegerOptional
Legacy fallback for order_set_id, still accepted for older integrations. It identifies an exam/pharmacy/order-set pairing rather than the order set itself, so its value differs from order_set_id on the same package - do not pass one where the other is expected. Prefer order_set_id for new work.
Single RxAccepted at the request level.
Multi-RxMust not be sent. The server derives it from the order sets on each entry, and sending it returns 422 MIXED_REQUEST_SHAPE.
provider_pos_selectionintegerOptional
How much is left to the provider. 1=Provider does not choose. 2=Provider picks order set only. 3=Provider picks both pharmacy and order set.
Single RxSet it yourself, or let the server default it from the fields you sent.
Multi-RxMust not be sent. The server sets it per entry: 3 when an entry has no order sets, 1 when it has them. Sending it returns 422 MIXED_REQUEST_SHAPE.
!
Empty values do not count as sent. "", 0, "0", null and an absent key are all treated as absent, as is an empty order_set_ids array. This is deliberate: saved requests and partner templates routinely carry these keys with empty defaults, and those payloads keep working. Only a real value trips the rule.
!
Custom-pharmacy fields do not belong on this flow, and the two shapes refuse them differently. With Single Rx, an exam offering only partner pharmacies rejects custom_pharmacy: 2 with 401 "Only partner pharmacies available for this exam!". With Multi-Rx they are neither rejected nor honoured: the server's custom-pharmacy path - the availability check, the required-field validation, and the record that stores your retail destination - runs only for a list of IDs, so custom_pharmacy, ncpdpid and the pharmacy_* fields pass without an error and the retail pharmacy is never recorded. For a retail destination use Urgent Care Visit or Choose Your Own Pharmacy instead.
What the server derives

What each entry resolves to:

Non-Rx exam
No pharmacy, and nothing for the provider to choose. Supplying order_set_ids here is an error.
Rx exam, no order_set_ids
No pharmacy is set and provider_pos_selection becomes 3 - the provider picks both the pharmacy and the order set during the consultation.
Rx exam with order_set_ids
The pharmacy is resolved from those order sets, and provider_pos_selection becomes 1 - nothing left for the provider to choose.

To resolve the pharmacy the server looks up which pharmacies carry each order set for that exam, in the patient's state, then intersects those lists across the entry. Exactly one pharmacy has to survive.

!
All order sets on one exam entry must come from the same pharmacy. Different exams in the same invitation may use different pharmacies - that is what the object form is for - but within a single entry the intersection has to land on exactly one. An order set not carried for that exam and state returns 422 MED_NOT_IN_PACKAGE and names the order set; order sets split across pharmacies return 422 MED_PHARMACY_MISMATCH; an entry resolving to none, or to more than one, returns 422 PHARMACY_UNRESOLVED.
Limits
3 Rx exams per invitation
Counted over Rx exams only - non-Rx exams are unlimited. A fourth returns 422 PACKAGE_LIMIT_EXCEEDED, with one error naming each extra entry. This is the object form's limit: a plain list of IDs carries at most one Rx exam, because its single top-level pharmacy and order-set selection applies to the whole request.
3 order sets per exam
Per entry in the object form, or across the top-level order_set_ids with a list of IDs. Over that returns 422 MED_LIMIT_EXCEEDED.
500 characters per provider_note
The invite-level note and each exam-level note are checked separately, and each returns its own 422 NOTE_TOO_LONG.
Response
200 OK
{ "http_code": 200, "meeting_url": "https://app.qualiphy.me/meeting/...", "meeting_uuid": "abc-123-def-456", "patient_exams": [ { "patient_exam_id": 4844, "exam_title": "GLP-1 Weight Loss", "exam_id": 1292 } ]}
{ "http_code": 200, "meeting_url": "https://app.qualiphy.me/meeting/...", "meeting_uuid": "abc-123-def-456", "exams": [ { "index": 0, "exam_id": 73, "patient_exam_id": 4844, "rx_type": 2, "pharmacy_id": 4501, "order_set_ids": [12, 15] }, { "index": 1, "exam_id": 88, "patient_exam_id": 4845, "rx_type": 2, "pharmacy_id": 4501, "order_set_ids": [31] } ]}

The two shapes answer with different keys - patient_exams for Single Rx, exams for Multi-Rx. Existing integrations are unaffected, but anything migrating to multi-Rx has to read the new key. In the Multi-Rx body, index is the entry's position in the exams[] you sent, rx_type is 1 for non-Rx and 2 for Rx, and pharmacy_id is null whenever none was resolved. That shape does not carry exam_title.

POST/api/exam_invite
{ "api_key": "YOUR_API_KEY", "exams": [3104], "first_name": "Test", "last_name": "Prescription Approve", "email": "test@example.com", "dob": "1991-02-18", "phone_number": "+15555550100", "state": "TE", "tele_state": "TE", "custom_pharmacy": 2, "ncpdpid": "1234567", "pharmacy_name": "CVS Pharmacy #5821", "pharmacy_address_line_1": "1500 Main St", "pharmacy_city": "Austin", "pharmacy_state": "TX", "pharmacy_zip_code": "78701", "pharmacy_phone": "+15125550000", "webhook_url": "https://yourapp.com/webhooks/qualiphy"}
Required parameters
api_keystringRequired
Your location's API key.
examsarrayRequired
The exams to run, as an array of IDs from /exam_list. Stack non-Rx exams freely; this flow carries one Rx exam per meeting. To set skip_intake, send the object form (see Skipping the questionnaire). The custom-pharmacy fields on this tab can stay with that form. Only a real top-level pharmacy_id, order_set_id, order_set_ids, exam_pos_id, or provider_pos_selection returns 422 MIXED_REQUEST_SHAPE.
first_namelast_namestringRequired
Patient name as it should appear on the consultation record.
emailstringRequired
Patient email. Used for invite delivery and as the patient identifier.
dobstringRequired
Date of birth as YYYY-MM-DD. Example: 1990-06-30.
phone_numberstringRequired
Patient phone. Two formats accepted: +15552223232 or 1234567890.
tele_statestringRequired
Two-letter state abbreviation of the patient (not your clinic). Determines provider matching.
Common optional parameters
webhook_urlstringOptional
Where to POST the result. Highly recommended - without it, you have no way to know when the exam completes. Applies to this exam only. If your clinic also has a webhook URL saved in the portal, the value you send here wins - see Where your webhook URL comes from. Register the URL first (/webhook_destination_register) to receive signed deliveries. A value that could never be a partner endpoint - not parseable, embedded credentials, a non-http scheme, a private, loopback or cloud-metadata host - is refused now with http_code 422, error_code invalid_webhook_url (a real HTTP 422 status, unlike the validation errors below). A URL you have not registered is logged and still delivered to today. Once the rollout completes (registration enforced), an unregistered URL is refused with 422 webhook_url_not_registered (an unregistered plain http:// one that is not your profile URL with 422 invalid_webhook_url: it must use https://). Also once the rollout completes, your clinic's profile URL - sent here, or used because you omit this field - is accepted only if it is https:// or you registered it, and not if its registration was removed (422 webhook_url_not_registered; register it again); a plain http:// profile URL you have not registered then refuses the invite with 422 invalid_webhook_url (must use https:// or be registered first); and if the registry cannot be checked, the invite answers HTTP 503 webhook_registry_unavailable: nothing was created, retry shortly. Until then, the profile URL is delivered to as today. See Status & webhooks, section 3.
additional_datastringOptional
Stringified JSON. Returned unchanged in the webhook payload. Use it to round-trip your internal IDs (order ID, subscription ID, etc.). One reserved key: if the JSON has a provider key naming an EMR handled by Qualiphy's integration hub (for example zenoti), the partner webhook for that exam is suppressed and the result is delivered through that integration instead - so do not use provider for your own data.
visit_typestringOptional
"async" for an asynchronous review, "video" for a video visit. Leave it off and the invite behaves exactly as it does today. Async that the rules don't allow becomes a video visit, never an error; the response says which visit type the invite got and why. Any other value returns HTTP 200 with http_code 400 and "Invalid visit type.", and nothing is created. See Asking for an async review below this table.
provider_notestringOptional
A note for the provider, carried with the consultation. This one applies to the whole invitation and is stored on the meeting. Max 500 characters - longer returns 422 NOTE_TOO_LONG. Accepted with both shapes of exams[]; the object form adds a second, per-exam note alongside it. See the QualiphyRx Packages (Multi-Rx) tab below.
redirect_approveredirect_rejectredirect_naredirect_missedstringOptional
URLs to send the patient to after their meeting completes, segmented by outcome. redirect_missed fires after a 3-minute provider-availability timeout.
genderintegerOptional
1=Male, 2=Female, 3=Prefer not to say. Integer, not a string.
dmv_license_numberstringOptional
Patient's DMV license number for ID verification.
address_line_1address_line_2citystatezip_codestringOptional
Patient's home address. Note state here is the address field; provider matching uses tele_state. Test mode needs both set to TE.
shipping_address_line_1shipping_address_line_2shipping_cityshipping_stateshipping_zip_codestringOptional
Where the pharmacy delivers, when custom_pharmacy_delivery_method is 2. Not used for in-pharmacy pickup.
Pharmacy routing
!
Watch the custom_pharmacy mapping. 2 means custom (retail) pharmacy and 1 means partner pharmacy. It carries the platform's internal 1=false / 2=true convention rather than reading as an ordered list, which makes it easy to invert. The flag must also match how your exam is configured: an exam offering only custom pharmacies rejects 1 with 401 "Only custom pharmacies available for this exam!", and an exam offering only partner pharmacies rejects 2 with 401 "Only partner pharmacies available for this exam!". Where only one kind is available the server selects it for you, so the flag decides nothing unless the exam offers both.
custom_pharmacyintegerOptional
2=Custom Pharmacy (retail), 1=Partner Pharmacy. Inverted from how it reads - see the note above.
ncpdpidstringOptional
The retail pharmacy's NCPDPID. Get it from /custom_pharmacy_search. Saved on the exam record as the e-Rx (SureScripts) destination. It's a pass-through - no registration or allowlisting of the pharmacy is needed on Qualiphy's side.
pharmacy_namepharmacy_address_line_1pharmacy_address_line_2pharmacy_citypharmacy_statepharmacy_zip_codepharmacy_phonepharmacy_typestringOptional
The retail pharmacy's details, sent alongside custom_pharmacy: 2.
custom_pharmacy_delivery_methodintegerOptional
1=Patient picks up in pharmacy. 2=Ship to patient or clinic.
custom_pharmacy_patient_billingintegerOptional
1=Clinic is billed by the pharmacy. 2=Patient is billed.
custom_pharmacy_clinic_billingstringOptional
Clinic identifier for pharmacy billing. Required when custom_pharmacy_patient_billing: 1.

By default the patient still gets a pharmacy step in the meeting, and their pick overrides the destination you sent. To preselect it and remove that step, add custom_pharmacy_patient_choice: 1 and skip_pharmacy_confirmation: 2 - both documented on the Choose Your Own Pharmacy tab. Runnable version: Urgent Care Visit & Custom Pharmacies.

Response
200 OK
{ "http_code": 200, "meeting_url": "https://app.qualiphy.me/meeting/...", "meeting_uuid": "abc-123-def-456", "patient_exams": [ { "patient_exam_id": 4844, "exam_title": "Urgent Care Visit", "exam_id": 3104 } ]}

One entry in patient_exams per exam you sent. patient_exam_id is the handle the rest of the API takes - resend, cancel and status all key off it.

POST/api/exam_invite
{ "api_key": "YOUR_API_KEY", "exams": [3104], "first_name": "Test", "last_name": "Prescription Approve", "email": "test@example.com", "dob": "1991-02-18", "phone_number": "+15555550100", "state": "TE", "tele_state": "TE", "pharmacy_id": 12, "order_set_id": 1500, "ncpdpid": "1234567", "pharmacy_name": "Your Fulfillment Pharmacy", "pharmacy_address_line_1": "1500 Main St", "pharmacy_city": "Austin", "pharmacy_state": "TX", "pharmacy_zip_code": "78701", "custom_pharmacy_patient_choice": 1, "skip_pharmacy_confirmation": 2, "webhook_url": "https://yourapp.com/webhooks/qualiphy"}
Required parameters
api_keystringRequired
Your location's API key.
examsarrayRequired
The exams to run, as an array of IDs from /exam_list. Stack non-Rx exams freely; this flow carries one Rx exam per meeting. To set skip_intake, send the object form (see Skipping the questionnaire). pharmacy_id and order_set_id must not stay at the top level: put the order set on the entry as order_set_ids: [id] and drop pharmacy_id, because the server derives the pharmacy. Sending either at the top level returns 422 MIXED_REQUEST_SHAPE and nothing is created. The ncpdpid, pharmacy address, custom_pharmacy_patient_choice, and skip_pharmacy_confirmation on this tab can stay.
first_namelast_namestringRequired
Patient name as it should appear on the consultation record.
emailstringRequired
Patient email. Used for invite delivery and as the patient identifier.
dobstringRequired
Date of birth as YYYY-MM-DD. Example: 1990-06-30.
phone_numberstringRequired
Patient phone. Two formats accepted: +15552223232 or 1234567890.
tele_statestringRequired
Two-letter state abbreviation of the patient (not your clinic). Determines provider matching.
Common optional parameters
webhook_urlstringOptional
Where to POST the result. Highly recommended - without it, you have no way to know when the exam completes. Applies to this exam only. If your clinic also has a webhook URL saved in the portal, the value you send here wins - see Where your webhook URL comes from. Register the URL first (/webhook_destination_register) to receive signed deliveries. A value that could never be a partner endpoint - not parseable, embedded credentials, a non-http scheme, a private, loopback or cloud-metadata host - is refused now with http_code 422, error_code invalid_webhook_url (a real HTTP 422 status, unlike the validation errors below). A URL you have not registered is logged and still delivered to today. Once the rollout completes (registration enforced), an unregistered URL is refused with 422 webhook_url_not_registered (an unregistered plain http:// one that is not your profile URL with 422 invalid_webhook_url: it must use https://). Also once the rollout completes, your clinic's profile URL - sent here, or used because you omit this field - is accepted only if it is https:// or you registered it, and not if its registration was removed (422 webhook_url_not_registered; register it again); a plain http:// profile URL you have not registered then refuses the invite with 422 invalid_webhook_url (must use https:// or be registered first); and if the registry cannot be checked, the invite answers HTTP 503 webhook_registry_unavailable: nothing was created, retry shortly. Until then, the profile URL is delivered to as today. See Status & webhooks, section 3.
additional_datastringOptional
Stringified JSON. Returned unchanged in the webhook payload. Use it to round-trip your internal IDs (order ID, subscription ID, etc.). One reserved key: if the JSON has a provider key naming an EMR handled by Qualiphy's integration hub (for example zenoti), the partner webhook for that exam is suppressed and the result is delivered through that integration instead - so do not use provider for your own data.
visit_typestringOptional
"async" for an asynchronous review, "video" for a video visit. Leave it off and the invite behaves exactly as it does today. Async that the rules don't allow becomes a video visit, never an error; the response says which visit type the invite got and why. Any other value returns HTTP 200 with http_code 400 and "Invalid visit type.", and nothing is created. See Asking for an async review below this table.
provider_notestringOptional
A note for the provider, carried with the consultation. This one applies to the whole invitation and is stored on the meeting. Max 500 characters - longer returns 422 NOTE_TOO_LONG. Accepted with both shapes of exams[]; the object form adds a second, per-exam note alongside it. See the QualiphyRx Packages (Multi-Rx) tab below.
redirect_approveredirect_rejectredirect_naredirect_missedstringOptional
URLs to send the patient to after their meeting completes, segmented by outcome. redirect_missed fires after a 3-minute provider-availability timeout.
genderintegerOptional
1=Male, 2=Female, 3=Prefer not to say. Integer, not a string.
dmv_license_numberstringOptional
Patient's DMV license number for ID verification.
address_line_1address_line_2citystatezip_codestringOptional
Patient's home address. Note state here is the address field; provider matching uses tele_state. Test mode needs both set to TE.
shipping_address_line_1shipping_address_line_2shipping_cityshipping_stateshipping_zip_codestringOptional
Where the pharmacy delivers, when custom_pharmacy_delivery_method is 2. Not used for in-pharmacy pickup.
Pharmacy routing
!
This shape carries no custom_pharmacy flag. You supply the destination outright and turn off the patient's pharmacy step, so there is nothing for the flag to decide. Where the exam also uses partner order sets, ncpdpid rides alongside pharmacy_id + order_set_id - see the QualiphyRx Packages (Single Rx) tab for those two.
ncpdpidstringOptional
The pharmacy you are routing to, from /custom_pharmacy_search. This is the destination the prescription is sent to.
pharmacy_namepharmacy_address_line_1pharmacy_address_line_2pharmacy_citypharmacy_statepharmacy_zip_codepharmacy_phonepharmacy_typestringOptional
The pharmacy's details. The full address must be present for skip_pharmacy_confirmation to take effect.
custom_pharmacy_patient_choiceintegerOptional
1=Custom pharmacy is preselected. 2=Patient chooses their own custom pharmacy at the meeting. If omitted, this defaults to 2 even when you supplied an ncpdpid - the patient still gets a pharmacy step in the meeting, and their pick overrides your preset destination. For fully automatic routing with no patient step, always send 1 (requires ncpdpid).
skip_pharmacy_confirmationintegerOptional
1=Show pharmacy confirmation screen. 2=Skip it. Only skips when all pharmacy fields are present in the payload.
pharmacy_idorder_set_idintegerOptional
Where the exam is also configured with partner order sets these ride alongside the retail destination, which is why the payload above carries them. Get them from /partner_pharmacy_list and /partner_pharmacy_treatment_packages. Omit both on an exam that only routes to retail.
custom_pharmacy_delivery_methodintegerOptional
1=Patient picks up in pharmacy. 2=Ship to patient or clinic. This is the field the shipping address above depends on.
custom_pharmacy_patient_billingintegerOptional
1=Clinic is billed by the pharmacy. 2=Patient is billed.
custom_pharmacy_clinic_billingstringOptional
Clinic identifier for pharmacy billing. Required when custom_pharmacy_patient_billing: 1.

Runnable version: the preselect variant in Urgent Care Visit & Custom Pharmacies.

Response
200 OK
{ "http_code": 200, "meeting_url": "https://app.qualiphy.me/meeting/...", "meeting_uuid": "abc-123-def-456", "patient_exams": [ { "patient_exam_id": 4844, "exam_title": "Urgent Care Visit", "exam_id": 3104 } ]}

One entry in patient_exams per exam you sent. patient_exam_id is the handle the rest of the API takes - resend, cancel and status all key off it.

These are the same payloads the Recipes walk through, declared once and read in both places. Try now in the right rail always fires the basic invite sample, not the tab you are reading - to run one of these as-is, open its recipe and use the payload there.

Asking for an async review (visit_type)

One exam can run as an asynchronous review (the patient answers the questionnaire and a provider reviews it, with no live visit) or as a video visit. Send the exam you already use, with a top-level visit_type. You no longer need a separate "ASYNC" copy of the exam.

POST/api/exam_invite
{ "api_key": "YOUR_API_KEY", "exams": [5359], "visit_type": "async", "first_name": "Test", "last_name": "Approve", "email": "test@example.com", "dob": "1985-03-12", "phone_number": "+15555550100", "state": "TE", "tele_state": "TE"}
  • No visit_type, or null: exactly today's invite. The response carries none of the fields below.
  • "async": an async review where the rules allow it: your clinic's async rollout, the exam's own rules, and the patient's state (tele_state, or the clinic's state when you don't send one).
  • Where the rules don't allow async, the invite is still created, as a video visit. It is never refused for this. The response gives the visit type the invite got and why, so you can tell the patient what to expect.
  • "video": a video visit, even where async would be allowed.
  • You set the visit type; the patient can't switch it.
  • One visit type per invite. If one exam on the invite has to be a video visit, the other exams are video visits too, and their reason_code is other_exam_video. Your existing "ASYNC" exams are the exception: they stay async (next point).
  • Price: an async review is charged at the exam's own price, less any async discount Qualiphy has set up for your account on that exam. A video visit is the exam's usual price. The discount is fixed when the invite is sent.
  • Your existing "ASYNC" exams keep working and run as async whatever visit_type says (reason_code not_in_conversion).
  • Any other value ("live", "ASYNC", 2, true) returns HTTP 200 with { "http_code": 400, "error_message": "Invalid visit type." }, and nothing is created.

The sample uses Test mode and the no-charge exam 5359, so it is safe to send as-is. TE isn't a state Compliance sets, so a test invite that asks for async is always a video visit: not_reviewed, unless your clinic's switch (clinic_not_enabled), the exam's own rule or a clinical rule (first_visit_video) answers first. To see an async review, send a real patient state where the rules allow it.

200 OK - async asked for in Test mode, so a video visit
{ "http_code": 200, "meeting_url": "https://app.qualiphy.me/meeting/...", "meeting_uuid": "abc-123-def-456", "visit": { "requested": "async", "visit_type": "video", "reason_code": "not_reviewed", "reason": "The patient's state isn't one Compliance sets, so it stays video." }, "patient_exams": [ { "patient_exam_id": 4844, "exam_title": "GFE Aesthetic", "exam_id": 5359, "visit_type": "video", "reason_code": "not_reviewed" } ]}

visit describes the invite as a whole. Each entry in patient_exams (or exams, for the object form) also carries its own visit_type and reason_code. Both are returned only when you sent visit_type. Keep them from this response: patient_exam_status and the webhooks don't carry them yet.

visit.requestedstring
The visit_type you sent.
visit.visit_typestring
"async" or "video": what the invite got.
visit.reason_codestring
Why, as a stable code (table below). Branch on this, not on reason.
visit.reasonstring
The same reason in words, for your logs or your staff. Its wording can change.
api_pick
You asked for this visit type and the rules allow it.
clinic_not_enabled
Async review isn't switched on for your clinic yet, so the invite is a video visit.
exam_not_ready
This exam isn't approved for async review yet.
exam_video
This exam only runs as a video visit.
controlled_substance
This exam prescribes a controlled substance, so it runs as a video visit.
urgent_care
Urgent care exams run as video visits.
first_visit_video
A clinical rule for this exam requires the patient's first visit to be a video visit, and this patient has none yet. It applies in every state.
exam_video_here
This exam is video only in the patient's state.
video_only
The patient's state allows only video visits.
not_reviewed
The patient's state hasn't been reviewed for async yet (also the answer for a missing state or TE).
no_video_visit
The patient's state allows async only after a video visit for the same treatment, and this patient has none at your clinic.
treatment_period_over
The patient's state allows async only during the treatment period of a video visit, and it has ended.
video_visit_too_long_ago
The patient's state allows async only within a set time of a video visit, and the last one was longer ago.
other_exam_video
Another exam on the same invite has to be a video visit, so this one is too.
native_video
Another exam on the invite always runs as a video visit, so the invite is video.
not_in_conversion
This exam always runs as it does today (for example an existing "ASYNC" exam); visit_type doesn't change it.
rules_unavailable
The rules couldn't be checked, so the invite is a video visit. The invite still went out; send the next one as usual.

422 validation errors

These arrive with HTTP status 200; the 422 is in http_code. Validation runs before anything is written, so a 422 means nothing was created - no meeting, no exams - and the request is safe to correct and retry. Where several entries are at fault, all of them come back in one response rather than one per round trip. A problem with the shape of the request itself - a mixed array, or legacy fields sent with the object form - returns on its own, before the entries are examined.

HTTP 200, http_code 422
{ "http_code": 422, "error_message": "Invitation not created.", "errors": [ { "index": 0, "exam_id": 73, "code": "DUPLICATE_EXAM", "detail": "The same exam appears more than once in this invite." } ]}

index and exam_id point at the entry at fault and are both null for problems with the invitation as a whole - which is how you tell an over-long invite note from an over-long exam note. MED_NOT_IN_PACKAGE carries an extra order_set_id naming the order set that failed.

Most of these codes are specific to the object form of exams[]. That form is available to any partner; the order-set codes are the partner-pharmacy ones. The three that reach a request sending a list of IDs - in any scenario - are marked below.

MIXED_EXAMS_FORM
Either shape. exams[] must be all ids or all objects, not a mix.
MIXED_REQUEST_SHAPE
Object-form exams[] cannot be combined with top-level Rx scalars; remove: … The detail ends with the offending field names, so you do not have to work out which one tripped it.
PACKAGE_NOT_AVAILABLE
Exam is not available to this clinic or state. The exam is no longer assigned to your clinic for the patient's state - despite still being published. A request sending a list of IDs fails the same check earlier and more bluntly, with 401 "Unauthorized Exam Access!" for the whole request rather than a per-exam error.
DUPLICATE_EXAM
The same exam appears more than once in this invite.
DUPLICATE_MED
The same order set is listed more than once for this exam.
PACKAGE_LIMIT_EXCEEDED
At most 3 Rx exams are allowed per invite. One error per entry beyond the third.
MED_LIMIT_EXCEEDED
Either shape. At most 3 order sets are allowed per exam. With a list of IDs this is the top-level order_set_ids, and the error carries index: null.
NOTE_TOO_LONG
Either shape. provider_note exceeds 500 characters. Raised for the invite-level note on both shapes, and separately for each exam-level note in the object form.
INVALID_SKIP_INTAKE
skip_intake must be a boolean. Object form only. The entry sent skip_intake as something other than true or false (for example "true" or 1). It is refused rather than read as false, so a patient is never sent the questionnaire you meant to skip, and a non-boolean is still refused on an asynchronous exam where a real boolean is otherwise ignored. Nothing is created. The entry is in errors[] with this exam's index and exam_id.
ORDER_SETS_ON_NON_RX
Order sets can only be supplied for Rx (rx_type = 2) exams.
MED_NOT_IN_PACKAGE
Order set 15 is not available for exam 73 in this state. Names the order set in the message and again in an order_set_id field on the error.
MED_PHARMACY_MISMATCH
Order sets in this exam are supplied by different pharmacies… The detail lists the candidate pharmacy IDs for each order set, so you can see where they diverge. Split the entry across two exams, or pick order sets from one pharmacy.
PHARMACY_UNRESOLVED
Two cases, with different messages. A single order set resolving to no pharmacy at all: The selected order set does not resolve to a pharmacy. Or several that resolve to more than one, leaving nothing to choose between them: The selected order sets resolve to multiple pharmacies (…); cannot pick one.
NO_EXAMS
No exams provided. Shared with the Qualiphy portal's own invite path. /exam_invite rejects an empty or missing exams[] earlier, with 401 "Exams is invalid!", so this code does not reach partner callers today.

Webhook URL errors

Checks on webhook_url (ENG-1823) answer in a flat shape - { http_code, error_code, error_message }, no errors[] - and, like the codes above, nothing is created. Unlike the codes above, which arrive with HTTP status 200 and the 422 only in http_code, these answer with the real HTTP status too: 422 for invalid_webhook_url and (once the rollout completes) webhook_url_not_registered, 503 for webhook_registry_unavailable (also only once the rollout completes). A client that throws on any non-2xx status must still read the JSON body to see error_code.

invalid_webhook_url
422, now: the URL could never be a partner endpoint (not parseable, embedded credentials, non-http scheme, private, loopback or cloud-metadata host). 422, after the rollout: also an unregistered plain http:// URL that is not your profile URL, and a plain http:// profile URL you have not registered - including when the invite omits webhook_url and falls back to it. Use https://, or register the profile URL first.
webhook_url_not_registered
422, after the rollout: the URL is not a registered destination. Register it with /webhook_destination_register, or omit webhook_url to use the clinic's configured URL. Today it is logged and the invite goes through.
webhook_registry_unavailable
503, after the rollout: the destination registry could not be read while the invite was checked. Nothing was created; retry shortly.

Common 401 errors

The /exam_invite endpoint returns several distinct 401 messages. Most map to a specific portal action you (or your clinic admin) need to take in staging-app.qualiphy.me - not a code change.

Unauthorized access.
API key is missing or invalid.
Need to add Patient Care Provider via Qualiphy Portal!
Your account doesn't have a provider configured for the patient's state. Add one in Portal → Operators → Add Provider.
You need to signed docusign and signed rx
Onboarding agreements aren't complete. Sign all DocuSign documents and the Rx agreement in the portal before retrying.
Need to sign Prescriptive Services Contract via Qualiphy Portal!
Required before any Rx exam (GFE works without this). Sign in Portal → Settings → Agreements.
POSTyour webhook_url

Inbound webhook fired by Qualiphy at three lifecycle moments. Your handler dispatches on the event field. Respond 200 immediately and process asynchronously to avoid retries.

!
This is the most common integration mistake. Treating the webhook as a single payload type means missing treatment details and tracking updates. Always switch on event.
i
Webhooks are the only delivery mechanism - there is no pull API. No endpoint lists your orders or returns delivery status / tracking numbers on demand; shipment tracking arrives on event 3 once the pharmacy ships. Key your records on patient_exam_id and round-trip your own order ID in additional_data so every event matches back without a lookup. The provider key is reserved - see /exam_invite.

Where your webhook URL comes from

Two places can hold a webhook URL, and knowing which one is in play saves a lot of debugging.

webhook_urlon the invite
Per exam, sent on each /exam_invite call. This is the primary method for an API integration and needs no portal access. Register it first with /webhook_destination_register to receive signed deliveries; see /exam_invite for what happens to an unregistered or invalid value.
Clinic URL in the portal
An account-level default used when an invite arrives without a webhook_url. Set it under Clinics → the three-dot menu on the clinic → Edit. This view is on the clinic owner account, so a manager-level login may not see it.
!
When both are set, the invite wins. If the two drift apart, deliveries go out against whatever the invite carries and fail the token check on the other URL. That reads like our webhooks are down when they are actually arriving. Keep both values identical, or send only the invite value and leave the portal field empty.
i
The clinic URL is the only way to catch portal-created exams. Exams your staff create by hand in the portal have no invite to carry a webhook_url, so they fire against the clinic-level URL. If you want events for both API-created and staff-created exams, set both and keep them in sync.
i
Deliveries are signed. Every delivery to a registered destination carries X-Qualiphy-Signature (v1= + hex HMAC-SHA256 over <timestamp>.<raw body>, keyed with the destination's signing_secret) and X-Qualiphy-Timestamp (Unix seconds). Register the URL with POST /webhook_destination_register to receive the secret, then verify with a constant-time compare and a 300-second replay window before parsing; the recipe is in Status & webhooks. During the rollout a URL you have not registered still receives deliveries, unsigned - until then, keep a secret token in the URL (letters, numbers and dashes only: & or # gets truncated anywhere the URL is handled unencoded). Once the rollout's final step is switched on, no unsigned delivery is sent at all: an unregistered URL is refused on the invite, and the later webhooks of exams created before the switch are not sent either until that URL is registered. The one exception is Qualiphy's own Zenoti integration endpoint, which carries no secret and is delivered unsigned by design.

Request headers

X-Qualiphy-Timestampstring
Send time in Unix seconds. Reject a delivery more than 300 seconds from your clock (replay window).
X-Qualiphy-Signaturestring
v1= + hex HMAC-SHA256 over <timestamp>.<raw request body>, keyed with the destination's signing_secret from /webhook_destination_register. Hash the raw bytes you received and compare in constant time. Present on every delivery to a registered destination; absent on deliveries to a URL you have not registered.
Content-Typestring
Always application/json.

Two senders, two shapes

Each decision produces at least two deliveries to your URL, from two different Qualiphy components, and they do not carry the same shape:

  • The completion sender posts first, the moment the provider decides. Its prescription list is prescriptions (plural), and on environments that predate ENG-101 its exam_status is the lower-case enum key (approved / rejected / na).
  • The result-document sender posts when the chart PDF is generated, about a minute later, and again on every regeneration - a provider editing the note, a prescription change, an admin regenerating the record. Its list is prescription (singular), its exam_status is always the label form, its rx_status uses the pharmacy vocabulary, and it is the copy that reliably carries a signed exam_url - the completion sender includes one too, but only when the document already exists as it fires.
!
The samples below are the result-document sender's. They are the shape most integrations were built against, but they are not the first delivery you receive. A receiver must tolerate both: read prescriptions ?? prescription, compare exam_status case-insensitively, and never assume a field outside the core set is present. These samples are abbreviated: the result-document copy also carries patient and prescriber PHI that is elided here. Status & webhooks documents both payloads field by field.

Event 1 - Consultation Complete

Fires for every exam (GFE, Rx, Urgent Care) when the provider finishes the consultation. This is the basic exam outcome.

POSTevent: 1 · Consultation Complete
{ "event": 1, "reason": "Initial consultation complete", "exam_id": 106, "exam_url": "https://d29tu1ox8kfrdk.cloudfront.net/pdfs/...", "exam_name": "General Health Check", "exam_status": "Approved", "rx_status": "", "clinic_id": 1042, "clinic_name": "Downtown Medical Center", "patient_email": "patient@example.com", "patient_phone_number": "5551234567", "patient_exam_id": 272, "provider_name": "NP Liza", "additional_data": "{\"order_id\":\"WC-12847\"}", "questions_answers": [ { "no": 1, "question": "How are you feeling?", "answer": "Good." } ]}
{ "event": 1, "reason": "Flagged for medical director review pending additional records.", "exam_id": 106, "exam_url": "https://d29tu1ox8kfrdk.cloudfront.net/pdfs/...", "exam_name": "General Health Check", "exam_status": "Deferred to Medical Director", "rx_status": "", "clinic_id": 1042, "clinic_name": "Downtown Medical Center", "patient_email": "patient@example.com", "patient_phone_number": "5551234567", "patient_exam_id": 272, "provider_name": "NP Liza", "additional_data": "{\"order_id\":\"WC-12847\"}", "questions_answers": [ { "no": 1, "question": "How are you feeling?", "answer": "Borderline blood pressure, on multiple medications." } ]}
{ "event": 1, "reason": "Patient self-disqualified during pre-screening questionnaire.", "exam_id": 106, "exam_url": null, "exam_name": "General Health Check", "exam_status": "N/A", "rx_status": "", "clinic_id": 1042, "clinic_name": "Downtown Medical Center", "patient_email": "patient@example.com", "patient_phone_number": "5551234567", "patient_exam_id": 272, "provider_name": null, "additional_data": "{\"order_id\":\"WC-12847\"}", "questions_answers": [ { "no": 1, "question": "Are you currently pregnant or breastfeeding?", "answer": "Yes." } ]}

Status values: exactly three outcomes are terminal and fire this webhook - Approved, Deferred to Medical Director (the case a provider declines and escalates) and N/A (no decision was possible, for example the patient never attended). There is no Rejected, NA or Missed on the wire. The completion sender has not adopted these labels everywhere yet: until ENG-101 reaches an environment it sends the lower-case enum keys approved / rejected / na instead, which is what production emits today, so compare case-insensitively and map rejected to Deferred to Medical Director. Status & webhooks carries the full mapping table. The exam_url is a CloudFront-hosted PDF of the consultation record, and it is usually null on the first delivery: the document is generated on demand. The result-document delivery is the one that reliably carries the signed link; the completion sender includes one only if a PDF already exists when it fires. A handler that ignores repeat deliveries outright never receives a PDF. Stay idempotent on the decision itself, but let a later delivery update exam_url, then download and mirror the file to your own storage - the signed link is short-lived. See Status & webhooks for the two senders and what each carries.

Event 2 - Prescription Confirmed

Fires only for Rx exams, after Event 1, when the treatment order has been written and confirmed at the pharmacy. Carries the full schema below.

POSTevent: 2 · Prescription Confirmed
{ "event": 2, "exam_id": 1292, "exam_name": "GLP-1 Weight Loss", "exam_status": "Approved", "exam_url": "https://d29tu1ox8kfrdk.cloudfront.net/pdfs/...", "rx_status": "Pharmacy Confirmed", "clinic_id": 1042, "clinic_name": "Downtown Medical Center", "patient_email": "patient@example.com", "patient_phone_number": "5551234567", "patient_exam_id": 149784, "provider_name": "NP Liza", "prescribed_os_id": 486, "prescription": [ { "prescription_id": 3320, "drug_name": "Semaglutide", "dosage_form_type": "Inj", "strength": "2mg", "size": "2mL", "quantity": "2", "quantity_units": "", "directions": "Inject 0.25mg subcutaneously weekly.", "duration_days": 30, "refill_amount": 2, "ndc_number": "", "gpi_number": "", "schedule_code": "", "active_ingredient": "", "inactive_ingredient": "", "pharmacy_name": "Choose Your Pharmacy", "pharmacy_contacts": [ { "full_name": null, "email": null, "phone_number": null, "role": null } ], "prescription_tracking": [ { "rx_number": null, "tracking_number": null, "ship_carrier": null, "delivery_service": null, "pharmacy_location": null } ], "created_at": "2025-03-19T18:42:27.000Z" } ], "questions_answers": [ /* same shape as event 1 */ ]}
{ "event": 2, "exam_id": 1517, "exam_name": "Hormone Replacement Therapy", "exam_status": "Approved", "exam_url": "https://d29tu1ox8kfrdk.cloudfront.net/pdfs/...", "rx_status": "Pharmacy Confirmed", "clinic_id": 1042, "clinic_name": "Downtown Medical Center", "patient_email": "patient@example.com", "patient_phone_number": "5551234567", "patient_exam_id": 152019, "provider_name": "NP Liza", "prescribed_os_id": 712, "prescription": [ { "prescription_id": 4180, "drug_name": "Estradiol", "dosage_form_type": "Cream", "strength": "0.1%", "size": "30g", "quantity": "1", "quantity_units": "tube", "directions": "Apply a pea-sized amount to inner forearm daily.", "duration_days": 30, "refill_amount": 5, "ndc_number": "", "gpi_number": "", "schedule_code": "", "active_ingredient": "Estradiol", "inactive_ingredient": "", "pharmacy_name": "Choose Your Pharmacy", "pharmacy_contacts": [ { "full_name": null, "email": null, "phone_number": null, "role": null } ], "prescription_tracking": [ { "rx_number": null, "tracking_number": null, "ship_carrier": null, "delivery_service": null, "pharmacy_location": null } ], "created_at": "2025-03-19T18:42:27.000Z" }, { "prescription_id": 4181, "drug_name": "Progesterone", "dosage_form_type": "Cap", "strength": "100mg", "size": "30ct", "quantity": "1", "quantity_units": "bottle", "directions": "Take 1 capsule by mouth at bedtime.", "duration_days": 30, "refill_amount": 5, "ndc_number": "", "gpi_number": "", "schedule_code": "", "active_ingredient": "Progesterone", "inactive_ingredient": "", "pharmacy_name": "Choose Your Pharmacy", "pharmacy_contacts": [ { "full_name": null, "email": null, "phone_number": null, "role": null } ], "prescription_tracking": [ { "rx_number": null, "tracking_number": null, "ship_carrier": null, "delivery_service": null, "pharmacy_location": null } ], "created_at": "2025-03-19T18:42:27.000Z" } ], "questions_answers": [ /* same shape as event 1 */ ]}
{ "event": 2, "exam_id": 1843, "exam_name": "Testosterone Replacement Therapy", "exam_status": "Approved", "exam_url": "https://d29tu1ox8kfrdk.cloudfront.net/pdfs/...", "rx_status": "Pharmacy Confirmed", "clinic_id": 1042, "clinic_name": "Downtown Medical Center", "patient_email": "patient@example.com", "patient_phone_number": "5551234567", "patient_exam_id": 158402, "provider_name": "NP Liza", "prescribed_os_id": 904, "prescription": [ { "prescription_id": 5012, "drug_name": "Testosterone Cypionate", "dosage_form_type": "Inj", "strength": "200mg/mL", "size": "10mL", "quantity": "1", "quantity_units": "vial", "directions": "Inject 1mL intramuscularly every 7 days.", "duration_days": 70, "refill_amount": 0, "ndc_number": "00574-0820-10", "gpi_number": "", "schedule_code": "C3", "active_ingredient": "Testosterone Cypionate", "inactive_ingredient": "", "pharmacy_name": "Choose Your Pharmacy", "pharmacy_contacts": [ { "full_name": null, "email": null, "phone_number": null, "role": null } ], "prescription_tracking": [ { "rx_number": null, "tracking_number": null, "ship_carrier": null, "delivery_service": null, "pharmacy_location": null } ], "created_at": "2025-03-19T18:42:27.000Z" } ], "questions_answers": [ /* same shape as event 1 */ ]}

prescription is an array; an exam may include multiple treatment items. schedule_code reflects DEA controlled-substance schedule when applicable. Storage of these fields is regulated - design your DB schema with that in mind.

Event 3 - Prescription Tracking

Fires when the pharmacy ships the treatment. Use this to surface tracking info to the patient or your operations team.

This event comes from the pharmacy tracking handlers, not the senders above, and its body is smaller and differently typed. It carries no exam_status, exam_id or questions_answers, so branch on event before reading those - a handler that indexes them unconditionally throws here. patient_exam_id and prescription_id are relayed as received from the shipment notice and so may arrive as strings, where events 1 and 2 send numbers; compare with Number(). prescription_id is present only when the pharmacy supplies one. It does carry clinic_id, and that is the only location key on this event - there is no clinic_name here.

POSTevent: 3 · Prescription Tracking
{ "event": 3, "patient_exam_id": "patient-exam-789", "clinic_id": 4188, "prescription_id": "12345", "tracking_number": "123ABC456DEF", "delivery_service": "Overnight", "pharmacy_location": "Main Street Location", "order_id": "1234567890"}

Dispatching the events

A reliable handler maps the event integer to the appropriate processor:

handler example
app.post('/webhooks/qualiphy', async (req, res) => { // Always 200 first, process async res.status(200).send('OK'); const payload = req.body; await queue.enqueue('qualiphy_webhook', payload);}); // Workerasync function processQualiphy(payload) { switch (payload.event) { case 1: return onConsultationComplete(payload); case 2: return onPrescriptionConfirmed(payload); case 3: return onPrescriptionTracking(payload); default: console.warn('Unknown event:', payload.event); }}
@app.post('/webhooks/qualiphy')async def qualiphy_webhook(payload: dict): # Respond 200 first asyncio.create_task(process_qualiphy(payload)) return {"ok": True} EVENT_HANDLERS = { 1: on_consultation_complete, 2: on_prescription_confirmed, 3: on_prescription_tracking,} async def process_qualiphy(payload): handler = EVENT_HANDLERS.get(payload.get('event')) if handler: await handler(payload) else: log.warning('Unknown event: %s', payload.get('event'))
POST/api/exam_upload_attachment

Attach a document to a patient exam: ID photos, lab results, prior records. The provider sees attachments during the screening.

POST/api/exam_questions

Returns the screening question schema for a given exam ID. Use to build pre-fill UI on your own intake form, or to map your existing intake fields onto the Qualiphy question set.

Parameters

api_keystringRequired
Your location's API key.
exam_idintegerRequired
The exam to fetch questions for. Get the ID from /exam_list.

Sample request

POST/api/exam_questions
curl -X POST https://staging-api.qualiphy.me/api/exam_questions \ -H "Content-Type: application/json" \ -d '{"api_key":"YOUR_API_KEY","exam_id":5359}'
POST/api/exam_submit_answers

Submits answers on behalf of the patient. Pair with /exam_questions to pre-fill the screening from your own intake data, so patients aren't answering the same questions twice.

Parameters

api_keystringRequired
Your location's API key.
meeting_uuidstringRequired
From the original /exam_invite response. Omitting it returns 400 "Invalid meeting id".
patient_exam_idintegerRequired
From the patient_exams[] array in the original /exam_invite response.
answersarrayRequired
Array of answer objects. Each takes question_id and answer. For single-select and multi-select questions also send exam_question_response_id (for multi-select, repeat the same question_id once per selection); use answer_text for options with a free-text box. Get IDs from /exam_questions. Weight and height have fixed formats, below.

Weight and height

Weight is pounds in answer, e.g. "212" ("212 lbs" also works). Height can be sent in any of these forms, and is stored as 5' 11":

  • { "answer": "5' 11\"" }: feet and inches in answer. 5'11", 5'11', 5 ft 11 in, 5 feet 11 inches, 5'-11", 5' 11 1/2", 5 11 and 5-11 also work (inches are rounded to the nearest whole inch), as does feet alone with a unit (6', 6 ft).
  • { "answer": "5", "height_inches": 11 }: feet in answer, and height_inches from 0 to 11 is the inches part.
  • { "answer": "", "height_inches": 71 }: height_inches of 12 or more is total inches. answer may be empty or the matching feet ("5").
  • { "answer": "71 in" }: total inches in answer. A bare number with no unit ("71") is read as inches only from 24 to 84 (2' 0" to 7' 0"); send a unit for anything taller.
  • { "answer": "180 cm" }, "1.8 m", or a bare "180" (120 to 250): metric, rounded to the nearest inch.

Heights from 2' 0" to 8' 11" are accepted. Weight and height also update the patient's profile and BMI. A weight that isn't a number of pounds is stored as sent but doesn't update the profile. A height that can't be read in any of these forms (for example "5" with no height_inches, or "5.9") is not stored; the rest of the request is, and the response is 200 with a warnings list naming the question:

{ "http_code": 200, "warnings": [ { "question_id": 4461, "message": "Height not stored: couldn't read {\"answer\":\"5\"} as a height. Send e.g. answer 5' 11\", or answer \"5\" with height_inches 11, or height_inches 71." } ]}

A height listed in warnings leaves that question as it was. A height stored by an earlier call is kept, and the exam can reach a provider with it. If none was stored, the question counts as unanswered: an asynchronous exam stays in prefill_only_patient_ready (it isn't sent to a provider) until you resubmit that height or the patient answers it. Each warning's question_id is the id you sent, as you sent it. An empty answer with no height_inches (or 0) is stored as sent, with no warning.

Sample request

POST/api/exam_submit_answers
{ "api_key": "YOUR_API_KEY", "meeting_uuid": "MEETING_UUID_FROM_EXAM_INVITE", "patient_exam_id": 149784, "answers": [ { "question_id": 4457, "answer": "No previous complications" }, { "question_id": 4458, "answer": "Yes", "exam_question_response_id": 5011, "answer_text": "Occasionally" }, { "question_id": 4459, "answer": "Heart issues", "exam_question_response_id": 5013 }, { "question_id": 4459, "answer": "Memory Loss", "exam_question_response_id": 5014 }, { "question_id": 4460, "answer": "212" }, { "question_id": 4461, "answer": "5", "height_inches": 11 } ]}
POST/api/exam_invite_resend

Re-sends the invite email and SMS to the patient. Use when a patient says they didn't receive their original invite.

Parameters

api_keystringRequired
Your location's API key.
patient_exam_idintegerRequired
From the patient_exams[] array in the original /exam_invite response.

Sample request

POST/api/exam_invite_resend
curl -X POST https://staging-api.qualiphy.me/api/exam_invite_resend \ -H "Content-Type: application/json" \ -d '{"api_key":"YOUR_API_KEY","patient_exam_id":4844}'
POST/api/exam_invite_cancel

Cancel a previously created patient exam invite. Useful when a patient cancels their order or you need to clean up a duplicate invite. Cancellation is only valid before the provider has acted on the exam.

Parameters

patient_exam_idintegerRequired
From the patient_exams[] array in the original /exam_invite response. Not the exam_id.
api_keystringRequired
Your location's API key.

Sample request

POST/api/exam_invite_cancel
curl -X POST https://staging-api.qualiphy.me/api/exam_invite_cancel \ -H "Content-Type: application/json" \ -d '{"api_key":"YOUR_API_KEY","patient_exam_id":4844}'

Response

200 OK
{ "http_code": 200, "patient_exam_id": 55322, "status": "cancelled", "cancelled_at": "2026-04-22T19:08:29.680Z"}

Cancellation rules (400 errors)

An exam can't be cancelled once a provider has acted on it. The 400 response tells you why:

Exam status is already approved.
Provider already approved. Trigger your refund/cleanup flow instead of trying to cancel.
Exam status is already rejected.
Provider already rejected. The exam is closed; no action needed.
Exam status is already Deferred to Medical Director.
Under medical director review. Contact support if you need to intervene.
!
Idempotency: calling /exam_invite_cancel twice on a successfully-cancelled exam returns 400 with the relevant status. Treat that as success in your retry logic.
POST/api/patient_exam_status

Read the current status of one of your clinic's patient exams - where it has reached in provider review, and the prescription outcome where one applies. Poll this after creating an exam invite. Authenticates on your api_key alone; only exams belonging to your clinic are readable.

Parameters

api_keystringRequired
Your location's API key.
patient_exam_idintegerRequired
The patient exam to look up. Returned when you create an /exam_invite, and included in every webhook payload.

Sample request

POST/api/patient_exam_status
curl -X POST https://staging-api.qualiphy.me/api/patient_exam_status \ -H "Content-Type: application/json" \ -d '{"api_key":"YOUR_API_KEY","patient_exam_id":1234567}'

Response

200 OK
{ "http_code": 200, "status": "approved"}

Response fields

statusstring
Where the exam has got to. pending - awaiting provider review. approved / rejected / na / cancelled - the provider's outcome. prescribed - a prescription was approved for the exam. rejected_prescription - the prescription was rejected. expired - the exam is past its window.
http_codeinteger
Mirrors the HTTP status in the body, for clients that read only the payload.

Errors

401 Unauthorized: api_key did not resolve a clinic
The api_key is wrong, or the clinic is inactive.
403 Forbidden: patient exam does not belong to this clinic
The exam exists but belongs to another clinic. You can only read your own clinic's exams.
404 Patient exam not found.
No exam exists with that patient_exam_id.
POST/api/patient_exam_status_set

Set the status of one of your clinic's patient exams. Authenticates on your api_key alone; only exams belonging to your clinic can be modified, and the exam's recorded provider is preserved.

!
Prefer /exam_invite_cancel. This endpoint has no active-session or terminal guard, so status: 6 will overwrite an already-approved exam to cancelled. /exam_invite_cancel refuses in those cases. Use this one only for exams you know are still pending.

Parameters

api_keystringRequired
Your location's API key.
patient_exam_idintegerRequired
The patient exam to update. Must belong to your clinic.
statusintegerRequired
The status to set. A partner may only cancel its own exam, so the only accepted value is 6 (cancelled). Approving, rejecting or marking n/a are clinical determinations made by a provider and cannot be set through this endpoint - any other value returns 403.

Sample request

POST/api/patient_exam_status_set
curl -X POST https://staging-api.qualiphy.me/api/patient_exam_status_set \ -H "Content-Type: application/json" \ -d '{"api_key":"YOUR_API_KEY","patient_exam_id":1234567,"status":6}'

Response

200 OK
{ "http_code": 200, "success_message": "Status updated"}

Response fields

success_messagestring
Present when the status was updated ("Status updated").
error_messagestring
Present on failure, and specific about which check failed - authentication (401), exam ownership or a non-settable status (403), or an unexpected processing error (400).

Errors

401 Unauthorized: api_key did not resolve a clinic
The api_key is wrong, or the clinic is inactive.
403 Forbidden: patient exam does not belong to this clinic
The exam exists but belongs to another clinic.
403 Forbidden: only 'cancelled' (6) may be set via this endpoint
The exam is yours, but the requested status is not one a partner may set (only 6 / cancelled is).
400 <reason>
The request could not be processed (e.g. a malformed body). Note there is no 400 for an already-decided or in-session exam: the update is applied regardless. A server-side guard is tracked.
POST/api/patient_exam_webhook_payload

Retrieve the same completion webhook JSON (Event 1 or Event 2) Qualiphy would POST to your webhook_url, rebuilt from current exam data. Use it when a delivery was missed - the senders never replay a failed delivery, so this is how you recover one. Authenticates on your api_key alone; only exams belonging to your clinic are readable.

i
This does not re-send the webhook. It returns the payload for you to process yourself, and only for exams that already reached a terminal status. It returns the completion sender's shape - never the result-document sender's singular prescription body. See Exam Webhook for the two shapes.

Parameters

api_keystringRequired
Your location's API key.
patient_exam_idintegerRequired
The patient exam whose completion webhook payload you want. Must belong to your clinic. Returned when you create an /exam_invite, and included in every webhook payload.

Sample request

POST/api/patient_exam_webhook_payload
curl -X POST https://staging-api.qualiphy.me/api/patient_exam_webhook_payload \ -H "Content-Type: application/json" \ -d '{"api_key":"YOUR_API_KEY","patient_exam_id":1234567}'

Response

200 OK — event 1, good-faith exam (no prescriptions)
{ "http_code": 200, "event": 1, "exam_status": "approved", "rx_status": "", "patient_exam_id": 272, "exam_id": 106, "exam_name": "P Shot", "exam_url": null, "clinic_id": 832, "clinic_name": "Dev QA Test", "provider_name": "Sandbox Provider", "reason": "SANDBOX DECISION (approved) via /sandbox_exam_decision", "patient_email": "jane.doe@example.com", "patient_phone_number": "4155550100", "additional_data": "{\"your_ref\":\"ORD-2231\"}", "questions_answers": [ { "no": 1, "question": "In the treatment area, do you have any of the following?", "answer": "Active infection" } ]}

Response fields

http_codeinteger
Mirrors the HTTP status in the body, for clients that read only the payload.
eventinteger
As on the completion webhook: 1 = good-faith exam (no prescriptions key), 2 = exam with prescriptions (adds prescriptions[]).
exam_statusstring
The completion sender's vocabulary: Approved / Deferred to Medical Director / N/A. Environments that predate ENG-101 - the sandbox today - still emit lower-case approved / rejected / na, so compare case-insensitively. Not the patient_exam_status polling vocabulary.
rx_statusstring
approved, rejected, pending, or "" when the exam has no prescription component (event 1).
exam_urlstring
Usually null right after a decision, since the PDF is produced on demand. If a result document already exists when you call this, the response may carry a time-limited link.
clinic_idinteger
The clinic (location) the exam belongs to - the same id exam_list returns. Key on this rather than clinic_name, which is free text.
additional_datastring
The string you passed on the invite, echoed back verbatim (null if none). One reserved key: if it is JSON whose provider names an EMR handled by Qualiphy's integration hub (for example zenoti), the partner webhook for that exam is suppressed and the result is delivered through that integration instead. Do not use provider for your own data - see /exam_invite.
patient_emailpatient_phone_numberquestions_answersmixed
PHI. Handle as you would a webhook payload: HTTPS only, do not log bodies in plaintext, never put patient data in URLs.

Errors

400 Completion webhook payload is not available until the exam reaches a terminal status.
The exam exists but has not been decided yet. Poll patient_exam_status and retry later - this is not a bad id.
401 Unauthorized: api_key did not resolve a clinic
The api_key is wrong, or the clinic is inactive.
403 Forbidden: patient exam does not belong to this clinic
The exam exists but belongs to another clinic.
404 Patient exam not found.
No exam exists with that patient_exam_id.
POST/api/webhook_destination_register

Register a URL as a webhook destination for your clinic and receive its signing_secret. Every delivery to a registered destination carries X-Qualiphy-Signature and X-Qualiphy-Timestamp (see Exam Webhook and the recipe in Status & webhooks). An https:// URL configured on the clinic profile is registered for you (at rollout, or on its first delivery). A plain http:// profile URL is not: register that same URL here yourself (the one case where http:// is accepted) to receive a secret, or move it to https://. A clinic with no profile URL has no destination until you register one. Changing the clinic's webhook URL in the portal deregisters the old profile URL only if it was registered for you (at rollout or on its first delivery) and you never collected its secret; a URL you registered yourself, or whose secret you collected, stays registered.

Registering a URL you previously removed reactivates it with a new signing_secret, returned once: HTTP 200, created: false, reactivated: true. The old secret is never revived, so deploy the new one before the URL receives deliveries again.

Parameters

webhook_urlstringRequired
An https:// URL to a public host, at most 500 characters, no embedded credentials. Private, loopback and cloud-metadata hosts are refused (422 invalid_webhook_url). Plain http:// is accepted only for a URL already in use (the clinic's configured URL), never for a new destination. A clinic may hold at most 10 active destinations (422 too_many_webhook_destinations).
rotate_secretbooleanOptional
On an already-registered URL, mint and return a new signing_secret. It replaces the old one immediately: deliveries signed after the call use it, and it exists only in this response, so your receiver cannot hold it beforehand. Store and deploy it right away; deliveries signed before your receiver has it fail verification, the completion sender's retries span only about 2.5 seconds and the result-document sender does not retry a 4xx, so rotate at a quiet time. Keeping the previous secret accepted for a few minutes still helps for a delivery signed just before the rotation (sample).
api_keystringRequired
Your account API key.

Sample request

POST/api/webhook_destination_register
curl -X POST https://staging-api.qualiphy.me/api/webhook_destination_register \ -H "Content-Type: application/json" \ -d '{"api_key":"YOUR_API_KEY","webhook_url":"https://store2.example.com/qualiphy/webhook"}'

Response

201 — new destination; the secret is shown ONCE
{ "http_code": 201, "created": true, "reactivated": false, "destination": { "id": 9, "webhook_url": "https://store2.example.com/qualiphy/webhook", "is_clinic_default": false, "signing_secret_hint": "…b21c", "created_at": "2026-10-02 14:58:21", "signing_secret": "<64 hex characters>" }, "message": "Store signing_secret now; it is not shown again. Send rotate_secret: true to issue a new one."}
200 — already registered (no secret unless rotate_secret, or the first time a pre-registered URL's secret is handed out)
{ "http_code": 200, "created": false, "reactivated": false, "destination": { "id": 9, "webhook_url": "https://store2.example.com/qualiphy/webhook", "is_clinic_default": false, "signing_secret_hint": "…b21c", "created_at": "2026-10-02 14:58:21" }, "message": "Already registered. Send rotate_secret: true to issue a new signing secret."}

Errors

Real HTTP statuses, mirrored as http_code, with error_code and error_message. A missing or invalid api_key is the exception: HTTP 200 with http_code 401, like every endpoint.

422 invalid_webhook_url
Not https:// (a new plain http:// destination), not a public host, embedded credentials, or longer than 500 characters.
422 too_many_webhook_destinations
The clinic already has 10 active destinations. Remove one first.
409 registration_conflict
A concurrent registration of the same URL was undone (it would have exceeded the 10-destination cap). Nothing was issued; retry the request.
429 rate_limited
Too many register or remove calls in the rate-limit window. Slow down and retry later.
!
The secret is returned once. On creation, on rotate_secret: true, on reactivating a removed URL (always a new secret), or the first time a URL that was registered for you (your clinic's https:// profile URL, at rollout or on its first delivery) is registered by you. After that only signing_secret_hint (the last four characters) is ever shown.
POST/api/webhook_destination_list

List the clinic's active webhook destinations. Full secrets are never listed; signing_secret_hint is the last four characters, enough to tell which secret a delivery was signed with after a rotation.

Parameters

api_keystringRequired
Your account API key.

Sample request

POST/api/webhook_destination_list
curl -X POST https://staging-api.qualiphy.me/api/webhook_destination_list \ -H "Content-Type: application/json" \ -d '{"api_key":"YOUR_API_KEY"}'

Response

200 OK
{ "http_code": 200, "clinic_webhook_url": "https://partner.example.com/qualiphy/webhook", "destinations": [ { "id": 1, "webhook_url": "https://partner.example.com/qualiphy/webhook", "is_clinic_default": true, "signing_secret_hint": "…3f9a", "created_at": "2026-09-30 09:12:00" }, { "id": 9, "webhook_url": "https://store2.example.com/qualiphy/webhook", "is_clinic_default": false, "signing_secret_hint": "…b21c", "created_at": "2026-10-02 14:58:21" } ]}

Errors

Real HTTP statuses, mirrored as http_code, with error_code and error_message. A missing or invalid api_key is the exception: HTTP 200 with http_code 401, like every endpoint.

429 rate_limited
Too many list calls in the rate-limit window (a separate, larger budget than register and remove, so polling the list cannot block a registration). Slow down and retry later.
POST/api/webhook_destination_remove

Remove a webhook destination. During the rollout, deliveries to that URL continue unsigned; once the rollout's final step lands, an invite naming it is refused and nothing is delivered to it. The clinic's configured URL cannot be removed here: change it in the portal first. To use a removed URL again, register it: that reactivates it with a new signing_secret, returned once (HTTP 200, created: false, reactivated: true). The old secret is never revived, so update your receiver.

Parameters

destination_idintegerRequired
The id from /webhook_destination_list or the register response.
api_keystringRequired
Your account API key.

Sample request

POST/api/webhook_destination_remove
curl -X POST https://staging-api.qualiphy.me/api/webhook_destination_remove \ -H "Content-Type: application/json" \ -d '{"api_key":"YOUR_API_KEY","destination_id":9}'

Response

200 OK
{ "http_code": 200, "removed": true, "destination_id": 9 }

Errors

Real HTTP statuses, mirrored as http_code, with error_code and error_message. A missing or invalid api_key is the exception: HTTP 200 with http_code 401, like every endpoint.

404 destination_not_found
No active destination with that id for your clinic: it was already removed, the id is mistyped, or it belongs to another clinic.
409 destination_is_clinic_default
The URL is the clinic's configured webhook URL. Change it in the portal, then remove it here.
422 invalid_destination_id
destination_id must be a positive integer.
429 rate_limited
Too many register or remove calls in the rate-limit window. Slow down and retry later.
!
Retries: a 404 means only that your clinic has no active destination with that id - already removed (for example by an earlier attempt), mistyped, or not yours. Before treating it as done, call webhook_destination_list and confirm the URL you meant to remove is no longer listed.
POST/api/partner_pharmacy_list

Lists the partner compounding pharmacies that can fulfill the given Rx exam(s) for a patient in the given state. Returns each pharmacy's pharmacy_id, which you'll pass into /exam_invite and /partner_pharmacy_treatment_packages.

Parameters

api_keystringRequired
Your location's API key.
exam_idsinteger[]Required
Array of Rx exam IDs from /exam_list (rx_type: 2).
patient_statestringRequired
Two-letter state code (e.g. "NY"). Filters to pharmacies that can ship to the patient's state. Omitting it returns an empty array.

Sample request

POST/api/partner_pharmacy_list
curl -X POST https://staging-api.qualiphy.me/api/partner_pharmacy_list \ -H "Content-Type: application/json" \ -d '{"api_key":"YOUR_API_KEY","exam_ids":[4279],"patient_state":"NY"}'

Sample response

200 OK
[ { "pharmacy_id": 16, "pharmacy_name": "Greenwich Pharmacy" }]
!
Gotcha: omitting exam_ids returns 400 with "Cannot convert undefined or null to object" — not a missing-parameter message. An empty array ([]) response usually means no partner pharmacy / order sets are attached to those exams yet, or the patient_state isn't covered — contact your Qualiphy representative to get the pharmacy configured.
POST/api/partner_pharmacy_treatment_packages

Lists treatment packages (drug + dosage combinations + pricing) available at the given partner pharmacies for the given Rx exam(s). Returns order_set_id values for use with /exam_invite. Legacy exam_pos_id is still returned alongside for older integrations.

Parameters

api_keystringRequired
Your location's API key.
pharmacy_idsinteger | integer[]Required
Pharmacy ID(s) from /partner_pharmacy_list. Accepts a single integer or an array.
exam_idsinteger[]Required
Array of Rx exam IDs from /exam_list you want packages for.
patient_statestringRequired
Two-letter state code (e.g. "NY"). Omitting it returns an empty array.

Sample request

POST/api/partner_pharmacy_treatment_packages
curl -X POST https://staging-api.qualiphy.me/api/partner_pharmacy_treatment_packages \ -H "Content-Type: application/json" \ -d '{"api_key":"YOUR_API_KEY","pharmacy_ids":[16],"exam_ids":[4279],"patient_state":"NY"}'

Sample response

200 OK
[ { "exam_pos_id": 27708, "order_set_id": 610, "title": "Semaglutide + B12 + Zofran (add-on) - Injection - Dose 1: 0.25mg/weekly - 1mg/05mg Total - 30 Days Supply", "pharmacy_id": 16, "turnaround_time": "3-4", "pharmacy_name": "Greenwich Pharmacy", "integration_partner": 8, "qualiphy_total_price": "125.00" }]
!
Gotcha: the parameter is pharmacy_ids (plural) — passing pharmacy_id returns an empty array, not an error. An empty array with correct parameters means no order sets are attached to those exams for those pharmacies yet — contact your Qualiphy representative.
POST/api/custom_pharmacy_search

Look up any U.S. pharmacy by name, location, or NCPDPID. Returns full address and identifier fields you'll need for /exam_invite when using custom pharmacy routing.

Parameters

api_keystringRequired
Your location's API key.
searchstringOptional
Pharmacy name fragment (e.g. "CVS").
zip_codestringOptional
Five-digit ZIP for proximity filtering.
ncpdpidstringOptional
Direct NCPDPID lookup. Pass alone to fetch a known pharmacy by ID.

Sample request

POST/api/custom_pharmacy_search
curl -X POST https://staging-api.qualiphy.me/api/custom_pharmacy_search \ -H "Content-Type: application/json" \ -d '{"api_key":"YOUR_API_KEY","search":"CVS","zip_code":"10001"}'

Sample response

200 OK
{ "pharmacies": [ { "ncpdpid": "3318547", "name": "CVS Pharmacy #4382", "address_line_1": "342 W 23rd St", "city": "New York", "state": "NY", "zip_code": "10011", "phone": "2127757582" } ]}

External APIs

The endpoints under /api/v1/ are External APIs: endpoints built for integration partners, such as the Quidget middleware that keeps a clinic's online store in sync with its Qualiphy catalog. They use your clinic's API key, but they follow their own conventions, so the rules elsewhere in these docs that describe the core API don't apply to them.

Core API (everything outside /api/v1/)External APIs (/api/v1/)
MethodPOST with a JSON bodyGET; Notification Settings also takes PATCH with a JSON body
API keyapi_key in the JSON bodyOnly Authorization: Bearer YOUR_API_KEY; a key in the body or query string gets 401
StatusHTTP 200, real status in http_codeReal HTTP status codes; no http_code
BodyEndpoint-specific{"success": true, "data": …} or {"success": false, "error": {"code", "message", "field_errors", "correlation_id"}}
LimitsNone documentedRate-limited, with X-RateLimit-* headers and 429 + Retry-After; each endpoint's page gives its budgets
i
Where the rules differ: wherever these docs say every request is POST, carries api_key in the body, or answers HTTP 200 with http_code, that describes the core API. The External APIs are the endpoints listed under External APIs in the navigation, and every one of them lives under /api/v1/.
GET/api/v1/pharmacies

Returns every pharmacy your clinic can route to in one call, each with the states it ships to. Use it to answer "can this pharmacy serve this patient" without a second call, and to resolve the pharmacy_id returned by /v1/packages.

!
Authentication: send your API key only as Authorization: Bearer YOUR_API_KEY. A key in the query string or body is rejected with 401.

Query parameters

statestringOptional
Two-letter state code (e.g. TX). Only pharmacies that ship to that state.
activestringOptional
true or false. Only active, or only inactive, pharmacies. Omit it to get every pharmacy.

Sample request

GET/api/v1/pharmacies
curl 'https://staging-api.qualiphy.me/api/v1/pharmacies' \ -H "Authorization: Bearer YOUR_API_KEY" \ -H 'If-None-Match: "<ETag from your last response>"'

Sample response

200 OK
{ "success": true, "data": { "environment": "production", "count": 1, "pharmacies": [ { "pharmacy_id": 6, "pharmacy_name": "Example Pharmacy", "active": true, "states": ["CA", "NY", "TX"], "integration_partner": 1 } ] }}

Response fields

pharmacy_idinteger
The pharmacy id. The same id as pharmacy_id in /v1/packages.
pharmacy_namestring | null
The canonical pharmacy name: the one name for this pharmacy across the v1 API; null if none is recorded. /v1/packages returns the same value for the same pharmacy_id.
activeboolean
Whether the pharmacy is active. active is always true today; the field is there so a future on/off switch does not change the format.
statesstring[]
Two-letter states this pharmacy ships to for your clinic: states where an invite will succeed for at least one of your exams. Can be empty.
integration_partnerinteger | null
The pharmacy's integration partner.

Errors

Real HTTP status codes, with the body {"success": false, "error": {"code", "message", "field_errors", "correlation_id"}}.

304
Not modified: your If-None-Match matched the current ETag. Empty body — keep your cached copy.
400
An invalid state or active (listed in field_errors).
401
Missing or invalid API key, or a key sent in the query string or body.
429
Rate limited — wait Retry-After seconds. Two budgets, both per server worker: 120 requests per minute per clinic for this endpoint, separate from /v1/packages, /v1/locations and /v1/settings/notifications; and 60 failed authentications (401s) per minute per IP, shared with them and checked before the key is.
500
Unexpected server error. Retry later; if it persists, send us the correlation_id from the error body.
!
Canonical name: pharmacy_name is the canonical pharmacy name across the v1 API. Use it as returned instead of normalizing names yourself.
i
Polling and limits: send the last ETag as If-None-Match on every poll — a 304 means nothing changed. The rate limit is 120 requests per minute per clinic, per server worker (the API runs several workers, so treat it as approximate), separate from /v1/packages, /v1/locations and /v1/settings/notifications, plus a shared per-IP budget for failed authentications (see 429); every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. A pharmacy missing from an unfiltered response (no state, no active) has been removed.
GET/api/v1/packages

Returns every treatment package for up to 20 exams in one call, each with the states it is available in — no patient state is needed in the request. Use it to build or refresh your package catalog instead of calling /partner_pharmacy_list and /partner_pharmacy_treatment_packages once per state.

!
Authentication: send your API key only as Authorization: Bearer YOUR_API_KEY. A key in the query string or body is rejected with 401.

Query parameters

exam_idstringRequired
Comma-separated exam ids from /exam_list, at most 20 per call — e.g. 123,456.
pharmacy_idintegerOptional
Only packages from this pharmacy.
statestringOptional
Two-letter state code (e.g. NY). Only packages an invite will succeed for in that state.
availabilitystringOptional
active (default) or all. With all, inactive packages are included and marked "availability": "inactive".
cursorstringOptional
Pass back next_cursor from the previous response to get the next page.
limitintegerOptional
Packages per page. Default 200, maximum 1000.

Sample request

GET/api/v1/packages
curl 'https://staging-api.qualiphy.me/api/v1/packages?exam_id=12345' \ -H "Authorization: Bearer YOUR_API_KEY" \ -H 'If-None-Match: "<ETag from your last response>"'

Sample response

200 OK
{ "success": true, "data": { "environment": "production", "count": 1, "next_cursor": null, "exam_ids_not_found": [], "packages": [ { "exam_id": 12345, "exam_version_id": 67890, "exam_pos_id": 1234, "order_set_id": 55, "pharmacy_id": 6, "pharmacy_name": "Example Pharmacy", "integration_partner": 1, "title": "Package Title", "consult_price": "45.00", "medication_price": "125.50", "total_price": "170.50", "currency": "USD", "states": ["CA", "NY", "TX"], "availability": "active", "updated_at": "2026-09-01T12:00:00.000Z" } ] }}

Response fields

exam_idinteger
The exam id you requested. Stable across exam edits.
exam_version_idinteger
The current version of the exam. Changes when the exam is re-versioned.
exam_pos_idinteger
The package id to send with an exam invite. Changes when the exam is re-versioned — do not store it as the package's identity.
order_set_idinteger
The treatment (order set) id.
pharmacy_idinteger
The pharmacy.
pharmacy_namestring | null
The canonical pharmacy name, the same as in /v1/pharmacies; null if none is recorded.
integration_partnerinteger | null
The pharmacy's integration partner.
titlestring | null
The package title; null if none is recorded.
consult_pricemedication_pricetotal_pricestring
USD, as strings with 2 decimals. total_price = consult_price + medication_price, and equals qualiphy_total_price from /partner_pharmacy_treatment_packages.
currencystring
Always USD.
statesstring[]
Two-letter states where an invite for this package will succeed: the pharmacy serves the state and the exam is offered there. Can be empty.
availabilitystring
active or inactive (inactive only appears with availability=all).
updated_atstring | null
When any part of the package last changed (ISO 8601); null if none of its source rows carries a timestamp.
exam_ids_not_foundinteger[]
Requested exam ids that are unknown or not available to your clinic. They do not fail the call.
next_cursorstring | null
Pass as cursor to get the next page; null on the last page.

Errors

Real HTTP status codes, with the body {"success": false, "error": {"code", "message", "field_errors", "correlation_id"}}.

304
Not modified: your If-None-Match matched the current ETag. Empty body — keep your cached copy.
400
Missing or malformed exam_id, more than 20 ids, limit over 1000, or another invalid parameter (listed in field_errors).
401
Missing or invalid API key, or a key sent in the query string or body.
429
Rate limit exceeded — wait Retry-After seconds. The per-clinic budget is shared with Locations and Notification Settings; the failed-authentication budget is shared by every /api/v1/ endpoint.
500
Unexpected server error. Retry later; if it persists, send us the correlation_id from the error body.
!
Stable key: identify a package by (exam_id, pharmacy_id, order_set_id). exam_pos_id and exam_version_id change when an exam is re-versioned, so anything bound to exam_pos_id alone will break.
i
Polling and limits: send the last ETag as If-None-Match on every poll — a 304 means nothing changed. The rate limit is 120 requests per minute per clinic, per server worker (the API runs several workers, so treat it as approximate), shared with Locations and Notification Settings, plus 60 failed authentications (401s) per minute per IP, shared by every /api/v1/ endpoint; every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. At most 20 exam_id per call. Treat a package missing from the response as removed only when you requested availability=all.
GET/api/v1/locations

Lists your active locations with their ids, so you can bind each storefront to the right location without asking support for ids. Each location is a clinic: its id is the same value as clinic_id in /exam_list and in webhooks.

"Your locations" means the active locations under the same account and the same organization as the location whose API key you send, including that location itself; a location on your account with no organization is grouped only with other locations that have none. A single-location account gets one location back. Locations on other Qualiphy accounts are never returned.

!
Authentication: send your API key only as Authorization: Bearer YOUR_API_KEY. A key in the query string or body is rejected with 401.

Query parameters

cursorstringOptional
Pass back next_cursor from the previous response to get the next page.
limitintegerOptional
Locations per page. Default 200, maximum 1000.

Sample request

GET/api/v1/locations
curl 'https://staging-api.qualiphy.me/api/v1/locations' \ -H "Authorization: Bearer YOUR_API_KEY"

Sample response

200 OK
{ "success": true, "data": { "environment": "production", "count": 2, "next_cursor": null, "locations": [ { "id": 1201, "name": "Main Street Clinic" }, { "id": 1202, "name": "Downtown Clinic" } ] }}

Response fields

locations[].idinteger
The location id.
locations[].namestring | null
The location's name; null if none is recorded.
countinteger
Locations on this page.
next_cursorstring | null
Pass as cursor to get the next page; null on the last page.

Errors

Real HTTP status codes, with the body {"success": false, "error": {"code", "message", "field_errors", "correlation_id"}}.

400
Malformed cursor, or limit not a whole number from 1 to 1000 (listed in field_errors).
401
Missing or invalid API key, or a key sent in the query string or body.
429
Rate limited; wait Retry-After seconds. Two budgets apply, both per server worker: 120 requests per minute per clinic, shared with Packages, Locations and Notification Settings, and 60 failed authentications (401s) per minute per IP, shared by every /api/v1/ endpoint. The failed-authentication budget is checked before the key is, so once an IP passes 60 failed authentications, every request from it gets 429 until the window resets, valid keys included. X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset report the per-clinic budget on authenticated responses, and the failed-authentication budget on a 401 or a failed-authentication 429.
500
Unexpected server error. Retry later; if it persists, send us the correlation_id from the error body.
i
Ids and names only: locations carry no address, status or API key. Read a single location with /v1/locations/{location_id}.
GET/api/v1/locations/{location_id}

Returns one location from /v1/locations by its id. The same rule applies: only locations that list would return for your API key.

!
Authentication: send your API key only as Authorization: Bearer YOUR_API_KEY. A key in the query string or body is rejected with 401.

Path parameters

location_idintegerRequired
A location id from /v1/locations.

Sample request

GET/api/v1/locations/{location_id}
curl 'https://staging-api.qualiphy.me/api/v1/locations/1202' \ -H "Authorization: Bearer YOUR_API_KEY"

Sample response

200 OK
{ "success": true, "data": { "environment": "production", "location": { "id": 1202, "name": "Downtown Clinic" } }}

Errors

Same error body as /v1/locations.

400
location_id is not a positive whole number.
401
Missing or invalid API key, or a key sent in the query string or body.
404
No such location among yours. A location on another account returns the same 404.
429
Rate limited; wait Retry-After seconds. Two budgets apply, both per server worker: 120 requests per minute per clinic, shared with Packages, Locations and Notification Settings, and 60 failed authentications (401s) per minute per IP, shared by every /api/v1/ endpoint. The failed-authentication budget is checked before the key is, so once an IP passes 60 failed authentications, every request from it gets 429 until the window resets, valid keys included. X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset report the per-clinic budget on authenticated responses, and the failed-authentication budget on a 401 or a failed-authentication 429.
500
Unexpected server error. Retry later; if it persists, send us the correlation_id from the error body.
GET/api/v1/settings/notifications

Returns your location's setting for Qualiphy's exam invitation emails and text messages to your patients. Change the setting with PATCH /v1/settings/notifications.

The setting applies only to the location (clinic) whose API key you send. Other locations on your account keep their own setting. A location that has never changed it reads back true for both.

It controls Qualiphy's exam invitation emails and text messages to your patients, including invitation resends. Follow-up exam emails and texts always send, whatever this setting says: they carry information patients need after their exam. The text that tells a waiting patient a provider is now available also sends whatever this setting says, unless the exam has text messages turned off. It is the same setting Qualiphy support can change for you, so changes made either way show here.

!
Authentication: send your API key only as Authorization: Bearer YOUR_API_KEY. A key in the query string or body is rejected with 401.

Sample request

GET/api/v1/settings/notifications
curl 'https://staging-api.qualiphy.me/api/v1/settings/notifications' \ -H "Authorization: Bearer YOUR_API_KEY"

Sample response

200 OK
{ "success": true, "data": { "environment": "production", "notifications": { "email": true, "sms": true } }}

Response fields

notifications.emailboolean
Your location's setting for exam invitation emails: true is on, false is off.
notifications.smsboolean
Your location's setting for exam invitation text messages: true is on, false is off.

Errors

Real HTTP status codes, with the body {"success": false, "error": {"code", "message", "field_errors", "correlation_id"}}.

401
Missing or invalid API key, or a key sent in the query string or body.
429
Rate limited; wait Retry-After seconds. Two budgets apply, both per server worker: 120 requests per minute per clinic, shared with Packages, Locations and Notification Settings, and 60 failed authentications (401s) per minute per IP, shared by every /api/v1/ endpoint. The failed-authentication budget is checked before the key is, so once an IP passes 60 failed authentications, every request from it gets 429 until the window resets, valid keys included. X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset report the per-clinic budget on authenticated responses, and the failed-authentication budget on a 401 or a failed-authentication 429.
500
Unexpected server error. Retry later; if it persists, send us the correlation_id from the error body.
PATCH/api/v1/settings/notifications

Turns Qualiphy's exam invitation emails or text messages to your patients on or off. Send only the channels you want to change; the response shows the setting after the change, in the same shape as GET /v1/settings/notifications.

  • Scope: the setting applies only to the location (clinic) whose API key you send. Other locations on your account keep their own setting.
  • What it controls: Qualiphy's exam invitation emails and text messages to your patients, including invitation resends.
  • What it does not control: follow-up exam emails and texts always send, whatever this setting says. They carry information patients need after their exam. The text that tells a waiting patient a provider is now available also sends whatever this setting says, unless the exam has text messages turned off.
  • Administrator notice: turning patient email off sends a notice to the administrator email address on file for the location. This endpoint cannot change that address.
  • Audit log: every change made through this endpoint is recorded in an audit log.
  • Support changes: it is the same setting Qualiphy support can change for you. Changes made either way show here.
!
Authentication: send your API key only as Authorization: Bearer YOUR_API_KEY. A key in the query string or body is rejected with 401.

Body parameters

A JSON object with at least one of these fields. Any other field (for example admin_email) is rejected with 400, not ignored.

emailbooleanOptional
Your location's setting for exam invitation emails: true turns it on, false turns it off. Must be a JSON boolean.
smsbooleanOptional
Your location's setting for exam invitation text messages: true turns it on, false turns it off. Must be a JSON boolean.

Sample request

PATCH/api/v1/settings/notifications
curl -X PATCH 'https://staging-api.qualiphy.me/api/v1/settings/notifications' \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "sms": false }'

Sample response

200 OK
{ "success": true, "data": { "environment": "production", "notifications": { "email": true, "sms": false } }}

Errors

Real HTTP status codes, with the body {"success": false, "error": {"code", "message", "field_errors", "correlation_id"}}. Read error.code to tell the cases apart.

400
invalid_request: the body is not a JSON object, has no fields, has a value that is not a JSON boolean, or has a field other than email and sms. Each problem is listed in field_errors. An api_key in the body is a 401, not a 400 (see Authentication).
401
Missing or invalid API key, or a key sent in the query string or body.
409
conflict: the setting changed while your request was running. Nothing was changed; retry.
422
channel_required: a channel you asked to turn off cannot be turned off for your clinic; field_errors[].message gives the reason. No channel is restricted today, but handle this code. admin_email_missing: turning email off needs an administrator email address on file for the location, and there is none. Nothing was changed.
429
Rate limited; wait Retry-After seconds. Two budgets apply, both per server worker: 120 requests per minute per clinic, shared with Packages, Locations and Notification Settings, and 60 failed authentications (401s) per minute per IP, shared by every /api/v1/ endpoint. The failed-authentication budget is checked before the key is, so once an IP passes 60 failed authentications, every request from it gets 429 until the window resets, valid keys included. X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset report the per-clinic budget on authenticated responses, and the failed-authentication budget on a 401 or a failed-authentication 429.
500
Unexpected server error. Retry later; if it persists, send us the correlation_id from the error body.
503
notice_failed: turning email off sends a notice to your administrator email address, and that notice could not be sent. Nothing was changed; retry.

Recipe: GFE for an Aesthetic Treatment

The most common Qualiphy API integration. A patient buys a Botox or filler treatment on your store; you need a licensed provider to clear them before they show up at the clinic.

Run a GFE for Botox or fillers

~15 min implementation · 2 endpoints + 1 webhook

  1. 1Once at setup: call /exam_list to grab your aesthetic exam ID. Store the IDs you'll use - they're stable.
  2. 2In your e-commerce platform (WooCommerce, Shopify, custom checkout, etc.), the patient checks out for an aesthetic treatment. Your order-completion handler fires.
  3. 3Call /exam_invite with the patient's details and your aesthetic exam ID.
  4. 4Qualiphy emails and texts the patient a meeting link only if you want Qualiphy to contact your patient. Otherwise the meeting_url in the response is yours to deliver - see Patient Notification Settings to disable.
  5. 5Your webhook receives an approve result. Update the order status and notify the patient that they're cleared to come in.
POST/api/exam_invite
{ "api_key": "YOUR_API_KEY", "exams": [5359], "first_name": "Test", "last_name": "Approve", "email": "test@example.com", "dob": "1985-03-12", "phone_number": "+15555550100", "state": "TE", "tele_state": "TE", "webhook_url": "https://yourstore.com/webhooks/qualiphy", "additional_data": "{\"order_id\":\"WC-12847\"}", "redirect_approve": "https://yourstore.com/cleared", "redirect_reject": "https://yourstore.com/needs-followup"}

Tip: Use additional_data to pass your internal order ID. It comes back unchanged in the webhook payload, making it trivial to match results to orders without a separate database lookup. The provider key is reserved - see /exam_invite.

Recipe: Partner Pharmacy Medication Shipping

Order medication from our partner pharmacies with negotiated rates. We handle routing the prescription and notifying you with shipping updates along the way. Works for GLP-1, peptides, hormone replacement, and other Rx programs running through Qualiphy partner pharmacies.

Order medication with Qualiphy

~30 min implementation · up to 4 endpoints + 1 webhook

  1. 1Once at setup: call /exam_list to grab the medication exam ID(s) you'll be sending patients through.
  2. 2Once at setup: call /partner_pharmacy_list with your Rx exam_ids and a patient_state to discover the pharmacies that can fulfill them. Store the pharmacy_id values you want to use. Skip this step if you don't have a preferred pharmacy and want the prescriber to choose the cheapest option every time.
  3. 3Once at setup: call /partner_pharmacy_treatment_packages with your pharmacy_ids, exam_ids, and patient_state to get the available packages. Store the order_set_id values. Skip this step if you don't care which dosage is prescribed and trust the physician to make the right decision per patient.
  4. 4Per patient: call /exam_invite with the medication exam ID, the patient details, and the optional pharmacy_id + order_set_id if you preselected them.
  5. 5Qualiphy emails and texts the patient a meeting link only if you want Qualiphy to contact your patient. Otherwise the meeting_url in the response is yours to deliver - see Patient Notification Settings to disable.
  6. 6Webhook event 1 fires when the consultation completes. Webhook event 2 fires once the prescription is confirmed at the partner pharmacy, and event 3 fires when the package ships - tracking number included.
!
Repeat orders: store the pharmacy_id and order_set_id on the patient/subscription record. For the next order just rebuild the same /exam_invite payload with current patient data - no need to re-discover pharmacy or dosage IDs.
!
Renewals never fire on their own. Qualiphy has no subscription concept: nothing on our side triggers when a patient's plan renews. Every renewal or follow-up consult is your system calling /exam_invite again for a fresh meeting_url - the subscription cadence lives entirely in your billing system.
POST/api/exam_invite
{ "api_key": "YOUR_API_KEY", "exams": [1292], "first_name": "Test", "last_name": "Prescription Approve", "email": "test@example.com", "dob": "1982-09-04", "phone_number": "+15555550100", "state": "TE", "tele_state": "TE", "pharmacy_id": 16, "order_set_id": 610, "webhook_url": "https://yourapp.com/webhooks/qualiphy", "additional_data": "{\"subscription_id\":\"SUB-9912\"}"}

Recipe: Urgent Care Visit & Custom Pharmacies

Use this flow when the prescription should ship to (or be picked up from) a pharmacy outside Qualiphy's partner network - the patient's local CVS, Walgreens, or any other retail pharmacy. Common for same-day UTI treatments, but also for any program where a patient prefers their own pharmacy over the partner-pharmacy default.

Send a prescription to a custom pharmacy

~20 min implementation · 3 endpoints + 1 webhook

  1. 1Once at setup: call /exam_list to grab the exam ID(s) you'll be sending patients through.
  2. 2On checkout, ask the patient which pharmacy they want to use. Call /custom_pharmacy_search to look up nearby pharmacies by name or ZIP.
  3. 3Submit /exam_invite with the exam ID, the patient details, and the patient's chosen pharmacy.
  4. 4Qualiphy emails and texts the patient a meeting link only if you want Qualiphy to contact your patient. Otherwise the meeting_url in the response is yours to deliver - see Patient Notification Settings to disable.
  5. 5Patient joins the screening, talks to the provider. If approved, the prescription is sent to the chosen pharmacy.
  6. 6Webhook event 1 fires once the consultation is approved. Webhook event 2 fires after the provider sends the prescription to the pharmacy. (No event 3 for custom pharmacies - see warning below.)
!
Qualiphy is not the contact for tracking or availability with custom pharmacies. The pharmacy itself is the source of truth for fill status, ready-for-pickup, and shipping. Direct your patient (or your support team) to the pharmacy for those updates - we don't relay them.
!
Always send a destination on Rx invites. An Rx exam invite with no pharmacy fields at all is accepted (200), but the prescription has nowhere to go after the provider signs it - the order strands until someone manually sets a destination. If you route fulfillment yourself, include the ncpdpid and pharmacy fields on every invite.

Variant: preselect a fixed pharmacy (no patient step)

If every order goes to the same pharmacy (e.g. your own fulfillment partner), preselect it on the invite instead of asking the patient. Send your exam's normal routing fields (pharmacy_id / order_set_id if it uses Choose-Your-Pharmacy order sets) plus the destination and the two mode fields - and note there's no custom_pharmacy flag in this shape:

POST/api/exam_invite
{ "api_key": "YOUR_API_KEY", "exams": [3104], "first_name": "Test", "last_name": "Prescription Approve", "email": "test@example.com", "dob": "1991-02-18", "phone_number": "+15555550100", "state": "TE", "tele_state": "TE", "pharmacy_id": 12, "order_set_id": 1500, "ncpdpid": "1234567", "pharmacy_name": "Your Fulfillment Pharmacy", "pharmacy_address_line_1": "1500 Main St", "pharmacy_city": "Austin", "pharmacy_state": "TX", "pharmacy_zip_code": "78701", "custom_pharmacy_patient_choice": 1, "skip_pharmacy_confirmation": 2, "webhook_url": "https://yourapp.com/webhooks/qualiphy"}

custom_pharmacy_patient_choice: 1 removes the patient's pharmacy step; skip_pharmacy_confirmation: 2 skips the confirmation screen (it only takes effect because the full pharmacy address is present). Omit both and the invite defaults to patient-picks mode, where the patient's in-meeting choice overrides your preset destination.

POST/api/exam_invite
{ "api_key": "YOUR_API_KEY", "exams": [3104], "first_name": "Test", "last_name": "Prescription Approve", "email": "test@example.com", "dob": "1991-02-18", "phone_number": "+15555550100", "state": "TE", "tele_state": "TE", "custom_pharmacy": 2, "ncpdpid": "1234567", "pharmacy_name": "CVS Pharmacy #5821", "pharmacy_address_line_1": "1500 Main St", "pharmacy_city": "Austin", "pharmacy_state": "TX", "pharmacy_zip_code": "78701", "pharmacy_phone": "+15125550000", "webhook_url": "https://yourapp.com/webhooks/qualiphy"}

Recipe: Pull Your Full Exam Configuration

You want an exam's full setup - its screening questions and the order sets and pharmacies attached to it - in machine-readable form, without transcribing it by hand or asking us to confirm what's attached. This recipe assembles the read-only endpoints you already have into one configuration view, so your integration can discover an exam's config on its own.

Discover an exam's questions, order sets & pharmacies

~20 min implementation · up to 4 read-only endpoints · no webhook

  1. 1Call /exam_list to get every exam on your account with its id, title, and type. Pick the exam IDs you're integrating.
  2. 2For each exam, call /exam_questions with the exam_id to get its screening question schema - the curated questions patients answer, keyed by no.
  3. 3Rx exams only: call /partner_pharmacy_list with your exam_ids and a patient_state to find the partner pharmacies attached to the exam. Store the pharmacy_id values.
  4. 4Rx exams only: call /partner_pharmacy_treatment_packages with those pharmacy_ids, your exam_ids, and patient_state to get the attached order sets - each with its order_set_id, exam_pos_id, title, pricing, and pharmacy_name.
!
What you get: the exam's questions plus its attached order sets and pharmacies, pulled programmatically - no manual transcription and no asking us to confirm what's attached. A GFE / clearance exam has no pharmacy or order sets attached, so steps 3-4 return nothing for those - the question schema is the whole config.
!
Answer-level IDs: /exam_questions returns each question by its no and text, not individual answer-choice IDs. When you submit answers back, match on no + question (see Pre-fill Patient Answers). Re-pull the schema after an exam is edited rather than caching it long-term.
POST/api/exam_questions
{ "api_key": "YOUR_API_KEY", "exam_id": 5359}

Recipe: Pre-fill Patient Answers

You already collect health screening info on your own intake form, and you don't want patients to re-answer the same questions during the Qualiphy screening. Or you want full control over the wording of every question and you'll display the form on your end - not Qualiphy's.

Submit answers programmatically

~30 min implementation · 3 endpoints + 1 webhook

  1. 1Call /exam_questions to get the question schema for the exam. Map each question to the matching field on your intake form.
  2. 2Call /exam_invite as usual. Capture the returned patient_exam_id and meeting_uuid — both are required on the submit.
  3. 3Immediately call /exam_submit_answers with the patient's pre-collected answers. Every question you submit appears pre-filled on the Qualiphy side, except a height the server couldn't read, which comes back in warnings (see Weight and height). If you submit answers for every question, the questionnaire is skipped entirely and the patient goes straight to the provider call. Submit a subset and the patient only sees the unanswered questions, with their existing answers shown alongside.
POST/api/exam_submit_answers
{ "api_key": "YOUR_API_KEY", "meeting_uuid": "MEETING_UUID_FROM_EXAM_INVITE", "patient_exam_id": 149784, "answers": [ { "question_id": 4457, "answer": "No previous complications" }, { "question_id": 4458, "answer": "Yes", "exam_question_response_id": 5011, "answer_text": "Occasionally" }, { "question_id": 4459, "answer": "Heart issues", "exam_question_response_id": 5013 }, { "question_id": 4459, "answer": "Memory Loss", "exam_question_response_id": 5014 }, { "question_id": 4460, "answer": "212" }, { "question_id": 4461, "answer": "5", "height_inches": 11 } ]}

Patient Notification Settings

Qualiphy sends two distinct kinds of patient-facing messages. Each can be disabled independently if you want full control - or you want your providers to stay out of direct patient contact. Disable one, both, or neither.

1. Auto-generated invites

When you call /exam_invite, Qualiphy automatically emails and texts the patient the meeting link. Disable these if you want to deliver the link from your own branded system using the meeting_url returned in the response.

How to disable: call PATCH /api/v1/settings/notifications with {"email": false, "sms": false}, or ask your Qualiphy rep. The setting applies per location (the location whose API key you use), not per request; turn it off for each location that sends its own invites. Turning email off emails the administrator address on file for that location; if there is none, the call returns 422, and if that email cannot be sent it returns 503; either way it changes nothing, SMS included.

i
Follow-ups still send. Turning off auto-generated invites does not turn off follow-up exam emails and texts, such as the GLP-1 follow-up sent about 3 weeks after the original visit to check for adverse effects. Qualiphy keeps sending those, so you don't need to send your own.

One text also still sends: when a provider becomes available while your patient is waiting for their exam, Qualiphy texts them a link to join now, unless the exam has text messages turned off. You have no webhook for that moment, so Qualiphy keeps sending it.

2. Provider direct contact

Qualiphy providers may personally email or call the patient in specific situations - for example, when a video call drops mid-session and the provider needs to call them back, or to nudge a patient whose exam has been pending too long. These messages come from the provider's number/email, not Qualiphy's automated system.

How to disable: in the Qualiphy portal, go to Settings → Notification Settings. From there you can toggle each notification type per clinic, manage which notification contacts get copied, and choose whether providers contact patients directly for pending consultations.

Qualiphy portal Notification Settings panel showing Approved Notification, Deferred Notification, Not Applicable Notification, and Qualiphy Providers Contact Patients toggles
Settings → Notification Settings in the Qualiphy portal. Toggle each notification type per clinic and add or remove notification contacts.

Sending invites from your own system

Once auto-generated invites are off, the integration shape is straightforward:

Deliver the meeting link yourself

~15 min implementation · 2 endpoints · one settings call per location

  1. 1Turn off auto-generated invites with PATCH /api/v1/settings/notifications, once per location.
  2. 2Call /exam_invite as usual. Capture the returned meeting_url.
  3. 3Send your own email or SMS to the patient with the meeting_url embedded in your branded template.

How an Exam Works

Every Qualiphy interaction follows the same lifecycle, regardless of treatment type. Understanding this flow makes everything else easier to reason about.

  1. 1You call /exam_invite with patient details and one or more exam IDs. Qualiphy returns a meeting_url immediately.
  2. 2The patient receives an invite via email and SMS (or via your own system if you've configured custom delivery). They click the link and enter the screening.
  3. 3The patient completes the screening. They answer health questions, then connect with a licensed provider for a brief video consultation.
  4. 4The provider makes a decision: approve, reject, or defer. For Rx exams, an approval includes a treatment order that routes to your selected pharmacy.
  5. 5Your webhook_url receives the result as a POST. Your handler updates the patient record, triggers fulfillment, sends a notification, or whatever your business logic requires.

Steps 1 and 5 are where your code lives. Steps 2-4 happen on Qualiphy's side without further integration work.

Exam Types

The same /exam_invite endpoint handles all three exam types. The exam ID determines the type; a single payload can trigger one of any kind.

Good Faith Exam (GFE)

Provider clears a patient for an in-clinic procedure. Most common for Botox, fillers, IV therapy, and other aesthetic services. No medication is dispensed.

Rx Treatment

Provider evaluates the patient and, if appropriate, issues a treatment order. Common for GLP-1 weight loss programs, hormone therapy, and other ongoing treatments. Medication routes to a partner or custom pharmacy.

Urgent Care

On-demand consultations for acute conditions: UTI, pink eye, cold sores, acne, nausea. Treatments are sent to a retail pharmacy of the patient's choice.

How to know which type an exam is

Call /exam_list; each exam record returns its type. Or check the exam in the Qualiphy portal under Exam List.

!
Multi-exam constraint: you can stack any number of GFE exams on a single invite. Send a plain list of exam IDs for non-Rx exams and for a single Rx exam - it applies one pharmacy and one medication selection to the whole request. More than one Rx exam in a meeting - up to 3, each with its own medications and pharmacy - requires the object form of exams[], the only shape that can express a per-exam choice. See Multi-Rx on /exam_invite.

States & Telehealth

Telehealth in the U.S. is regulated state-by-state. Qualiphy uses the tele_state field on every /exam_invite call to match patients with providers licensed in their location.

Always pass the patient's state

Not your clinic's state. The patient's state determines which providers can serve them and which pharmacies can fulfill treatments. A clinic in Texas with a patient in California sends "tele_state": "CA".

!
Sending the wrong state is the single most common integration bug. If exams are getting "no provider available" responses, this is almost always why.

Format

Two-letter uppercase state abbreviation: NY, CA, TX, etc. Use DC for Washington D.C.

Coverage

Qualiphy serves 48 states + D.C. Alabama and Mississippi are not currently supported.

Pharmacy Routing

For Rx exams, you choose how treatments get from the provider to the patient. There are three patterns. Pick whichever fits your business model.

Partner pharmacy (recommended for Rx programs)

Use Qualiphy's pre-vetted compounding pharmacy network. Bundled, all-inclusive pricing. Qualiphy handles fulfillment and ships directly to the patient. Best for GLP-1, peptide, and other recurring Rx programs.

Workflow: call /partner_pharmacy_list with your Rx exam_ids + patient_state to see available pharmacies and their pharmacy_id, then optionally call /partner_pharmacy_treatment_packages (same parameters plus pharmacy_ids) to get an order_set_id for a specific package. Pass pharmacy_id + order_set_id into your /exam_invite payload.

Custom pharmacy

Send the treatment order to a specific retail or compounding pharmacy. Required for Urgent Care exams (the patient picks a pharmacy near them). Best when the patient already has a preferred pharmacy.

Workflow: call /custom_pharmacy_search to find a pharmacy by name or ZIP, then pass the resulting ncpdpid and address fields into your /exam_invite payload.

Provider's choice

Let the licensed provider pick the right pharmacy and order set during the consultation, based on the patient's needs. Use the provider_pos_selection field on /exam_invite:

1
Provider does not choose. You've fully specified the pharmacy and order.
2
Provider picks the order set only (drug + dosage). You specified the pharmacy.
3
Provider picks both the pharmacy and the order set. Most flexible.

Field Glossary

The Qualiphy API has a few field names whose meaning isn't obvious from the name. Bookmark this section - you'll come back to it.

tele_statevsstate
tele_state is the patient's telehealth jurisdiction, used to match providers and pharmacies. It must be the patient's state, even if the clinic is elsewhere. state is just the patient's home address state. They're often the same value, but conceptually different fields.
address_*vsshipping_address_*vspharmacy_*
Three different addresses. address_* is the patient's home address. shipping_address_* is where Rx ships to (often a clinic or P.O. box, not the patient's home). pharmacy_* is the custom retail pharmacy when custom_pharmacy: 2.
custom_pharmacy
Inverted from intuition. 2=Custom Pharmacy (retail like CVS, Walgreens). 1=Partner Pharmacy (Qualiphy's compounding network) - the platform's internal 1=false / 2=true convention, not an ordered list. Must match the exam's configured routing: a custom-only exam rejects 1 with 401 "Only custom pharmacies available for this exam!", a partner-only exam rejects 2 with 401 "Only partner pharmacies available for this exam!". To preselect a retail destination without the flag, use ncpdpid + custom_pharmacy_patient_choice: 1 instead.
attachments_required
Also inverted. 1=not required. 2=required. Watch for off-by-one bugs.
rx_type
On exams from /exam_list. 1=non-Rx (GFE), 2=Rx. You can stack non-Rx exams freely in one meeting. A plain list of exam IDs carries at most one Rx exam; up to 3 need the object form of exams[] - see Multi-Rx on /exam_invite.
gender
Integer, not string. 1=Male, 2=Female, 3=Prefer not to say.
exam_idvspatient_exam_id
exam_id is the static catalog ID for a treatment (e.g. "GLP-1 Weight Loss"). patient_exam_id is unique to one patient's instance of that exam. Always use patient_exam_id when cancelling, looking up answers, or correlating webhooks.
eventon the webhook
1=Consultation Complete. 2=Prescription Confirmed. 3=Prescription Tracking. Always switch on this. Webhook reference →
provider_pos_selection
"POS" = Pharmacy / Order Set. 1=you specify both. 2=provider picks order set. 3=provider picks both.

Webhook Best Practices

Webhooks are the most operationally sensitive part of any integration. A failed webhook handler means a missed approval, which means a frustrated patient. Build defensively.

Respond fast, process slow

Your handler should validate the payload, queue the work, and return 200 in under 100 ms. Do the actual processing in a background worker. A slow handler eats into the sender's timeout (10 seconds for the completion sender), and a timed-out attempt is treated as a failure.

Retries are bounded - reconcile what is lost

Each sender retries 3 times and then gives up: the completion sender at 0.5 s then 2 s, retrying any non-2xx; the result-document sender immediately, then after 2 s and 8 s, retrying only network errors and 5xx (a 4xx from you is read as a deliberate rejection). Neither replays a failed delivery later. A decision whose deliveries all failed is not resent, so treat webhooks as the fast path and /patient_exam_status as the reconciliation path - poll on startup, and for any exam you have not heard about. See Status & webhooks for the full delivery contract.

Idempotency

Treat patient_exam_id as a unique key. If your handler is invoked twice with the same ID, the second invocation should be a no-op. Store a record of processed IDs and check on every call.

Logging

Log every payload before processing, including failed deliveries. When something goes wrong months later, the raw payload is the only forensic record you'll have.

Verifying the source

Verify the signature first. Register your URL (POST /webhook_destination_register) to receive a signing_secret; every delivery to a registered destination then carries X-Qualiphy-Signature and X-Qualiphy-Timestamp. Recompute v1= + hex HMAC-SHA256 over <timestamp>.<raw body>, compare in constant time, reject anything older than 300 seconds, and only then parse the body. Recipe and samples: Status & webhooks. Until you register, authenticate a delivery by matching patient_exam_id (and the additional_data reference you sent on the invite) to an exam you created, and treat anything that does not match as hostile. The provider key is reserved - see /exam_invite. Keep the webhook URL unguessable, serve it over HTTPS, and IP-allowlist Qualiphy's origin as a second layer if your platform supports it - but do not rely on the allowlist alone, since it cannot tell a forged payload from a real one.

Errors & Status Codes

A 200 means the call succeeded and the body carries the response payload. Everything else is one of these. The /api/v1/ endpoints (Packages, Locations, Pharmacies, Notification Settings) return these as real HTTP status codes with the body {"success": false, "error": {"code", "message", "field_errors", "correlation_id"}}, and can also return 304, 404, 409, 422, 429 and 503; each endpoint lists its own.

400
Bad request. Usually a missing required field, malformed date/phone, or an invalid tele_state. The response body specifies which field.
401
Authentication failed: your API key is missing or invalid. Outside /api/v1/ the key is the api_key body field; on /api/v1/ it is the Authorization: Bearer header, and a key sent anywhere else is also a 401.
500
Server error. Retry after a brief backoff. If it persists, contact support.

Going to Production

A pre-launch checklist. Run through this before flipping your integration on for real patients.

  • ☐Full integration validated end-to-end via Test mode (state & tele_state set to TE, expected outcomes confirmed via webhook)
  • ☐state and tele_state now driven by the patient's real address (no hardcoded TE left in code paths)
  • ☐Patient name fields use real patient data (no Test Approve / Test Reject fixtures left over)
  • ☐The no-charge test exam 5359 replaced with the real exam IDs your integration sends
  • ☐Webhook handler tested against approve and reject paths
  • ☐Production API key stored in your secrets manager (not in source control)
  • ☐Production webhook URL registered on the production host with /webhook_destination_register, and the signing_secret it returns stored in your secrets manager for the receiver. Destinations and secrets are per environment: the sandbox registration and secret do not carry over (see Status & webhooks)
  • ☐Idempotency check on patient_exam_id in webhook handler
  • ☐Error monitoring on the /exam_invite call (4xx and 5xx)
  • ☐Subscribed to API change notifications
  • ☐For Rx programs: pharmacy routing values stored on the patient/subscription record, not hardcoded
✓
Ready to ship? Once your test exam clears the full pipeline, swap state/tele_state from TE to the patient's real state, replace test names with real patient data, and you're live. Roll out gradually — feature-flag the integration on for a small percentage of patients first.

Want a tailored plan for your team?

The quick start asks a handful of questions about your business, then generates a custom integration plan you can email straight to your dev team.

Run the quick start →
QualiphyQualiphy APIDeveloper Docs

Programmatic access to licensed provider consultations, treatments, and pharmacy fulfillment. Built for clinics, medspas, and software teams.

Get Started

Quick startCode walkthroughAuthentication

Reference

/exam_inviteWebhookPharmaciesField glossary

Account

Get API access ↗Qualiphy portal ↗
© 2026 Qualiphy PC
Made with care in the United States

Persists in this browser session and auto-fills YOUR_API_KEY across the docs.

Sample request

Browse a recipe or endpoint

Scroll into a recipe or API endpoint to load a sample request. Edit the payload here and click Try now to send it with your API key.

Recent runs 0

Your Try now requests will appear here so you can reference them after scrolling.