set -euumask 077# Path values must be URL-encoded; query string excludes the leading question mark.url="${HD_BASE_URL:?Set API origin}/v1/partner/consultations/${HD_QUERY_STRING:+?${HD_QUERY_STRING}}"printf 'Accept: application/json\n' > "${HD_REQUEST_HEADERS_FILE:?Private header file}"printf 'Authorization: Bearer %s\n' "${HD_PARTNER_API_KEY:?Set partner API key}" >> "$HD_REQUEST_HEADERS_FILE"# Create the Idempotency-Key once per logical request, store it before the first attempt and send the same value on every retry.printf 'Idempotency-Key: %s\n' "${HD_IDEMPOTENCY_KEY:?Set the stored Idempotency-Key; reuse it on retry}" >> "$HD_REQUEST_HEADERS_FILE"curl --silent --show-error --max-time 30 --request POST \ --header "@$HD_REQUEST_HEADERS_FILE" \ --dump-header "${HD_HEADERS_FILE:?Private response header file}" \ --output "${HD_RESPONSE_FILE:?Private response file}" \ --write-out '%{http_code}\n%{content_type}\n' \ --header 'Content-Type: application/json' \ --data-binary "@${HD_REQUEST_FILE:?JSON fixture file}" \ "$url"
import os, json
from pathlib import Path
from urllib.parse import quote
import requests
os.umask(0o077)
url = os.environ["HD_BASE_URL"].rstrip("/") + '/v1/partner/consultations/'
if os.environ.get("HD_QUERY_STRING"): url += "?" + os.environ["HD_QUERY_STRING"]
headers = {"Accept": 'application/json'}
headers["Authorization"] = "Bearer " + os.environ["HD_PARTNER_API_KEY"]
# Create the Idempotency-Key once per logical request, store it before the first attempt and send the same value on every retry.
headers["Idempotency-Key"] = os.environ["HD_IDEMPOTENCY_KEY"]
kwargs = {}
kwargs["json"] = json.loads(Path(os.environ["HD_REQUEST_FILE"]).read_text())
response = requests.request('POST', url, headers=headers, timeout=30, allow_redirects=False, **kwargs)
Path(os.environ["HD_RESPONSE_FILE"]).write_bytes(response.content)
Path(os.environ["HD_HEADERS_FILE"]).write_text(json.dumps(dict(response.headers)))
print(response.status_code)
print(response.headers.get("Content-Type", ""))
import { readFileSync, writeFileSync } from "node:fs";
const env = process.env;
let url = env.HD_BASE_URL.replace(/\/$/, "") + "/v1/partner/consultations/";
if (env.HD_QUERY_STRING) url += "?" + env.HD_QUERY_STRING;
const headers = { "Accept": "application/json" };
headers.Authorization = "Bearer " + env.HD_PARTNER_API_KEY;
// Create the Idempotency-Key once per logical request, store it before the first attempt and send the same value on every retry.
headers["Idempotency-Key"] = env.HD_IDEMPOTENCY_KEY;
const options = { method: "POST", headers, redirect: "manual", signal: AbortSignal.timeout(30000) };
headers["Content-Type"] = "application/json";
options.body = readFileSync(env.HD_REQUEST_FILE, "utf8");
const response = await fetch(url, options);
writeFileSync(env.HD_RESPONSE_FILE, Buffer.from(await response.arrayBuffer()), {mode: 0o600});
writeFileSync(env.HD_HEADERS_FILE, JSON.stringify(Object.fromEntries(response.headers)), {mode: 0o600});
console.log(response.status);
console.log(response.headers.get("content-type") ?? "");
Submits a patient’s questionnaire answers for clinical review. The patient’s consent flags must all be true and the notice version must be the current one (otherwise 422 consent_notice_outdated with current_notice_version). schema_version and schema_hash must name the published questionnaire (otherwise 409 schema_outdated with the current pair). Retries with the same Idempotency-Key and body return the original response.
Answer only the questions that apply after branching: an answer to a step the other answers hide (conditional display) is refused with 422 unexpected_question_key, one error item per hidden question_key. Errors never repeat a submitted answer value or identifier; they name the question_key instead (an unexpected question_key is echoed as sent). A pharmacy selection that is not valid for the patient’s country is refused with 422 pharmacy_selection_invalid (question_key pharmacy_selection), whatever the directory’s reason.
patient.national_identifier is optional: send it where the product country’s prescribing needs one (otherwise 422 patient_identifier_required, unless the identifier is already stored for the patient). An unknown type or invalid value is refused with 422 invalid_request (field patient.national_identifier, code invalid_identifier); it is never echoed or returned. In live mode it is stored on the patient’s account the first time; a different identifier for the same patient is refused with 409 patient_conflict and never overwrites it. Test mode validates it and stores nothing.
patient.identity_document is optional: send it where electronic prescribing in the patient’s country needs the patient’s identity document before approval (a national id_card or a passport, with the country that issued it). It is validated like the patient’s own profile (5 to 20 letters or digits; for a few issuing countries an id_card number is also checked against its national format); one that breaks those rules is refused with 422 invalid_request (field patient.identity_document, code invalid_identity_document). Structural errors keep their nested field errors (for example field patient.identity_document.type, code invalid_choice, for an unsupported type; patient.identity_document.number, code required, when the number is missing). It is never echoed or returned. In live mode it is stored on the patient’s account the first time; a different document for the same patient is refused with 409 patient_conflict and never overwrites it. Test mode validates it and stores nothing. Without it, the reviewing doctor, if they need it, asks through an information request with reason_code identity_document_required.
patient.address line1 and line2 are stored joined with ”, ” in one street line of at most 200 characters (separator included); a longer address is refused with 422 invalid_request (field patient.address), never truncated. patient.address.country is the patient’s country of residence and must be an EU member state (ISO 3166-1 alpha-2 or alpha-3), in test and live mode alike; any other value is refused with 422 invalid_request (field patient.address.country, code residence_outside_eu). Without it, the product country is the residence. A patient who withdrew consent is refused with 409 consent_withdrawn. Requires the consultations:write scope.
Access, effects and retries
Ownership: The API key’s own partner and mode (test or live).
Prerequisites: A partner API key with the consultations:write scope.
Effects: Creates the consultation (and the patient on first submission) and sends it to clinical review; emits consultation webhook events.
Retries: Required Idempotency-Key: a retry with the same key and body within 24 hours returns the stored response.
POST
/
v1
/
partner
/
consultations
/
curl
set -euumask 077# Path values must be URL-encoded; query string excludes the leading question mark.url="${HD_BASE_URL:?Set API origin}/v1/partner/consultations/${HD_QUERY_STRING:+?${HD_QUERY_STRING}}"printf 'Accept: application/json\n' > "${HD_REQUEST_HEADERS_FILE:?Private header file}"printf 'Authorization: Bearer %s\n' "${HD_PARTNER_API_KEY:?Set partner API key}" >> "$HD_REQUEST_HEADERS_FILE"# Create the Idempotency-Key once per logical request, store it before the first attempt and send the same value on every retry.printf 'Idempotency-Key: %s\n' "${HD_IDEMPOTENCY_KEY:?Set the stored Idempotency-Key; reuse it on retry}" >> "$HD_REQUEST_HEADERS_FILE"curl --silent --show-error --max-time 30 --request POST \ --header "@$HD_REQUEST_HEADERS_FILE" \ --dump-header "${HD_HEADERS_FILE:?Private response header file}" \ --output "${HD_RESPONSE_FILE:?Private response file}" \ --write-out '%{http_code}\n%{content_type}\n' \ --header 'Content-Type: application/json' \ --data-binary "@${HD_REQUEST_FILE:?JSON fixture file}" \ "$url"
import os, json
from pathlib import Path
from urllib.parse import quote
import requests
os.umask(0o077)
url = os.environ["HD_BASE_URL"].rstrip("/") + '/v1/partner/consultations/'
if os.environ.get("HD_QUERY_STRING"): url += "?" + os.environ["HD_QUERY_STRING"]
headers = {"Accept": 'application/json'}
headers["Authorization"] = "Bearer " + os.environ["HD_PARTNER_API_KEY"]
# Create the Idempotency-Key once per logical request, store it before the first attempt and send the same value on every retry.
headers["Idempotency-Key"] = os.environ["HD_IDEMPOTENCY_KEY"]
kwargs = {}
kwargs["json"] = json.loads(Path(os.environ["HD_REQUEST_FILE"]).read_text())
response = requests.request('POST', url, headers=headers, timeout=30, allow_redirects=False, **kwargs)
Path(os.environ["HD_RESPONSE_FILE"]).write_bytes(response.content)
Path(os.environ["HD_HEADERS_FILE"]).write_text(json.dumps(dict(response.headers)))
print(response.status_code)
print(response.headers.get("Content-Type", ""))
import { readFileSync, writeFileSync } from "node:fs";
const env = process.env;
let url = env.HD_BASE_URL.replace(/\/$/, "") + "/v1/partner/consultations/";
if (env.HD_QUERY_STRING) url += "?" + env.HD_QUERY_STRING;
const headers = { "Accept": "application/json" };
headers.Authorization = "Bearer " + env.HD_PARTNER_API_KEY;
// Create the Idempotency-Key once per logical request, store it before the first attempt and send the same value on every retry.
headers["Idempotency-Key"] = env.HD_IDEMPOTENCY_KEY;
const options = { method: "POST", headers, redirect: "manual", signal: AbortSignal.timeout(30000) };
headers["Content-Type"] = "application/json";
options.body = readFileSync(env.HD_REQUEST_FILE, "utf8");
const response = await fetch(url, options);
writeFileSync(env.HD_RESPONSE_FILE, Buffer.from(await response.arrayBuffer()), {mode: 0o600});
writeFileSync(env.HD_HEADERS_FILE, JSON.stringify(Object.fromEntries(response.headers)), {mode: 0o600});
console.log(response.status);
console.log(response.headers.get("content-type") ?? "");
A unique key per logical request. Retrying with the same key and body returns the stored response for 24 hours instead of creating a second consultation; the same key with a different body is refused.
Increases with every change to the consultation's public state, i.e. every field of this object except version, status_history, updated_at and product.name (catalogue copy: a product rename does not advance it). Events carry the same number.
true exactly when POST /consultations/{consultation_id}/cancel would succeed now: the consultation is submitted, has no prescription, and (live) no doctor has opened it, no decision or electronic prescription signing has started, and no prescription issuance or replacement is in flight.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Hi Doctor","public":true,"description":"Hi Doctor operates across the whole European Union: residents of all 27 EU member states can use the service, and every consultation is reviewed by an EU-licensed doctor. Connect it to an AI assistant over MCP, or build on the REST API.","colors":{"primary":"#157A5C","light":"#39C69C","dark":"#0E6149"},"logo":{"light":"https://mintcdn.com/hi-doctor-ai/PIEJYA1zSavoVnhH/logo/wordmark-on-light.svg?fit=max\u0026auto=format\u0026n=PIEJYA1zSavoVnhH\u0026q=85\u0026s=c7243fb417e4d3908f3b5fc634a28923","dark":"https://mintcdn.com/hi-doctor-ai/PIEJYA1zSavoVnhH/logo/wordmark-on-dark.svg?fit=max\u0026auto=format\u0026n=PIEJYA1zSavoVnhH\u0026q=85\u0026s=06850588c83edfff94669e9260585343","href":"https://hi-doctor.ai"},"favicon":"https://mintcdn.com/hi-doctor-ai/V_4Yl0k2E857_Kxm/favicon.svg?fit=max\u0026auto=format\u0026n=V_4Yl0k2E857_Kxm\u0026q=85\u0026s=581ac27595afff79fbc35c5d54d60709","api":{"openapi":"api-reference/openapi.json","examples":{"prefill":true},"mdx":{"auth":{"method":"bearer"},"server":"https://api.hi-doctor.ai"}},"background":{"color":{"light":"#FFFFFF","dark":"#0A0A0A"}},"navbar":{"links":[{"icon":"star","href":"https://www.trustpilot.com/review/hi-doctor.ai","label":"Reviews"},{"icon":"envelope","href":"mailto:hello@hi-doctor.ai","label":"Support"}],"primary":{"type":"button","label":"Start a consultation","href":"https://hi-doctor.ai/consultation"}},"footer":{"socials":{"website":"https://hi-doctor.ai"}},"search":{"prompt":"Search Hi Doctor docs..."},"seo":{"metatags":{"description":"Hi Doctor operates across the whole European Union: residents of all 27 EU member states can use the service, and every consultation is reviewed by an EU-licensed doctor. Weight loss, hair growth and sexual health consultations. Connect your account to an AI assistant with the Hi Doctor MCP connector, or build on the REST API.","author":"Hi Doctor","robots":"index, follow, max-image-preview:large, max-snippet:-1","og:site_name":"Hi Doctor Documentation","og:type":"website","og:locale":"en_US","twitter:card":"summary_large_image","theme-color":"#157A5C"},"organization":{"name":"Hi Doctor","url":"https://hi-doctor.ai"},"indexing":"navigable"},"fonts":{"family":"Figtree"},"errors":{"404":{"redirect":false,"title":"Page not found","description":"This page moved or never existed. [Back to the docs](/)"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity",{"title":"Hi Doctor Docs search","description":"Search the documentation with the Hi Doctor Docs MCP server.","icon":"magnifying-glass","href":"https://docs.hi-doctor.ai/mcp"},{"title":"Connect Hi Doctor","description":"Install the Hi Doctor MCP connector for patient tools.","icon":"plug","href":"/mcp/connect"}],"display":"header"},"markdown":{"instructions":"Connect the Hi Doctor MCP connector at https://mcp.hi-doctor.ai/mcp. Add this URL as a remote HTTP MCP server in your client, then sign in and authorise access through OAuth. Setup: https://docs.hi-doctor.ai/mcp/connect.\n\nThe REST API base is https://api.hi-doctor.ai. Hi Doctor Docs at https://docs.hi-doctor.ai/mcp searches documentation; connect to the product endpoint above for patient tools.\n\nHi Doctor operates across the whole European Union: residents of all 27 EU member states can use the service, and every consultation is reviewed by an EU-licensed doctor. Every consultation is reviewed in full by an EU-licensed doctor, who decides on medical grounds only. No algorithm, assistant or API call approves a consultation, issues a prescription or changes a dose. The service is available in eight languages: English, Spanish, German, Dutch, Italian, French, Portuguese and Chinese.\n\n## Rules an assistant must follow\n\n- Never invent, assume or infer a medical answer. \"I don't know\" is a real answer: ask the patient to pick the closest option rather than guessing for them.\n- Never give medical advice and never suggest a medication or a dose. An EU-licensed doctor decides those.\n- If a questionnaire returns `ineligible`, say so plainly. Do not retry with altered answers.\n- Before anything that costs money or cancels a plan, state exactly what will happen and get an explicit yes.\n- Cancellation takes effect at the **end of the paid period**, not immediately. Say so.\n- An early order is irreversible: it creates the renewal consultation immediately and uses up the period's one early order. Explain that and get an explicit yes.\n- Prescription and invoice links are medical documents. A `signed_redirect` link opens without signing in: give it only to the patient, never repeat it anywhere shared.\n- Send option `value`s, not the labels shown to the patient. Labels are translated, values are stable.\n- Never ask for card details. Payment happens on Stripe's hosted checkout via a link.\n- On severe or sudden symptoms (chest pain, difficulty breathing, severe allergic reaction, suicidal thoughts), stop and direct the patient to their local emergency number."},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"OpenAPI spec","icon":"file-code","href":"/api-reference/openapi.json"},{"anchor":"Add the MCP connector","icon":"plug","href":"https://claude.ai/customize/connectors?modal=add-custom-connector\u0026connectorName=Hi%20Doctor\u0026connectorUrl=https://mcp.hi-doctor.ai/mcp"},{"anchor":"AI integration prompt","icon":"wand-magic-sparkles","href":"/mcp/ai-integration"},{"anchor":"hi-doctor.ai","icon":"house-medical","href":"https://hi-doctor.ai"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"hi-doctor-ai","hasAudioNarration":false,"actualSubdomain":"hi-doctor-ai","customDomains":["docs.hi-doctor.ai"],"gitSource":{"type":"github","owner":"online-medicine","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6aeb4f77b21018c2553e6554","collectionId":"479e76df-8b71-4bcd-b29d-f545ddafad1a","liveDeploymentHistoryId":"6aeb4f77b21018c2553e6554","schemaVersion":"v3"},"entitlements":{},"buildId":"6aeb4f77b21018c2553e6554","clientVersion":"0.0.4067","searchFilterCounts":[{"language":"default","tag":"Health library","count":132},{"language":"default","tag":"API reference","count":114},{"language":"default","tag":"Endpoints","count":104},{"language":"default","tag":"Medicines","count":72},{"language":"default","tag":"Partners","count":47},{"language":"default","tag":"Sexual-health medicines","count":28},{"language":"default","tag":"Documentation","count":26},{"language":"default","tag":"Partner API reference","count":26},{"language":"default","tag":"Conditions","count":25},{"language":"default","tag":"Progress","count":23}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":":root{--hd-brand: #157a5c;--hd-brand-strong: #0e6149;--hd-tint: #e3f4ec;--hd-canvas: #ffffff;--hd-alt: #f4f7f4;--hd-border: #e0e0e0;--hd-secondary: #666666;--hd-ink: #000000;--hd-brand-deep: #0b2b22;--hd-dark-bg: #0a0a0a;--hd-dark-surface: #161616;--hd-dark-raised: #1c1c1c;--hd-dark-border: #262626;--hd-dark-text: #ededed;--hd-dark-muted: #a1a1a1;--hd-dark-accent: #39c69c;--hd-status-warning: #8f5e1d;--hd-status-warning-wash: #f6e9dd;--hd-canvas-rgb: 255 255 255;--hd-tint-rgb: 227 244 236;--hd-ink-rgb: 0 0 0;--hd-dark-accent-rgb: 57 198 156;--hd-label-on-dark: rgb(var(--hd-tint-rgb) / 0.75);--hd-card-bg: var(--hd-brand-deep);--hd-card-fg: var(--hd-tint);--hd-card-accent: var(--hd-tint);--hd-card-accent-rgb: var(--hd-tint-rgb);--hd-card-border: rgb(var(--hd-ink-rgb) / 0.1)}html.dark{--hd-label-on-dark: var(--hd-dark-muted);--hd-card-bg: var(--hd-dark-surface);--hd-card-fg: var(--hd-dark-text);--hd-card-accent: var(--hd-dark-accent);--hd-card-accent-rgb: var(--hd-dark-accent-rgb);--hd-card-border: var(--hd-dark-border);--gray-50: 250 250 250;--gray-100: 245 245 245;--gray-200: 237 237 237;--gray-300: 212 212 212;--gray-400: 161 161 161;--gray-500: 115 115 115;--gray-600: 82 82 82;--gray-700: 58 58 58;--gray-800: 38 38 38;--gray-900: 22 22 22;--gray-950: 10 10 10}.nav-logo{height:26px;width:auto;max-width:none}a:has(>.nav-logo){display:inline-flex;align-items:center;min-height:44px}@media (max-width: 1023px){.nav-logo{height:24px}}#topbar-cta-button a{--hd-cta-bg: var(--hd-ink);--hd-cta-fg: var(--hd-canvas);--hd-cta-ring: var(--hd-brand);background-color:var(--hd-cta-bg);color:var(--hd-cta-fg);border-radius:999px;transition:background-color 160ms ease, color 160ms ease}#topbar-cta-button a>span.absolute{background-color:transparent;opacity:1}#topbar-cta-button a span,#topbar-cta-button a svg{color:var(--hd-cta-fg)}#topbar-cta-button a:hover{--hd-cta-bg: var(--hd-brand);--hd-cta-fg: var(--hd-canvas);transition-duration:240ms}#topbar-cta-button a:focus-visible{outline:2px solid var(--hd-cta-ring);outline-offset:2px}html.dark #topbar-cta-button a{--hd-cta-bg: var(--hd-canvas);--hd-cta-fg: var(--hd-ink);--hd-cta-ring: var(--hd-dark-accent)}html.dark #topbar-cta-button a:hover{--hd-cta-bg: var(--hd-tint);--hd-cta-fg: var(--hd-ink)}.hd-agent-card{width:100%;max-width:100%;min-width:0;margin:12px 0 20px;border-radius:12px;border:1px solid var(--hd-card-border);overflow:hidden;box-sizing:border-box;background:var(--hd-card-bg)}.hd-agent-titlebar{display:flex;align-items:center;gap:10px;width:100%;box-sizing:border-box;padding:10px 14px;background:rgb(var(--hd-canvas-rgb) / 0.05);border-bottom:1px solid rgb(var(--hd-canvas-rgb) / 0.1)}.hd-agent-mark{display:inline-flex;align-items:center;color:var(--hd-card-accent)}.hd-agent-filename{flex:1;font-family:ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, monospace;font-size:11px;letter-spacing:0.18em;text-transform:uppercase;color:var(--hd-card-accent)}.hd-agent-copy{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:8px;border:1px solid rgb(var(--hd-canvas-rgb) / 0.18);background:transparent;color:var(--hd-canvas);font-size:12px;cursor:pointer;transition:background-color 160ms ease, border-color 160ms ease}.hd-agent-copy:hover{background:rgb(var(--hd-canvas-rgb) / 0.1);border-color:rgb(var(--hd-canvas-rgb) / 0.32);transition-duration:240ms}.hd-agent-copy-copied{color:var(--hd-card-accent);border-color:var(--hd-card-accent)}.hd-agent-body{width:100%;max-height:340px;overflow-y:auto;overflow-x:auto;margin:0!important;padding:16px 18px!important;background:var(--hd-card-bg)!important;border:none!important;border-radius:0!important;box-shadow:none!important;font-family:ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, monospace!important;font-size:12.5px!important;line-height:1.65!important;color:var(--hd-card-fg)!important;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;scrollbar-width:thin;scrollbar-color:rgb(var(--hd-canvas-rgb) / 0.18) transparent}.hd-agent-footer{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:10px 14px;background:rgb(var(--hd-canvas-rgb) / 0.04);border-top:1px solid rgb(var(--hd-canvas-rgb) / 0.1)}.hd-agent-footer-label{font-family:ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, monospace;font-size:10px;letter-spacing:0.2em;text-transform:uppercase;color:var(--hd-label-on-dark)}.hd-agent-chips{display:flex;flex-wrap:wrap;gap:6px}.hd-agent-chip{padding:3px 9px;border-radius:999px;background:rgb(var(--hd-card-accent-rgb) / 0.14);color:var(--hd-card-accent);font-size:11px;white-space:nowrap}.hd-agent-card pre,.hd-agent-card code{max-width:100%}#content-area h1,#content-area h2,#content-area h3,#content-area h4{color:var(--hd-ink)}html.dark #content-area h1,html.dark #content-area h2,html.dark #content-area h3,html.dark #content-area h4{color:var(--hd-canvas)}html.dark #content-area table th,html.dark #content-area table td{border-color:var(--hd-dark-border)}html.dark #content-area table th{color:var(--hd-dark-text)}html.dark #content-area :not(pre):not(a)>code{background-color:var(--hd-dark-surface);border-color:var(--hd-dark-border);color:var(--hd-dark-text)}.sidebar-group-header{font-family:ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, monospace;font-size:11px;font-weight:600;line-height:1.2;letter-spacing:0.16em;text-transform:uppercase;color:var(--hd-brand);margin-top:0.35rem;margin-bottom:0.9rem}.sidebar-group-header .sidebar-title{font:inherit;letter-spacing:inherit}html.dark .sidebar-group-header{color:var(--hd-label-on-dark)}.callout[data-callout-type=\"note\"]{border-color:var(--hd-border);background-color:var(--hd-alt)}.callout[data-callout-type=\"note\"] [data-component-part=\"callout-icon\"] svg,.callout[data-callout-type=\"note\"] [data-component-part=\"callout-content\"]{color:var(--hd-secondary)}.callout[data-callout-type=\"info\"]{border-color:var(--hd-brand);background-color:var(--hd-tint)}.callout[data-callout-type=\"info\"] [data-component-part=\"callout-icon\"] svg,.callout[data-callout-type=\"info\"] [data-component-part=\"callout-content\"]{color:var(--hd-brand-deep)}.callout[data-callout-type=\"tip\"]{border-color:var(--hd-brand-strong);background-color:var(--hd-canvas)}.callout[data-callout-type=\"tip\"] [data-component-part=\"callout-icon\"] svg,.callout[data-callout-type=\"tip\"] [data-component-part=\"callout-content\"]{color:var(--hd-brand-deep)}.callout[data-callout-type=\"warning\"]{border-color:var(--hd-status-warning);background-color:var(--hd-status-warning-wash)}.callout[data-callout-type=\"warning\"] [data-component-part=\"callout-icon\"] svg{color:var(--hd-status-warning)}.callout[data-callout-type=\"warning\"] [data-component-part=\"callout-content\"]{color:var(--hd-ink)}html.dark .callout[data-callout-type=\"note\"]{border-color:var(--hd-dark-border);background-color:var(--hd-dark-surface)}html.dark .callout[data-callout-type=\"note\"] [data-component-part=\"callout-icon\"] svg,html.dark .callout[data-callout-type=\"note\"] [data-component-part=\"callout-content\"]{color:var(--hd-dark-muted)}html.dark .callout[data-callout-type=\"info\"]{border-color:rgb(var(--hd-dark-accent-rgb) / 0.6);background-color:rgb(var(--hd-dark-accent-rgb) / 0.1)}html.dark .callout[data-callout-type=\"tip\"]{border-color:rgb(var(--hd-dark-accent-rgb) / 0.5);background-color:transparent}html.dark .callout[data-callout-type=\"info\"] [data-component-part=\"callout-icon\"] svg,html.dark .callout[data-callout-type=\"tip\"] [data-component-part=\"callout-icon\"] svg{color:var(--hd-dark-accent)}html.dark .callout[data-callout-type=\"info\"] [data-component-part=\"callout-content\"],html.dark .callout[data-callout-type=\"tip\"] [data-component-part=\"callout-content\"]{color:var(--hd-dark-text)}html.dark .callout[data-callout-type=\"warning\"]{border-color:#a57e4a;background-color:rgb(143 94 29 / 0.22)}html.dark .callout[data-callout-type=\"warning\"] [data-component-part=\"callout-icon\"] svg,html.dark .callout[data-callout-type=\"warning\"] [data-component-part=\"callout-content\"]{color:#d8b28a}"}],"page":{"pagePath":"api-reference/consultations/submit-a-consultation","slug":"/api-reference/consultations/submit-a-consultation","pageMetadata":{"title":"Submit a consultation","description":"Submits a patient's questionnaire answers for clinical review. The patient's consent flags must all be true and the notice version must be the current one (otherwise 422 consent_notice_outdated with current_notice_version). schema_version and schema_hash must name the published questionnaire (otherwise 409 schema_outdated with the current pair). Retries with the same Idempotency-Key and body return the original response.\n\nAnswer only the questions that apply after branching: an answer to a step the other answers hide (conditional display) is refused with 422 unexpected_question_key, one error item per hidden question_key. Errors never repeat a submitted answer value or identifier; they name the question_key instead (an unexpected question_key is echoed as sent). A pharmacy selection that is not valid for the patient's country is refused with 422 pharmacy_selection_invalid (question_key pharmacy_selection), whatever the directory's reason.\n\npatient.national_identifier is optional: send it where the product country's prescribing needs one (otherwise 422 patient_identifier_required, unless the identifier is already stored for the patient). An unknown type or invalid value is refused with 422 invalid_request (field patient.national_identifier, code invalid_identifier); it is never echoed or returned. In live mode it is stored on the patient's account the first time; a different identifier for the same patient is refused with 409 patient_conflict and never overwrites it. Test mode validates it and stores nothing.\n\npatient.identity_document is optional: send it where electronic prescribing in the patient's country needs the patient's identity document before approval (a national id_card or a passport, with the country that issued it). It is validated like the patient's own profile (5 to 20 letters or digits; for a few issuing countries an id_card number is also checked against its national format); one that breaks those rules is refused with 422 invalid_request (field patient.identity_document, code invalid_identity_document). Structural errors keep their nested field errors (for example field patient.identity_document.type, code invalid_choice, for an unsupported type; patient.identity_document.number, code required, when the number is missing). It is never echoed or returned. In live mode it is stored on the patient's account the first time; a different document for the same patient is refused with 409 patient_conflict and never overwrites it. Test mode validates it and stores nothing. Without it, the reviewing doctor, if they need it, asks through an information request with reason_code identity_document_required.\n\npatient.address line1 and line2 are stored joined with \", \" in one street line of at most 200 characters (separator included); a longer address is refused with 422 invalid_request (field patient.address), never truncated. patient.address.country is the patient's country of residence and must be an EU member state (ISO 3166-1 alpha-2 or alpha-3), in test and live mode alike; any other value is refused with 422 invalid_request (field patient.address.country, code residence_outside_eu). Without it, the product country is the residence. A patient who withdrew consent is refused with 409 consent_withdrawn. Requires the consultations:write scope.\n\n### Access, effects and retries\n**Ownership:** The API key's own partner and mode (test or live).\n\n**Prerequisites:** A partner API key with the `consultations:write` scope.\n\n**Effects:** Creates the consultation (and the patient on first submission) and sends it to clinical review; emits consultation webhook events.\n\n**Retries:** Required Idempotency-Key: a retry with the same key and body within 24 hours returns the stored response.","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json post /v1/partner/consultations/","href":"/api-reference/consultations/submit-a-consultation","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n h3: \"h3\",\n p: \"p\",\n strong: \"strong\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Submits a patient’s questionnaire answers for clinical review. The patient’s consent flags must all be true and the notice version must be the current one (otherwise 422 consent_notice_outdated with current_notice_version). schema_version and schema_hash must name the published questionnaire (otherwise 409 schema_outdated with the current pair). Retries with the same Idempotency-Key and body return the original response.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"Answer only the questions that apply after branching: an answer to a step the other answers hide (conditional display) is refused with 422 unexpected_question_key, one error item per hidden question_key. Errors never repeat a submitted answer value or identifier; they name the question_key instead (an unexpected question_key is echoed as sent). A pharmacy selection that is not valid for the patient’s country is refused with 422 pharmacy_selection_invalid (question_key pharmacy_selection), whatever the directory’s reason.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"patient.national_identifier is optional: send it where the product country’s prescribing needs one (otherwise 422 patient_identifier_required, unless the identifier is already stored for the patient). An unknown type or invalid value is refused with 422 invalid_request (field patient.national_identifier, code invalid_identifier); it is never echoed or returned. In live mode it is stored on the patient’s account the first time; a different identifier for the same patient is refused with 409 patient_conflict and never overwrites it. Test mode validates it and stores nothing.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"patient.identity_document is optional: send it where electronic prescribing in the patient’s country needs the patient’s identity document before approval (a national id_card or a passport, with the country that issued it). It is validated like the patient’s own profile (5 to 20 letters or digits; for a few issuing countries an id_card number is also checked against its national format); one that breaks those rules is refused with 422 invalid_request (field patient.identity_document, code invalid_identity_document). Structural errors keep their nested field errors (for example field patient.identity_document.type, code invalid_choice, for an unsupported type; patient.identity_document.number, code required, when the number is missing). It is never echoed or returned. In live mode it is stored on the patient’s account the first time; a different document for the same patient is refused with 409 patient_conflict and never overwrites it. Test mode validates it and stores nothing. Without it, the reviewing doctor, if they need it, asks through an information request with reason_code identity_document_required.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"patient.address line1 and line2 are stored joined with ”, ” in one street line of at most 200 characters (separator included); a longer address is refused with 422 invalid_request (field patient.address), never truncated. patient.address.country is the patient’s country of residence and must be an EU member state (ISO 3166-1 alpha-2 or alpha-3), in test and live mode alike; any other value is refused with 422 invalid_request (field patient.address.country, code residence_outside_eu). Without it, the product country is the residence. A patient who withdrew consent is refused with 409 consent_withdrawn. Requires the consultations:write scope.\"\n }), \"\\n\", _jsx(_components.h3, {\n children: \"Access, effects and retries\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Ownership:\"\n }), \" The API key’s own partner and mode (test or live).\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Prerequisites:\"\n }), \" A partner API key with the \", _jsx(_components.code, {\n children: \"consultations:write\"\n }), \" scope.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Effects:\"\n }), \" Creates the consultation (and the patient on first submission) and sends it to clinical review; emits consultation webhook events.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Retries:\"\n }), \" Required Idempotency-Key: a retry with the same key and body within 24 hours returns the stored response.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Submit a consultation","description":"Submits a patient's questionnaire answers for clinical review. The patient's consent flags must all be true and the notice version must be the current one (otherwise 422 consent_notice_outdated with current_notice_version). schema_version and schema_hash must name the published questionnaire (otherwise 409 schema_outdated with the current pair). Retries with the same Idempotency-Key and body return the original response.\n\nAnswer only the questions that apply after branching: an answer to a step the other answers hide (conditional display) is refused with 422 unexpected_question_key, one error item per hidden question_key. Errors never repeat a submitted answer value or identifier; they name the question_key instead (an unexpected question_key is echoed as sent). A pharmacy selection that is not valid for the patient's country is refused with 422 pharmacy_selection_invalid (question_key pharmacy_selection), whatever the directory's reason.\n\npatient.national_identifier is optional: send it where the product country's prescribing needs one (otherwise 422 patient_identifier_required, unless the identifier is already stored for the patient). An unknown type or invalid value is refused with 422 invalid_request (field patient.national_identifier, code invalid_identifier); it is never echoed or returned. In live mode it is stored on the patient's account the first time; a different identifier for the same patient is refused with 409 patient_conflict and never overwrites it. Test mode validates it and stores nothing.\n\npatient.identity_document is optional: send it where electronic prescribing in the patient's country needs the patient's identity document before approval (a national id_card or a passport, with the country that issued it). It is validated like the patient's own profile (5 to 20 letters or digits; for a few issuing countries an id_card number is also checked against its national format); one that breaks those rules is refused with 422 invalid_request (field patient.identity_document, code invalid_identity_document). Structural errors keep their nested field errors (for example field patient.identity_document.type, code invalid_choice, for an unsupported type; patient.identity_document.number, code required, when the number is missing). It is never echoed or returned. In live mode it is stored on the patient's account the first time; a different document for the same patient is refused with 409 patient_conflict and never overwrites it. Test mode validates it and stores nothing. Without it, the reviewing doctor, if they need it, asks through an information request with reason_code identity_document_required.\n\npatient.address line1 and line2 are stored joined with \", \" in one street line of at most 200 characters (separator included); a longer address is refused with 422 invalid_request (field patient.address), never truncated. patient.address.country is the patient's country of residence and must be an EU member state (ISO 3166-1 alpha-2 or alpha-3), in test and live mode alike; any other value is refused with 422 invalid_request (field patient.address.country, code residence_outside_eu). Without it, the product country is the residence. A patient who withdrew consent is refused with 409 consent_withdrawn. Requires the consultations:write scope.\n\n### Access, effects and retries\n**Ownership:** The API key's own partner and mode (test or live).\n\n**Prerequisites:** A partner API key with the `consultations:write` scope.\n\n**Effects:** Creates the consultation (and the patient on first submission) and sends it to clinical review; emits consultation webhook events.\n\n**Retries:** Required Idempotency-Key: a retry with the same key and body within 24 hours returns the stored response.","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json post /v1/partner/consultations/","href":"/api-reference/consultations/submit-a-consultation","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"create_consultation","description":"Submits a patient's questionnaire answers for clinical review. The patient's consent flags must all be true and the notice version must be the current one (otherwise 422 consent_notice_outdated with current_notice_version). schema_version and schema_hash must name the published questionnaire (otherwise 409 schema_outdated with the current pair). Retries with the same Idempotency-Key and body return the original response.\n\nAnswer only the questions that apply after branching: an answer to a step the other answers hide (conditional display) is refused with 422 unexpected_question_key, one error item per hidden question_key. Errors never repeat a submitted answer value or identifier; they name the question_key instead (an unexpected question_key is echoed as sent). A pharmacy selection that is not valid for the patient's country is refused with 422 pharmacy_selection_invalid (question_key pharmacy_selection), whatever the directory's reason.\n\npatient.national_identifier is optional: send it where the product country's prescribing needs one (otherwise 422 patient_identifier_required, unless the identifier is already stored for the patient). An unknown type or invalid value is refused with 422 invalid_request (field patient.national_identifier, code invalid_identifier); it is never echoed or returned. In live mode it is stored on the patient's account the first time; a different identifier for the same patient is refused with 409 patient_conflict and never overwrites it. Test mode validates it and stores nothing.\n\npatient.identity_document is optional: send it where electronic prescribing in the patient's country needs the patient's identity document before approval (a national id_card or a passport, with the country that issued it). It is validated like the patient's own profile (5 to 20 letters or digits; for a few issuing countries an id_card number is also checked against its national format); one that breaks those rules is refused with 422 invalid_request (field patient.identity_document, code invalid_identity_document). Structural errors keep their nested field errors (for example field patient.identity_document.type, code invalid_choice, for an unsupported type; patient.identity_document.number, code required, when the number is missing). It is never echoed or returned. In live mode it is stored on the patient's account the first time; a different document for the same patient is refused with 409 patient_conflict and never overwrites it. Test mode validates it and stores nothing. Without it, the reviewing doctor, if they need it, asks through an information request with reason_code identity_document_required.\n\npatient.address line1 and line2 are stored joined with \", \" in one street line of at most 200 characters (separator included); a longer address is refused with 422 invalid_request (field patient.address), never truncated. patient.address.country is the patient's country of residence and must be an EU member state (ISO 3166-1 alpha-2 or alpha-3), in test and live mode alike; any other value is refused with 422 invalid_request (field patient.address.country, code residence_outside_eu). Without it, the product country is the residence. A patient who withdrew consent is refused with 409 consent_withdrawn. Requires the consultations:write scope.\n\n### Access, effects and retries\n**Ownership:** The API key's own partner and mode (test or live).\n\n**Prerequisites:** A partner API key with the `consultations:write` scope.\n\n**Effects:** Creates the consultation (and the patient on first submission) and sends it to clinical review; emits consultation webhook events.\n\n**Retries:** Required Idempotency-Key: a retry with the same key and body within 24 hours returns the stored response.","summary":"Submit a consultation","parameters":["15539aeb-8711-4c29-abcd-7092142038d3"],"tags":["Consultations"],"requestBody":"ddffc4da-8042-47da-a1dd-9a81c28d4612","security":["a1568530-ceaa-4c00-848b-4e6fc17ac9d9"],"responses":{"201":"80964896-e3be-49cc-b914-45de25fa6135","400":"0946f65c-f59d-4080-8f93-ff60688e9cfb","401":"9c57f358-1e31-4ec7-9270-453083e88330","403":"89bd47f4-d562-46cd-b532-11dff9206243","404":"1c12f668-e8a0-428e-9247-254b26c0515a","409":"2da17a58-fb70-4417-89d9-bfaec664b2cc","422":"3550f5a0-61de-4e3b-b2ac-8927911d2faa","429":"651c15cb-8422-4af2-b2e2-4b7cf10d9b2d"},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"set -eu\numask 077\n# Path values must be URL-encoded; query string excludes the leading question mark.\nurl=\"${HD_BASE_URL:?Set API origin}/v1/partner/consultations/${HD_QUERY_STRING:+?${HD_QUERY_STRING}}\"\nprintf 'Accept: application/json\\n' > \"${HD_REQUEST_HEADERS_FILE:?Private header file}\"\nprintf 'Authorization: Bearer %s\\n' \"${HD_PARTNER_API_KEY:?Set partner API key}\" >> \"$HD_REQUEST_HEADERS_FILE\"\n# Create the Idempotency-Key once per logical request, store it before the first attempt and send the same value on every retry.\nprintf 'Idempotency-Key: %s\\n' \"${HD_IDEMPOTENCY_KEY:?Set the stored Idempotency-Key; reuse it on retry}\" >> \"$HD_REQUEST_HEADERS_FILE\"\ncurl --silent --show-error --max-time 30 --request POST \\\n --header \"@$HD_REQUEST_HEADERS_FILE\" \\\n --dump-header \"${HD_HEADERS_FILE:?Private response header file}\" \\\n --output \"${HD_RESPONSE_FILE:?Private response file}\" \\\n --write-out '%{http_code}\\n%{content_type}\\n' \\\n --header 'Content-Type: application/json' \\\n --data-binary \"@${HD_REQUEST_FILE:?JSON fixture file}\" \\\n \"$url\"\n"},{"lang":"Python","label":"requests","source":"import os, json\nfrom pathlib import Path\nfrom urllib.parse import quote\nimport requests\nos.umask(0o077)\nurl = os.environ[\"HD_BASE_URL\"].rstrip(\"/\") + '/v1/partner/consultations/'\nif os.environ.get(\"HD_QUERY_STRING\"): url += \"?\" + os.environ[\"HD_QUERY_STRING\"]\nheaders = {\"Accept\": 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"HD_PARTNER_API_KEY\"]\n# Create the Idempotency-Key once per logical request, store it before the first attempt and send the same value on every retry.\nheaders[\"Idempotency-Key\"] = os.environ[\"HD_IDEMPOTENCY_KEY\"]\nkwargs = {}\nkwargs[\"json\"] = json.loads(Path(os.environ[\"HD_REQUEST_FILE\"]).read_text())\nresponse = requests.request('POST', url, headers=headers, timeout=30, allow_redirects=False, **kwargs)\nPath(os.environ[\"HD_RESPONSE_FILE\"]).write_bytes(response.content)\nPath(os.environ[\"HD_HEADERS_FILE\"]).write_text(json.dumps(dict(response.headers)))\nprint(response.status_code)\nprint(response.headers.get(\"Content-Type\", \"\"))\n"},{"lang":"JavaScript","label":"fetch","source":"import { readFileSync, writeFileSync } from \"node:fs\";\nconst env = process.env;\nlet url = env.HD_BASE_URL.replace(/\\/$/, \"\") + \"/v1/partner/consultations/\";\nif (env.HD_QUERY_STRING) url += \"?\" + env.HD_QUERY_STRING;\nconst headers = { \"Accept\": \"application/json\" };\nheaders.Authorization = \"Bearer \" + env.HD_PARTNER_API_KEY;\n// Create the Idempotency-Key once per logical request, store it before the first attempt and send the same value on every retry.\nheaders[\"Idempotency-Key\"] = env.HD_IDEMPOTENCY_KEY;\nconst options = { method: \"POST\", headers, redirect: \"manual\", signal: AbortSignal.timeout(30000) };\nheaders[\"Content-Type\"] = \"application/json\";\noptions.body = readFileSync(env.HD_REQUEST_FILE, \"utf8\");\nconst response = await fetch(url, options);\nwriteFileSync(env.HD_RESPONSE_FILE, Buffer.from(await response.arrayBuffer()), {mode: 0o600});\nwriteFileSync(env.HD_HEADERS_FILE, JSON.stringify(Object.fromEntries(response.headers)), {mode: 0o600});\nconsole.log(response.status);\nconsole.log(response.headers.get(\"content-type\") ?? \"\");\n"}],"method":"post","type":"path","servers":["a52f5261-d6ca-4f76-8d3e-ad58db271710"],"path":"/v1/partner/consultations/","baseUrlOptions":["https://api.hi-doctor.ai"],"title":"Submit a consultation","codeSamples":[{"label":"curl","lang":"Shell","source":"set -eu\numask 077\n# Path values must be URL-encoded; query string excludes the leading question mark.\nurl=\"${HD_BASE_URL:?Set API origin}/v1/partner/consultations/${HD_QUERY_STRING:+?${HD_QUERY_STRING}}\"\nprintf 'Accept: application/json\\n' > \"${HD_REQUEST_HEADERS_FILE:?Private header file}\"\nprintf 'Authorization: Bearer %s\\n' \"${HD_PARTNER_API_KEY:?Set partner API key}\" >> \"$HD_REQUEST_HEADERS_FILE\"\n# Create the Idempotency-Key once per logical request, store it before the first attempt and send the same value on every retry.\nprintf 'Idempotency-Key: %s\\n' \"${HD_IDEMPOTENCY_KEY:?Set the stored Idempotency-Key; reuse it on retry}\" >> \"$HD_REQUEST_HEADERS_FILE\"\ncurl --silent --show-error --max-time 30 --request POST \\\n --header \"@$HD_REQUEST_HEADERS_FILE\" \\\n --dump-header \"${HD_HEADERS_FILE:?Private response header file}\" \\\n --output \"${HD_RESPONSE_FILE:?Private response file}\" \\\n --write-out '%{http_code}\\n%{content_type}\\n' \\\n --header 'Content-Type: application/json' \\\n --data-binary \"@${HD_REQUEST_FILE:?JSON fixture file}\" \\\n \"$url\"\n"},{"label":"requests","lang":"Python","source":"import os, json\nfrom pathlib import Path\nfrom urllib.parse import quote\nimport requests\nos.umask(0o077)\nurl = os.environ[\"HD_BASE_URL\"].rstrip(\"/\") + '/v1/partner/consultations/'\nif os.environ.get(\"HD_QUERY_STRING\"): url += \"?\" + os.environ[\"HD_QUERY_STRING\"]\nheaders = {\"Accept\": 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"HD_PARTNER_API_KEY\"]\n# Create the Idempotency-Key once per logical request, store it before the first attempt and send the same value on every retry.\nheaders[\"Idempotency-Key\"] = os.environ[\"HD_IDEMPOTENCY_KEY\"]\nkwargs = {}\nkwargs[\"json\"] = json.loads(Path(os.environ[\"HD_REQUEST_FILE\"]).read_text())\nresponse = requests.request('POST', url, headers=headers, timeout=30, allow_redirects=False, **kwargs)\nPath(os.environ[\"HD_RESPONSE_FILE\"]).write_bytes(response.content)\nPath(os.environ[\"HD_HEADERS_FILE\"]).write_text(json.dumps(dict(response.headers)))\nprint(response.status_code)\nprint(response.headers.get(\"Content-Type\", \"\"))\n"},{"label":"fetch","lang":"JavaScript","source":"import { readFileSync, writeFileSync } from \"node:fs\";\nconst env = process.env;\nlet url = env.HD_BASE_URL.replace(/\\/$/, \"\") + \"/v1/partner/consultations/\";\nif (env.HD_QUERY_STRING) url += \"?\" + env.HD_QUERY_STRING;\nconst headers = { \"Accept\": \"application/json\" };\nheaders.Authorization = \"Bearer \" + env.HD_PARTNER_API_KEY;\n// Create the Idempotency-Key once per logical request, store it before the first attempt and send the same value on every retry.\nheaders[\"Idempotency-Key\"] = env.HD_IDEMPOTENCY_KEY;\nconst options = { method: \"POST\", headers, redirect: \"manual\", signal: AbortSignal.timeout(30000) };\nheaders[\"Content-Type\"] = \"application/json\";\noptions.body = readFileSync(env.HD_REQUEST_FILE, \"utf8\");\nconst response = await fetch(url, options);\nwriteFileSync(env.HD_RESPONSE_FILE, Buffer.from(await response.arrayBuffer()), {mode: 0o600});\nwriteFileSync(env.HD_HEADERS_FILE, JSON.stringify(Object.fromEntries(response.headers)), {mode: 0o600});\nconsole.log(response.status);\nconsole.log(response.headers.get(\"content-type\") ?? \"\");\n"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[{"body.product_id":"oral_finasteride","body.country":"ES","body.plan_key":"one_off","body.schema_version":"412","body.schema_hash":"\u003cHASH>","body.patient.external_patient_id":"cust-8812","body.patient.email":"patient@example.com","body.patient.first_name":"Sam","body.patient.last_name":"Example","body.patient.date_of_birth":"1988-04-02","body.patient.sex":"male","body.patient.consent.terms_accepted":true,"body.patient.consent.privacy_accepted":true,"body.patient.consent.clinical_data_processing_accepted":true,"body.patient.consent.accepted_at":"2026-11-03T10:10:00Z","body.patient.consent.notice_version":"pn-2026-11","body.patient.consent.evidence_reference":"consent-log-55102","body.patient.consent.ip.oneOf.0":"203.0.113.24","body.patient.phone":"+34600000000","body.patient.address.line1":"Calle Example 1","body.patient.address.line2":"2B","body.patient.address.city":"Madrid","body.patient.address.postal_code":"28001","body.patient.address.country":"ES","body.patient.national_identifier.type":"dni","body.patient.national_identifier.value":"12345678Z","body.answers.items.0.oneOf.0.question_key":"hair_loss_duration","body.answers.items.0.oneOf.0.value":"over_1_year","body.dosage":"1 mg","body.locale":"es","body.external_reference":"order-10045"}]},"dependencies":{"parameters":{"15539aeb-8711-4c29-abcd-7092142038d3":{"in":"header","name":"Idempotency-Key","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,128}$","isRequired":true,"description":"A unique key per logical request. Retrying with the same key and body returns the stored response for 24 hours instead of creating a second consultation; the same key with a different body is refused.","uniqueKey":"","typeLabel":"string"},"description":"A unique key per logical request. Retrying with the same key and body returns the stored response for 24 hours instead of creating a second consultation; the same key with a different body is refused.","required":true,"example":"order-10045-submit-1"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"product_id":{"type":"string","maxLength":64,"minLength":1,"pattern":"\\S","description":"Product id from GET /v1/partner/products.","isRequired":true,"uniqueKey":"product_id","typeLabel":"string"},"country":{"type":"string","maxLength":3,"minLength":1,"pattern":"\\S","description":"ISO 3166-1 alpha-2 code of a country your partner catalogue offers the product in.","isRequired":true,"uniqueKey":"country","typeLabel":"string"},"plan_key":{"type":"string","maxLength":32,"minLength":1,"pattern":"\\S","description":"One of the product's plans[].plan_key for the country.","isRequired":true,"uniqueKey":"plan_key","typeLabel":"string"},"schema_version":{"type":"string","maxLength":64,"minLength":1,"pattern":"\\S","description":"schema_version of the questionnaire you rendered.","isRequired":true,"uniqueKey":"schema_version","typeLabel":"string"},"schema_hash":{"type":"string","maxLength":64,"minLength":1,"pattern":"\\S","description":"schema_hash of the questionnaire you rendered, with or without a locale.","isRequired":true,"uniqueKey":"schema_hash","typeLabel":"string"},"patient":{"type":"object","description":"Patient identity, consent and optional national identifier.","required":["consent","date_of_birth","email","external_patient_id","first_name","last_name","sex"],"properties":{"external_patient_id":{"type":"string","maxLength":128,"minLength":1,"pattern":"\\S","description":"Your stable identifier for the patient.","isRequired":true,"uniqueKey":"patient.external_patient_id","typeLabel":"string"},"email":{"type":"string","format":"email","minLength":1,"pattern":"\\S","description":"The patient's own email address.","isRequired":true,"uniqueKey":"patient.email","typeLabel":"string\u003cemail>"},"first_name":{"type":"string","maxLength":150,"minLength":1,"pattern":"\\S","description":"Legal first name.","isRequired":true,"uniqueKey":"patient.first_name","typeLabel":"string"},"last_name":{"type":"string","maxLength":150,"minLength":1,"pattern":"\\S","description":"Legal last name.","isRequired":true,"uniqueKey":"patient.last_name","typeLabel":"string"},"date_of_birth":{"type":"string","format":"date","description":"Date of birth (YYYY-MM-DD).","isRequired":true,"uniqueKey":"patient.date_of_birth","typeLabel":"string\u003cdate>"},"sex":{"type":"string","description":"female, male, other or unspecified.","enum":["female","male","other","unspecified"],"isRequired":true,"uniqueKey":"patient.sex","typeLabel":"enum\u003cstring>"},"consent":{"type":"object","description":"The patient's consent, captured by you before submission.","required":["accepted_at","clinical_data_processing_accepted","notice_version","privacy_accepted","terms_accepted"],"properties":{"terms_accepted":{"type":"boolean","enum":[true],"description":"The patient accepted Hi Doctor's terms for the consultation. Must be true.","isRequired":true,"uniqueKey":"patient.consent.terms_accepted","typeLabel":"enum\u003cboolean>"},"privacy_accepted":{"type":"boolean","enum":[true],"description":"The patient was shown Hi Doctor's privacy notice. Must be true.","isRequired":true,"uniqueKey":"patient.consent.privacy_accepted","typeLabel":"enum\u003cboolean>"},"clinical_data_processing_accepted":{"type":"boolean","enum":[true],"description":"The patient agreed that their health data is processed for the consultation. Must be true.","isRequired":true,"uniqueKey":"patient.consent.clinical_data_processing_accepted","typeLabel":"enum\u003cboolean>"},"accepted_at":{"type":"string","format":"date-time","description":"When the patient gave consent (ISO 8601).","isRequired":true,"uniqueKey":"patient.consent.accepted_at","typeLabel":"string\u003cdate-time>"},"notice_version":{"type":"string","maxLength":32,"minLength":1,"pattern":"\\S","description":"The version of the patient notice you showed; must be the current one.","isRequired":true,"uniqueKey":"patient.consent.notice_version","typeLabel":"string"},"evidence_reference":{"type":"string","maxLength":128,"description":"Your reference to the stored consent record.","uniqueKey":"patient.consent.evidence_reference","typeLabel":"string"},"ip":{"oneOf":[{"type":"string","description":"The IPv4 or IPv6 address the patient accepted from, or null; any other value is refused with 422 invalid_request.","format":"ipv4","uniqueKey":"patient.consent.ip.oneOf.0","typeLabel":"string\u003cipv4>"},{"type":"string","description":"The IPv4 or IPv6 address the patient accepted from, or null; any other value is refused with 422 invalid_request.","format":"ipv6","uniqueKey":"patient.consent.ip.oneOf.1","typeLabel":"string\u003cipv6>"},{"type":"null","uniqueKey":"patient.consent.ip.oneOf.2","typeLabel":"null"}],"uniqueKey":"patient.consent.ip","typeLabel":"string\u003cipv4> | string\u003cipv6> | null"}},"isRequired":true,"uniqueKey":"patient.consent","typeLabel":"object"},"phone":{"type":"string","maxLength":16,"description":"Phone number in E.164 format.","uniqueKey":"patient.phone","typeLabel":"string"},"address":{"type":"object","description":"The patient's postal address.","properties":{"line1":{"type":"string","description":"line1 and line2 are stored as one street line, joined with \", \"; together (separator included) they must not exceed 200 characters, or the request is refused with 422 invalid_request (field patient.address). Nothing is truncated.","maxLength":200,"uniqueKey":"patient.address.line1","typeLabel":"string"},"line2":{"type":"string","description":"line1 and line2 are stored as one street line, joined with \", \"; together (separator included) they must not exceed 200 characters, or the request is refused with 422 invalid_request (field patient.address). Nothing is truncated.","maxLength":200,"uniqueKey":"patient.address.line2","typeLabel":"string"},"city":{"type":"string","maxLength":120,"description":"City.","uniqueKey":"patient.address.city","typeLabel":"string"},"postal_code":{"type":"string","maxLength":20,"description":"Postal code.","uniqueKey":"patient.address.postal_code","typeLabel":"string"},"country":{"type":"string","description":"Country of residence, ISO 3166-1 alpha-2 or alpha-3. It must be one of the 27 EU member states (AT, BE, BG, CY, CZ, DE, DK, EE, ES, FI, FR, GR, HR, HU, IE, IT, LT, LU, LV, MT, NL, PL, PT, RO, SE, SI, SK). Defaults to the request country when absent or blank. A well-formed code outside the EU is refused with 422 invalid_request and an error item with field patient.address.country and code residence_outside_eu. A malformed value (null, or longer than 3 characters) fails field validation first: 422 invalid_request with the same field and the field validation code (null or max_length).","maxLength":3,"uniqueKey":"patient.address.country","typeLabel":"string"}},"uniqueKey":"patient.address","typeLabel":"object"},"national_identifier":{"type":"object","description":"Optional. The patient's national identifier for the product country, needed where that country's prescribing requires one (without it, a submission is refused with 422 patient_identifier_required unless the identifier is already stored for the patient). A type the product country does not use, or a value that fails validation, is refused with 422 invalid_request and an error item with field patient.national_identifier and code invalid_identifier; a missing, blank or too long type or value keeps its own field error instead (for example field patient.national_identifier.value, code required or max_length); the submitted value is never echoed in errors or returned in any response or event. Live mode stores it on the patient's account the first time; a later submission for the same patient with a different identifier is refused with 409 patient_conflict and never overwrites the stored one. Test mode validates it and stores nothing.","required":["type","value"],"properties":{"type":{"type":"string","description":"An identifier type of the product country (not the residence country). Types by country: BE: niss, eid_card_number; ES: dni, nie; IE: ppsn; IT: codice_fiscale, stp, eni; PT: nif; SE: personnummer.","maxLength":32,"minLength":1,"pattern":"\\S","isRequired":true,"uniqueKey":"patient.national_identifier.type","typeLabel":"string"},"value":{"type":"string","description":"The identifier as printed; it is validated (format and check digits) and normalised.","maxLength":32,"minLength":1,"pattern":"\\S","isRequired":true,"uniqueKey":"patient.national_identifier.value","typeLabel":"string"}},"uniqueKey":"patient.national_identifier","typeLabel":"object"},"identity_document":{"type":"object","description":"Optional. The patient's identity document: a national id_card or a passport, with the country that issued it. Electronic prescribing in some countries needs it before a doctor can approve. It is validated like a patient's own profile: every number must be 5 to 20 letters or digits after spaces, dots and hyphens are removed, and for a few issuing countries an id_card number is also checked against its national format and check character. A document that breaks these rules (unknown issuing state, wrong check character, number format) is refused with 422 invalid_request and an error item with field patient.identity_document and code invalid_identity_document. A structural error keeps its nested field error instead: a value that is not an object is field patient.identity_document.non_field_errors with code invalid, an unsupported type is field patient.identity_document.type with code invalid_choice, and a missing, blank or too long member is that member's field (for example patient.identity_document.number) with code required, blank or max_length. It is never echoed in errors or returned in any response or event. Live mode stores it on the patient's account the first time; a later submission for the same patient with a different document is refused with 409 patient_conflict and never overwrites the stored one. Test mode validates it and stores nothing. If the reviewing doctor needs it later, they ask with the information request reason identity_document_required.","required":["issuing_state","number","type"],"properties":{"type":{"type":"string","description":"passport or id_card.","enum":["passport","id_card"],"isRequired":true,"uniqueKey":"patient.identity_document.type","typeLabel":"enum\u003cstring>"},"number":{"type":"string","description":"The document number as printed; it is normalised.","maxLength":50,"minLength":1,"pattern":"\\S","isRequired":true,"uniqueKey":"patient.identity_document.number","typeLabel":"string"},"issuing_state":{"type":"string","description":"ISO 3166-1 alpha-2 or alpha-3 code of the country that issued the document.","maxLength":3,"minLength":1,"pattern":"\\S","isRequired":true,"uniqueKey":"patient.identity_document.issuing_state","typeLabel":"string"}},"uniqueKey":"patient.identity_document","typeLabel":"object"}},"isRequired":true,"uniqueKey":"patient","typeLabel":"object"},"answers":{"type":"array","items":{"oneOf":[{"type":"object","description":"One entries-v1 answer: question_key plus exactly one payload, value, values or skip, as the question kind\nrequires.","required":["question_key"],"properties":{"question_key":{"type":"string","description":"A question key from the questionnaire schema. Required, a non-empty string: an entry without one is refused with 422 invalid_answers.","minLength":1,"pattern":"\\S","isRequired":true,"uniqueKey":"answers.items.[INDEX].oneOf.0.question_key","typeLabel":"string"},"value":{"description":"The answer for option, confirm, upload and scalar kinds: an option value, a list of option values for multi kinds, true for a confirm, or an upload_id for an upload question.","uniqueKey":"answers.items.[INDEX].oneOf.0.value","typeLabel":"any"},"values":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"answers.items.[INDEX].oneOf.0.values.additionalProperties","typeLabel":"any"},"description":"The answer for input, iief5 and likert-grid kinds: an object of field values, for example {\"height\": 172, \"weight\": 96}.","uniqueKey":"answers.items.[INDEX].oneOf.0.values","typeLabel":"object"},"skip":{"type":"boolean","description":"true to skip an optional question (required false). A skipped entry carries only its locator (question_key, or on an information-request answer its alias key), skip and, optionally, the question's own step_id: value, values, option_inputs or any other member alongside it is refused with 422 invalid_answers.","enum":[true],"uniqueKey":"answers.items.[INDEX].oneOf.0.skip","typeLabel":"enum\u003cboolean>"},"option_inputs":{"type":"object","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"answers.items.[INDEX].oneOf.0.option_inputs.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"number","uniqueKey":"answers.items.[INDEX].oneOf.0.option_inputs.additionalProperties.oneOf.1","typeLabel":"number"},{"type":"boolean","uniqueKey":"answers.items.[INDEX].oneOf.0.option_inputs.additionalProperties.oneOf.2","typeLabel":"boolean"}],"uniqueKey":"answers.items.[INDEX].oneOf.0.option_inputs.additionalProperties","typeLabel":"string | number | boolean"},"description":"Extra input for options that require it, keyed by option value.","uniqueKey":"answers.items.[INDEX].oneOf.0.option_inputs","typeLabel":"object"}},"uniqueKey":"answers.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"One entries-v1 answer: question_key plus exactly one payload, value, values or skip, as the question kind\nrequires.","required":["question_key"],"properties":{"question_key":{"type":"string","description":"A question key from the questionnaire schema. Required, a non-empty string: an entry without one is refused with 422 invalid_answers.","minLength":1,"pattern":"\\S","isRequired":true,"uniqueKey":"answers.items.[INDEX].oneOf.1.question_key","typeLabel":"string"},"step_id":{"description":"Optional: the skipped question's own step_id.","uniqueKey":"answers.items.[INDEX].oneOf.1.step_id","typeLabel":"any"},"skip":{"type":"boolean","description":"true to skip an optional question (required false). A skipped entry carries only its locator (question_key, or on an information-request answer its alias key), skip and, optionally, the question's own step_id: value, values, option_inputs or any other member alongside it is refused with 422 invalid_answers.","enum":[true],"uniqueKey":"answers.items.[INDEX].oneOf.1.skip","typeLabel":"enum\u003cboolean>"},"value":{"description":"The answer for option, confirm, upload and scalar kinds: an option value, a list of option values for multi kinds, true for a confirm, or an upload_id for an upload question.","uniqueKey":"answers.items.[INDEX].oneOf.1.value","typeLabel":"any"},"values":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"answers.items.[INDEX].oneOf.1.values.additionalProperties","typeLabel":"any"},"description":"The answer for input, iief5 and likert-grid kinds: an object of field values, for example {\"height\": 172, \"weight\": 96}.","uniqueKey":"answers.items.[INDEX].oneOf.1.values","typeLabel":"object"},"option_inputs":{"type":"object","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"answers.items.[INDEX].oneOf.1.option_inputs.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"number","uniqueKey":"answers.items.[INDEX].oneOf.1.option_inputs.additionalProperties.oneOf.1","typeLabel":"number"},{"type":"boolean","uniqueKey":"answers.items.[INDEX].oneOf.1.option_inputs.additionalProperties.oneOf.2","typeLabel":"boolean"}],"uniqueKey":"answers.items.[INDEX].oneOf.1.option_inputs.additionalProperties","typeLabel":"string | number | boolean"},"description":"Extra input for options that require it, keyed by option value.","uniqueKey":"answers.items.[INDEX].oneOf.1.option_inputs","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"answers.items.[INDEX].oneOf.1","typeLabel":"object"}],"uniqueKey":"answers.items.[INDEX]","typeLabel":"object"},"minItems":1,"description":"The patient's answers as entries-v1 entries keyed by question_key. Answer only the steps that apply after branching.","isRequired":true,"uniqueKey":"answers","typeLabel":"object[]"},"dosage":{"type":"string","default":"","maxLength":32,"description":"One of the product's dosages[].dosage, when the product lists dosages.","uniqueKey":"dosage","typeLabel":"string"},"locale":{"type":"string","default":"","maxLength":2,"description":"Two-letter language code saved as the language of a new patient account; empty uses your partner default.","uniqueKey":"locale","typeLabel":"string"},"external_reference":{"type":"string","default":"","maxLength":128,"description":"Your order or case reference, unique per partner and mode.","uniqueKey":"external_reference","typeLabel":"string"}},"required":["answers","country","patient","plan_key","product_id","schema_hash","schema_version"],"uniqueKey":"","typeLabel":"object"},"examples":{"example-1":{"title":"example-1","value":{"product_id":"oral_finasteride","country":"ES","plan_key":"one_off","dosage":"1 mg","locale":"es","schema_version":"412","schema_hash":"\u003cHASH>","external_reference":"order-10045","patient":{"external_patient_id":"cust-8812","email":"patient@example.com","first_name":"Sam","last_name":"Example","date_of_birth":"1988-04-02","sex":"male","phone":"+34600000000","address":{"line1":"Calle Example 1","line2":"2B","city":"Madrid","postal_code":"28001","country":"ES"},"national_identifier":{"type":"dni","value":"12345678Z"},"consent":{"terms_accepted":true,"privacy_accepted":true,"clinical_data_processing_accepted":true,"accepted_at":"2026-11-03T10:10:00Z","notice_version":"pn-2026-11","evidence_reference":"consent-log-55102","ip":"203.0.113.24"}},"answers":[{"question_key":"hair_loss_duration","value":"over_1_year"}]}}},"exampleType":"examples"}},"required":true,"exampleType":"examples"},"responses":{"80964896-e3be-49cc-b914-45de25fa6135":{"headers":{"Idempotent-Replayed":{"schema":{"type":"string","enum":["true"]},"description":"true when the response is the stored one, replayed for a retry with the same Idempotency-Key and body; absent on the original response."},"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the current window for the most restrictive limit that applies. Absent on refusals made before the throttles run (brand header, flag off, partner_not_live)."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time, in seconds, when the window frees up."}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The consultation id.","isRequired":true,"uniqueKey":"id","typeLabel":"string\u003cuuid>"},"object":{"type":"string","description":"Always consultation.","enum":["consultation"],"isRequired":true,"uniqueKey":"object","typeLabel":"enum\u003cstring>"},"mode":{"type":"string","description":"test or live, from the API key.","enum":["live","test"],"isRequired":true,"uniqueKey":"mode","typeLabel":"enum\u003cstring>"},"status":{"type":"string","description":"Current consultation status.","enum":["submitted","in_review","info_requested","approved","rejected","cancelled"],"isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"version":{"type":"integer","description":"Increases with every change to the consultation's public state, i.e. every field of this object except version, status_history, updated_at and product.name (catalogue copy: a product rename does not advance it). Events carry the same number.","isRequired":true,"uniqueKey":"version","typeLabel":"integer"},"status_history":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","description":"The status entered.","enum":["submitted","in_review","info_requested","approved","rejected","cancelled"],"isRequired":true,"uniqueKey":"status_history.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"version":{"type":"integer","description":"Consultation version at this status.","isRequired":true,"uniqueKey":"status_history.items.[INDEX].version","typeLabel":"integer"},"at":{"type":"string","format":"date-time","description":"When the consultation entered this status.","isRequired":true,"uniqueKey":"status_history.items.[INDEX].at","typeLabel":"string\u003cdate-time>"}},"required":["at","status","version"],"uniqueKey":"status_history.items.[INDEX]","typeLabel":"object"},"description":"Every status change, oldest first.","isRequired":true,"uniqueKey":"status_history","typeLabel":"object[]"},"external_reference":{"oneOf":[{"type":"string","description":"Your order or case reference; null when none was sent.","isRequired":true,"uniqueKey":"external_reference.oneOf.0","typeLabel":"string"},{"type":"null","description":"Your order or case reference; null when none was sent.","isRequired":true,"uniqueKey":"external_reference.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"external_reference","typeLabel":"string | null"},"product":{"type":"object","description":"The product.","required":["name","product_id"],"properties":{"product_id":{"type":"string","description":"Product id from GET /v1/partner/products.","isRequired":true,"uniqueKey":"product.product_id","typeLabel":"string"},"name":{"type":"string","description":"Product display name.","isRequired":true,"uniqueKey":"product.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"product","typeLabel":"object"},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code.","isRequired":true,"uniqueKey":"country","typeLabel":"string"},"plan_key":{"oneOf":[{"type":"string","description":"The chosen plan.","isRequired":true,"uniqueKey":"plan_key.oneOf.0","typeLabel":"string"},{"type":"null","description":"The chosen plan.","isRequired":true,"uniqueKey":"plan_key.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"plan_key","typeLabel":"string | null"},"dosage":{"oneOf":[{"type":"string","description":"The chosen dosage; null when the product has none.","isRequired":true,"uniqueKey":"dosage.oneOf.0","typeLabel":"string"},{"type":"null","description":"The chosen dosage; null when the product has none.","isRequired":true,"uniqueKey":"dosage.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"dosage","typeLabel":"string | null"},"patient":{"type":"object","description":"The patient.","required":["external_patient_id","id"],"properties":{"id":{"type":"string","format":"uuid","description":"The patient id.","isRequired":true,"uniqueKey":"patient.id","typeLabel":"string\u003cuuid>"},"external_patient_id":{"type":"string","description":"Your stable identifier for the patient.","isRequired":true,"uniqueKey":"patient.external_patient_id","typeLabel":"string"}},"isRequired":true,"uniqueKey":"patient","typeLabel":"object"},"submitted_at":{"type":"string","format":"date-time","description":"When the consultation was submitted.","isRequired":true,"uniqueKey":"submitted_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"type":"string","format":"date-time","description":"When it last changed.","isRequired":true,"uniqueKey":"updated_at","typeLabel":"string\u003cdate-time>"},"reviewer":{"oneOf":[{"type":"object","description":"Present once the reviewing doctor has opened the case.","required":["description","licence_country"],"properties":{"description":{"type":"string","description":"Who reviewed the consultation.","isRequired":true,"uniqueKey":"reviewer.oneOf.0.description","typeLabel":"string"},"licence_country":{"oneOf":[{"type":"string","description":"ISO 3166-1 alpha-2 country of the reviewing doctor's licence; null when not recorded.","isRequired":true,"uniqueKey":"reviewer.oneOf.0.licence_country.oneOf.0","typeLabel":"string"},{"type":"null","description":"ISO 3166-1 alpha-2 country of the reviewing doctor's licence; null when not recorded.","isRequired":true,"uniqueKey":"reviewer.oneOf.0.licence_country.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"reviewer.oneOf.0.licence_country","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"reviewer.oneOf.0","typeLabel":"object"},{"type":"string","description":"Present once the reviewing doctor has opened the case.","enum":[null],"isRequired":true,"uniqueKey":"reviewer.oneOf.1","typeLabel":"enum\u003cstring>"},{"type":"null","description":"Present once the reviewing doctor has opened the case.","enum":[null],"isRequired":true,"uniqueKey":"reviewer.oneOf.2","typeLabel":"null"}],"isRequired":true,"uniqueKey":"reviewer","typeLabel":"object | enum\u003cstring> | null"},"decision":{"oneOf":[{"type":"object","description":"The clinical decision; null until one is recorded.","required":["decided_at","outcome","reason_category"],"properties":{"outcome":{"type":"string","description":"approved or rejected.","enum":["approved","rejected"],"isRequired":true,"uniqueKey":"decision.oneOf.0.outcome","typeLabel":"enum\u003cstring>"},"reason_category":{"oneOf":[{"type":"string","description":"Category of a rejection; null otherwise.","enum":["safety","not_eligible"],"isRequired":true,"uniqueKey":"decision.oneOf.0.reason_category.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"string","description":"Category of a rejection; null otherwise.","enum":[null],"isRequired":true,"uniqueKey":"decision.oneOf.0.reason_category.oneOf.1","typeLabel":"enum\u003cstring>"},{"type":"null","description":"Category of a rejection; null otherwise.","enum":[null],"isRequired":true,"uniqueKey":"decision.oneOf.0.reason_category.oneOf.2","typeLabel":"null"}],"isRequired":true,"uniqueKey":"decision.oneOf.0.reason_category","typeLabel":"enum\u003cstring> · enum\u003cstring> · null"},"decided_at":{"oneOf":[{"type":"string","format":"date-time","description":"When the decision was recorded.","isRequired":true,"uniqueKey":"decision.oneOf.0.decided_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When the decision was recorded.","isRequired":true,"uniqueKey":"decision.oneOf.0.decided_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"decision.oneOf.0.decided_at","typeLabel":"string\u003cdate-time> | null"}},"isRequired":true,"uniqueKey":"decision.oneOf.0","typeLabel":"object"},{"type":"string","description":"The clinical decision; null until one is recorded.","enum":[null],"isRequired":true,"uniqueKey":"decision.oneOf.1","typeLabel":"enum\u003cstring>"},{"type":"null","description":"The clinical decision; null until one is recorded.","enum":[null],"isRequired":true,"uniqueKey":"decision.oneOf.2","typeLabel":"null"}],"isRequired":true,"uniqueKey":"decision","typeLabel":"object | enum\u003cstring> | null"},"open_info_request":{"oneOf":[{"type":"object","description":"The open information request; null when there is none.","required":["id","reason_code","requested_at"],"properties":{"id":{"type":"string","format":"uuid","description":"The information request id.","isRequired":true,"uniqueKey":"open_info_request.oneOf.0.id","typeLabel":"string\u003cuuid>"},"reason_code":{"type":"string","description":"Why the doctor needs more information.","enum":["answer_unclear","answer_inconsistent","photo_quality","photo_missing","measurement_check","medication_history","medical_history","identity_check","document_missing","identity_document_required","other_clarification"],"isRequired":true,"uniqueKey":"open_info_request.oneOf.0.reason_code","typeLabel":"enum\u003cstring>"},"requested_at":{"oneOf":[{"type":"string","format":"date-time","description":"When the doctor raised the request.","isRequired":true,"uniqueKey":"open_info_request.oneOf.0.requested_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When the doctor raised the request.","isRequired":true,"uniqueKey":"open_info_request.oneOf.0.requested_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"open_info_request.oneOf.0.requested_at","typeLabel":"string\u003cdate-time> | null"}},"isRequired":true,"uniqueKey":"open_info_request.oneOf.0","typeLabel":"object"},{"type":"string","description":"The open information request; null when there is none.","enum":[null],"isRequired":true,"uniqueKey":"open_info_request.oneOf.1","typeLabel":"enum\u003cstring>"},{"type":"null","description":"The open information request; null when there is none.","enum":[null],"isRequired":true,"uniqueKey":"open_info_request.oneOf.2","typeLabel":"null"}],"isRequired":true,"uniqueKey":"open_info_request","typeLabel":"object | enum\u003cstring> | null"},"prescriptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The prescription id.","isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"consultation_id":{"oneOf":[{"type":"string","format":"uuid","description":"The consultation this belongs to.","isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].consultation_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The consultation this belongs to.","isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].consultation_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].consultation_id","typeLabel":"string\u003cuuid> | null"},"status":{"type":"string","description":"issued until the prescription is cancelled. It does not say whether the prescription can still be used: read active, and compare expires_at yourself.","enum":["issued","cancelled"],"isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"active":{"type":"boolean","description":"false once the prescription is cancelled or no longer published to the patient, for example after a dispensing is recorded during a manual recovery. It does not check expiry: an expired prescription can stay active true, so compare expires_at yourself.","isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].active","typeLabel":"boolean"},"issued_at":{"oneOf":[{"type":"string","format":"date-time","description":"When the prescription was issued.","isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].issued_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When the prescription was issued.","isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].issued_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].issued_at","typeLabel":"string\u003cdate-time> | null"},"cancelled_at":{"oneOf":[{"type":"string","format":"date-time","description":"When the prescription was cancelled; null if it was not.","isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].cancelled_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When the prescription was cancelled; null if it was not.","isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].cancelled_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].cancelled_at","typeLabel":"string\u003cdate-time> | null"},"expires_at":{"oneOf":[{"type":"string","format":"date-time","description":"When the prescription expires, or null when not recorded. Always null in test mode.","isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].expires_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When the prescription expires, or null when not recorded. Always null in test mode.","isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].expires_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].expires_at","typeLabel":"string\u003cdate-time> | null"},"dispensing_country":{"oneOf":[{"type":"string","description":"ISO 3166-1 alpha-2 country where the prescription is dispensed, or null when not recorded. Always null in test mode.","isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].dispensing_country.oneOf.0","typeLabel":"string"},{"type":"null","description":"ISO 3166-1 alpha-2 country where the prescription is dispensed, or null when not recorded. Always null in test mode.","isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].dispensing_country.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].dispensing_country","typeLabel":"string | null"},"medication":{"type":"object","description":"The prescribed medication.","required":["dosage","name","prescribed_label","supply_days"],"properties":{"name":{"type":"string","description":"Medication name.","isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].medication.name","typeLabel":"string"},"prescribed_label":{"type":"string","description":"The medication as prescribed.","isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].medication.prescribed_label","typeLabel":"string"},"dosage":{"oneOf":[{"type":"string","description":"Prescribed dosage.","isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].medication.dosage.oneOf.0","typeLabel":"string"},{"type":"null","description":"Prescribed dosage.","isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].medication.dosage.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].medication.dosage","typeLabel":"string | null"},"supply_days":{"oneOf":[{"type":"integer","description":"Days of supply prescribed.","isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].medication.supply_days.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Days of supply prescribed.","isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].medication.supply_days.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].medication.supply_days","typeLabel":"integer | null"}},"isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].medication","typeLabel":"object"},"fulfilment":{"type":"object","description":"How the patient obtains the medication.","required":["route"],"properties":{"route":{"type":"string","description":"How the patient obtains the medication; see the fulfilment guide.","enum":["national_e_prescription","signed_pdf","pharmacy_delivery","cross_border_pdf"],"isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].fulfilment.route","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].fulfilment","typeLabel":"object"},"collected_at":{"oneOf":[{"type":"string","format":"date-time","description":"When the medication was collected, when known; otherwise null.","isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].collected_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When the medication was collected, when known; otherwise null.","isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].collected_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].collected_at","typeLabel":"string\u003cdate-time> | null"},"replaced_by":{"oneOf":[{"type":"string","format":"uuid","description":"The prescription that replaced this one.","isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].replaced_by.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The prescription that replaced this one.","isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].replaced_by.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"prescriptions.items.[INDEX].replaced_by","typeLabel":"string\u003cuuid> | null"}},"required":["active","cancelled_at","collected_at","consultation_id","dispensing_country","expires_at","fulfilment","id","issued_at","medication","replaced_by","status"],"uniqueKey":"prescriptions.items.[INDEX]","typeLabel":"object"},"description":"Prescriptions issued for the consultation.","isRequired":true,"uniqueKey":"prescriptions","typeLabel":"object[]"},"billing":{"type":"object","description":"Billing state and price of the consultation.","required":["price","state"],"properties":{"state":{"oneOf":[{"type":"string","description":"pending, billable, void or reversed.","enum":["pending","billable","void","reversed"],"isRequired":true,"uniqueKey":"billing.state.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"string","description":"pending, billable, void or reversed.","enum":[null],"isRequired":true,"uniqueKey":"billing.state.oneOf.1","typeLabel":"enum\u003cstring>"},{"type":"null","description":"pending, billable, void or reversed.","enum":[null],"isRequired":true,"uniqueKey":"billing.state.oneOf.2","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billing.state","typeLabel":"enum\u003cstring> · enum\u003cstring> · null"},"price":{"type":"object","description":"Price agreed for the consultation.","required":["amount_cents","currency"],"properties":{"amount_cents":{"type":"integer","description":"Amount in the currency's minor unit.","isRequired":true,"uniqueKey":"billing.price.amount_cents","typeLabel":"integer"},"currency":{"type":"string","description":"ISO 4217 currency code.","isRequired":true,"uniqueKey":"billing.price.currency","typeLabel":"string"}},"isRequired":true,"uniqueKey":"billing.price","typeLabel":"object"}},"isRequired":true,"uniqueKey":"billing","typeLabel":"object"},"cancellable":{"type":"boolean","description":"true exactly when POST /consultations/{consultation_id}/cancel would succeed now: the consultation is submitted, has no prescription, and (live) no doctor has opened it, no decision or electronic prescription signing has started, and no prescription issuance or replacement is in flight.","isRequired":true,"uniqueKey":"cancellable","typeLabel":"boolean"}},"required":["billing","cancellable","country","decision","dosage","external_reference","id","mode","object","open_info_request","patient","plan_key","prescriptions","product","reviewer","status","status_history","submitted_at","updated_at","version"],"uniqueKey":"","typeLabel":"object"},"examples":{"example-1":{"title":"example-1","value":{"id":"7f8b1c2e-4d5a-4e6f-9a0b-1c2d3e4f5a6b","object":"consultation","mode":"test","status":"submitted","version":1,"status_history":[{"status":"submitted","version":1,"at":"2026-11-03T10:15:00Z"}],"external_reference":"order-10045","product":{"product_id":"oral_finasteride","name":"Oral finasteride"},"country":"ES","plan_key":"one_off","dosage":"1 mg","patient":{"id":"0e1d2c3b-4a59-4687-8b9a-0b1c2d3e4f50","external_patient_id":"cust-8812"},"submitted_at":"2026-11-03T10:15:00Z","updated_at":"2026-11-03T10:15:00Z","reviewer":null,"decision":null,"open_info_request":null,"prescriptions":[],"billing":{"state":"pending","price":{"amount_cents":2900,"currency":"EUR"}},"cancellable":true}}},"exampleType":"examples"}},"description":"The new consultation.","exampleType":"examples"},"0946f65c-f59d-4080-8f93-ff60688e9cfb":{"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the current window for the most restrictive limit that applies. Absent on refusals made before the throttles run (brand header, flag off, partner_not_live)."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time, in seconds, when the window frees up."}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","description":"The error.","required":["code","message","request_id","type"],"properties":{"type":{"type":"string","description":"Error type, for example validation_error or rate_limited; see Errors in the partner guides.","enum":["api_error","authentication_error","conflict","invalid_request","not_found","permission_error","rate_limited","validation_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"A stable, machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"A human-readable explanation; do not parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","description":"Quote this identifier when you contact support.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code for this item.","isRequired":true,"uniqueKey":"error.errors.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable message. It never repeats the submitted value.","isRequired":true,"uniqueKey":"error.errors.items.[INDEX].message","typeLabel":"string"},"field":{"oneOf":[{"type":"string","description":"The request field the problem refers to, or null when none.","uniqueKey":"error.errors.items.[INDEX].field.oneOf.0","typeLabel":"string"},{"type":"null","description":"The request field the problem refers to, or null when none.","uniqueKey":"error.errors.items.[INDEX].field.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.errors.items.[INDEX].field","typeLabel":"string | null"},"question_key":{"oneOf":[{"type":"string","description":"The questionnaire question the problem refers to, or null when the entry named none.","uniqueKey":"error.errors.items.[INDEX].question_key.oneOf.0","typeLabel":"string"},{"type":"null","description":"The questionnaire question the problem refers to, or null when the entry named none.","uniqueKey":"error.errors.items.[INDEX].question_key.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.errors.items.[INDEX].question_key","typeLabel":"string | null"},"min":{"type":"number","format":"double","description":"On out_of_range: the lowest allowed value, when the schema sets one.","uniqueKey":"error.errors.items.[INDEX].min","typeLabel":"number\u003cdouble>"},"max":{"type":"number","format":"double","description":"On out_of_range: the highest allowed value, when the schema sets one.","uniqueKey":"error.errors.items.[INDEX].max","typeLabel":"number\u003cdouble>"}},"required":["code","message"],"uniqueKey":"error.errors.items.[INDEX]","typeLabel":"object"},"description":"Field-level problems, when any.","uniqueKey":"error.errors","typeLabel":"object[]"},"current":{"type":"object","description":"On 409 schema_outdated: the schema_version and schema_hash currently published.","required":["schema_hash","schema_version"],"properties":{"schema_version":{"type":"string","description":"The published schema_version.","isRequired":true,"uniqueKey":"error.current.schema_version","typeLabel":"string"},"schema_hash":{"type":"string","description":"A hash accepted for the published version.","isRequired":true,"uniqueKey":"error.current.schema_hash","typeLabel":"string"}},"uniqueKey":"error.current","typeLabel":"object"},"current_notice_version":{"type":"string","description":"On 422 consent_notice_outdated: the patient notice version to show and record.","uniqueKey":"error.current_notice_version","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"example-1":{"title":"example-1","value":{"error":{"type":"invalid_request","code":"parse_error","message":"JSON parse error - Expecting value: line 1 column 1 (char 0)","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-2":{"title":"example-2","value":{"error":{"type":"invalid_request","code":"idempotency_key_required","message":"This endpoint requires an Idempotency-Key header.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-3":{"title":"example-3","value":{"error":{"type":"invalid_request","code":"invalid_idempotency_key","message":"Idempotency-Key must match [A-Za-z0-9_-]{8,128}.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-4":{"title":"example-4","value":{"error":{"type":"invalid_request","code":"brand_header_not_allowed","message":"Brand headers are not accepted on partner requests; the brand comes from the API key.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}}},"exampleType":"examples"}},"description":"The request is malformed. Partner routes also refuse the patient-app brand header with 400 brand_header_not_allowed, before authentication (no rate-limit headers).","exampleType":"examples"},"9c57f358-1e31-4ec7-9270-453083e88330":{"headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"The authentication scheme to use: Bearer realm=\"hi-doctor-partner\"."}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","description":"The error.","required":["code","message","request_id","type"],"properties":{"type":{"type":"string","description":"Error type, for example validation_error or rate_limited; see Errors in the partner guides.","enum":["api_error","authentication_error","conflict","invalid_request","not_found","permission_error","rate_limited","validation_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"A stable, machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"A human-readable explanation; do not parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","description":"Quote this identifier when you contact support.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code for this item.","isRequired":true,"uniqueKey":"error.errors.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable message. It never repeats the submitted value.","isRequired":true,"uniqueKey":"error.errors.items.[INDEX].message","typeLabel":"string"},"field":{"oneOf":[{"type":"string","description":"The request field the problem refers to, or null when none.","uniqueKey":"error.errors.items.[INDEX].field.oneOf.0","typeLabel":"string"},{"type":"null","description":"The request field the problem refers to, or null when none.","uniqueKey":"error.errors.items.[INDEX].field.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.errors.items.[INDEX].field","typeLabel":"string | null"},"question_key":{"oneOf":[{"type":"string","description":"The questionnaire question the problem refers to, or null when the entry named none.","uniqueKey":"error.errors.items.[INDEX].question_key.oneOf.0","typeLabel":"string"},{"type":"null","description":"The questionnaire question the problem refers to, or null when the entry named none.","uniqueKey":"error.errors.items.[INDEX].question_key.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.errors.items.[INDEX].question_key","typeLabel":"string | null"},"min":{"type":"number","format":"double","description":"On out_of_range: the lowest allowed value, when the schema sets one.","uniqueKey":"error.errors.items.[INDEX].min","typeLabel":"number\u003cdouble>"},"max":{"type":"number","format":"double","description":"On out_of_range: the highest allowed value, when the schema sets one.","uniqueKey":"error.errors.items.[INDEX].max","typeLabel":"number\u003cdouble>"}},"required":["code","message"],"uniqueKey":"error.errors.items.[INDEX]","typeLabel":"object"},"description":"Field-level problems, when any.","uniqueKey":"error.errors","typeLabel":"object[]"},"current":{"type":"object","description":"On 409 schema_outdated: the schema_version and schema_hash currently published.","required":["schema_hash","schema_version"],"properties":{"schema_version":{"type":"string","description":"The published schema_version.","isRequired":true,"uniqueKey":"error.current.schema_version","typeLabel":"string"},"schema_hash":{"type":"string","description":"A hash accepted for the published version.","isRequired":true,"uniqueKey":"error.current.schema_hash","typeLabel":"string"}},"uniqueKey":"error.current","typeLabel":"object"},"current_notice_version":{"type":"string","description":"On 422 consent_notice_outdated: the patient notice version to show and record.","uniqueKey":"error.current_notice_version","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"example-1":{"title":"example-1","value":{"error":{"type":"authentication_error","code":"not_authenticated","message":"Authentication credentials were not provided.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-2":{"title":"example-2","value":{"error":{"type":"authentication_error","code":"invalid_token","message":"The API key is not valid.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-3":{"title":"example-3","value":{"error":{"type":"authentication_error","code":"key_revoked","message":"The API key has been revoked.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-4":{"title":"example-4","value":{"error":{"type":"authentication_error","code":"key_expired","message":"The API key has expired.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-5":{"title":"example-5","value":{"error":{"type":"authentication_error","code":"partner_suspended","message":"The partner account is suspended.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}}},"exampleType":"examples"}},"description":"The API key is missing, malformed, unknown, revoked or expired, or the partner account is suspended. The response carries WWW-Authenticate: Bearer realm=\"hi-doctor-partner\" and no rate-limit headers.","exampleType":"examples"},"89bd47f4-d562-46cd-b532-11dff9206243":{"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the current window for the most restrictive limit that applies. Absent on refusals made before the throttles run (brand header, flag off, partner_not_live)."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time, in seconds, when the window frees up."}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","description":"The error.","required":["code","message","request_id","type"],"properties":{"type":{"type":"string","description":"Error type, for example validation_error or rate_limited; see Errors in the partner guides.","enum":["api_error","authentication_error","conflict","invalid_request","not_found","permission_error","rate_limited","validation_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"A stable, machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"A human-readable explanation; do not parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","description":"Quote this identifier when you contact support.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code for this item.","isRequired":true,"uniqueKey":"error.errors.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable message. It never repeats the submitted value.","isRequired":true,"uniqueKey":"error.errors.items.[INDEX].message","typeLabel":"string"},"field":{"oneOf":[{"type":"string","description":"The request field the problem refers to, or null when none.","uniqueKey":"error.errors.items.[INDEX].field.oneOf.0","typeLabel":"string"},{"type":"null","description":"The request field the problem refers to, or null when none.","uniqueKey":"error.errors.items.[INDEX].field.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.errors.items.[INDEX].field","typeLabel":"string | null"},"question_key":{"oneOf":[{"type":"string","description":"The questionnaire question the problem refers to, or null when the entry named none.","uniqueKey":"error.errors.items.[INDEX].question_key.oneOf.0","typeLabel":"string"},{"type":"null","description":"The questionnaire question the problem refers to, or null when the entry named none.","uniqueKey":"error.errors.items.[INDEX].question_key.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.errors.items.[INDEX].question_key","typeLabel":"string | null"},"min":{"type":"number","format":"double","description":"On out_of_range: the lowest allowed value, when the schema sets one.","uniqueKey":"error.errors.items.[INDEX].min","typeLabel":"number\u003cdouble>"},"max":{"type":"number","format":"double","description":"On out_of_range: the highest allowed value, when the schema sets one.","uniqueKey":"error.errors.items.[INDEX].max","typeLabel":"number\u003cdouble>"}},"required":["code","message"],"uniqueKey":"error.errors.items.[INDEX]","typeLabel":"object"},"description":"Field-level problems, when any.","uniqueKey":"error.errors","typeLabel":"object[]"},"current":{"type":"object","description":"On 409 schema_outdated: the schema_version and schema_hash currently published.","required":["schema_hash","schema_version"],"properties":{"schema_version":{"type":"string","description":"The published schema_version.","isRequired":true,"uniqueKey":"error.current.schema_version","typeLabel":"string"},"schema_hash":{"type":"string","description":"A hash accepted for the published version.","isRequired":true,"uniqueKey":"error.current.schema_hash","typeLabel":"string"}},"uniqueKey":"error.current","typeLabel":"object"},"current_notice_version":{"type":"string","description":"On 422 consent_notice_outdated: the patient notice version to show and record.","uniqueKey":"error.current_notice_version","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"example-1":{"title":"example-1","value":{"error":{"type":"permission_error","code":"insufficient_scope","message":"This endpoint requires the consultations:write scope.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-2":{"title":"example-2","value":{"error":{"type":"permission_error","code":"partner_not_live","message":"Live mode is not enabled for this partner.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}}},"exampleType":"examples"}},"description":"The key lacks the consultations:write scope (insufficient_scope), or a live key was used while live mode is not enabled for the partner (partner_not_live).","exampleType":"examples"},"1c12f668-e8a0-428e-9247-254b26c0515a":{"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the current window for the most restrictive limit that applies. Absent on refusals made before the throttles run (brand header, flag off, partner_not_live)."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time, in seconds, when the window frees up."}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["error"],"properties":{"error":{"type":"object","description":"The error.","required":["code","message","request_id","type"],"properties":{"type":{"type":"string","description":"Error type, for example validation_error or rate_limited; see Errors in the partner guides.","enum":["api_error","authentication_error","conflict","invalid_request","not_found","permission_error","rate_limited","validation_error"],"isRequired":true,"uniqueKey":"oneOf.0.error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"A stable, machine-readable error code.","isRequired":true,"uniqueKey":"oneOf.0.error.code","typeLabel":"string"},"message":{"type":"string","description":"A human-readable explanation; do not parse it.","isRequired":true,"uniqueKey":"oneOf.0.error.message","typeLabel":"string"},"request_id":{"type":"string","description":"Quote this identifier when you contact support.","isRequired":true,"uniqueKey":"oneOf.0.error.request_id","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code for this item.","isRequired":true,"uniqueKey":"oneOf.0.error.errors.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable message. It never repeats the submitted value.","isRequired":true,"uniqueKey":"oneOf.0.error.errors.items.[INDEX].message","typeLabel":"string"},"field":{"oneOf":[{"type":"string","description":"The request field the problem refers to, or null when none.","uniqueKey":"oneOf.0.error.errors.items.[INDEX].field.oneOf.0","typeLabel":"string"},{"type":"null","description":"The request field the problem refers to, or null when none.","uniqueKey":"oneOf.0.error.errors.items.[INDEX].field.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.error.errors.items.[INDEX].field","typeLabel":"string | null"},"question_key":{"oneOf":[{"type":"string","description":"The questionnaire question the problem refers to, or null when the entry named none.","uniqueKey":"oneOf.0.error.errors.items.[INDEX].question_key.oneOf.0","typeLabel":"string"},{"type":"null","description":"The questionnaire question the problem refers to, or null when the entry named none.","uniqueKey":"oneOf.0.error.errors.items.[INDEX].question_key.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.error.errors.items.[INDEX].question_key","typeLabel":"string | null"},"min":{"type":"number","format":"double","description":"On out_of_range: the lowest allowed value, when the schema sets one.","uniqueKey":"oneOf.0.error.errors.items.[INDEX].min","typeLabel":"number\u003cdouble>"},"max":{"type":"number","format":"double","description":"On out_of_range: the highest allowed value, when the schema sets one.","uniqueKey":"oneOf.0.error.errors.items.[INDEX].max","typeLabel":"number\u003cdouble>"}},"required":["code","message"],"uniqueKey":"oneOf.0.error.errors.items.[INDEX]","typeLabel":"object"},"description":"Field-level problems, when any.","uniqueKey":"oneOf.0.error.errors","typeLabel":"object[]"},"current":{"type":"object","description":"On 409 schema_outdated: the schema_version and schema_hash currently published.","required":["schema_hash","schema_version"],"properties":{"schema_version":{"type":"string","description":"The published schema_version.","isRequired":true,"uniqueKey":"oneOf.0.error.current.schema_version","typeLabel":"string"},"schema_hash":{"type":"string","description":"A hash accepted for the published version.","isRequired":true,"uniqueKey":"oneOf.0.error.current.schema_hash","typeLabel":"string"}},"uniqueKey":"oneOf.0.error.current","typeLabel":"object"},"current_notice_version":{"type":"string","description":"On 422 consent_notice_outdated: the patient notice version to show and record.","uniqueKey":"oneOf.0.error.current_notice_version","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.0.error","typeLabel":"object"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","description":"The reduced body every route answers while the Partner API is switched off for the environment: no code, message or request_id.","required":["error"],"properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["not_found"],"description":"Always not_found.","isRequired":true,"uniqueKey":"oneOf.1.error.type","typeLabel":"enum\u003cstring>"}},"required":["type"],"additionalProperties":false,"description":"Only the error type; no code, message or request_id.","isRequired":true,"uniqueKey":"oneOf.1.error","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"example-1":{"title":"example-1","value":{"error":{"type":"not_found"}}}},"exampleType":"examples"}},"description":"While the Partner API is switched off for the environment, every route answers 404 with only {\"error\": {\"type\": \"not_found\"}}, before authentication.","exampleType":"examples"},"2da17a58-fb70-4417-89d9-bfaec664b2cc":{"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the current window for the most restrictive limit that applies. Absent on refusals made before the throttles run (brand header, flag off, partner_not_live)."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time, in seconds, when the window frees up."}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","description":"The error.","required":["code","message","request_id","type"],"properties":{"type":{"type":"string","description":"Error type, for example validation_error or rate_limited; see Errors in the partner guides.","enum":["api_error","authentication_error","conflict","invalid_request","not_found","permission_error","rate_limited","validation_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"A stable, machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"A human-readable explanation; do not parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","description":"Quote this identifier when you contact support.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code for this item.","isRequired":true,"uniqueKey":"error.errors.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable message. It never repeats the submitted value.","isRequired":true,"uniqueKey":"error.errors.items.[INDEX].message","typeLabel":"string"},"field":{"oneOf":[{"type":"string","description":"The request field the problem refers to, or null when none.","uniqueKey":"error.errors.items.[INDEX].field.oneOf.0","typeLabel":"string"},{"type":"null","description":"The request field the problem refers to, or null when none.","uniqueKey":"error.errors.items.[INDEX].field.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.errors.items.[INDEX].field","typeLabel":"string | null"},"question_key":{"oneOf":[{"type":"string","description":"The questionnaire question the problem refers to, or null when the entry named none.","uniqueKey":"error.errors.items.[INDEX].question_key.oneOf.0","typeLabel":"string"},{"type":"null","description":"The questionnaire question the problem refers to, or null when the entry named none.","uniqueKey":"error.errors.items.[INDEX].question_key.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.errors.items.[INDEX].question_key","typeLabel":"string | null"},"min":{"type":"number","format":"double","description":"On out_of_range: the lowest allowed value, when the schema sets one.","uniqueKey":"error.errors.items.[INDEX].min","typeLabel":"number\u003cdouble>"},"max":{"type":"number","format":"double","description":"On out_of_range: the highest allowed value, when the schema sets one.","uniqueKey":"error.errors.items.[INDEX].max","typeLabel":"number\u003cdouble>"}},"required":["code","message"],"uniqueKey":"error.errors.items.[INDEX]","typeLabel":"object"},"description":"Field-level problems, when any.","uniqueKey":"error.errors","typeLabel":"object[]"},"current":{"type":"object","description":"On 409 schema_outdated: the schema_version and schema_hash currently published.","required":["schema_hash","schema_version"],"properties":{"schema_version":{"type":"string","description":"The published schema_version.","isRequired":true,"uniqueKey":"error.current.schema_version","typeLabel":"string"},"schema_hash":{"type":"string","description":"A hash accepted for the published version.","isRequired":true,"uniqueKey":"error.current.schema_hash","typeLabel":"string"}},"uniqueKey":"error.current","typeLabel":"object"},"current_notice_version":{"type":"string","description":"On 422 consent_notice_outdated: the patient notice version to show and record.","uniqueKey":"error.current_notice_version","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"example-1":{"title":"example-1","value":{"error":{"type":"conflict","code":"duplicate_external_reference","message":"A consultation with this external_reference already exists.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-2":{"title":"example-2","value":{"error":{"type":"conflict","code":"patient_conflict","message":"An account with this email already exists for the brand.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-3":{"title":"example-3","value":{"error":{"type":"conflict","code":"patient_conflict","message":"The national identifier does not match the patient's account.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-4":{"title":"example-4","value":{"error":{"type":"conflict","code":"patient_conflict","message":"The identity document does not match the patient's account.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-5":{"title":"example-5","value":{"error":{"type":"conflict","code":"schema_outdated","message":"The questionnaire schema has changed; fetch it again.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8","current":{"schema_version":"413","schema_hash":"\u003cHASH>"}}}},"example-6":{"title":"example-6","value":{"error":{"type":"conflict","code":"consent_withdrawn","message":"The patient withdrew consent; no further consultations are processed.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-7":{"title":"example-7","value":{"error":{"type":"conflict","code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still executing.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-8":{"title":"example-8","value":{"error":{"type":"conflict","code":"context_unsupported","message":"The submission needs a context the partner API does not offer.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}}},"exampleType":"examples"}},"description":"The request conflicts with the resource's current state.","exampleType":"examples"},"3550f5a0-61de-4e3b-b2ac-8927911d2faa":{"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the current window for the most restrictive limit that applies. Absent on refusals made before the throttles run (brand header, flag off, partner_not_live)."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time, in seconds, when the window frees up."}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","description":"The error.","required":["code","message","request_id","type"],"properties":{"type":{"type":"string","description":"Error type, for example validation_error or rate_limited; see Errors in the partner guides.","enum":["api_error","authentication_error","conflict","invalid_request","not_found","permission_error","rate_limited","validation_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"A stable, machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"A human-readable explanation; do not parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","description":"Quote this identifier when you contact support.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code for this item.","isRequired":true,"uniqueKey":"error.errors.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable message. It never repeats the submitted value.","isRequired":true,"uniqueKey":"error.errors.items.[INDEX].message","typeLabel":"string"},"field":{"oneOf":[{"type":"string","description":"The request field the problem refers to, or null when none.","uniqueKey":"error.errors.items.[INDEX].field.oneOf.0","typeLabel":"string"},{"type":"null","description":"The request field the problem refers to, or null when none.","uniqueKey":"error.errors.items.[INDEX].field.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.errors.items.[INDEX].field","typeLabel":"string | null"},"question_key":{"oneOf":[{"type":"string","description":"The questionnaire question the problem refers to, or null when the entry named none.","uniqueKey":"error.errors.items.[INDEX].question_key.oneOf.0","typeLabel":"string"},{"type":"null","description":"The questionnaire question the problem refers to, or null when the entry named none.","uniqueKey":"error.errors.items.[INDEX].question_key.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.errors.items.[INDEX].question_key","typeLabel":"string | null"},"min":{"type":"number","format":"double","description":"On out_of_range: the lowest allowed value, when the schema sets one.","uniqueKey":"error.errors.items.[INDEX].min","typeLabel":"number\u003cdouble>"},"max":{"type":"number","format":"double","description":"On out_of_range: the highest allowed value, when the schema sets one.","uniqueKey":"error.errors.items.[INDEX].max","typeLabel":"number\u003cdouble>"}},"required":["code","message"],"uniqueKey":"error.errors.items.[INDEX]","typeLabel":"object"},"description":"Field-level problems, when any.","uniqueKey":"error.errors","typeLabel":"object[]"},"current":{"type":"object","description":"On 409 schema_outdated: the schema_version and schema_hash currently published.","required":["schema_hash","schema_version"],"properties":{"schema_version":{"type":"string","description":"The published schema_version.","isRequired":true,"uniqueKey":"error.current.schema_version","typeLabel":"string"},"schema_hash":{"type":"string","description":"A hash accepted for the published version.","isRequired":true,"uniqueKey":"error.current.schema_hash","typeLabel":"string"}},"uniqueKey":"error.current","typeLabel":"object"},"current_notice_version":{"type":"string","description":"On 422 consent_notice_outdated: the patient notice version to show and record.","uniqueKey":"error.current_notice_version","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"example-1":{"title":"example-1","value":{"error":{"type":"validation_error","code":"invalid_request","message":"The request body is invalid.","errors":[{"field":"answers","code":"required","message":"This field is required."}],"request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-2":{"title":"example-2","value":{"error":{"type":"validation_error","code":"invalid_request","message":"The request body is invalid.","errors":[{"field":"patient.national_identifier","code":"invalid_identifier","message":"Enter a valid identifier of a type the product country uses."}],"request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-3":{"title":"example-3","value":{"error":{"type":"validation_error","code":"invalid_request","message":"The request body is invalid.","errors":[{"field":"patient.identity_document","code":"invalid_identity_document","message":"Enter a valid document number for this document type and issuing state."}],"request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-4":{"title":"example-4","value":{"error":{"type":"validation_error","code":"invalid_request","message":"The request body is invalid.","errors":[{"field":"patient.identity_document.type","code":"invalid_choice","message":"This is not a valid choice."}],"request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-5":{"title":"example-5","value":{"error":{"type":"validation_error","code":"invalid_request","message":"The request body is invalid.","errors":[{"field":"patient.address","code":"max_length","message":"line1 and line2 together must not exceed 200 characters."}],"request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-6":{"title":"example-6","value":{"error":{"type":"validation_error","code":"invalid_request","message":"The request body is invalid.","errors":[{"field":"patient.address.country","code":"residence_outside_eu","message":"Country of residence must be within the EU"}],"request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-7":{"title":"example-7","value":{"error":{"type":"validation_error","code":"unexpected_question_key","message":"Only questions that apply after branching may be answered.","errors":[{"question_key":"hair_loss_pattern","code":"unexpected_question_key","message":"Only questions that apply after branching may be answered."}],"request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-8":{"title":"example-8","value":{"error":{"type":"validation_error","code":"invalid_answers","message":"The answer to question hair_loss_duration does not match the questionnaire schema.","errors":[{"question_key":"hair_loss_duration","code":"invalid_answers","message":"The answer to question hair_loss_duration does not match the questionnaire schema."}],"request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-9":{"title":"example-9","value":{"error":{"type":"validation_error","code":"out_of_range","message":"A value is outside the schema's input bounds.","errors":[{"question_key":"body_measurements","field":"height","code":"out_of_range","message":"The value is outside the allowed range.","min":100,"max":250}],"request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-10":{"title":"example-10","value":{"error":{"type":"validation_error","code":"upload_unusable","message":"The upload does not exist, has expired or was already used.","errors":[{"question_key":"scalp_photo_top","code":"upload_unusable","message":"The upload does not exist, has expired or was already used."}],"request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-11":{"title":"example-11","value":{"error":{"type":"validation_error","code":"pharmacy_selection_invalid","message":"The pharmacy selection is not valid for this patient's country.","errors":[{"question_key":"pharmacy_selection","code":"pharmacy_selection_invalid","message":"Choose a pharmacy from the directory."}],"request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-12":{"title":"example-12","value":{"error":{"type":"validation_error","code":"patient_identifier_required","message":"The patient's national identifier is required for this country.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-13":{"title":"example-13","value":{"error":{"type":"validation_error","code":"consent_required","message":"Every consent flag must be true.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-14":{"title":"example-14","value":{"error":{"type":"validation_error","code":"consent_notice_outdated","message":"The patient notice version is not the current one.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8","current_notice_version":"pn-2026-12"}}},"example-15":{"title":"example-15","value":{"error":{"type":"validation_error","code":"product_unavailable","message":"This product is not available for that country, plan or dosage.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-16":{"title":"example-16","value":{"error":{"type":"validation_error","code":"country_conflict","message":"The answers name a country other than the product country enabled for this partner.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-17":{"title":"example-17","value":{"error":{"type":"validation_error","code":"country_closed","message":"New consultations are not accepted for this country.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-18":{"title":"example-18","value":{"error":{"type":"validation_error","code":"clinical_ineligibility","message":"The answers do not meet the clinical eligibility rules.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}},"example-19":{"title":"example-19","value":{"error":{"type":"validation_error","code":"idempotency_key_reuse","message":"The Idempotency-Key was used with a different request.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}}},"exampleType":"examples"}},"description":"The request body is invalid.","exampleType":"examples"},"651c15cb-8422-4af2-b2e2-4b7cf10d9b2d":{"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the current window for the most restrictive limit that applies. Absent on refusals made before the throttles run (brand header, flag off, partner_not_live)."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time, in seconds, when the window frees up."},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","description":"The error.","required":["code","message","request_id","type"],"properties":{"type":{"type":"string","description":"Error type, for example validation_error or rate_limited; see Errors in the partner guides.","enum":["api_error","authentication_error","conflict","invalid_request","not_found","permission_error","rate_limited","validation_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"A stable, machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"A human-readable explanation; do not parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","description":"Quote this identifier when you contact support.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code for this item.","isRequired":true,"uniqueKey":"error.errors.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable message. It never repeats the submitted value.","isRequired":true,"uniqueKey":"error.errors.items.[INDEX].message","typeLabel":"string"},"field":{"oneOf":[{"type":"string","description":"The request field the problem refers to, or null when none.","uniqueKey":"error.errors.items.[INDEX].field.oneOf.0","typeLabel":"string"},{"type":"null","description":"The request field the problem refers to, or null when none.","uniqueKey":"error.errors.items.[INDEX].field.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.errors.items.[INDEX].field","typeLabel":"string | null"},"question_key":{"oneOf":[{"type":"string","description":"The questionnaire question the problem refers to, or null when the entry named none.","uniqueKey":"error.errors.items.[INDEX].question_key.oneOf.0","typeLabel":"string"},{"type":"null","description":"The questionnaire question the problem refers to, or null when the entry named none.","uniqueKey":"error.errors.items.[INDEX].question_key.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.errors.items.[INDEX].question_key","typeLabel":"string | null"},"min":{"type":"number","format":"double","description":"On out_of_range: the lowest allowed value, when the schema sets one.","uniqueKey":"error.errors.items.[INDEX].min","typeLabel":"number\u003cdouble>"},"max":{"type":"number","format":"double","description":"On out_of_range: the highest allowed value, when the schema sets one.","uniqueKey":"error.errors.items.[INDEX].max","typeLabel":"number\u003cdouble>"}},"required":["code","message"],"uniqueKey":"error.errors.items.[INDEX]","typeLabel":"object"},"description":"Field-level problems, when any.","uniqueKey":"error.errors","typeLabel":"object[]"},"current":{"type":"object","description":"On 409 schema_outdated: the schema_version and schema_hash currently published.","required":["schema_hash","schema_version"],"properties":{"schema_version":{"type":"string","description":"The published schema_version.","isRequired":true,"uniqueKey":"error.current.schema_version","typeLabel":"string"},"schema_hash":{"type":"string","description":"A hash accepted for the published version.","isRequired":true,"uniqueKey":"error.current.schema_hash","typeLabel":"string"}},"uniqueKey":"error.current","typeLabel":"object"},"current_notice_version":{"type":"string","description":"On 422 consent_notice_outdated: the patient notice version to show and record.","uniqueKey":"error.current_notice_version","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"example-1":{"title":"example-1","value":{"error":{"type":"rate_limited","code":"throttled","message":"Request was throttled. Expected available in 12 seconds.","request_id":"req_5f0c3a9d2b7e4f18a6c1d9e3b2a7f4c8"}}}},"exampleType":"examples"}},"description":"Too many requests; wait for the number of seconds in Retry-After.","exampleType":"examples"}},"security":{"a1568530-ceaa-4c00-848b-4e6fc17ac9d9":{"PartnerApiKey":{"type":"http","scheme":"bearer","bearerFormat":"API key","description":"Partner API key sent as Authorization: Bearer \u003capi key>. Test keys and live keys are separate.","scopes":[],"schemeName":"PartnerApiKey"}}},"servers":{"a52f5261-d6ca-4f76-8d3e-ad58db271710":{"url":"https://api.hi-doctor.ai","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"API key","description":"Partner API key sent as Authorization: Bearer \u003capi key>. Test keys and live keys are separate.","scopes":[],"schemeName":"PartnerApiKey"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Partner API key sent as Authorization: Bearer \u003capi key>. Test keys and live keys are separate.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"PartnerApiKey","name":"Authorization"}],"title":"PartnerApiKey"}]},"originalFileLocation":"api-reference/partner/openapi.json"},"subdomain":"hi-doctor-ai","siteName":"Hi Doctor","title":"Submit a consultation - Hi Doctor","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-04T14:38:28.078Z","originalFileLocation":"api-reference/consultations/submit-a-consultation.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Submits a patient\u0026#x27;s questionnaire answers for clinical review. The patient\u0026#x27;s consent flags must all be true and the notice version must be the current one (otherwise 422 consent_notice_outdated with current_notice_version). schema_version and schema_hash must name the published questionnaire (otherwise 409 schema_outdated with the current pair). Retries with the same Idempotency-Key and body return the original response. Answer only the questions that apply after branching: an answer to a step the other answers hide (conditional display) is refused with 422 unexpected_question_key, one error item per hidden question_key. Errors never repeat a submitted answer value or identifier; they name the question_key instead (an unexpected question_key is echoed as sent). A pharmacy selection that is not valid for the patient\u0026#x27;s country is refused with 422 pharmacy_selection_invalid (question_key pharmacy_selection), whatever the directory\u0026#x27;s reason. patient.national_identifier is optional: send it where the product country\u0026#x27;s prescribing needs one (otherwise 422 patient_identifier_required, unless the identifier is already stored for the patient). An unknown type or invalid value is refused with 422 invalid_request (field patient.national_identifier, code invalid_identifier); it is never echoed or returned. In live mode it is stored on the patient\u0026#x27;s account the first time; a different identifier for the same patient is refused with 409 patient_conflict and never overwrites it. Test mode validates it and stores nothing. patient.identity_document is optional: send it where electronic prescribing in the patient\u0026#x27;s country needs the patient\u0026#x27;s identity document before approval (a national id_card or a passport, with the country that issued it). It is validated like the patient\u0026#x27;s own profile (5 to 20 letters or digits; for a few issuing countries an id_card number is also checked against its national format); one that breaks those rules is refused with 422 invalid_request (field patient.identity_document, code invalid_identity_document). Structural errors keep their nested field errors (for example field patient.identity_document.type, code invalid_choice, for an unsupported type; patient.identity_document.number, code required, when the number is missing). It is never echoed or returned. In live mode it is stored on the patient\u0026#x27;s account the first time; a different document for the same patient is refused with 409 patient_conflict and never overwrites it. Test mode validates it and stores nothing. Without it, the reviewing doctor, if they need it, asks through an information request with reason_code identity_document_required. patient.address line1 and line2 are stored joined with \u0026quot;, \u0026quot; in one street line of at most 200 characters (separator included); a longer address is refused with 422 invalid_request (field patient.address), never truncated. patient.address.country is the patient\u0026#x27;s country of residence and must be an EU member state (ISO 3166-1 alpha-2 or alpha-3), in test and live mode alike; any other value is refused with 422 invalid_request (field patient.address.country, code residence_outside_eu). Without it, the product country is the residence. A patient who withdrew consent is refused with 409 consent_withdrawn. Requires the consultations:write scope. ### Access, effects and retries Ownership: The API key\u0026#x27;s own partner and mode (test or live). Prerequisites: A partner API key with the consultations:write scope. Effects: Creates the consultation (and the patient on first submission) and sends it to clinical review; emits consultation webhook events. Retries: Required Idempotency-Key: a retry with the same key and body within 24 hours returns the stored response.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Hi Doctor\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"index, follow, max-image-preview:large, max-snippet:-1\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/hi-doctor-ai/nurYHPmYbdMdWury/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/hi-doctor-ai/nurYHPmYbdMdWury/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/hi-doctor-ai/nurYHPmYbdMdWury/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/hi-doctor-ai/nurYHPmYbdMdWury/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/hi-doctor-ai/nurYHPmYbdMdWury/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/hi-doctor-ai/nurYHPmYbdMdWury/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/hi-doctor-ai/nurYHPmYbdMdWury/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/hi-doctor-ai/nurYHPmYbdMdWury/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/hi-doctor-ai/nurYHPmYbdMdWury/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Submit a consultation - Hi Doctor\">\u003cmeta data-mint-head property=\"og:description\" content=\"Submits a patient\u0026#x27;s questionnaire answers for clinical review. The patient\u0026#x27;s consent flags must all be true and the notice version must be the current one (otherwise 422 consent_notice_outdated with current_notice_version). schema_version and schema_hash must name the published questionnaire (otherwise 409 schema_outdated with the current pair). Retries with the same Idempotency-Key and body return the original response. Answer only the questions that apply after branching: an answer to a step the other answers hide (conditional display) is refused with 422 unexpected_question_key, one error item per hidden question_key. Errors never repeat a submitted answer value or identifier; they name the question_key instead (an unexpected question_key is echoed as sent). A pharmacy selection that is not valid for the patient\u0026#x27;s country is refused with 422 pharmacy_selection_invalid (question_key pharmacy_selection), whatever the directory\u0026#x27;s reason. patient.national_identifier is optional: send it where the product country\u0026#x27;s prescribing needs one (otherwise 422 patient_identifier_required, unless the identifier is already stored for the patient). An unknown type or invalid value is refused with 422 invalid_request (field patient.national_identifier, code invalid_identifier); it is never echoed or returned. In live mode it is stored on the patient\u0026#x27;s account the first time; a different identifier for the same patient is refused with 409 patient_conflict and never overwrites it. Test mode validates it and stores nothing. patient.identity_document is optional: send it where electronic prescribing in the patient\u0026#x27;s country needs the patient\u0026#x27;s identity document before approval (a national id_card or a passport, with the country that issued it). It is validated like the patient\u0026#x27;s own profile (5 to 20 letters or digits; for a few issuing countries an id_card number is also checked against its national format); one that breaks those rules is refused with 422 invalid_request (field patient.identity_document, code invalid_identity_document). Structural errors keep their nested field errors (for example field patient.identity_document.type, code invalid_choice, for an unsupported type; patient.identity_document.number, code required, when the number is missing). It is never echoed or returned. In live mode it is stored on the patient\u0026#x27;s account the first time; a different document for the same patient is refused with 409 patient_conflict and never overwrites it. Test mode validates it and stores nothing. Without it, the reviewing doctor, if they need it, asks through an information request with reason_code identity_document_required. patient.address line1 and line2 are stored joined with \u0026quot;, \u0026quot; in one street line of at most 200 characters (separator included); a longer address is refused with 422 invalid_request (field patient.address), never truncated. patient.address.country is the patient\u0026#x27;s country of residence and must be an EU member state (ISO 3166-1 alpha-2 or alpha-3), in test and live mode alike; any other value is refused with 422 invalid_request (field patient.address.country, code residence_outside_eu). Without it, the product country is the residence. A patient who withdrew consent is refused with 409 consent_withdrawn. Requires the consultations:write scope. ### Access, effects and retries Ownership: The API key\u0026#x27;s own partner and mode (test or live). Prerequisites: A partner API key with the consultations:write scope. Effects: Creates the consultation (and the patient on first submission) and sends it to clinical review; emits consultation webhook events. Retries: Required Idempotency-Key: a retry with the same key and body within 24 hours returns the stored response.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Hi Doctor Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.hi-doctor.ai/api-reference/consultations/submit-a-consultation\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://hi-doctor-ai.mintlify.app/_mintlify/api/og/v2?division=Consultations\u0026amp;title=Submit+a+consultation\u0026amp;description=Submits+a+patient%27s+questionnaire+answers+for+clinical+review.+The+patient%27s+consent+flags+must+all+be+true+and+the+notice+version+must+be+the+current+one+%28othe\u0026amp;theme=62172df8443c9a1536d0ebde\u0026amp;signature=1ef13eddca0dcee3c6b6c4468472d8094435c11ba7bdae7ceb83e8de6380e80d\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Submit a consultation - Hi Doctor\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Submits a patient\u0026#x27;s questionnaire answers for clinical review. The patient\u0026#x27;s consent flags must all be true and the notice version must be the current one (otherwise 422 consent_notice_outdated with current_notice_version). schema_version and schema_hash must name the published questionnaire (otherwise 409 schema_outdated with the current pair). Retries with the same Idempotency-Key and body return the original response. Answer only the questions that apply after branching: an answer to a step the other answers hide (conditional display) is refused with 422 unexpected_question_key, one error item per hidden question_key. Errors never repeat a submitted answer value or identifier; they name the question_key instead (an unexpected question_key is echoed as sent). A pharmacy selection that is not valid for the patient\u0026#x27;s country is refused with 422 pharmacy_selection_invalid (question_key pharmacy_selection), whatever the directory\u0026#x27;s reason. patient.national_identifier is optional: send it where the product country\u0026#x27;s prescribing needs one (otherwise 422 patient_identifier_required, unless the identifier is already stored for the patient). An unknown type or invalid value is refused with 422 invalid_request (field patient.national_identifier, code invalid_identifier); it is never echoed or returned. In live mode it is stored on the patient\u0026#x27;s account the first time; a different identifier for the same patient is refused with 409 patient_conflict and never overwrites it. Test mode validates it and stores nothing. patient.identity_document is optional: send it where electronic prescribing in the patient\u0026#x27;s country needs the patient\u0026#x27;s identity document before approval (a national id_card or a passport, with the country that issued it). It is validated like the patient\u0026#x27;s own profile (5 to 20 letters or digits; for a few issuing countries an id_card number is also checked against its national format); one that breaks those rules is refused with 422 invalid_request (field patient.identity_document, code invalid_identity_document). Structural errors keep their nested field errors (for example field patient.identity_document.type, code invalid_choice, for an unsupported type; patient.identity_document.number, code required, when the number is missing). It is never echoed or returned. In live mode it is stored on the patient\u0026#x27;s account the first time; a different document for the same patient is refused with 409 patient_conflict and never overwrites it. Test mode validates it and stores nothing. Without it, the reviewing doctor, if they need it, asks through an information request with reason_code identity_document_required. patient.address line1 and line2 are stored joined with \u0026quot;, \u0026quot; in one street line of at most 200 characters (separator included); a longer address is refused with 422 invalid_request (field patient.address), never truncated. patient.address.country is the patient\u0026#x27;s country of residence and must be an EU member state (ISO 3166-1 alpha-2 or alpha-3), in test and live mode alike; any other value is refused with 422 invalid_request (field patient.address.country, code residence_outside_eu). Without it, the product country is the residence. A patient who withdrew consent is refused with 409 consent_withdrawn. Requires the consultations:write scope. ### Access, effects and retries Ownership: The API key\u0026#x27;s own partner and mode (test or live). Prerequisites: A partner API key with the consultations:write scope. Effects: Creates the consultation (and the patient on first submission) and sends it to clinical review; emits consultation webhook events. Retries: Required Idempotency-Key: a retry with the same key and body within 24 hours returns the stored response.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://hi-doctor-ai.mintlify.app/_mintlify/api/og/v2?division=Consultations\u0026amp;title=Submit+a+consultation\u0026amp;description=Submits+a+patient%27s+questionnaire+answers+for+clinical+review.+The+patient%27s+consent+flags+must+all+be+true+and+the+notice+version+must+be+the+current+one+%28othe\u0026amp;theme=62172df8443c9a1536d0ebde\u0026amp;signature=1ef13eddca0dcee3c6b6c4468472d8094435c11ba7bdae7ceb83e8de6380e80d\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/hi-doctor-ai/nurYHPmYbdMdWury/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Hi Doctor\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#157A5C\">\u003cmeta data-mint-head name=\"og:locale\" content=\"en_US\">\u003cmeta data-mint-head name=\"author\" content=\"Hi Doctor\">\u003cmeta data-mint-head name=\"theme-color\" content=\"#157A5C\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.hi-doctor.ai/api-reference/consultations/submit-a-consultation\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/consultations/submit-a-consultation.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://hi-doctor.ai/#organization\",\"name\":\"Hi Doctor\",\"url\":\"https://hi-doctor.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/hi-doctor-ai/PIEJYA1zSavoVnhH/logo/wordmark-on-light.svg?fit=max\u0026auto=format\u0026n=PIEJYA1zSavoVnhH\u0026q=85\u0026s=c7243fb417e4d3908f3b5fc634a28923\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.hi-doctor.ai#website\",\"name\":\"Hi Doctor\",\"url\":\"https://docs.hi-doctor.ai\",\"publisher\":{\"@id\":\"https://hi-doctor.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.hi-doctor.ai/api-reference/consultations/submit-a-consultation#webpage\",\"url\":\"https://docs.hi-doctor.ai/api-reference/consultations/submit-a-consultation\",\"name\":\"Submit a consultation\",\"description\":\"Submits a patient's questionnaire answers for clinical review. The patient's consent flags must all be true and the notice version must be the current one (otherwise 422 consent_notice_outdated with current_notice_version). schema_version and schema_hash must name the published questionnaire (otherwise 409 schema_outdated with the current pair). Retries with the same Idempotency-Key and body return the original response. Answer only the questions that apply after branching: an answer to a step the other answers hide (conditional display) is refused with 422 unexpected_question_key, one error item per hidden question_key. Errors never repeat a submitted answer value or identifier; they name the question_key instead (an unexpected question_key is echoed as sent). A pharmacy selection that is not valid for the patient's country is refused with 422 pharmacy_selection_invalid (question_key pharmacy_selection), whatever the directory's reason. patient.national_identifier is optional: send it where the product country's prescribing needs one (otherwise 422 patient_identifier_required, unless the identifier is already stored for the patient). An unknown type or invalid value is refused with 422 invalid_request (field patient.national_identifier, code invalid_identifier); it is never echoed or returned. In live mode it is stored on the patient's account the first time; a different identifier for the same patient is refused with 409 patient_conflict and never overwrites it. Test mode validates it and stores nothing. patient.identity_document is optional: send it where electronic prescribing in the patient's country needs the patient's identity document before approval (a national id_card or a passport, with the country that issued it). It is validated like the patient's own profile (5 to 20 letters or digits; for a few issuing countries an id_card number is also checked against its national format); one that breaks those rules is refused with 422 invalid_request (field patient.identity_document, code invalid_identity_document). Structural errors keep their nested field errors (for example field patient.identity_document.type, code invalid_choice, for an unsupported type; patient.identity_document.number, code required, when the number is missing). It is never echoed or returned. In live mode it is stored on the patient's account the first time; a different document for the same patient is refused with 409 patient_conflict and never overwrites it. Test mode validates it and stores nothing. Without it, the reviewing doctor, if they need it, asks through an information request with reason_code identity_document_required. patient.address line1 and line2 are stored joined with \\\", \\\" in one street line of at most 200 characters (separator included); a longer address is refused with 422 invalid_request (field patient.address), never truncated. patient.address.country is the patient's country of residence and must be an EU member state (ISO 3166-1 alpha-2 or alpha-3), in test and live mode alike; any other value is refused with 422 invalid_request (field patient.address.country, code residence_outside_eu). Without it, the product country is the residence. A patient who withdrew consent is refused with 409 consent_withdrawn. Requires the consultations:write scope. ### Access, effects and retries Ownership: The API key's own partner and mode (test or live). Prerequisites: A partner API key with the consultations:write scope. Effects: Creates the consultation (and the patient on first submission) and sends it to clinical review; emits consultation webhook events. Retries: Required Idempotency-Key: a retry with the same key and body within 24 hours returns the stored response.\",\"dateModified\":\"2026-11-04T14:38:28.078Z\",\"isPartOf\":{\"@id\":\"https://docs.hi-doctor.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.hi-doctor.ai/api-reference/consultations/submit-a-consultation#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.hi-doctor.ai/api-reference/consultations/submit-a-consultation#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Partner API reference\",\"item\":\"https://docs.hi-doctor.ai/api-reference/connectivity/check-an-api-key\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Consultations\",\"item\":\"https://docs.hi-doctor.ai/api-reference/consultations/list-consultations\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Submit a consultation\",\"item\":\"https://docs.hi-doctor.ai/api-reference/consultations/submit-a-consultation\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.hi-doctor.ai/api-reference/consultations/submit-a-consultation#apireference\",\"headline\":\"Submit a consultation\",\"name\":\"Submit a consultation\",\"description\":\"Submits a patient's questionnaire answers for clinical review. The patient's consent flags must all be true and the notice version must be the current one (otherwise 422 consent_notice_outdated with current_notice_version). schema_version and schema_hash must name the published questionnaire (otherwise 409 schema_outdated with the current pair). Retries with the same Idempotency-Key and body return the original response. Answer only the questions that apply after branching: an answer to a step the other answers hide (conditional display) is refused with 422 unexpected_question_key, one error item per hidden question_key. Errors never repeat a submitted answer value or identifier; they name the question_key instead (an unexpected question_key is echoed as sent). A pharmacy selection that is not valid for the patient's country is refused with 422 pharmacy_selection_invalid (question_key pharmacy_selection), whatever the directory's reason. patient.national_identifier is optional: send it where the product country's prescribing needs one (otherwise 422 patient_identifier_required, unless the identifier is already stored for the patient). An unknown type or invalid value is refused with 422 invalid_request (field patient.national_identifier, code invalid_identifier); it is never echoed or returned. In live mode it is stored on the patient's account the first time; a different identifier for the same patient is refused with 409 patient_conflict and never overwrites it. Test mode validates it and stores nothing. patient.identity_document is optional: send it where electronic prescribing in the patient's country needs the patient's identity document before approval (a national id_card or a passport, with the country that issued it). It is validated like the patient's own profile (5 to 20 letters or digits; for a few issuing countries an id_card number is also checked against its national format); one that breaks those rules is refused with 422 invalid_request (field patient.identity_document, code invalid_identity_document). Structural errors keep their nested field errors (for example field patient.identity_document.type, code invalid_choice, for an unsupported type; patient.identity_document.number, code required, when the number is missing). It is never echoed or returned. In live mode it is stored on the patient's account the first time; a different document for the same patient is refused with 409 patient_conflict and never overwrites it. Test mode validates it and stores nothing. Without it, the reviewing doctor, if they need it, asks through an information request with reason_code identity_document_required. patient.address line1 and line2 are stored joined with \\\", \\\" in one street line of at most 200 characters (separator included); a longer address is refused with 422 invalid_request (field patient.address), never truncated. patient.address.country is the patient's country of residence and must be an EU member state (ISO 3166-1 alpha-2 or alpha-3), in test and live mode alike; any other value is refused with 422 invalid_request (field patient.address.country, code residence_outside_eu). Without it, the product country is the residence. A patient who withdrew consent is refused with 409 consent_withdrawn. Requires the consultations:write scope. ### Access, effects and retries Ownership: The API key's own partner and mode (test or live). Prerequisites: A partner API key with the consultations:write scope. Effects: Creates the consultation (and the patient on first submission) and sends it to clinical review; emits consultation webhook events. Retries: Required Idempotency-Key: a retry with the same key and body within 24 hours returns the stored response.\",\"url\":\"https://docs.hi-doctor.ai/api-reference/consultations/submit-a-consultation\",\"mainEntityOfPage\":{\"@id\":\"https://docs.hi-doctor.ai/api-reference/consultations/submit-a-consultation#webpage\"},\"dateModified\":\"2026-11-04T14:38:28.078Z\",\"publisher\":{\"@id\":\"https://hi-doctor.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.hi-doctor.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Hi Doctor\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Hi Doctor","nav":{"global":{"anchors":[{"anchor":"OpenAPI spec","icon":"file-code","href":"/api-reference/openapi.json"},{"anchor":"Add the MCP connector","icon":"plug","href":"https://claude.ai/customize/connectors?modal=add-custom-connector\u0026connectorName=Hi%20Doctor\u0026connectorUrl=https://mcp.hi-doctor.ai/mcp"},{"anchor":"AI integration prompt","icon":"wand-magic-sparkles","href":"/mcp/ai-integration"},{"anchor":"hi-doctor.ai","icon":"house-medical","href":"https://hi-doctor.ai"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"MCP","pages":[{"title":"MCP","href":"/mcp/overview"}]},{"tab":"API reference","pages":[{"title":"API reference","href":"/api-reference/introduction"}]},{"tab":"Partners","groups":[{"group":"Start","pages":[{"title":"Hi Doctor Partner API overview for developers","sidebarTitle":"Partner API overview","href":"/partners/overview"},{"title":"How the Hi Doctor Partner API works: roles and flow","sidebarTitle":"How it works","href":"/partners/how-it-works"},{"title":"Partner API quickstart: your first test consultation","sidebarTitle":"Quickstart","href":"/partners/quickstart"},{"title":"Partner API authentication: keys, scopes and rotation","sidebarTitle":"Authentication","href":"/partners/authentication"},{"title":"Partner API test mode: synthetic consultations","sidebarTitle":"Test mode","href":"/partners/test-mode"}]},{"group":"Build","pages":[{"title":"Partner API questionnaires: schema and answer format","sidebarTitle":"Questionnaires and schema","href":"/partners/questionnaires-and-schema"},{"title":"Submit a consultation with the Partner API","sidebarTitle":"Submit a consultation","href":"/partners/submit-a-consultation"},{"title":"Partner API photos and files: uploads and limits","sidebarTitle":"Photos and files","href":"/partners/photos"},{"title":"Partner API consultation lifecycle and statuses","sidebarTitle":"Consultation lifecycle","href":"/partners/consultation-lifecycle"},{"title":"Partner API prescriptions: data, status and events","sidebarTitle":"Prescriptions","href":"/partners/prescriptions"},{"title":"Partner API webhooks: events, signing and retries","sidebarTitle":"Webhooks","href":"/partners/webhooks"},{"title":"Partner API information requests from the doctor","sidebarTitle":"Information requests","href":"/partners/information-requests"},{"title":"Partner API errors: envelope and error codes","sidebarTitle":"Errors","href":"/partners/errors"},{"title":"Partner API rate limits: per key and per partner","sidebarTitle":"Rate limits","href":"/partners/rate-limits"},{"title":"Partner API idempotency: retry submissions safely","sidebarTitle":"Idempotency","href":"/partners/idempotency"},{"title":"Partner API pagination with opaque cursors","sidebarTitle":"Pagination","href":"/partners/pagination"},{"title":"Partner API versioning policy and changelog","sidebarTitle":"Versioning and changelog","href":"/partners/versioning-and-changelog"}]},{"group":"Operate","pages":[{"title":"Hi Doctor Business portal for Partner API teams","sidebarTitle":"Business portal","href":"/partners/business-portal"},{"title":"Partner API security, GDPR and patient consent","sidebarTitle":"Security and compliance","href":"/partners/security-and-compliance"},{"title":"Partner API go-live checklist before live mode","sidebarTitle":"Go-live checklist","href":"/partners/go-live-checklist"},{"title":"Partner API FAQ for developers","sidebarTitle":"Developer FAQ","href":"/partners/faq"}]},{"group":"Partner API reference","pages":[{"group":"Connectivity","pages":[{"title":"Check an API key","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json get /v1/partner/ping/","href":"/api-reference/connectivity/check-an-api-key"}]},{"group":"Products","pages":[{"title":"List products","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json get /v1/partner/products/","href":"/api-reference/products/list-products"}]},{"group":"Questionnaires","pages":[{"title":"Get a questionnaire","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json get /v1/partner/questionnaires/{slug}/","href":"/api-reference/questionnaires/get-a-questionnaire"}]},{"group":"Files","pages":[{"title":"Upload a photo or document","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json post /v1/partner/files/","href":"/api-reference/files/upload-a-photo-or-document"}]},{"group":"Consultations","pages":[{"title":"List consultations","description":"Your consultations in this key's mode, newest first, with cursor pagination. Requires the consultations:read scope.\n\n### Access, effects and retries\n**Ownership:** The API key's own partner and mode (test or live).\n\n**Prerequisites:** A partner API key with the `consultations:read` scope.\n\n**Effects:** None.\n\n**Retries:** Safe to retry.","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json get /v1/partner/consultations/","href":"/api-reference/consultations/list-consultations"},{"title":"Submit a consultation","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json post /v1/partner/consultations/","href":"/api-reference/consultations/submit-a-consultation"},{"title":"Get a consultation by id","description":"The current state of one consultation: status, decision, open information request, prescriptions and billing. Requires the consultations:read scope.\n\n### Access, effects and retries\n**Ownership:** The API key's own partner and mode (test or live); another partner's or mode's records answer 404.\n\n**Prerequisites:** A partner API key with the `consultations:read` scope.\n\n**Effects:** None.\n\n**Retries:** Safe to retry.","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json get /v1/partner/consultations/{consultation_id}/","href":"/api-reference/consultations/get-a-consultation-by-id"},{"title":"Cancel a consultation","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json post /v1/partner/consultations/{consultation_id}/cancel/","href":"/api-reference/consultations/cancel-a-consultation"}]},{"group":"Patients","pages":[{"title":"List patients","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json get /v1/partner/patients/","href":"/api-reference/patients/list-patients"},{"title":"Get a patient","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json get /v1/partner/patients/{patient_id}/","href":"/api-reference/patients/get-a-patient"},{"title":"Record a consent withdrawal","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json post /v1/partner/patients/{patient_id}/consent-withdrawal/","href":"/api-reference/patients/record-a-consent-withdrawal"}]},{"group":"Information requests","pages":[{"title":"List a consultation's information requests","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json get /v1/partner/consultations/{consultation_id}/info-requests/","href":"/api-reference/information-requests/list-a-consultations-information-requests"},{"title":"Answer an information request","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json post /v1/partner/consultations/{consultation_id}/info-requests/{request_id}/answer/","href":"/api-reference/information-requests/answer-an-information-request"},{"title":"Answer an information request by id","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json post /v1/partner/info-requests/{request_id}/answer/","href":"/api-reference/information-requests/answer-an-information-request-by-id"}]},{"group":"Prescriptions","pages":[{"title":"List prescriptions","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json get /v1/partner/prescriptions/","href":"/api-reference/prescriptions/list-prescriptions"},{"title":"Get a prescription","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json get /v1/partner/prescriptions/{prescription_id}/","href":"/api-reference/prescriptions/get-a-prescription"}]},{"group":"Webhooks","pages":[{"title":"List webhook endpoints","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json get /v1/partner/webhook-endpoints/","href":"/api-reference/webhooks/list-webhook-endpoints"},{"title":"Create a webhook endpoint","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json post /v1/partner/webhook-endpoints/","href":"/api-reference/webhooks/create-a-webhook-endpoint"},{"title":"Get a webhook endpoint","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json get /v1/partner/webhook-endpoints/{endpoint_id}/","href":"/api-reference/webhooks/get-a-webhook-endpoint"},{"title":"Update a webhook endpoint","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json patch /v1/partner/webhook-endpoints/{endpoint_id}/","href":"/api-reference/webhooks/update-a-webhook-endpoint"},{"title":"Delete a webhook endpoint","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json delete /v1/partner/webhook-endpoints/{endpoint_id}/","href":"/api-reference/webhooks/delete-a-webhook-endpoint"},{"title":"Rotate a webhook signing secret","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json post /v1/partner/webhook-endpoints/{endpoint_id}/rotate-secret/","href":"/api-reference/webhooks/rotate-a-webhook-signing-secret"},{"title":"Send a test event","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json post /v1/partner/webhook-endpoints/{endpoint_id}/test/","href":"/api-reference/webhooks/send-a-test-event"},{"title":"List deliveries for an endpoint","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json get /v1/partner/webhook-endpoints/{endpoint_id}/deliveries/","href":"/api-reference/webhooks/list-deliveries-for-an-endpoint"},{"title":"Replay a delivery","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json post /v1/partner/webhook-deliveries/{delivery_id}/replay/","href":"/api-reference/webhooks/replay-a-delivery"}]},{"group":"Test mode","pages":[{"title":"Move a test consultation forward","deprecated":null,"version":null,"openapi":"/api-reference/partner/openapi.json post /v1/partner/test/consultations/{consultation_id}/advance/","href":"/api-reference/test-mode/move-a-test-consultation-forward"}]}]}]},{"tab":"Articles","pages":[{"title":"Articles","href":"/blog/connect-hi-doctor-mcp"}]},{"tab":"Health library","pages":[{"title":"Health library","href":"/library/overview"}]}]},"basePath":"","title":"Submit a consultation - Hi Doctor","buildId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","deploymentId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DX1Meug0.js","utils-B_OMIQVC.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-ChxhRPMa.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-CuKvD8Iv.js","snippetPresets-C5d7p2hp.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CfHcE8m4.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C1zZV314.js","shallow-CmQhqCJn.js","getApiPlaygroundDisplay-YRo9s1O7.js","CodeSnippet-RN1MTdfk.js","CodeSnippets-DKLPHxJA.js","Page-BAvA99GL.js","getPastedJson-bz0M41mU.js","icon-CsmhpPrv.js","MethodPill-CNGsVE77.js","DuplicateIcon-DilfU_Z2.js","createIcon-BdsYzQck.js","DynamicMarkdown-CbqEDjbV.js","SectionHeading-O6hXpFCN.js","axios-vUo_bRtp.js","Markdown-nKm-uidQ.js","clsx-ClVdStUn.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CIQkMg3R.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-ImrFS4Fy.js"]}