Cancels an order you placed, identified by the placerId it was placed with or its sampleId — exactly one of the two (the orderId is not accepted).
What it costs depends on how far the order has travelled:
Stage
Cancellable?
Fee
Before the kit ships
Yes
Free
After the kit ships, before the lab receives the sample
Yes
$25
After lab receipt
No
—
Cancellation is not idempotent-echo: an already-cancelled order returns 422 with reason: not_cancellable ("Order already canceled") — when retrying after a timeout, treat that as already done. An unknown identifier returns 422 with reason: order_not_found.
WIP — coming soon: cancellation through the API covers only orders placed through the API. An order placed in the Vibrant Portal returns 422 with reason: not_placed_via_api; an order outside your clinic is treated as not found.
Cancels an order you placed. Identify it by the placerId you placed it with, or the
sampleId from the place response — exactly one of the two (the orderId is not accepted).
The policy
Stage
Cancellable?
Fee
Before the kit ships
Yes
Free
After the kit ships, before the lab receives the sample
Yes
$25
After lab receipt (the lab has the sample)
No
—
Once the lab has the sample the result is already in production; cancellation is rejected with
422 / not_cancellable.
What comes back
201 with the cancellation result. refundAmount is what this cancellation actually refunded —
0 when nothing had been charged yet (e.g. a patient-pays-later order that was never paid).
Cancelling twice, and other rejections
Cancellation is not an idempotent echo: an already-cancelled order returns 422 with
reason: "not_cancellable" and message: "Order already canceled". When retrying after a network
timeout, treat that response as “already done”. An unknown placerId/sampleId returns 422
with reason: "order_not_found".
Orders placed in the Portal
WIP — coming soon. This rejection is not returned yet, and its shape may change.
Cancellation through the API covers only orders placed through the API. An order placed in the
Vibrant Portal, for example one you identify by its sampleId, will return 422 with
reason: "not_placed_via_api":
422
{ "status": "rejected", "reason": "not_placed_via_api", "message": "This order was not placed through the API. Only orders placed through the API can be looked up or cancelled with the API."}
An order outside your clinic is treated as not found (order_not_found), as it is today.
There is no fee-preview API yet — the fee/refund that applies is the one returned by the
cancellation itself. (Get order status remains a proposed
endpoint.)
Authorizations
Authorization
string
header
required
OAuth2 client credentials. Generate a client ID and client secret in the Portal, exchange them for an access token, then send Authorization: Bearer <access_token>. Request the result and report scopes to read results.
Body
application/json
Identify the order by exactly one of these.
placerId
string
The placerId the order was placed with.
Example:
"VENDOR-ORDER-12345"
sampleId
integer
The sampleId returned when the order was placed.
Example:
2575603
Response
Order cancelled.
status
enum<string>
Available options:
cancelled
sampleId
integer
Example:
2575603
refundAmount
number
Amount refunded by this cancellation — 0 when nothing had been charged yet.
Example:
0
currency
string
Example:
"usd"
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Vibrant Wellness Portal API","colors":{"primary":"#0142E2","light":"#94AEF7","dark":"#0142E2"},"logo":{"light":"https://mintcdn.com/vibrant-8ddfe82e/S0AZ5CIJgM1r_bu8/logo/light.svg?fit=max\u0026auto=format\u0026n=S0AZ5CIJgM1r_bu8\u0026q=85\u0026s=7f84f445f8577c8f385caef31ea25d07","dark":"https://mintcdn.com/vibrant-8ddfe82e/S0AZ5CIJgM1r_bu8/logo/dark.svg?fit=max\u0026auto=format\u0026n=S0AZ5CIJgM1r_bu8\u0026q=85\u0026s=e53f111f2c721c1b421bf21a90f932f3"},"favicon":"https://mintcdn.com/vibrant-8ddfe82e/S0AZ5CIJgM1r_bu8/favicon.svg?fit=max\u0026auto=format\u0026n=S0AZ5CIJgM1r_bu8\u0026q=85\u0026s=9f6d347c1739756b1ef5468ed4166985","background":{"color":{"light":"#F3F3F3","dark":"#161616"}},"navbar":{"links":[{"href":"https://portal.vibrant-wellness.com","label":"Portal"}],"primary":{"type":"button","label":"Get credentials","href":"https://portal.vibrant-wellness.com/settings/api-credentials"}},"footer":{"socials":{"x":"https://x.com/vibrantwellness","linkedin":"https://linkedin.com/company/vibrant-wellness"}},"banner":{"content":"Last updated **11-23-2026 14:46 PST**","dismissible":false},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Status","icon":"signal-bars","href":"https://status.vibrant-wellness.com"},{"anchor":"Changelog","icon":"list-timeline","href":"https://developers.vibrant-wellness.com/changelog"},{"anchor":"Support","icon":"headset","href":"mailto:[email protected]"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"vibrant-8ddfe82e","hasAudioNarration":false,"actualSubdomain":"vibrant-8ddfe82e","customDomains":[],"gitSource":{"type":"github","owner":"vibrant-america","repo":"api-documentation","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6b04d9f744cc743809d82fd5"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b04df3744cc743809d89eef","clientVersion":"0.0.4286","searchFilterCounts":[{"language":"default","tag":"Guides","count":17},{"language":"default","tag":"API reference","count":11},{"language":"default","tag":"Endpoints","count":10},{"language":"default","tag":"Core concepts","count":6},{"language":"default","tag":"Platform","count":5},{"language":"default","tag":"Get started","count":4},{"language":"default","tag":"Order","count":3},{"language":"default","tag":"Patient","count":3},{"language":"default","tag":"Help","count":2},{"language":"default","tag":"Overview","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","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":"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":"site-roles","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":"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":"editor-metadata","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},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"/* cyrillic-ext */\n@font-face {\n font-family: 'Roboto Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/robotomono/v31/L0x5DF4xlVMF-BfR8bXMIjhGq3-OXg.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Roboto Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/robotomono/v31/L0x5DF4xlVMF-BfR8bXMIjhPq3-OXg.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek */\n@font-face {\n font-family: 'Roboto Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/robotomono/v31/L0x5DF4xlVMF-BfR8bXMIjhIq3-OXg.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Roboto Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/robotomono/v31/L0x5DF4xlVMF-BfR8bXMIjhEq3-OXg.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Roboto Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/robotomono/v31/L0x5DF4xlVMF-BfR8bXMIjhFq3-OXg.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Roboto Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/robotomono/v31/L0x5DF4xlVMF-BfR8bXMIjhLq38.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Roboto Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/robotomono/v31/L0x5DF4xlVMF-BfR8bXMIjhGq3-OXg.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Roboto Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/robotomono/v31/L0x5DF4xlVMF-BfR8bXMIjhPq3-OXg.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek */\n@font-face {\n font-family: 'Roboto Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/robotomono/v31/L0x5DF4xlVMF-BfR8bXMIjhIq3-OXg.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Roboto Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/robotomono/v31/L0x5DF4xlVMF-BfR8bXMIjhEq3-OXg.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Roboto Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/robotomono/v31/L0x5DF4xlVMF-BfR8bXMIjhFq3-OXg.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Roboto Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/robotomono/v31/L0x5DF4xlVMF-BfR8bXMIjhLq38.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n:root{--vw-blue: #0142E2;--vw-blue-hover: #0035B8;--vw-blue-50: #F0F4FE;--vw-blue-200: #BFCFFB;--vw-ink: #161616;--vw-page: #F3F3F3;--vw-text: #262626;--vw-text-secondary: #525252;--vw-text-muted: #737373;--vw-surface: #FFFFFF;--vw-line: #E5E5E5;--vw-line-strong: #D4D4D4;--vw-warning-bg: #FDF3E1;--vw-warning-line: #F9E2BF;--vw-diagram-stroke: #161616;--vw-mono: \"Roboto Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace}:root.dark{--vw-page: #161616;--vw-diagram-stroke: #A3A3A3;--vw-text: #F3F3F3;--vw-text-secondary: #D4D4D4;--vw-text-muted: #A3A3A3;--vw-surface: #1F1F1F;--vw-line: #2E2E2E;--vw-line-strong: #404040}::selection{background:var(--vw-blue-200);color:var(--vw-ink)}#banner,#sidebar .sidebar-group-header,#sidebar .sidebar-group-header .sidebar-title,#content-area .eyebrow,#table-of-contents h2 button,#table-of-contents-layout h2 button,.mdx-content table th{font-family:var(--vw-mono);font-size:11px;font-weight:400;letter-spacing:0.1em;text-transform:uppercase;text-shadow:none}#sidebar .sidebar-group-header,#sidebar .sidebar-group-header .sidebar-title,#content-area .eyebrow,#table-of-contents h2 button,#table-of-contents-layout h2 button,.mdx-content table th{color:var(--vw-text-muted)}#banner{background:var(--vw-ink);color:#FFFFFF}#banner strong{font-weight:500}.dark #banner{border-bottom:1px solid var(--vw-line)}#navbar-transition{background:var(--vw-surface)!important;border-bottom:1px solid var(--vw-line)}.dark #navbar-transition{background:var(--vw-ink)!important}#navbar .nav-logo{height:24px}#search-bar-entry{background:var(--vw-surface);border-radius:9999px}#topbar-cta-button a{font-family:var(--vw-mono);font-size:12px;font-weight:400;letter-spacing:0.08em;text-transform:uppercase;padding-left:18px;padding-right:18px}#topbar-cta-button a>span.absolute{background:var(--vw-blue);border-radius:9999px}#topbar-cta-button a:hover>span.absolute{background:var(--vw-blue-hover);opacity:1}#page-title{color:var(--vw-ink);font-weight:500;letter-spacing:-0.025em}.dark #page-title{color:#FFFFFF}#page-context-menu>button{background:var(--vw-surface)}#page-context-menu>button:first-child{border-top-left-radius:9999px;border-bottom-left-radius:9999px;padding-left:14px}#page-context-menu>button:last-child{border-top-right-radius:9999px;border-bottom-right-radius:9999px}.mdx-content{color:var(--vw-text)}.mdx-content h2,.mdx-content h3,.mdx-content h4{font-weight:500;letter-spacing:-0.02em}html:not(.dark) .mdx-content h2,html:not(.dark) .mdx-content h3,html:not(.dark) .mdx-content h4,html:not(.dark) .mdx-content strong{color:var(--vw-ink)}.mdx-content .card,.mdx-content .callout,.mdx-content .code-block{border-radius:12px}.mdx-content .card{background:var(--vw-surface);border-color:var(--vw-line)}.mdx-content .callout[data-callout-type=\"info\"]{background:var(--vw-surface);border-color:var(--vw-line)}html:not(.dark) .mdx-content .callout[data-callout-type=\"note\"]{background:var(--vw-blue-50);border-color:var(--vw-blue-200)}html:not(.dark) .mdx-content .callout[data-callout-type=\"warning\"]{background:var(--vw-warning-bg);border-color:var(--vw-warning-line)}.mdx-content [data-component-part=\"step-number\"]>div{background:var(--vw-surface);box-shadow:inset 0 0 0 1px var(--vw-line);font-family:var(--vw-mono)}.mdx-content .accordion{background:var(--vw-surface);border-color:var(--vw-line)}.mdx-content :not(.accordion-group)>.accordion{border-radius:12px}.mdx-content .accordion-group{border-color:var(--vw-line);border-radius:12px}.mermaid svg .node rect,.mermaid svg .node polygon,.mermaid svg .node circle{fill:var(--vw-surface)!important;stroke:var(--vw-diagram-stroke)!important;stroke-width:1px!important}.mermaid svg .nodeLabel,.mermaid svg .edgeLabel{color:var(--vw-text)!important}.mermaid svg .flowchart-link{stroke:var(--vw-diagram-stroke)!important}.mermaid svg .arrowMarkerPath{fill:var(--vw-diagram-stroke)!important;stroke:var(--vw-diagram-stroke)!important}.mermaid svg .edgeLabel,.mermaid svg .edgeLabel p,.mermaid svg .edgeLabel span,.mermaid svg .labelBkg{background-color:var(--vw-page)!important}.mermaid svg .edgeLabel rect{fill:var(--vw-page)!important}.mdx-content table th{border-bottom-color:var(--vw-line-strong);padding-bottom:10px}.mdx-content table td{border-bottom-color:var(--vw-line)}#content-container code,#content-container pre,#content-container .font-mono{font-family:var(--vw-mono)}#content-area :not(pre)>code{background:var(--vw-surface);border:1px solid var(--vw-line);border-radius:4px;color:var(--vw-ink);font-weight:400;-webkit-box-decoration-break:clone;box-decoration-break:clone}.dark #content-area :not(pre)>code{background:rgba(255, 255, 255, 0.08);border-color:transparent;color:var(--vw-text)}.mdx-content .code-block{border-color:var(--vw-line)}.tryit-button{border-radius:9999px;font-family:var(--vw-mono);letter-spacing:0.06em;text-transform:uppercase}"}]}
{"page":{"pagePath":"api-reference/orders/cancel","slug":"/api-reference/orders/cancel","pageMetadata":{"title":"Cancel an order","sidebarTitle":"Cancel","openapi":"POST /orders/cancel","description":"Cancels an order you placed, identified by the **`placerId` it was placed with or its `sampleId`** — exactly one of the two (the `orderId` is not accepted).\n\nWhat it costs depends on how far the order has travelled:\n\n| Stage | Cancellable? | Fee |\n|---|---|---|\n| Before the kit ships | Yes | **Free** |\n| After the kit ships,\u003cbr/>before the lab receives the sample | Yes | **$25** |\n| After lab receipt | **No** | — |\n\nCancellation is **not** idempotent-echo: an already-cancelled order returns `422` with `reason: not_cancellable` (`\"Order already canceled\"`) — when retrying after a timeout, treat that as already done. An unknown identifier returns `422` with `reason: order_not_found`.\n\n**WIP — coming soon:** cancellation through the API covers only orders placed through the API. An order placed in the Vibrant Portal returns `422` with `reason: not_placed_via_api`; an order outside your clinic is treated as not found.","href":"/api-reference/orders/cancel"},"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 p: \"p\",\n strong: \"strong\",\n table: \"table\",\n tbody: \"tbody\",\n td: \"td\",\n th: \"th\",\n thead: \"thead\",\n tr: \"tr\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Cancels an order you placed, identified by the \", _jsxs(_components.strong, {\n children: [_jsx(_components.code, {\n children: \"placerId\"\n }), \" it was placed with or its \", _jsx(_components.code, {\n children: \"sampleId\"\n })]\n }), \" — exactly one of the two (the \", _jsx(_components.code, {\n children: \"orderId\"\n }), \" is not accepted).\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"What it costs depends on how far the order has travelled:\"\n }), \"\\n\", _jsxs(_components.table, {\n children: [_jsx(_components.thead, {\n children: _jsxs(_components.tr, {\n children: [_jsx(_components.th, {\n children: \"Stage\"\n }), _jsx(_components.th, {\n children: \"Cancellable?\"\n }), _jsx(_components.th, {\n children: \"Fee\"\n })]\n })\n }), _jsxs(_components.tbody, {\n children: [_jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: \"Before the kit ships\"\n }), _jsx(_components.td, {\n children: \"Yes\"\n }), _jsx(_components.td, {\n children: _jsx(_components.strong, {\n children: \"Free\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsxs(_components.td, {\n children: [\"After the kit ships,\", _jsx(\"br\", {}), \"before the lab receives the sample\"]\n }), _jsx(_components.td, {\n children: \"Yes\"\n }), _jsx(_components.td, {\n children: _jsx(_components.strong, {\n children: \"$25\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: \"After lab receipt\"\n }), _jsx(_components.td, {\n children: _jsx(_components.strong, {\n children: \"No\"\n })\n }), _jsx(_components.td, {\n children: \"—\"\n })]\n })]\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Cancellation is \", _jsx(_components.strong, {\n children: \"not\"\n }), \" idempotent-echo: an already-cancelled order returns \", _jsx(_components.code, {\n children: \"422\"\n }), \" with \", _jsx(_components.code, {\n children: \"reason: not_cancellable\"\n }), \" (\", _jsx(_components.code, {\n children: \"\\\"Order already canceled\\\"\"\n }), \") — when retrying after a timeout, treat that as already done. An unknown identifier returns \", _jsx(_components.code, {\n children: \"422\"\n }), \" with \", _jsx(_components.code, {\n children: \"reason: order_not_found\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"WIP — coming soon:\"\n }), \" cancellation through the API covers only orders placed through the API. An order placed in the Vibrant Portal returns \", _jsx(_components.code, {\n children: \"422\"\n }), \" with \", _jsx(_components.code, {\n children: \"reason: not_placed_via_api\"\n }), \"; an order outside your clinic is treated as not found.\"]\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Cancels an order you placed. Identify it by the `,_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`placerId`}),` you placed it with, or the\n`,_jsx(_components.code,{children:`sampleId`})]}),` from the place response — exactly one of the two (the `,_jsx(_components.code,{children:`orderId`}),` is not accepted).`]}),`\n`,_jsx(Heading,{level:`2`,id:`the-policy`,children:`The policy`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Stage`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Cancellable?`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Fee`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.strong,{children:`Before the kit ships`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Yes`}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.strong,{children:`Free`})})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{style:{textAlign:`left`},children:[_jsx(_components.strong,{children:`After the kit ships`}),`,`,_jsx(`br`,{}),`before the lab receives the sample`]}),_jsx(_components.td,{style:{textAlign:`left`},children:`Yes`}),_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:_jsx(_components.strong,{children:`$25`})})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{style:{textAlign:`left`},children:[_jsx(_components.strong,{children:`After lab receipt`}),` (the lab has the sample)`]}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.strong,{children:`No`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`—`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Once the lab has the sample the result is already in production; cancellation is rejected with\n`,_jsx(_components.code,{children:`422`}),` / `,_jsx(_components.code,{children:`not_cancellable`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`what-comes-back`,children:`What comes back`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`201`}),` with the cancellation result. `,_jsx(_components.code,{children:`refundAmount`}),` is what this cancellation actually refunded —\n`,_jsx(_components.code,{children:`0`}),` when nothing had been charged yet (e.g. a patient-pays-later order that was never paid).`]}),`\n`,_jsx(Heading,{level:`2`,id:`cancelling-twice-and-other-rejections`,children:`Cancelling twice, and other rejections`}),`\n`,_jsxs(_components.p,{children:[`Cancellation is `,_jsx(_components.strong,{children:`not`}),` an idempotent echo: an already-cancelled order returns `,_jsx(_components.code,{children:`422`}),` with\n`,_jsx(_components.code,{children:`reason: \"not_cancellable\"`}),` and `,_jsx(_components.code,{children:`message: \"Order already canceled\"`}),`. When retrying after a network\ntimeout, treat that response as “already done”. An unknown `,_jsx(_components.code,{children:`placerId`}),`/`,_jsx(_components.code,{children:`sampleId`}),` returns `,_jsx(_components.code,{children:`422`}),`\nwith `,_jsx(_components.code,{children:`reason: \"order_not_found\"`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`orders-placed-in-the-portal`,children:`Orders placed in the Portal`}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`WIP — coming soon.`}),` This rejection is not returned yet, and its shape may change.`]})}),`\n`,_jsxs(_components.p,{children:[`Cancellation through the API covers only orders placed through the API. An order placed in the\nVibrant Portal, for example one you identify by its `,_jsx(_components.code,{children:`sampleId`}),`, will return `,_jsx(_components.code,{children:`422`}),` with\n`,_jsx(_components.code,{children:`reason: \"not_placed_via_api\"`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:`422`,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"rejected\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"reason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"not_placed_via_api\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"This order was not placed through the API. Only orders placed through the API can be looked up or cancelled with the API.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`An order outside your clinic is treated as not found (`,_jsx(_components.code,{children:`order_not_found`}),`), as it is today.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`There is no fee-preview API yet — the fee/refund that applies is the one returned by the\ncancellation itself. (`,_jsx(_components.a,{href:`/api-reference/orders/status`,children:`Get order status`}),` remains a proposed\nendpoint.)`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Cancel an order","sidebarTitle":"Cancel","openapi":"POST /orders/cancel","description":"Cancels an order you placed, identified by the **`placerId` it was placed with or its `sampleId`** — exactly one of the two (the `orderId` is not accepted).\n\nWhat it costs depends on how far the order has travelled:\n\n| Stage | Cancellable? | Fee |\n|---|---|---|\n| Before the kit ships | Yes | **Free** |\n| After the kit ships,\u003cbr/>before the lab receives the sample | Yes | **$25** |\n| After lab receipt | **No** | — |\n\nCancellation is **not** idempotent-echo: an already-cancelled order returns `422` with `reason: not_cancellable` (`\"Order already canceled\"`) — when retrying after a timeout, treat that as already done. An unknown identifier returns `422` with `reason: order_not_found`.\n\n**WIP — coming soon:** cancellation through the API covers only orders placed through the API. An order placed in the Vibrant Portal returns `422` with `reason: not_placed_via_api`; an order outside your clinic is treated as not found.","href":"/api-reference/orders/cancel"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"The policy","slug":"the-policy","depth":2,"children":[]},{"title":"What comes back","slug":"what-comes-back","depth":2,"children":[]},{"title":"Cancelling twice, and other rejections","slug":"cancelling-twice-and-other-rejections","depth":2,"children":[{"title":"Orders placed in the Portal","slug":"orders-placed-in-the-portal","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"cancelOrder","tags":["Orders"],"summary":"Cancel an order","description":"Cancels an order you placed, identified by the **`placerId` it was placed with or its `sampleId`** — exactly one of the two (the `orderId` is not accepted).\n\nWhat it costs depends on how far the order has travelled:\n\n| Stage | Cancellable? | Fee |\n|---|---|---|\n| Before the kit ships | Yes | **Free** |\n| After the kit ships,\u003cbr/>before the lab receives the sample | Yes | **$25** |\n| After lab receipt | **No** | — |\n\nCancellation is **not** idempotent-echo: an already-cancelled order returns `422` with `reason: not_cancellable` (`\"Order already canceled\"`) — when retrying after a timeout, treat that as already done. An unknown identifier returns `422` with `reason: order_not_found`.\n\n**WIP — coming soon:** cancellation through the API covers only orders placed through the API. An order placed in the Vibrant Portal returns `422` with `reason: not_placed_via_api`; an order outside your clinic is treated as not found.","requestBody":"cfd50249-360c-478f-9797-7b86c70c5272","responses":{"201":"d6b829bf-c3e4-4c38-a8ec-85b497c60628","400":"4d470b5e-44e1-436a-bf05-0f441ac90a1b","401":"597e662c-4764-40c6-974d-0bfaee97676c","422":"605e0a57-a157-4204-ae1e-f93cb30b614c","500":"81066a81-2285-44d1-8f72-8100f18d3a7f"},"method":"post","type":"path","servers":["d2a30c61-023c-4a42-a0d0-4d24ce2907e9","1c8588a7-1767-493a-95e5-0417fc2a699c"],"security":["76c6c3c4-fdf3-4d09-a065-3df88619a129"],"path":"/orders/cancel","baseUrlOptions":["https://api.vibrant-america.com/v1","https://api-sandbox.vibrant-america.com/v1"],"title":"Cancel an order","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Identify the order by exactly one of these.","properties":{"placerId":{"type":"string","description":"The placerId the order was placed with.","example":"VENDOR-ORDER-12345","uniqueKey":"placerId","typeLabel":"string"},"sampleId":{"type":"integer","description":"The sampleId returned when the order was placed.","example":2575603,"uniqueKey":"sampleId","typeLabel":"integer"}},"uniqueKey":"","typeLabel":"object"},"example":{"placerId":"VENDOR-ORDER-12345"},"examples":{"Example":{"title":"Example","value":{"placerId":"VENDOR-ORDER-12345"}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"d6b829bf-c3e4-4c38-a8ec-85b497c60628":{"description":"Order cancelled.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["cancelled"],"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"sampleId":{"type":"integer","example":2575603,"uniqueKey":"sampleId","typeLabel":"integer"},"refundAmount":{"type":"number","description":"Amount refunded by this cancellation — 0 when nothing had been charged yet.","example":0,"uniqueKey":"refundAmount","typeLabel":"number"},"currency":{"type":"string","example":"usd","uniqueKey":"currency","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"status":"cancelled","sampleId":2575603,"refundAmount":0,"currency":"usd"},"examples":{"Example":{"title":"Example","value":{"status":"cancelled","sampleId":2575603,"refundAmount":0,"currency":"usd"}}},"exampleType":"examples"}},"exampleType":"examples"},"4d470b5e-44e1-436a-bf05-0f441ac90a1b":{"description":"The request was invalid.","content":{"application/json":{"schema":{"type":"object","description":"🚧 Working in progress — this envelope is the contract; not yet returned by every endpoint.","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable explanation.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Identifier for this request. Include it when contacting support. Also returned on every response as the X-Request-Id header.","example":"req_01JQ8ZC5X9K2MN","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","additionalProperties":true,"uniqueKey":"error.details.items.[INDEX]","typeLabel":"object"},"description":"Optional structured context.","uniqueKey":"error.details","typeLabel":"object[]"}},"required":["code","message","requestId"],"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"invalid_request","message":"One or more testCodes were not recognized.","requestId":"req_01JQ8ZC5X9K2MN","details":[{"unknownCodes":["FOO_BAR"]}]}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"invalid_request","message":"One or more testCodes were not recognized.","requestId":"req_01JQ8ZC5X9K2MN","details":[{"unknownCodes":["FOO_BAR"]}]}}}},"exampleType":"examples"}},"exampleType":"examples"},"597e662c-4764-40c6-974d-0bfaee97676c":{"description":"Not authenticated. See Authentication.","content":{"application/json":{"schema":{"type":"object","description":"🚧 Working in progress — this envelope is the contract; not yet returned by every endpoint.","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable explanation.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Identifier for this request. Include it when contacting support. Also returned on every response as the X-Request-Id header.","example":"req_01JQ8ZC5X9K2MN","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","additionalProperties":true,"uniqueKey":"error.details.items.[INDEX]","typeLabel":"object"},"description":"Optional structured context.","uniqueKey":"error.details","typeLabel":"object[]"}},"required":["code","message","requestId"],"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"unauthorized","message":"Not authenticated.","requestId":"req_01JQ8ZC5X9K2MN"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"unauthorized","message":"Not authenticated.","requestId":"req_01JQ8ZC5X9K2MN"}}}},"exampleType":"examples"}},"exampleType":"examples"},"605e0a57-a157-4204-ae1e-f93cb30b614c":{"description":"Not cancelled — already cancelled, past lab receipt, not found, or (coming soon) not placed through the API.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["rejected"],"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"reason":{"type":"string","description":"`not_cancellable` (already cancelled, or the lab already has the sample) or `order_not_found`. **WIP — coming soon:** `not_placed_via_api` (the order was placed in the Vibrant Portal).","uniqueKey":"reason","typeLabel":"string"},"message":{"type":"string","description":"Human-readable context, when available.","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"already_cancelled":{"title":"already_cancelled","summary":"Already cancelled","value":{"status":"rejected","reason":"not_cancellable","message":"Order already canceled"}},"not_found":{"title":"not_found","summary":"Unknown placerId / sampleId","value":{"status":"rejected","reason":"order_not_found"}},"not_placed_via_api":{"title":"not_placed_via_api","summary":"Placed in the Vibrant Portal (WIP — coming soon)","value":{"status":"rejected","reason":"not_placed_via_api","message":"This order was not placed through the API. Only orders placed through the API can be looked up or cancelled with the API."}}},"exampleType":"examples"}},"exampleType":"examples"},"81066a81-2285-44d1-8f72-8100f18d3a7f":{"description":"Something went wrong on our side. Safe to retry (idempotent endpoints: reuse the same placerId).","content":{"application/json":{"schema":{"type":"object","description":"🚧 Working in progress — this envelope is the contract; not yet returned by every endpoint.","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable explanation.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Identifier for this request. Include it when contacting support. Also returned on every response as the X-Request-Id header.","example":"req_01JQ8ZC5X9K2MN","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","additionalProperties":true,"uniqueKey":"error.details.items.[INDEX]","typeLabel":"object"},"description":"Optional structured context.","uniqueKey":"error.details","typeLabel":"object[]"}},"required":["code","message","requestId"],"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"internal_error","message":"Unexpected error.","requestId":"req_01JQ8ZC5X9K2MN"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"internal_error","message":"Unexpected error.","requestId":"req_01JQ8ZC5X9K2MN"}}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"76c6c3c4-fdf3-4d09-a065-3df88619a129":{"oauth2":{"type":"oauth2","description":"OAuth2 client credentials. Generate a client ID and client secret in the Portal, exchange them for an access token, then send `Authorization: Bearer \u003caccess_token>`. Request the `result` and `report` scopes to read results.","flows":{"clientCredentials":{"tokenUrl":"https://api.vibrant-america.com/v1/oauth2/token","scopes":{"result":"Read finalized lab results","report":"Read report status and issues"}}},"scopes":[],"schemeName":"oauth2"}}},"servers":{"d2a30c61-023c-4a42-a0d0-4d24ce2907e9":{"url":"https://api.vibrant-america.com/v1","description":"Production"},"1c8588a7-1767-493a-95e5-0417fc2a699c":{"url":"https://api-sandbox.vibrant-america.com/v1","description":"Staging (sandbox)"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"oauth2","description":"OAuth2 client credentials. Generate a client ID and client secret in the Portal, exchange them for an access token, then send `Authorization: Bearer \u003caccess_token>`. Request the `result` and `report` scopes to read results.","flows":{"clientCredentials":{"tokenUrl":"https://api.vibrant-america.com/v1/oauth2/token","scopes":{"result":"Read finalized lab results","report":"Read report status and issues"}}},"scopes":[],"schemeName":"oauth2"},"schema":{"title":"OAuth2 Auth","type":"string","isRequired":true,"description":"OAuth2 client credentials. Generate a client ID and client secret in the Portal, exchange them for an access token, then send `Authorization: Bearer \u003caccess_token>`. Request the `result` and `report` scopes to read results.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"oauth2","name":"Authorization"}],"title":"oauth2"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"vibrant-8ddfe82e","siteName":"Vibrant Wellness Portal API","title":"Cancel an order - Vibrant Wellness Portal API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-24T00:49:59.944Z","originalFileLocation":"api-reference/orders/cancel.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=\"Cancels an order you placed, identified by the placerId it was placed with or its sampleId — exactly one of the two (the orderId is not accepted). What it costs depends on how far the order has travelled: | Stage | Cancellable? | Fee | |---|---|---| | Before the kit ships | Yes | Free | | After the kit ships,before the lab receives the sample | Yes | $25 | | After lab receipt | No | — | Cancellation is not idempotent-echo: an already-cancelled order returns 422 with reason: not_cancellable (\u0026quot;Order already canceled\u0026quot;) — when retrying after a timeout, treat that as already done. An unknown identifier returns 422 with reason: order_not_found. WIP — coming soon: cancellation through the API covers only orders placed through the API. An order placed in the Vibrant Portal returns 422 with reason: not_placed_via_api; an order outside your clinic is treated as not found.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Vibrant Wellness Portal API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/vibrant-8ddfe82e/UJF0sQwLZAnu87TD/_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/vibrant-8ddfe82e/UJF0sQwLZAnu87TD/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/vibrant-8ddfe82e/UJF0sQwLZAnu87TD/_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/vibrant-8ddfe82e/UJF0sQwLZAnu87TD/_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/vibrant-8ddfe82e/UJF0sQwLZAnu87TD/_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/vibrant-8ddfe82e/UJF0sQwLZAnu87TD/_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/vibrant-8ddfe82e/UJF0sQwLZAnu87TD/_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/vibrant-8ddfe82e/UJF0sQwLZAnu87TD/_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/vibrant-8ddfe82e/UJF0sQwLZAnu87TD/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Cancel an order - Vibrant Wellness Portal API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Cancels an order you placed, identified by the placerId it was placed with or its sampleId — exactly one of the two (the orderId is not accepted). What it costs depends on how far the order has travelled: | Stage | Cancellable? | Fee | |---|---|---| | Before the kit ships | Yes | Free | | After the kit ships,before the lab receives the sample | Yes | $25 | | After lab receipt | No | — | Cancellation is not idempotent-echo: an already-cancelled order returns 422 with reason: not_cancellable (\u0026quot;Order already canceled\u0026quot;) — when retrying after a timeout, treat that as already done. An unknown identifier returns 422 with reason: order_not_found. WIP — coming soon: cancellation through the API covers only orders placed through the API. An order placed in the Vibrant Portal returns 422 with reason: not_placed_via_api; an order outside your clinic is treated as not found.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Vibrant Wellness Portal API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://vibrant-8ddfe82e.mintlify.app/api-reference/orders/cancel\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://vibrant-8ddfe82e.mintlify.site/_mintlify/api/og/v2?division=Order\u0026amp;title=Cancel+an+order\u0026amp;description=Cancels+an+order+you+placed%2C+identified+by+the+**%60placerId%60+it+was+placed+with+or+its+%60sampleId%60**+%E2%80%94+exactly+one+of+the+two+%28the+%60orderId%60+is+not+accepted%29.%0A%0AWh\u0026amp;theme=0d61504044ce1c182aeab1ce\u0026amp;signature=e537cdfa375784ae956dd9df8eddc99902475262e2d0366e1186c595bd4bd651\">\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=\"Cancel an order - Vibrant Wellness Portal API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Cancels an order you placed, identified by the placerId it was placed with or its sampleId — exactly one of the two (the orderId is not accepted). What it costs depends on how far the order has travelled: | Stage | Cancellable? | Fee | |---|---|---| | Before the kit ships | Yes | Free | | After the kit ships,before the lab receives the sample | Yes | $25 | | After lab receipt | No | — | Cancellation is not idempotent-echo: an already-cancelled order returns 422 with reason: not_cancellable (\u0026quot;Order already canceled\u0026quot;) — when retrying after a timeout, treat that as already done. An unknown identifier returns 422 with reason: order_not_found. WIP — coming soon: cancellation through the API covers only orders placed through the API. An order placed in the Vibrant Portal returns 422 with reason: not_placed_via_api; an order outside your clinic is treated as not found.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://vibrant-8ddfe82e.mintlify.site/_mintlify/api/og/v2?division=Order\u0026amp;title=Cancel+an+order\u0026amp;description=Cancels+an+order+you+placed%2C+identified+by+the+**%60placerId%60+it+was+placed+with+or+its+%60sampleId%60**+%E2%80%94+exactly+one+of+the+two+%28the+%60orderId%60+is+not+accepted%29.%0A%0AWh\u0026amp;theme=0d61504044ce1c182aeab1ce\u0026amp;signature=e537cdfa375784ae956dd9df8eddc99902475262e2d0366e1186c595bd4bd651\">\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/vibrant-8ddfe82e/UJF0sQwLZAnu87TD/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Vibrant Wellness Portal API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0142E2\">\u003clink data-mint-head rel=\"canonical\" href=\"https://vibrant-8ddfe82e.mintlify.app/api-reference/orders/cancel\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/orders/cancel.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://vibrant-8ddfe82e.mintlify.app/#organization\",\"name\":\"Vibrant Wellness Portal API\",\"url\":\"https://vibrant-8ddfe82e.mintlify.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/vibrant-8ddfe82e/S0AZ5CIJgM1r_bu8/logo/light.svg?fit=max\u0026auto=format\u0026n=S0AZ5CIJgM1r_bu8\u0026q=85\u0026s=7f84f445f8577c8f385caef31ea25d07\"}},{\"@type\":\"WebSite\",\"@id\":\"https://vibrant-8ddfe82e.mintlify.app#website\",\"name\":\"Vibrant Wellness Portal API\",\"url\":\"https://vibrant-8ddfe82e.mintlify.app\",\"publisher\":{\"@id\":\"https://vibrant-8ddfe82e.mintlify.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://vibrant-8ddfe82e.mintlify.app/api-reference/orders/cancel#webpage\",\"url\":\"https://vibrant-8ddfe82e.mintlify.app/api-reference/orders/cancel\",\"name\":\"Cancel an order\",\"description\":\"Cancels an order you placed, identified by the placerId it was placed with or its sampleId — exactly one of the two (the orderId is not accepted). What it costs depends on how far the order has travelled: | Stage | Cancellable? | Fee | |---|---|---| | Before the kit ships | Yes | Free | | After the kit ships,before the lab receives the sample | Yes | $25 | | After lab receipt | No | — | Cancellation is not idempotent-echo: an already-cancelled order returns 422 with reason: not_cancellable (\\\"Order already canceled\\\") — when retrying after a timeout, treat that as already done. An unknown identifier returns 422 with reason: order_not_found. WIP — coming soon: cancellation through the API covers only orders placed through the API. An order placed in the Vibrant Portal returns 422 with reason: not_placed_via_api; an order outside your clinic is treated as not found.\",\"dateModified\":\"2026-11-24T00:49:59.944Z\",\"isPartOf\":{\"@id\":\"https://vibrant-8ddfe82e.mintlify.app#website\"},\"breadcrumb\":{\"@id\":\"https://vibrant-8ddfe82e.mintlify.app/api-reference/orders/cancel#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://vibrant-8ddfe82e.mintlify.app/api-reference/orders/cancel#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://vibrant-8ddfe82e.mintlify.app/api-reference/catalog/list-products\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Order\",\"item\":\"https://vibrant-8ddfe82e.mintlify.app/api-reference/orders/place\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Cancel an order\",\"item\":\"https://vibrant-8ddfe82e.mintlify.app/api-reference/orders/cancel\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://vibrant-8ddfe82e.mintlify.app/api-reference/orders/cancel#apireference\",\"headline\":\"Cancel an order\",\"name\":\"Cancel an order\",\"description\":\"Cancels an order you placed, identified by the placerId it was placed with or its sampleId — exactly one of the two (the orderId is not accepted). What it costs depends on how far the order has travelled: | Stage | Cancellable? | Fee | |---|---|---| | Before the kit ships | Yes | Free | | After the kit ships,before the lab receives the sample | Yes | $25 | | After lab receipt | No | — | Cancellation is not idempotent-echo: an already-cancelled order returns 422 with reason: not_cancellable (\\\"Order already canceled\\\") — when retrying after a timeout, treat that as already done. An unknown identifier returns 422 with reason: order_not_found. WIP — coming soon: cancellation through the API covers only orders placed through the API. An order placed in the Vibrant Portal returns 422 with reason: not_placed_via_api; an order outside your clinic is treated as not found.\",\"url\":\"https://vibrant-8ddfe82e.mintlify.app/api-reference/orders/cancel\",\"mainEntityOfPage\":{\"@id\":\"https://vibrant-8ddfe82e.mintlify.app/api-reference/orders/cancel#webpage\"},\"dateModified\":\"2026-11-24T00:49:59.944Z\",\"publisher\":{\"@id\":\"https://vibrant-8ddfe82e.mintlify.app/#organization\"},\"isPartOf\":{\"@id\":\"https://vibrant-8ddfe82e.mintlify.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Vibrant Wellness Portal API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Vibrant Wellness Portal API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/orders/cancel.md","siteName":"Vibrant Wellness Portal API","nav":{"global":{"anchors":[{"anchor":"Status","icon":"signal-bars","href":"https://status.vibrant-wellness.com"},{"anchor":"Changelog","icon":"list-timeline","href":"https://developers.vibrant-wellness.com/changelog"},{"anchor":"Support","icon":"headset","href":"mailto:[email protected]"}]},"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"API reference","groups":[{"group":"Overview","pages":[{"title":"API reference","href":"/api-reference/introduction"}]},{"group":"Endpoints","pages":[{"title":"Catalog","openapi":"GET /catalog/products","href":"/api-reference/catalog/list-products"},{"title":"Quote","openapi":"POST /quote","href":"/api-reference/pricing/quote"},{"group":"Patient","pages":[{"title":"List patients","sidebarTitle":"List","openapi":"GET /patients","href":"/api-reference/patients/list"},{"title":"Create a patient","sidebarTitle":"Create","openapi":"POST /patients","href":"/api-reference/patients/create"},{"title":"Update a patient","sidebarTitle":"Update","openapi":"PUT /patients","href":"/api-reference/patients/update"}]},{"title":"Provider","openapi":"POST /providers","href":"/api-reference/providers/create"},{"group":"Order","pages":[{"title":"Order","openapi":"POST /orders","href":"/api-reference/orders/place"},{"title":"Get orders","sidebarTitle":"Status \u0026 history","openapi":"GET /orders","description":"List mode is available in sandbox for integration testing.\n\nOne endpoint, two questions.\n\n**Lookup** — send `orderId` **or** `placerId` (one, not both): the full **OrderStatus** — lifecycle, kit shipping, lab receipt, report readiness, open exceptions, and cancellation information when available. **WIP:** cancellation eligibility and fee preview are not available yet; `cancellation` is currently null except for orders already known to be cancelled. The [Cancel endpoint](/api-reference/orders/cancel) is available.\n\n**List** — send any combination of `patientId` and `from`/`to`, or no filters at all: pages of order summaries for your clinic, **including orders placed through the Vibrant Portal**. Portal-placed rows have `null` `orderId`/`placerId` — anchor on `accessionId`, which is the id the Report endpoint takes.\n\nMixing lookup and list parameters is a `400`.\n\n**Cancellation:** when the order's top-level `status` is `cancelled`, the whole order is terminal. Stop waiting for or polling results regardless of nested `report.status` or progress counts. The Report endpoint also uses a top-level `cancelled` status; you do not need to query both endpoints to confirm cancellation.\n\n[Webhooks](/concepts/webhooks) notify you of order, kit, and report changes for every order of your clinic, including Portal-created orders. Webhook events use their own status values, not the values returned here, and identify the order only by a string accessionId. **WIP — coming soon:** looking up an order by accessionId, for orders placed through this API. An order placed in the Vibrant Portal returns `403` with `not_placed_via_api`; an order of another clinic returns `404`.","href":"/api-reference/orders/status"},{"title":"Cancel an order","sidebarTitle":"Cancel","openapi":"POST /orders/cancel","href":"/api-reference/orders/cancel"}]},{"title":"Report","openapi":"GET /report/fhir/{id}","description":"Returns the lab result as a FHIR R4 `DiagnosticReport`, enriched with the portal report status and all issues.\n\n**Identifier — barcode or sampleId, auto-detected.** `{id}` accepts the accession/barcode returned by `POST /orders` or a numeric `sampleId`; the API resolves it as a barcode first and falls back to sampleId only for an all-digits value that is definitively not a barcode. Query aliases also work: `GET /report/fhir?barcode={barcode}` or `?sampleId={sampleId}` (if both are sent, `sampleId` wins; neither → `400`).\n\n**Four outcomes — always `200` unless access is denied:**\n- **Report ready and unblocked** (including `preliminary`) → full result content: observations, PDF `presentedForm` link, plus status + issues.\n- **Nothing finished yet** → a status shell: report status + per-report counts + issues, including a synthetic **`No Finished Test`** report-blocking issue. No result content.\n- **Report-blocking issue** (e.g. a billing issue) → status, counts and issue extensions returned; Observations, `result` references and PDF `presentedForm` links are withheld until the issue resolves. Status can remain `preliminary` or `final`; `conclusion` says why. Read the blocking flags rather than inferring content access from status alone.\n- **Cancelled order** → `status: cancelled`, cancellation details and `conclusion`, with no result content or PDF. This top-level status is terminal; stop waiting for or polling results regardless of per-report progress details. You do not need to query Get orders to confirm cancellation.\n\nThere is no bare \"not-ready\" `404` to poll — read `status` (and the `urn:vibrant:*` extensions) instead. Sample-level status, per-report progress counts (e.g. 2/3), and both issue lists ride in FHIR extensions; see the schema.","href":"/api-reference/reports/get"}]}]}]},"basePath":"","title":"Cancel an order - Vibrant Wellness Portal API","deploymentId":"dpl_G6E2ur2Zjq51xGTVZPSFXsWoTxCu","buildId":"dpl_G6E2ur2Zjq51xGTVZPSFXsWoTxCu","dynamics":["10e4515597","c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["BannerMarkdown-CoLHY196.js","dist-C-58LlaB.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js","OpenApiReferenceProvider-x4vGgoST.js","snippetPresets-BGlsYH49.js","utils-D225GpYB.js","style-to-object-BY3JEAdk.js","utils-fb7dxv-3.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-D0sNzoEe.js","conditional-requirements-CFM0id0Q.js","cloneDeep-C4iMfrOs.js","_Uint8Array-DDor1j2p.js","isObject-FP1Yky1u.js","ApiExamples-Bw_TWYoP.js","usePlaygroundInputsStore-DLRpNM_Z.js","shallow-DCZ_mvT2.js","isEqual-BZMHHGz2.js","CodeSnippets-CqYNT6UN.js","CodeSnippet-AsYrl7_f.js","getApiPlaygroundDisplay-B1HdZsAn.js","Page-COAeG2by.js","DynamicMarkdown-Bg54PExR.js","SectionHeading-BVOfbSTS.js","icon-Bwg0LftJ.js","MethodPill-ETXe5J4U.js","getPastedJson-6m1DH7UM.js","Check2Icon-Bz4v4IkN.js","axios-CsQoIw0U.js","Markdown-CYkmN8yk.js","AssistantPageLink-BZUrxqjy.js"]}