Optional key that makes a retry safe. Generate one value per logical operation (8 to 128 ASCII letters, digits, underscores or hyphens) and resend the same value on every retry. A repeat of a completed request returns its original status with Idempotent-Replayed: true and a short body of state, resource_ids and response_hash; read the resources to recover their content. Reusing a key with a different request returns 422 idempotency_key_reuse; a request still running returns 409 idempotency_in_progress. Keys are kept for 30 days. See https://docs.hi-doctor.ai/api-reference/idempotency.
Treatment change for this patient early order response. May be null when unavailable.
Show child attributes
{"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/billing/request-an-early-subscription-order","slug":"/api-reference/billing/request-an-early-subscription-order","pageMetadata":{"title":"Request an early subscription order","description":"Creates the renewal consultation now instead of at the period end.\n\n**Irreversible**, and allowed only once per paid period — it consumes the period's single early order and sets a lock window.\n\n### Access, effects and retries\n**Ownership:** Entitled patient subscription/category and completed renewal choice.\n\n**Prerequisites:** An authenticated patient account is required.\n\n**Effects:** Locks/consumes period and creates renewal consultation; clinically consequential.\n\n**Retries:** Not safely repeatable; 409 typed early-order guards prevent repeats.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/subscriptions/early-order/","href":"/api-reference/billing/request-an-early-subscription-order","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 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: \"Creates the renewal consultation now instead of at the period end.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Irreversible\"\n }), \", and allowed only once per paid period — it consumes the period’s single early order and sets a lock window.\"]\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 }), \" Entitled patient subscription/category and completed renewal choice.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Prerequisites:\"\n }), \" An authenticated patient account is required.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Effects:\"\n }), \" Locks/consumes period and creates renewal consultation; clinically consequential.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Retries:\"\n }), \" Not safely repeatable; 409 typed early-order guards prevent repeats.\"]\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":"Request an early subscription order","description":"Creates the renewal consultation now instead of at the period end.\n\n**Irreversible**, and allowed only once per paid period — it consumes the period's single early order and sets a lock window.\n\n### Access, effects and retries\n**Ownership:** Entitled patient subscription/category and completed renewal choice.\n\n**Prerequisites:** An authenticated patient account is required.\n\n**Effects:** Locks/consumes period and creates renewal consultation; clinically consequential.\n\n**Retries:** Not safely repeatable; 409 typed early-order guards prevent repeats.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/subscriptions/early-order/","href":"/api-reference/billing/request-an-early-subscription-order","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"users_subscriptions_early_order_create","parameters":["add6cb99-53fd-4dde-ab8c-5103ff700e29"],"tags":["Billing"],"requestBody":"c84be2d0-68c5-4bfa-8fb4-4b9058ff98f8","security":["ad41e598-9bfb-4621-aaa2-8bda3bad4f34"],"responses":{"201":"7948bf40-3c22-4165-83a7-eea4a916eab2","400":"b29286ef-480f-4864-b9a1-e6f1b398145d","401":"ee3d2ed8-2af1-42a3-a48d-ff3548cb01ad","403":"1c19a385-f6b0-4ef0-a485-761ab88985a7","409":"ce9d6258-d2cd-43e6-81f0-b41dbfeb070b","422":"e6ebf3a5-e702-4cb8-b2db-c3d5b582aaa2","429":"e349c13d-deb0-4367-a591-ecd4de2767b7"},"summary":"Request an early subscription order","x-pagination":{"kind":"not_applicable"},"description":"Creates the renewal consultation now instead of at the period end.\n\n**Irreversible**, and allowed only once per paid period — it consumes the period's single early order and sets a lock window.\n\n### Access, effects and retries\n**Ownership:** Entitled patient subscription/category and completed renewal choice.\n\n**Prerequisites:** An authenticated patient account is required.\n\n**Effects:** Locks/consumes period and creates renewal consultation; clinically consequential.\n\n**Retries:** Not safely repeatable; 409 typed early-order guards prevent repeats.","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/users/subscriptions/early-order/${HD_QUERY_STRING:+?${HD_QUERY_STRING}}\"\nprintf 'X-Brand-Slug: hi-doctor\\nAccept: application/json\\n' > \"${HD_REQUEST_HEADERS_FILE:?Private header file}\"\nprintf 'Authorization: Bearer %s\\n' \"${HD_ACCESS_TOKEN:?Set backend JWT}\" >> \"$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/users/subscriptions/early-order/'\nif os.environ.get(\"HD_QUERY_STRING\"): url += \"?\" + os.environ[\"HD_QUERY_STRING\"]\nheaders = {\"X-Brand-Slug\": \"hi-doctor\", \"Accept\": 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"HD_ACCESS_TOKEN\"]\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/users/subscriptions/early-order/\";\nif (env.HD_QUERY_STRING) url += \"?\" + env.HD_QUERY_STRING;\nconst headers = { \"X-Brand-Slug\": \"hi-doctor\", \"Accept\": \"application/json\" };\nheaders.Authorization = \"Bearer \" + env.HD_ACCESS_TOKEN;\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":["4f09e80c-2b64-4896-a8db-cb26d8ca4bfc"],"path":"/v1/users/subscriptions/early-order/","baseUrlOptions":["https://api.hi-doctor.ai"],"title":"Request an early subscription order","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/users/subscriptions/early-order/${HD_QUERY_STRING:+?${HD_QUERY_STRING}}\"\nprintf 'X-Brand-Slug: hi-doctor\\nAccept: application/json\\n' > \"${HD_REQUEST_HEADERS_FILE:?Private header file}\"\nprintf 'Authorization: Bearer %s\\n' \"${HD_ACCESS_TOKEN:?Set backend JWT}\" >> \"$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/users/subscriptions/early-order/'\nif os.environ.get(\"HD_QUERY_STRING\"): url += \"?\" + os.environ[\"HD_QUERY_STRING\"]\nheaders = {\"X-Brand-Slug\": \"hi-doctor\", \"Accept\": 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"HD_ACCESS_TOKEN\"]\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/users/subscriptions/early-order/\";\nif (env.HD_QUERY_STRING) url += \"?\" + env.HD_QUERY_STRING;\nconst headers = { \"X-Brand-Slug\": \"hi-doctor\", \"Accept\": \"application/json\" };\nheaders.Authorization = \"Bearer \" + env.HD_ACCESS_TOKEN;\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.category":"weight_loss","body.changed":false},{"body.category":"weight_loss","body.reason":"Synthetic example","body.changed":false,"body.answers.items.0.question_key":"glp1RenewalAdverseEffects","body.answers.items.0.values":{"pancreatitis":0,"severeGi":0,"hydration":0,"gallbladder":0}}]},"dependencies":{"parameters":{"add6cb99-53fd-4dde-ab8c-5103ff700e29":{"in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,128}$","isRequired":false,"description":"Optional key that makes a retry safe. Generate one value per logical operation (8 to 128 ASCII letters, digits, underscores or hyphens) and resend the same value on every retry. A repeat of a completed request returns its original status with `Idempotent-Replayed: true` and a short body of `state`, `resource_ids` and `response_hash`; read the resources to recover their content. Reusing a key with a different request returns 422 `idempotency_key_reuse`; a request still running returns 409 `idempotency_in_progress`. Keys are kept for 30 days. See https://docs.hi-doctor.ai/api-reference/idempotency.","uniqueKey":"","typeLabel":"string"},"description":"Optional key that makes a retry safe. Generate one value per logical operation (8 to 128 ASCII letters, digits, underscores or hyphens) and resend the same value on every retry. A repeat of a completed request returns its original status with `Idempotent-Replayed: true` and a short body of `state`, `resource_ids` and `response_hash`; read the resources to recover their content. Reusing a key with a different request returns 422 `idempotency_key_reuse`; a request still running returns 409 `idempotency_in_progress`. Keys are kept for 30 days. See https://docs.hi-doctor.ai/api-reference/idempotency.","example":"op-7f3a9c2e-0b1d-4e5f-9a8b-1c2d3e4f5a6b"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"category":{"type":"string","maxLength":50,"description":"Category for this early order request. Maximum 50 characters.","isRequired":true,"uniqueKey":"category","typeLabel":"string"},"reason":{"type":"string","default":"","maxLength":500,"description":"Reason for this early order request. Maximum 500 characters.","uniqueKey":"reason","typeLabel":"string"},"treatment_id":{"type":"string","maxLength":255,"description":"Identifier of the related treatment. Maximum 255 characters.","uniqueKey":"treatment_id","typeLabel":"string"},"dosage":{"type":"string","maxLength":255,"description":"Dosage for this early order request. Maximum 255 characters.","uniqueKey":"dosage","typeLabel":"string"},"changed":{"type":"boolean","default":false,"description":"Whether changed applies to this early order request.","uniqueKey":"changed","typeLabel":"boolean"},"answers":{"type":"array","items":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"answers.items.[INDEX].additionalProperties","typeLabel":"any"},"uniqueKey":"answers.items.[INDEX]","typeLabel":"object"},"description":"Answers for this early order request.","uniqueKey":"answers","typeLabel":"object[]"},"change_note":{"type":"string","default":"","maxLength":1000,"description":"Change note for this early order request. Maximum 1000 characters.","uniqueKey":"change_note","typeLabel":"string"}},"required":["category"],"uniqueKey":"","typeLabel":"object"},"examples":{"example-1":{"title":"example-1","value":{"category":"weight_loss","changed":false}},"example-2":{"title":"example-2","value":{"category":"weight_loss","changed":false,"reason":"Synthetic example","answers":[{"question_key":"glp1RenewalAdverseEffects","values":{"pancreatitis":0,"severeGi":0,"hydration":0,"gallbladder":0}}]}}},"exampleType":"examples"}},"required":true,"exampleType":"examples"},"responses":{"7948bf40-3c22-4165-83a7-eea4a916eab2":{"content":{"application/json":{"schema":{"type":"object","properties":{"consultation_id":{"type":"string","format":"uuid","description":"Identifier of the related consultation.","isRequired":true,"uniqueKey":"consultation_id","typeLabel":"string\u003cuuid>"},"subscription":{"type":"object","description":"Subscription for this patient early order response.","required":["currency","early_order_locked","id","payment_method_brand","payment_method_last4","payment_method_type","price_cents"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true,"description":"Unique identifier of this resource. Returned by the server; not writable.","isRequired":true,"uniqueKey":"subscription.id","typeLabel":"string\u003cuuid>"},"price_cents":{"type":"integer","readOnly":true,"description":"Amount in the currency's minor units. Returned by the server; not writable.","isRequired":true,"uniqueKey":"subscription.price_cents","typeLabel":"integer"},"currency":{"type":"string","readOnly":true,"description":"Currency for this patient subscription. Returned by the server; not writable.","isRequired":true,"uniqueKey":"subscription.currency","typeLabel":"string"},"payment_method_type":{"oneOf":[{"type":"string","readOnly":true,"description":"Payment method type for this patient subscription. Returned by the server; not writable. May be null when unavailable.","isRequired":true,"uniqueKey":"subscription.payment_method_type.oneOf.0","typeLabel":"string"},{"type":"null","readOnly":true,"description":"Payment method type for this patient subscription. Returned by the server; not writable. May be null when unavailable.","isRequired":true,"uniqueKey":"subscription.payment_method_type.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.payment_method_type","typeLabel":"string | null"},"payment_method_brand":{"oneOf":[{"type":"string","readOnly":true,"description":"Payment method brand for this patient subscription. Returned by the server; not writable. May be null when unavailable.","isRequired":true,"uniqueKey":"subscription.payment_method_brand.oneOf.0","typeLabel":"string"},{"type":"null","readOnly":true,"description":"Payment method brand for this patient subscription. Returned by the server; not writable. May be null when unavailable.","isRequired":true,"uniqueKey":"subscription.payment_method_brand.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.payment_method_brand","typeLabel":"string | null"},"payment_method_last4":{"oneOf":[{"type":"string","readOnly":true,"description":"Payment method last4 for this patient subscription. Returned by the server; not writable. May be null when unavailable.","isRequired":true,"uniqueKey":"subscription.payment_method_last4.oneOf.0","typeLabel":"string"},{"type":"null","readOnly":true,"description":"Payment method last4 for this patient subscription. Returned by the server; not writable. May be null when unavailable.","isRequired":true,"uniqueKey":"subscription.payment_method_last4.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.payment_method_last4","typeLabel":"string | null"},"early_order_locked":{"type":"boolean","readOnly":true,"description":"Whether early order locked applies to this patient subscription. Returned by the server; not writable.","isRequired":true,"uniqueKey":"subscription.early_order_locked","typeLabel":"boolean"},"status":{"type":"string","description":"Status for this patient subscription.","enum":["incomplete","active","past_due","unpaid","paused","canceled","trialing"],"uniqueKey":"subscription.status","typeLabel":"enum\u003cstring>"},"started_at":{"oneOf":[{"type":"string","format":"date-time","description":"Started at timestamp in ISO 8601 format. May be null when unavailable.","uniqueKey":"subscription.started_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"Started at timestamp in ISO 8601 format. May be null when unavailable.","uniqueKey":"subscription.started_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.started_at","typeLabel":"string\u003cdate-time> | null"},"current_period_start":{"oneOf":[{"type":"string","format":"date-time","description":"Current period start timestamp in ISO 8601 format. May be null when unavailable.","uniqueKey":"subscription.current_period_start.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"Current period start timestamp in ISO 8601 format. May be null when unavailable.","uniqueKey":"subscription.current_period_start.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.current_period_start","typeLabel":"string\u003cdate-time> | null"},"current_period_end":{"oneOf":[{"type":"string","format":"date-time","description":"Current period end timestamp in ISO 8601 format. May be null when unavailable.","uniqueKey":"subscription.current_period_end.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"Current period end timestamp in ISO 8601 format. May be null when unavailable.","uniqueKey":"subscription.current_period_end.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.current_period_end","typeLabel":"string\u003cdate-time> | null"},"cancel_at_period_end":{"type":"boolean","description":"Whether cancellation is scheduled for the end of the current billing period.","uniqueKey":"subscription.cancel_at_period_end","typeLabel":"boolean"},"canceled_at":{"oneOf":[{"type":"string","format":"date-time","description":"Canceled at timestamp in ISO 8601 format. May be null when unavailable.","uniqueKey":"subscription.canceled_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"Canceled at timestamp in ISO 8601 format. May be null when unavailable.","uniqueKey":"subscription.canceled_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.canceled_at","typeLabel":"string\u003cdate-time> | null"},"treatment_id":{"type":"string","maxLength":255,"description":"Identifier of the related treatment. Maximum 255 characters.","uniqueKey":"subscription.treatment_id","typeLabel":"string"},"category":{"type":"string","maxLength":50,"description":"Category for this patient subscription. Maximum 50 characters.","uniqueKey":"subscription.category","typeLabel":"string"},"interval":{"type":"string","maxLength":20,"description":"Interval for this patient subscription. Maximum 20 characters.","uniqueKey":"subscription.interval","typeLabel":"string"},"interval_count":{"type":"integer","description":"Interval count for this patient subscription.","uniqueKey":"subscription.interval_count","typeLabel":"integer"},"cycle_days":{"oneOf":[{"type":"integer","description":"Cycle days for this patient subscription. May be null when unavailable.","uniqueKey":"subscription.cycle_days.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Cycle days for this patient subscription. May be null when unavailable.","uniqueKey":"subscription.cycle_days.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.cycle_days","typeLabel":"integer | null"},"early_order_locked_until":{"oneOf":[{"type":"string","format":"date-time","description":"Early order locked until timestamp in ISO 8601 format. May be null when unavailable.","uniqueKey":"subscription.early_order_locked_until.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"Early order locked until timestamp in ISO 8601 format. May be null when unavailable.","uniqueKey":"subscription.early_order_locked_until.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.early_order_locked_until","typeLabel":"string\u003cdate-time> | null"}},"isRequired":true,"uniqueKey":"subscription","typeLabel":"object"},"patient_choice_status":{"type":"string","description":"Patient choice status for this patient early order response.","isRequired":true,"uniqueKey":"patient_choice_status","typeLabel":"string"},"dose_change":{"oneOf":[{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"dose_change.oneOf.0.additionalProperties","typeLabel":"any"},"description":"Dose change for this patient early order response. May be null when unavailable.","isRequired":true,"uniqueKey":"dose_change.oneOf.0","typeLabel":"object"},{"type":"null","additionalProperties":{"oneOf":[{}],"uniqueKey":"dose_change.oneOf.1.additionalProperties","typeLabel":"any"},"description":"Dose change for this patient early order response. May be null when unavailable.","isRequired":true,"uniqueKey":"dose_change.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"dose_change","typeLabel":"object | null"},"treatment_change":{"oneOf":[{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"treatment_change.oneOf.0.additionalProperties","typeLabel":"any"},"description":"Treatment change for this patient early order response. May be null when unavailable.","isRequired":true,"uniqueKey":"treatment_change.oneOf.0","typeLabel":"object"},{"type":"null","additionalProperties":{"oneOf":[{}],"uniqueKey":"treatment_change.oneOf.1.additionalProperties","typeLabel":"any"},"description":"Treatment change for this patient early order response. May be null when unavailable.","isRequired":true,"uniqueKey":"treatment_change.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"treatment_change","typeLabel":"object | null"}},"required":["consultation_id","dose_change","patient_choice_status","subscription","treatment_change"],"uniqueKey":"","typeLabel":"object"},"examples":{"example-1":{"title":"example-1","value":{"consultation_id":"00000000-0000-4000-8000-000000000001","subscription":{"id":"00000000-0000-4000-8000-000000000001","price_cents":0,"currency":"synthetic","payment_method_type":null,"payment_method_brand":null,"payment_method_last4":null,"early_order_locked":false},"patient_choice_status":"synthetic","dose_change":null,"treatment_change":null}},"example-2":{"title":"example-2","value":{"consultation_id":"41d355b7-e574-51f3-a844-858231040cc2","subscription":{"id":"778e8448-583f-5228-9015-1f578f92f1de","status":"active","price_cents":2500,"currency":"EUR","started_at":"2026-10-05T18:25:12.969528Z","current_period_start":"2026-10-05T18:25:07Z","current_period_end":"2026-11-02T18:25:07Z","cancel_at_period_end":false,"canceled_at":null,"treatment_id":"mounjaro","category":"weight_loss","interval":"week","interval_count":4,"cycle_days":28,"payment_method_type":null,"payment_method_brand":null,"payment_method_last4":null,"early_order_locked_until":"2026-11-02T18:25:07Z","early_order_locked":true},"patient_choice_status":"confirmed","dose_change":null,"treatment_change":null}}},"exampleType":"examples"}},"description":"Successful request an early subscription order.","exampleType":"examples"},"b29286ef-480f-4864-b9a1-e6f1b398145d":{"description":"Invalid request or renewal choice; correct fields before retrying.","content":{"application/json":{"schema":{"type":"object","description":"Error envelope emitted by the source branch or DRF validation. `detail`, `error` and `code` depend on the branch; field validation uses lists keyed by request field.","additionalProperties":{"oneOf":[{}],"uniqueKey":"additionalProperties","typeLabel":"any"},"uniqueKey":"","typeLabel":"object"},"examples":{"example-1":{"title":"example-1","value":{"code":"early_order_category_not_eligible"}}},"exampleType":"examples"}},"exampleType":"examples"},"ee3d2ed8-2af1-42a3-a48d-ff3548cb01ad":{"description":"No bearer token, or a token that is expired or malformed. Re-authenticate; do not retry the same token.","content":{"application/json":{"schema":{"type":"object","description":"Error envelope emitted by the source branch or DRF validation. `detail`, `error` and `code` depend on the branch; field validation uses lists keyed by request field.","additionalProperties":{"oneOf":[{}],"uniqueKey":"additionalProperties","typeLabel":"any"},"uniqueKey":"","typeLabel":"object"},"examples":{"example-1":{"title":"example-1","value":{"detail":"Authentication credentials were not provided."}}},"exampleType":"examples"}},"exampleType":"examples"},"1c19a385-f6b0-4ef0-a485-761ab88985a7":{"description":"The account lacks permission for this operation.","content":{"application/json":{"schema":{"type":"object","description":"Error envelope emitted by the source branch or DRF validation. `detail`, `error` and `code` depend on the branch; field validation uses lists keyed by request field.","additionalProperties":{"oneOf":[{}],"uniqueKey":"additionalProperties","typeLabel":"any"},"uniqueKey":"","typeLabel":"object"},"examples":{"example-1":{"title":"example-1","value":{"detail":"You do not have permission to perform this action."}}},"exampleType":"examples"}},"exampleType":"examples"},"ce9d6258-d2cd-43e6-81f0-b41dbfeb070b":{"description":"Subscription state refuses an early order. Read current state; never retry blindly.","content":{"application/json":{"schema":{"type":"object","description":"Error envelope emitted by the source branch or DRF validation. `detail`, `error` and `code` depend on the branch; field validation uses lists keyed by request field.","additionalProperties":{"oneOf":[{}],"uniqueKey":"additionalProperties","typeLabel":"any"},"uniqueKey":"","typeLabel":"object"},"examples":{"example-1":{"title":"example-1","value":{"code":"early_order_no_entitled_subscription"}},"example-2":{"title":"example-2","value":{"code":"early_order_no_entitled_subscription"}},"example-3":{"title":"example-3","value":{"code":"early_order_subscription_ending"}},"example-4":{"title":"example-4","value":{"code":"early_order_period_unavailable"}},"example-5":{"title":"example-5","value":{"code":"early_order_period_already_advanced"}},"example-6":{"title":"example-6","value":{"code":"early_order_pending_renewal"}}},"exampleType":"examples"}},"exampleType":"examples"},"e6ebf3a5-e702-4cb8-b2db-c3d5b582aaa2":{"description":"The Idempotency-Key was already used with a different request. Generate a new key only for a genuinely new operation.","content":{"application/json":{"schema":{"type":"object","description":"Idempotency error. `code` names the reason.","properties":{"code":{"type":"string","description":"Machine-readable reason.","isRequired":true,"uniqueKey":"code","typeLabel":"string"}},"required":["code"],"uniqueKey":"","typeLabel":"object"},"examples":{"example-1":{"title":"example-1","value":{"code":"idempotency_key_reuse"}}},"exampleType":"examples"}},"exampleType":"examples"},"e349c13d-deb0-4367-a591-ecd4de2767b7":{"description":"Source-defined error response; inspect the envelope and retry rules.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"additionalProperties","typeLabel":"any"},"description":"Endpoint/DRF error envelope; field validation is keyed by request field.","uniqueKey":"","typeLabel":"object"},"examples":{"example-1":{"title":"example-1","value":{"detail":"Request was throttled."}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"ad41e598-9bfb-4621-aaa2-8bda3bad4f34":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"4f09e80c-2b64-4896-a8db-cb26d8ca4bfc":{"url":"https://api.hi-doctor.ai","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"hi-doctor-ai","siteName":"Hi Doctor","title":"Request an early subscription order - Hi Doctor","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-04T14:38:27.619Z","originalFileLocation":"api-reference/billing/request-an-early-subscription-order.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=\"Creates the renewal consultation now instead of at the period end. Irreversible, and allowed only once per paid period — it consumes the period\u0026#x27;s single early order and sets a lock window. ### Access, effects and retries Ownership: Entitled patient subscription/category and completed renewal choice. Prerequisites: An authenticated patient account is required. Effects: Locks/consumes period and creates renewal consultation; clinically consequential. Retries: Not safely repeatable; 409 typed early-order guards prevent repeats.\">\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=\"Request an early subscription order - Hi Doctor\">\u003cmeta data-mint-head property=\"og:description\" content=\"Creates the renewal consultation now instead of at the period end. Irreversible, and allowed only once per paid period — it consumes the period\u0026#x27;s single early order and sets a lock window. ### Access, effects and retries Ownership: Entitled patient subscription/category and completed renewal choice. Prerequisites: An authenticated patient account is required. Effects: Locks/consumes period and creates renewal consultation; clinically consequential. Retries: Not safely repeatable; 409 typed early-order guards prevent repeats.\">\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/billing/request-an-early-subscription-order\">\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=Billing\u0026amp;title=Request+an+early+subscription+order\u0026amp;description=Creates+the+renewal+consultation+now+instead+of+at+the+period+end.%0A%0A**Irreversible**%2C+and+allowed+only+once+per+paid+period+%E2%80%94+it+consumes+the+period%27s+single+ea\u0026amp;theme=62172df8443c9a1536d0ebde\u0026amp;signature=4952cccc48d9a3ec927e6562d63ee2ce3cef889e3b78df692b8316d8b1339e4d\">\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=\"Request an early subscription order - Hi Doctor\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Creates the renewal consultation now instead of at the period end. Irreversible, and allowed only once per paid period — it consumes the period\u0026#x27;s single early order and sets a lock window. ### Access, effects and retries Ownership: Entitled patient subscription/category and completed renewal choice. Prerequisites: An authenticated patient account is required. Effects: Locks/consumes period and creates renewal consultation; clinically consequential. Retries: Not safely repeatable; 409 typed early-order guards prevent repeats.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://hi-doctor-ai.mintlify.app/_mintlify/api/og/v2?division=Billing\u0026amp;title=Request+an+early+subscription+order\u0026amp;description=Creates+the+renewal+consultation+now+instead+of+at+the+period+end.%0A%0A**Irreversible**%2C+and+allowed+only+once+per+paid+period+%E2%80%94+it+consumes+the+period%27s+single+ea\u0026amp;theme=62172df8443c9a1536d0ebde\u0026amp;signature=4952cccc48d9a3ec927e6562d63ee2ce3cef889e3b78df692b8316d8b1339e4d\">\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/billing/request-an-early-subscription-order\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/billing/request-an-early-subscription-order.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/billing/request-an-early-subscription-order#webpage\",\"url\":\"https://docs.hi-doctor.ai/api-reference/billing/request-an-early-subscription-order\",\"name\":\"Request an early subscription order\",\"description\":\"Creates the renewal consultation now instead of at the period end. Irreversible, and allowed only once per paid period — it consumes the period's single early order and sets a lock window. ### Access, effects and retries Ownership: Entitled patient subscription/category and completed renewal choice. Prerequisites: An authenticated patient account is required. Effects: Locks/consumes period and creates renewal consultation; clinically consequential. Retries: Not safely repeatable; 409 typed early-order guards prevent repeats.\",\"dateModified\":\"2026-11-04T14:38:27.619Z\",\"isPartOf\":{\"@id\":\"https://docs.hi-doctor.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.hi-doctor.ai/api-reference/billing/request-an-early-subscription-order#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.hi-doctor.ai/api-reference/billing/request-an-early-subscription-order#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://docs.hi-doctor.ai/api-reference/tags/account\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Billing\",\"item\":\"https://docs.hi-doctor.ai/api-reference/tags/billing\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Request an early subscription order\",\"item\":\"https://docs.hi-doctor.ai/api-reference/billing/request-an-early-subscription-order\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.hi-doctor.ai/api-reference/billing/request-an-early-subscription-order#apireference\",\"headline\":\"Request an early subscription order\",\"name\":\"Request an early subscription order\",\"description\":\"Creates the renewal consultation now instead of at the period end. Irreversible, and allowed only once per paid period — it consumes the period's single early order and sets a lock window. ### Access, effects and retries Ownership: Entitled patient subscription/category and completed renewal choice. Prerequisites: An authenticated patient account is required. Effects: Locks/consumes period and creates renewal consultation; clinically consequential. Retries: Not safely repeatable; 409 typed early-order guards prevent repeats.\",\"url\":\"https://docs.hi-doctor.ai/api-reference/billing/request-an-early-subscription-order\",\"mainEntityOfPage\":{\"@id\":\"https://docs.hi-doctor.ai/api-reference/billing/request-an-early-subscription-order#webpage\"},\"dateModified\":\"2026-11-04T14:38:27.619Z\",\"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","groups":[{"group":"Start","pages":[{"title":"Hi Doctor patient REST API: overview and base URL","sidebarTitle":"API reference","href":"/api-reference/introduction"},{"title":"REST API quickstart: sign in and make your first read","sidebarTitle":"Quickstart","href":"/api-reference/quickstart"},{"title":"Answer a Hi Doctor questionnaire one question at a time","sidebarTitle":"Answer a questionnaire","href":"/api-reference/questionnaire-guide"},{"title":"REST authentication: patient JWTs, refresh and Google","sidebarTitle":"Authentication","href":"/api-reference/authentication"},{"title":"Sign up a Hi Doctor patient over the REST API","sidebarTitle":"Sign up","href":"/api-reference/signup"}]},{"group":"Conventions","pages":[{"title":"Pagination in the Hi Doctor patient REST API","sidebarTitle":"Pagination","href":"/api-reference/pagination"},{"title":"Uploads and downloads in the Hi Doctor REST API","sidebarTitle":"Uploads and downloads","href":"/api-reference/uploads-downloads"},{"title":"Hi Doctor REST API errors, throttles and recovery","sidebarTitle":"Errors and recovery","href":"/api-reference/errors"},{"title":"Safe retries with Idempotency-Key in the Hi Doctor API","sidebarTitle":"Safe retries","href":"/api-reference/idempotency"},{"title":"Hi Doctor patient REST API changelog","sidebarTitle":"API changelog","href":"/api-reference/changelog"}]},{"group":"Endpoints","pages":[{"group":"Account","pages":[{"title":"Account endpoints: sign up, sign in and profile","sidebarTitle":"Account","href":"/api-reference/tags/account"},{"title":"Register a new patient","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/register/","href":"/api-reference/account/register-a-new-patient"},{"title":"Verify the emailed code","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/verify-email/","href":"/api-reference/account/verify-the-emailed-code"},{"title":"Create an access token pair","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/token/","href":"/api-reference/account/create-an-access-token-pair"},{"title":"Create tokens with Google","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/google-login/","href":"/api-reference/account/create-tokens-with-google"},{"title":"Refresh the access token","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/token/refresh/","href":"/api-reference/account/refresh-the-access-token"},{"title":"Request a password reset","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/forgot-password/","href":"/api-reference/account/request-a-password-reset"},{"title":"Replace the account password","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/reset-password/","href":"/api-reference/account/replace-the-account-password"},{"title":"Get the account profile","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/profile/me/","href":"/api-reference/account/get-the-account-profile"},{"title":"Update the account profile","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v1/users/profile/me/","href":"/api-reference/account/update-the-account-profile"},{"title":"Get the profile alias","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/profile/","href":"/api-reference/account/get-the-profile-alias"},{"title":"Update the profile alias","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v1/users/profile/","href":"/api-reference/account/update-the-profile-alias"},{"title":"Delete the patient account","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/account/delete/","href":"/api-reference/account/delete-the-patient-account"},{"title":"Check registration email status","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/register/email-status/","href":"/api-reference/account/check-registration-email-status"},{"title":"Subscribe to newsletter updates","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/marketing/newsletter/subscribe/","href":"/api-reference/account/subscribe-to-newsletter-updates"},{"title":"Join a treatment waitlist","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/marketing/waitlist/","href":"/api-reference/account/join-a-treatment-waitlist"},{"title":"Update email communication preferences","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/marketing/email-preferences/","href":"/api-reference/account/update-email-communication-preferences"},{"title":"Get an idempotency key result","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/idempotency/{key}/","href":"/api-reference/account/get-an-idempotency-key-result"}]},{"group":"Questionnaires","pages":[{"title":"Questionnaire endpoints: schema, answers and submit","sidebarTitle":"Questionnaires","href":"/api-reference/tags/questionnaires"},{"title":"List questionnaire categories","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/questionnaires/categories/","href":"/api-reference/questionnaires/list-questionnaire-categories"},{"title":"Get a questionnaire schema and saved progress","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/questionnaires/{slug}/schema/","href":"/api-reference/questionnaires/get-a-questionnaire-schema-and-saved-progress"},{"title":"Get saved answers","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/questionnaires/{slug}/progress/","href":"/api-reference/questionnaires/get-saved-answers"},{"title":"Replace saved answers","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v1/users/questionnaires/{slug}/progress/","href":"/api-reference/questionnaires/replace-saved-answers"},{"title":"Get the next questionnaire question","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/questionnaires/{slug}/current/","href":"/api-reference/questionnaires/get-the-next-questionnaire-question"},{"title":"Send questionnaire answers","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/questionnaires/{slug}/answer/","href":"/api-reference/questionnaires/send-questionnaire-answers"},{"title":"Get a previously answered question","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/questionnaires/{slug}/back/","href":"/api-reference/questionnaires/get-a-previously-answered-question"},{"title":"Get questionnaire answers for review","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/questionnaires/{slug}/review/","href":"/api-reference/questionnaires/get-questionnaire-answers-for-review"},{"title":"Submit for medical review","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/questionnaires/{slug}/submit/","href":"/api-reference/questionnaires/submit-for-medical-review"},{"title":"Submit the legacy patient form","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v1/users/forms/user/","href":"/api-reference/questionnaires/submit-the-legacy-patient-form"}]},{"group":"Consultations","pages":[{"title":"Consultation endpoints: status and photographs","sidebarTitle":"Consultations","href":"/api-reference/tags/consultations"},{"title":"List consultation photos","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/questionnaire/consultations/{id}/images/","href":"/api-reference/consultations/list-consultation-photos"},{"title":"Create a consultation photo","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/questionnaire/consultations/{id}/images/","href":"/api-reference/consultations/create-a-consultation-photo"},{"title":"Download a consultation photo","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/questionnaire/consultations/{id}/images/{image_id}/content/","href":"/api-reference/consultations/download-a-consultation-photo"},{"title":"List patient consultations","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/consultations/","href":"/api-reference/consultations/list-patient-consultations"},{"title":"Get a consultation","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/consultations/{id}/","href":"/api-reference/consultations/get-a-consultation"},{"title":"Delete a consultation photo","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/questionnaire/consultations/{id}/images/{image_id}/","href":"/api-reference/consultations/delete-a-consultation-photo"}]},{"group":"Prescriptions","pages":[{"title":"Prescription endpoints: list, PDF download and reissue","sidebarTitle":"Prescriptions","href":"/api-reference/tags/prescriptions"},{"title":"List patient prescriptions","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/prescriptions/","href":"/api-reference/prescriptions/list-patient-prescriptions"},{"title":"Download a prescription PDF by kind","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/prescriptions/{id}/pdf/{kind}/","href":"/api-reference/prescriptions/download-a-prescription-pdf-by-kind"},{"title":"Download a prescription PDF","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/prescriptions/{id}/pdf/","href":"/api-reference/prescriptions/download-a-prescription-pdf"},{"title":"Request a prescription reissue","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/prescriptions/{id}/request-reissue/","href":"/api-reference/prescriptions/request-a-prescription-reissue"},{"title":"Verify a prescription token","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/verify/prescription/{token}/","href":"/api-reference/prescriptions/verify-a-prescription-token"}]},{"group":"Messages","pages":[{"title":"Message endpoints: medical team conversations","sidebarTitle":"Messages","href":"/api-reference/tags/messages"},{"title":"List patient conversations","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/conversations/","href":"/api-reference/messages/list-patient-conversations"},{"title":"Create a medical-team conversation","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/conversations/","href":"/api-reference/messages/create-a-medical-team-conversation"},{"title":"Get a conversation","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/conversations/{id}/","href":"/api-reference/messages/get-a-conversation"},{"title":"Get unread counts","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/conversations/unread-summary/","href":"/api-reference/messages/get-unread-counts"},{"title":"List patient messages","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/conversations/{id}/messages/","href":"/api-reference/messages/list-patient-messages"},{"title":"Send a message","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/conversations/{id}/messages/","href":"/api-reference/messages/send-a-message"},{"title":"Download a message attachment","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/conversations/{id}/messages/{message_id}/attachment/","href":"/api-reference/messages/download-a-message-attachment"},{"title":"Mark a conversation as read","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/conversations/{id}/mark-read/","href":"/api-reference/messages/mark-a-conversation-as-read"},{"title":"Mark a conversation as unread","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/conversations/{id}/mark-unread/","href":"/api-reference/messages/mark-a-conversation-as-unread"}]},{"group":"Billing","pages":[{"title":"Billing endpoints: checkout, plans and invoices","sidebarTitle":"Billing","href":"/api-reference/tags/billing"},{"title":"Create a checkout session","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/checkout/","href":"/api-reference/billing/create-a-checkout-session"},{"title":"Get checkout session status","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/stripe/session/{session_id}/","href":"/api-reference/billing/get-checkout-session-status"},{"title":"Get patient subscription","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/subscriptions/me/","href":"/api-reference/billing/get-patient-subscription"},{"title":"Get renewal options for a category","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/subscriptions/renewal-options/","href":"/api-reference/billing/get-renewal-options-for-a-category"},{"title":"List pending renewal choices","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/subscriptions/pending-choice/","href":"/api-reference/billing/list-pending-renewal-choices"},{"title":"Confirm a pending renewal choice","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/subscriptions/pending-choice/confirm/","href":"/api-reference/billing/confirm-a-pending-renewal-choice"},{"title":"Cancel a subscription at period end","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/subscriptions/cancel/","href":"/api-reference/billing/cancel-a-subscription-at-period-end"},{"title":"Reactivate a subscription","description":"Cancels a pending period-end cancellation so the plan keeps renewing. Returns `409 already_active` if nothing was scheduled.\n\n### Access, effects and retries\n**Ownership:** Patient and brand-scoped latest or requested subscription.\n\n**Prerequisites:** An authenticated patient account is required.\n\n**Effects:** Stripe reactivation and conversation system event.\n\n**Retries:** Repeat returns 409 already_active; no second Stripe mutation.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/subscriptions/reactivate/","href":"/api-reference/billing/reactivate-a-subscription"},{"title":"Request an early subscription order","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/subscriptions/early-order/","href":"/api-reference/billing/request-an-early-subscription-order"},{"title":"Create a billing portal session","description":"Returns a Stripe-hosted URL where the patient changes card, plan or billing address. Hi-Doctor never sees card details.\n\nAn optional `return_path` must be a local path: a single leading slash, no scheme, no network path, and no encoded form of those.\n\n### Access, effects and retries\n**Ownership:** Patient Stripe customer in own brand.\n\n**Prerequisites:** An authenticated patient account is required.\n\n**Effects:** Can create Stripe customer and billing portal session.\n\n**Retries:** Each retry can mint another session; no implicit read-only claim.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/subscriptions/portal/","href":"/api-reference/billing/create-a-billing-portal-session"},{"title":"List patient payments","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/payments/","href":"/api-reference/billing/list-patient-payments"},{"title":"Download an invoice PDF","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/payments/{id}/invoice/","href":"/api-reference/billing/download-an-invoice-pdf"},{"title":"Download a credit note PDF","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/payments/{id}/credit-notes/{refund_pk}/","href":"/api-reference/billing/download-a-credit-note-pdf"}]},{"group":"Records","pages":[{"title":"Records endpoints: consultation orders and documents","sidebarTitle":"Records","href":"/api-reference/tags/records"},{"title":"List patient orders","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/orders/","href":"/api-reference/records/list-patient-orders"},{"title":"List health documents","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/documents/","href":"/api-reference/records/list-health-documents"},{"title":"Create a health document","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/documents/","href":"/api-reference/records/create-a-health-document"},{"title":"Delete a health document","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/users/documents/{document_id}/","href":"/api-reference/records/delete-a-health-document"},{"title":"Download a health document","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/documents/{document_id}/content/","href":"/api-reference/records/download-a-health-document"}]},{"group":"Safety reports","pages":[{"title":"Safety report endpoints: suspected side effects","sidebarTitle":"Safety reports","href":"/api-reference/tags/safety-reports"},{"title":"List reported side effects","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/adverse-events/","href":"/api-reference/safety-reports/list-reported-side-effects"},{"title":"Report a suspected side effect","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/adverse-events/","href":"/api-reference/safety-reports/report-a-suspected-side-effect"}]},{"group":"Progress","pages":[{"title":"Progress endpoints: weight-loss journal","sidebarTitle":"Progress","href":"/api-reference/tags/progress"},{"title":"Get patient goal","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/journal/goal/","href":"/api-reference/progress/get-patient-goal"},{"title":"Replace the progress goal","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json put /v1/users/journal/goal/","href":"/api-reference/progress/replace-the-progress-goal"},{"title":"Get injection plan","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/journal/injection-plan/","href":"/api-reference/progress/get-injection-plan"},{"title":"Update the injection plan","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json put /v1/users/journal/injection-plan/","href":"/api-reference/progress/update-the-injection-plan"},{"title":"List weight entries","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/journal/weight-entries/","href":"/api-reference/progress/list-weight-entries"},{"title":"Create a daily weight entry","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/journal/weight-entries/","href":"/api-reference/progress/create-a-daily-weight-entry"},{"title":"Update a weight entry","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v1/users/journal/weight-entries/{id}/","href":"/api-reference/progress/update-a-weight-entry"},{"title":"Get a weight entry","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/journal/weight-entries/{id}/","href":"/api-reference/progress/get-a-weight-entry"},{"title":"Delete a weight entry","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/users/journal/weight-entries/{id}/","href":"/api-reference/progress/delete-a-weight-entry"},{"title":"Replace a weight entry","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json put /v1/users/journal/weight-entries/{id}/","href":"/api-reference/progress/replace-a-weight-entry"},{"title":"List patient injections","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/journal/injections/","href":"/api-reference/progress/list-patient-injections"},{"title":"Create an injection entry","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/journal/injections/","href":"/api-reference/progress/create-an-injection-entry"},{"title":"Update an injection","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v1/users/journal/injections/{id}/","href":"/api-reference/progress/update-an-injection"},{"title":"Get an injection","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/journal/injections/{id}/","href":"/api-reference/progress/get-an-injection"},{"title":"Delete an injection","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/users/journal/injections/{id}/","href":"/api-reference/progress/delete-an-injection"},{"title":"Replace an injection","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json put /v1/users/journal/injections/{id}/","href":"/api-reference/progress/replace-an-injection"},{"title":"List patient notes","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/journal/notes/","href":"/api-reference/progress/list-patient-notes"},{"title":"Create a progress note","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/journal/notes/","href":"/api-reference/progress/create-a-progress-note"},{"title":"Update a note","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v1/users/journal/notes/{id}/","href":"/api-reference/progress/update-a-note"},{"title":"Get a note","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/journal/notes/{id}/","href":"/api-reference/progress/get-a-note"},{"title":"Delete a note","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/users/journal/notes/{id}/","href":"/api-reference/progress/delete-a-note"},{"title":"Replace a note","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json put /v1/users/journal/notes/{id}/","href":"/api-reference/progress/replace-a-note"}]},{"group":"Referrals","pages":[{"title":"Referral endpoints: summary and referred patients","sidebarTitle":"Referrals","href":"/api-reference/tags/referrals"},{"title":"Get referral summary","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/referrals/me/","href":"/api-reference/referrals/get-referral-summary"},{"title":"List people you referred","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/referrals/me/referred/","href":"/api-reference/referrals/list-people-you-referred"},{"title":"List referral transactions","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/referrals/me/transactions/","href":"/api-reference/referrals/list-referral-transactions"},{"title":"Get monthly referral totals","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/referrals/me/monthly/","href":"/api-reference/referrals/get-monthly-referral-totals"},{"title":"Activate the referral account","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/referrals/activate/","href":"/api-reference/referrals/activate-the-referral-account"}]}]}]},{"tab":"Partners","pages":[{"title":"Partners","href":"/partners/overview"}]},{"tab":"Articles","pages":[{"title":"Articles","href":"/blog/connect-hi-doctor-mcp"}]},{"tab":"Health library","pages":[{"title":"Health library","href":"/library/overview"}]}]},"basePath":"","title":"Request an early subscription order - 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"]}