Keep your Developer API key in a trusted server environment. This synthetic
example submits one physical-product warranty claim and parses the response
without assuming that network data is valid.
const apiBaseUrl = process.env.THE_WO_API_BASE_URL ?? "https://api.thewo.io";const apiKey = process.env.THE_WO_API_KEY;if (!apiKey) { throw new Error("THE_WO_API_KEY is required");}const response = await fetch(`${apiBaseUrl}/v1/product-claims/triage`, { method: "POST", headers: { "content-type": "application/json", "x-api-key": apiKey, "Idempotency-Key": "blender-warranty-001", }, body: JSON.stringify({ claimDomain: "physical_product", claimType: "warranty", product: { name: "Example blender", model: "B-100" }, issue: { description: "The motor stops during normal use." }, purchase: { purchasedAt: "2026-02-10", seller: "Example Shop" }, language: "en", }),});const body: unknown = await response.json();if (!response.ok) { const errorCode = typeof body === "object" && body !== null && "error" in body ? body.error : undefined; throw new Error(`ClaimReady request failed (${response.status}): ${String(errorCode)}`);}console.log(body);
Send the request only from your server. Do not expose the key in browser or
mobile code. Reuse the same idempotency key only when retrying the same
material request. The operation is currently Coming Soon; docs do not grant
entitlement. See the Quickstart,
triage contract, and
Errors.
⌘I
{"docsConfig":{"theme":"maple","$schema":"https://mintlify.com/docs.json","name":"The Wo Developer Platform","description":"Developer documentation for The Wo and its focused API products.","colors":{"primary":"#2F6BFF","light":"#9DB8FF","dark":"#2F6BFF"},"logo":{"light":"https://mintcdn.com/thewo/EcbNGrrf0A30-df5/assets/brand/thewo-wordmark-dark.svg?fit=max\u0026auto=format\u0026n=EcbNGrrf0A30-df5\u0026q=85\u0026s=b46da9124ece4b1b94d69f7ebd1752c0","dark":"https://mintcdn.com/thewo/EcbNGrrf0A30-df5/assets/brand/thewo-wordmark-light.svg?fit=max\u0026auto=format\u0026n=EcbNGrrf0A30-df5\u0026q=85\u0026s=7b425a99dfebebd431fd7021c990106b"},"favicon":{"light":"https://mintcdn.com/thewo/EcbNGrrf0A30-df5/assets/brand/thewo-utility-mark-dark.svg?fit=max\u0026auto=format\u0026n=EcbNGrrf0A30-df5\u0026q=85\u0026s=0a754b3a1196731e918dcf936de922c4","dark":"https://mintcdn.com/thewo/EcbNGrrf0A30-df5/assets/brand/thewo-utility-mark-light.svg?fit=max\u0026auto=format\u0026n=EcbNGrrf0A30-df5\u0026q=85\u0026s=f2264f85e30e5e368b9cfd83a0d37a0e"},"api":{"playground":{"display":"simple"},"examples":{"defaults":"required","languages":["curl","javascript"]}},"appearance":{"default":"light","strict":false},"seo":{"metatags":{"canonical":"https://docs.thewo.io"}},"fonts":{"heading":{"family":"Geist"},"body":{"family":"Geist"}},"icons":{"library":"lucide"},"styling":{"eyebrows":"breadcrumbs","codeblocks":{"theme":"github-dark-default"},"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"thewo","hasAudioNarration":false,"actualSubdomain":"thewo","customDomains":["docs.thewo.io"],"gitSource":{"type":"github","owner":"adonis-sanchez-quintana","repo":"the-wo-api","deployBranch":"development","contentDirectory":"developer-docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae8ed09194804357a270d43","clientVersion":"0.0.4076","searchFilterCounts":[{"language":"default","tag":"Guides","count":21},{"language":"default","tag":"ClaimReady","count":12},{"language":"default","tag":"Product guides","count":12},{"language":"default","tag":"Operational Evidence","count":12},{"language":"default","tag":"Trade Document","count":10},{"language":"default","tag":"API Reference","count":8},{"language":"default","tag":"Overview","count":6},{"language":"default","tag":"The Wo","count":4},{"language":"default","tag":"Examples","count":3},{"language":"default","tag":"Getting started","count":3}]},"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":"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":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"claim-ready/examples/typescript","slug":"/claim-ready/examples/typescript","pageMetadata":{"title":"TypeScript example","description":"Call ClaimReady safely from a trusted server using TypeScript.","href":"/claim-ready/examples/typescript"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Call ClaimReady safely from a trusted server using TypeScript.\"\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`,..._provideComponents(),...props.components},{CodeBlock,Heading}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`1`,id:`typescript-example`,children:`TypeScript example`}),`\n`,_jsx(_components.p,{children:`Keep your Developer API key in a trusted server environment. This synthetic\nexample submits one physical-product warranty claim and parses the response\nwithout assuming that network data is valid.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`34`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-dark-default github-dark-default`,style:{backgroundColor:`#0d1117`,\"--shiki-dark-bg\":`#0d1117`,color:`#e6edf3`,\"--shiki-dark\":`#e6edf3`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`34`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:`const`}),_jsx(_components.span,{style:{color:`#79C0FF`,\"--shiki-dark\":`#79C0FF`},children:` apiBaseUrl`}),_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:` =`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:` process.env.`}),_jsx(_components.span,{style:{color:`#79C0FF`,\"--shiki-dark\":`#79C0FF`},children:`THE_WO_API_BASE_URL`}),_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:` ??`}),_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:` \"https://api.thewo.io\"`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:`const`}),_jsx(_components.span,{style:{color:`#79C0FF`,\"--shiki-dark\":`#79C0FF`},children:` apiKey`}),_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:` =`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:` process.env.`}),_jsx(_components.span,{style:{color:`#79C0FF`,\"--shiki-dark\":`#79C0FF`},children:`THE_WO_API_KEY`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:`if`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:` (`}),_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:`!`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`apiKey) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:` throw`}),_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:` new`}),_jsx(_components.span,{style:{color:`#D2A8FF`,\"--shiki-dark\":`#D2A8FF`},children:` Error`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`(`}),_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:`\"THE_WO_API_KEY is required\"`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:`const`}),_jsx(_components.span,{style:{color:`#79C0FF`,\"--shiki-dark\":`#79C0FF`},children:` response`}),_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:` =`}),_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:` await`}),_jsx(_components.span,{style:{color:`#D2A8FF`,\"--shiki-dark\":`#D2A8FF`},children:` fetch`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`(`}),_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:\"`${\"}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`apiBaseUrl`}),_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:\"}/v1/product-claims/triage`\"}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:` method: `}),_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:`\"POST\"`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:` headers: {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:` \"content-type\"`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:`\"application/json\"`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:` \"x-api-key\"`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`: apiKey,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:` \"Idempotency-Key\"`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:`\"blender-warranty-001\"`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:` body: `}),_jsx(_components.span,{style:{color:`#79C0FF`,\"--shiki-dark\":`#79C0FF`},children:`JSON`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`.`}),_jsx(_components.span,{style:{color:`#D2A8FF`,\"--shiki-dark\":`#D2A8FF`},children:`stringify`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:` claimDomain: `}),_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:`\"physical_product\"`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:` claimType: `}),_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:`\"warranty\"`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:` product: { name: `}),_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:`\"Example blender\"`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`, model: `}),_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:`\"B-100\"`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:` issue: { description: `}),_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:`\"The motor stops during normal use.\"`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:` purchase: { purchasedAt: `}),_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:`\"2026-02-10\"`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`, seller: `}),_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:`\"Example Shop\"`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:` language: `}),_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:`\"en\"`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:` }),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:`const`}),_jsx(_components.span,{style:{color:`#79C0FF`,\"--shiki-dark\":`#79C0FF`},children:` body`}),_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:`:`}),_jsx(_components.span,{style:{color:`#79C0FF`,\"--shiki-dark\":`#79C0FF`},children:` unknown`}),_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:` =`}),_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:` await`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:` response.`}),_jsx(_components.span,{style:{color:`#D2A8FF`,\"--shiki-dark\":`#D2A8FF`},children:`json`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:`if`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:` (`}),_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:`!`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`response.ok) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:` const`}),_jsx(_components.span,{style:{color:`#79C0FF`,\"--shiki-dark\":`#79C0FF`},children:` errorCode`}),_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:` =`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:` typeof`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:` body `}),_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:`===`}),_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:` \"object\"`}),_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:` body `}),_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:`!==`}),_jsx(_components.span,{style:{color:`#79C0FF`,\"--shiki-dark\":`#79C0FF`},children:` null`}),_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:` in`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:` body `}),_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:`?`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:` body.error `}),_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:`:`}),_jsx(_components.span,{style:{color:`#79C0FF`,\"--shiki-dark\":`#79C0FF`},children:` undefined`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:` throw`}),_jsx(_components.span,{style:{color:`#FF7B72`,\"--shiki-dark\":`#FF7B72`},children:` new`}),_jsx(_components.span,{style:{color:`#D2A8FF`,\"--shiki-dark\":`#D2A8FF`},children:` Error`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`(`}),_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:\"`ClaimReady request failed (${\"}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`response`}),_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:`.`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`status`}),_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:\"}): ${\"}),_jsx(_components.span,{style:{color:`#D2A8FF`,\"--shiki-dark\":`#D2A8FF`},children:`String`}),_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:`(`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`errorCode`}),_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:`)`}),_jsx(_components.span,{style:{color:`#A5D6FF`,\"--shiki-dark\":`#A5D6FF`},children:\"}`\"}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`console.`}),_jsx(_components.span,{style:{color:`#D2A8FF`,\"--shiki-dark\":`#D2A8FF`},children:`log`}),_jsx(_components.span,{style:{color:`#E6EDF3`,\"--shiki-dark\":`#E6EDF3`},children:`(body);`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Send the request only from your server. Do not expose the key in browser or\nmobile code. Reuse the same idempotency key only when retrying the same\nmaterial request. The operation is currently `,_jsx(_components.strong,{children:`Coming Soon`}),`; docs do not grant\nentitlement. See the `,_jsx(_components.a,{href:`/claim-ready/quickstart`,children:`Quickstart`}),`,\n`,_jsx(_components.a,{href:`/claim-ready/guides/triage-contract`,children:`triage contract`}),`, and\n`,_jsx(_components.a,{href:`/claim-ready/guides/errors`,children:`Errors`}),`.`]})]})}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":{"codeStyling":{"theme":"github-dark-default"},"config":{},"pageMetadata":{"title":"TypeScript example","description":"Call ClaimReady safely from a trusted server using TypeScript.","href":"/claim-ready/examples/typescript"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"TypeScript example","slug":"typescript-example","depth":1,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"thewo","siteName":"The Wo Developer Platform","title":"TypeScript example - The Wo Developer Platform","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-31T17:58:13.646Z","originalFileLocation":"claim-ready/examples/typescript.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=\"light\"}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=\"Call ClaimReady safely from a trusted server using TypeScript.\">\u003cmeta data-mint-head name=\"application-name\" content=\"The Wo Developer Platform\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/thewo/gvoNq447GCm3VSNe/_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/thewo/gvoNq447GCm3VSNe/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/thewo/gvoNq447GCm3VSNe/_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/thewo/gvoNq447GCm3VSNe/_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/thewo/gvoNq447GCm3VSNe/_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/thewo/gvoNq447GCm3VSNe/_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/thewo/gvoNq447GCm3VSNe/_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/thewo/gvoNq447GCm3VSNe/_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/thewo/gvoNq447GCm3VSNe/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"TypeScript example - The Wo Developer Platform\">\u003cmeta data-mint-head property=\"og:description\" content=\"Call ClaimReady safely from a trusted server using TypeScript.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"The Wo Developer Platform\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.thewo.io/claim-ready/examples/typescript\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://thewo.mintlify.site/_mintlify/api/og/v2?division=Examples\u0026amp;title=TypeScript+example\u0026amp;description=Call+ClaimReady+safely+from+a+trusted+server+using+TypeScript.\u0026amp;theme=8e7a2604e583609a07a33091\u0026amp;signature=1e8149916fe3bb34d22cdd941da6d4021dd6840fd3031a2ab45475ce51903bd6\">\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=\"TypeScript example - The Wo Developer Platform\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Call ClaimReady safely from a trusted server using TypeScript.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://thewo.mintlify.site/_mintlify/api/og/v2?division=Examples\u0026amp;title=TypeScript+example\u0026amp;description=Call+ClaimReady+safely+from+a+trusted+server+using+TypeScript.\u0026amp;theme=8e7a2604e583609a07a33091\u0026amp;signature=1e8149916fe3bb34d22cdd941da6d4021dd6840fd3031a2ab45475ce51903bd6\">\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/thewo/gvoNq447GCm3VSNe/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"The Wo Developer Platform\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2F6BFF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.thewo.io/claim-ready/examples/typescript\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/claim-ready/examples/typescript.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.thewo.io/#organization\",\"name\":\"The Wo Developer Platform\",\"url\":\"https://docs.thewo.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/thewo/EcbNGrrf0A30-df5/assets/brand/thewo-wordmark-dark.svg?fit=max\u0026auto=format\u0026n=EcbNGrrf0A30-df5\u0026q=85\u0026s=b46da9124ece4b1b94d69f7ebd1752c0\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.thewo.io#website\",\"name\":\"The Wo Developer Platform\",\"url\":\"https://docs.thewo.io\",\"publisher\":{\"@id\":\"https://docs.thewo.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.thewo.io/claim-ready/examples/typescript#webpage\",\"url\":\"https://docs.thewo.io/claim-ready/examples/typescript\",\"name\":\"TypeScript example\",\"description\":\"Call ClaimReady safely from a trusted server using TypeScript.\",\"dateModified\":\"2026-10-31T17:58:13.646Z\",\"isPartOf\":{\"@id\":\"https://docs.thewo.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.thewo.io/claim-ready/examples/typescript#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.thewo.io/claim-ready/examples/typescript#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"The Wo Developer Platform\",\"item\":\"https://docs.thewo.io\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"TypeScript example\",\"item\":\"https://docs.thewo.io/claim-ready/examples/typescript\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.thewo.io/claim-ready/examples/typescript#article\",\"headline\":\"TypeScript example\",\"name\":\"TypeScript example\",\"description\":\"Call ClaimReady safely from a trusted server using TypeScript.\",\"url\":\"https://docs.thewo.io/claim-ready/examples/typescript\",\"mainEntityOfPage\":{\"@id\":\"https://docs.thewo.io/claim-ready/examples/typescript#webpage\"},\"dateModified\":\"2026-10-31T17:58:13.646Z\",\"publisher\":{\"@id\":\"https://docs.thewo.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.thewo.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"The Wo Developer Platform\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"The Wo Developer Platform","nav":{"global":null,"products":[{"product":"The Wo","icon":"https://mintlify.s3.us-west-1.amazonaws.com/thewo/assets/brand/thewo-utility-mark-dark.svg","description":"Developer platform overview and shared capabilities.","pages":[{"title":"The Wo","href":""}]},{"product":"Operational Evidence","description":"From messy evidence to structured operational reports.","pages":[{"title":"Operational Evidence","href":"/operational-evidence"}]},{"product":"Trade Document","description":"Turn invoices and receipts into structured business data.","pages":[{"title":"Trade Document","href":"/trade-document"}]},{"product":"ClaimReady","description":"Structure physical-product warranty and return claim triage.","tabs":[{"tab":"Guides","groups":[{"group":"Overview","pages":[{"title":"ClaimReady","href":"/claim-ready"}]},{"group":"Getting started","pages":[{"title":"Quickstart","href":"/claim-ready/quickstart"}]},{"group":"Product guides","pages":[{"title":"Triage contract","href":"/claim-ready/guides/triage-contract"},{"title":"Usage and quotas","href":"/claim-ready/guides/usage-and-quotas"},{"title":"Errors","href":"/claim-ready/guides/errors"},{"title":"Product access","description":"Understand ClaimReady availability, API keys, and entitlement checks.","href":"/claim-ready/guides/product-access"}]},{"group":"Examples","pages":[{"title":"TypeScript example","href":"/claim-ready/examples/typescript"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/claim-ready/api-reference/overview"}]}]}]},"basePath":"","title":"TypeScript example - The Wo Developer Platform","buildId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","deploymentId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","dynamics":[],"chunks":[]}