Update the default COGS / handling fee applied to product variants
that have no per-variant COG line. At least one of defaultCogs,
globalHandlingFee, or currency must be supplied.
Triggers a per-order COGS recalculation downstream (same SQS message
the web UI emits for this change).
At least one field is required. The product defaults apply to any variant with no
cost of its own (no manual COG line and no Shopify cost for the order's date).
One stored cost configuration. Which shape you get follows costType.
Global product override
Order costs
Gateway fees
Shipping costs
Variable costs
Fixed costs
Show child attributes
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Upstack Data","colors":{"primary":"#4230b4","light":"#6366F1","dark":"#322484"},"logo":{"light":"https://mintcdn.com/upstackdata-afbed50d/40dgTTn1PLjePhJa/logo/light.svg?fit=max\u0026auto=format\u0026n=40dgTTn1PLjePhJa\u0026q=85\u0026s=598c05fb87860ddc1b6b7640b41e136c","dark":"https://mintcdn.com/upstackdata-afbed50d/40dgTTn1PLjePhJa/logo/dark.svg?fit=max\u0026auto=format\u0026n=40dgTTn1PLjePhJa\u0026q=85\u0026s=4ffdf28479b596176b69034675d783b0","href":"https://docs.upstackdata.com/get-started/overview"},"favicon":"https://mintcdn.com/upstackdata-afbed50d/a7q81tQDxtvowAUn/favicon.svg?fit=max\u0026auto=format\u0026n=a7q81tQDxtvowAUn\u0026q=85\u0026s=4e6cad1d3845d8fe1e1f8fb54b430a3f","appearance":{"default":"light","strict":true},"navbar":{"links":[{"href":"https://docs.upstackdata.com/troubleshooting/support","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.upstackdata.com"}},"footer":{"socials":{"x":"https://x.com/upstackdata","linkedin":"https://linkedin.com/company/upstackdata"},"links":[{"header":"Product","items":[{"label":"Website","href":"https://www.upstackdata.com"},{"label":"Pricing","href":"https://www.upstackdata.com/pricing"},{"label":"Dashboard","href":"https://app.upstackdata.com"}]},{"header":"Resources","items":[{"label":"Documentation","href":"https://docs.upstackdata.com/get-started/overview"},{"label":"All troubleshooting guides","href":"https://docs.upstackdata.com/troubleshooting/overview"},{"label":"Blog","href":"https://www.upstackdata.com/blog"}]},{"header":"Support","items":[{"label":"Contact Support","href":"https://docs.upstackdata.com/troubleshooting/support"},{"label":"Install on Shopify","href":"https://docs.upstackdata.com/quickstart/install-on-shopify"},{"label":"Troubleshooting","href":"https://docs.upstackdata.com/troubleshooting/overview"}]},{"header":"Legal","items":[{"label":"Terms of Service","href":"https://www.upstackdata.com/terms"}]}]},"seo":{},"fonts":{"family":"Inter"},"integrations":{"intercom":{"appId":"y2qnvi2j"}},"contextual":{"options":["copy","view","claude"],"display":"header"},"metadata":{"timestamp":false},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"upstackdata-afbed50d","hasAudioNarration":false,"actualSubdomain":"upstackdata-afbed50d","customDomains":["docs.upstackdata.com"],"gitSource":{"type":"github","owner":"upstack-data","repo":"upstack-doc-site","deployBranch":"release/dev2","isPrivate":true,"contentDirectory":"","mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aeb5dfbb75ff94b1a021702","clientVersion":"0.0.4088","searchFilterCounts":[{"language":"default","tag":"Metrics","count":803},{"language":"default","tag":"METRICS","count":803},{"language":"default","tag":"Orders","count":271},{"language":"default","tag":"Advertising","count":268},{"language":"default","tag":"Funnel","count":246},{"language":"default","tag":"Documentation","count":174},{"language":"default","tag":"Conversions","count":149},{"language":"default","tag":"Blended","count":110},{"language":"default","tag":"OVERVIEW","count":107},{"language":"default","tag":"Event Tracking","count":104}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@upstackdata.com","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"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":false},"customCss":[{"filePath":"style.css","content":"/* cyrillic-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx3cwhsk.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: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxTcwhsk.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: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxPcwhsk.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: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx_cwhsk.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: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx7cwhsk.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: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxDcwg.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: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx3cwhsk.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: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxTcwhsk.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: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxPcwhsk.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: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx_cwhsk.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: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx7cwhsk.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: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxDcwg.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{--font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;--font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;--font-size-label: 0.6875rem;--font-size-tiny: 0.75rem;--font-size-small: 0.8125rem;--font-size-secondary: 0.875rem;--font-size-body: 0.9375rem;--font-size-h3: 1.0625rem;--font-size-h2: 1.25rem;--font-size-h1: 1.625rem;--font-size-code: 0.8125rem;--page-bg: #ffffff;--chrome-bg: #f6f7f8;--border: #e5e7eb;--accent: #4230b4;--accent-hover: #322484;--text-heading: #18181b;--text-body: #52525b;--text-muted: #71717a;--focus-ring: rgba(24, 24, 27, 0.12);--border-strong: #d4d4d8;--input-bg: #ffffff;--hover-bg: rgba(24, 24, 27, 0.04);--active-bg: rgba(24, 24, 27, 0.06)}html{background:var(--page-bg);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{background:var(--page-bg);color:var(--text-body);font-family:var(--font-sans)!important;font-size:var(--font-size-body)!important;line-height:1.6!important;font-weight:400!important}#navbar,#header{background:var(--chrome-bg)!important;border-bottom:1px solid var(--border)!important;backdrop-filter:none!important}.nav-tabs-item{font-size:var(--font-size-small)!important;font-weight:400!important;color:var(--text-muted)!important}.nav-tabs-item[data-active],.nav-tabs-item:hover{color:var(--text-heading)!important}#sidebar,#sidebar-content{background:var(--chrome-bg)!important;border-right:1px solid var(--border)!important}#sidebar{top:calc(7.1rem + var(--banner-height, 0px))!important;height:auto!important}#sidebar-content{overscroll-behavior:contain}.sidebar-group-header,.sidebar-title{font-size:var(--font-size-label)!important;font-weight:600!important;letter-spacing:0.05em;text-transform:uppercase;color:var(--text-muted)!important;margin-top:24px!important;margin-bottom:8px!important;padding-top:0!important;padding-bottom:0!important}#sidebar-content>div:first-child .sidebar-group-header,#sidebar-content>div:first-child .sidebar-title{margin-top:12px!important}#sidebar-content ul{padding-left:12px!important}#sidebar-content ul ul{padding-left:14px!important;border-left:1px solid var(--border)!important;margin-left:4px!important}.sidebar-group a,#sidebar a{font-size:var(--font-size-small)!important;font-weight:400!important;color:var(--text-body)!important;padding-top:5px!important;padding-bottom:5px!important;line-height:1.4!important;transition:color 80ms ease}.sidebar-group a:hover,#sidebar a:hover{color:var(--text-heading)!important}#navigation-items a,#navigation-items button,#sidebar-content .sidebar-group>button,#sidebar-content .sidebar-group button{border-radius:4px!important;transition:color 80ms ease, background-color 80ms ease!important}#navigation-items a:hover,#navigation-items button:hover{background:var(--hover-bg)!important}#navigation-items a[class*=\"bg-primary\"]{background:var(--active-bg)!important;color:var(--accent)!important;font-weight:500!important}.sidebar-group>button,.sidebar-group button{font-size:var(--font-size-small)!important;font-weight:400!important;color:var(--text-body)!important;padding-top:5px!important;padding-bottom:5px!important;transition:color 80ms ease}.sidebar-group>button:hover,.sidebar-group button:hover{color:var(--text-heading)!important}.eyebrow,.breadcrumb-list,.breadcrumb-item{font-size:var(--font-size-label)!important;color:var(--text-muted)!important;font-weight:500!important;text-transform:uppercase!important;letter-spacing:0.05em!important}div[class*=\"peer-[.is-not-custom]\"]{max-width:none!important}#content-area,#content,#content-container,#content-side-layout{background:var(--page-bg)!important;max-width:none!important}#navbar div[class*=\"max-w-8xl\"]{max-width:none!important}#table-of-contents-layout{max-width:none!important}#body-content{max-width:none!important}.mdx-content{max-width:none!important;overflow-wrap:break-word}h1,h2,h3,h4,h5,h6,#page-title,.mdx-content h1,.mdx-content h2,.mdx-content h3,.mdx-content h4,.mdx-content h5,.mdx-content h6{font-family:var(--font-sans)!important;text-wrap:balance}#page-title,.mdx-content h1{color:var(--text-heading)!important;font-size:var(--font-size-h1)!important;font-weight:600!important;line-height:1.2!important;letter-spacing:-0.01em;margin-top:0!important;margin-bottom:2px!important}.mdx-content>h2,.mdx-content>div>h2{color:var(--text-heading)!important;font-size:var(--font-size-h2)!important;font-weight:600!important;line-height:1.3!important;letter-spacing:-0.01em;margin-top:32px!important;margin-bottom:12px!important}.mdx-content>h3,.mdx-content>div>h3{color:var(--text-heading)!important;font-size:var(--font-size-h3)!important;font-weight:600!important;line-height:1.4!important;margin-top:24px!important;margin-bottom:8px!important}.mdx-content>h4,.mdx-content>div>h4{color:var(--text-heading)!important;font-size:var(--font-size-body)!important;font-weight:600!important;line-height:1.45!important;margin-top:20px!important;margin-bottom:6px!important}.mdx-content p,.mdx-content [data-as=\"p\"],.mdx-content li{color:var(--text-body)!important;font-size:var(--font-size-body)!important;line-height:1.6!important;font-weight:400!important}.mdx-content p{text-wrap:pretty}.mdx-content>p:first-of-type,.mdx-content>[data-as=\"p\"]:first-of-type{color:var(--text-body)!important;font-size:var(--font-size-body)!important;font-weight:400!important;line-height:1.6!important;margin-top:0!important;margin-bottom:20px!important}.mdx-content a,.mdx-content .link{color:var(--accent)!important;text-decoration:none;transition:color 80ms ease}.mdx-content a:hover,.mdx-content .link:hover{color:var(--accent-hover)!important;text-decoration:underline}.mdx-content a.link:has(>div){background:var(--page-bg)!important;border:1px solid var(--border)!important;border-radius:4px!important;box-shadow:none!important;padding:16px 18px!important;transition:border-color 80ms ease, background-color 80ms ease!important}.mdx-content a.link:has(>div):hover{border-color:var(--border-strong)!important;background:var(--page-bg)!important;box-shadow:none!important;transform:none!important;text-decoration:none!important}.mdx-content a.link:has(>div)>div:first-child{color:var(--accent)!important;font-size:var(--font-size-secondary)!important;font-weight:500!important;line-height:1.35!important;margin:0 0 4px 0!important;padding:0!important}.mdx-content a.link:has(>div)>div:last-child{color:var(--text-muted)!important;font-size:var(--font-size-small)!important;font-weight:400!important;line-height:1.4!important;margin:0!important;padding:0!important}.card-group,.columns{gap:12px!important}#topbar-cta-button{background:var(--accent)!important;border:1px solid var(--accent)!important;color:#fff!important;border-radius:4px!important;font-family:var(--font-sans)!important;font-size:var(--font-size-small)!important;font-weight:500!important;padding:6px 12px!important;box-shadow:none!important}#topbar-cta-button:hover{background:var(--accent-hover)!important;border-color:var(--accent-hover)!important}#page-context-menu button{border-radius:4px!important;border-color:var(--border)!important}#feedback-thumbs-up,#feedback-thumbs-down{border-radius:4px!important;border-color:var(--border)!important;background:var(--page-bg)!important}[data-assistant-bar] div[class*=\"rounded-2xl\"]{border-radius:4px!important;border-color:var(--border)!important}#search-input,#search-bar-entry{border:1px solid var(--border)!important;border-radius:4px!important;font-family:var(--font-sans)!important;font-size:var(--font-size-small)!important;background:var(--input-bg)!important;color:var(--text-body)!important}#search-input:focus{border-color:var(--border-strong)!important;box-shadow:0 0 0 3px var(--focus-ring)!important;outline:none!important}#search-input kbd,#search-bar-entry kbd{font-family:var(--font-mono)!important;font-size:var(--font-size-label)!important}#topbar-cta-button:focus-visible,#page-context-menu button:focus-visible,#navigation-items a:focus-visible,#navigation-items button:focus-visible,.toc-item a:focus-visible,#pagination a:focus-visible,#footer a:focus-visible{outline:2px solid var(--text-muted)!important;outline-offset:2px}.mdx-content table{border:1px solid var(--border)!important;border-collapse:collapse!important;font-variant-numeric:tabular-nums}.mdx-content th{background:var(--chrome-bg)!important;font-size:var(--font-size-small)!important;font-weight:600!important;color:var(--text-heading)!important;padding:8px 12px!important}.mdx-content td{border-color:var(--border)!important;font-size:var(--font-size-secondary)!important;padding:8px 12px!important}.mdx-content pre{border-radius:4px!important}code,pre,pre code,.code-block,[class*=\"language-\"]{font-family:var(--font-mono)!important}pre,.code-block{font-size:var(--font-size-code)!important;line-height:1.6!important}code{border-radius:4px!important;font-size:var(--font-size-code)!important;background:var(--chrome-bg)!important;color:var(--text-heading)!important;padding:1px 4px!important;border:1px solid var(--border)!important}pre code{background:transparent!important;border:0!important;padding:0!important;font-size:inherit!important}.mdx-content+.prose,[class*=\"text-lg\"][class*=\"prose\"]{font-size:var(--font-size-body)!important;line-height:1.6!important;color:var(--text-body)!important}.accordion{border:1px solid var(--border)!important;border-radius:4px!important;overflow:hidden}.accordion-group{border:1px solid var(--border)!important;border-radius:4px!important}.accordion-group>.accordion{border-radius:0!important;border-left:0!important;border-right:0!important;border-top:0!important}.accordion-group>.accordion:last-child{border-bottom:0!important}.mdx-content [data-component-part=\"accordion-title\"]{color:var(--text-heading)!important;font-size:var(--font-size-body)!important;font-weight:500!important}[data-component-part=\"accordion-content\"]{font-size:var(--font-size-body)!important;line-height:1.6!important;color:var(--text-body)!important}[data-component-part=\"accordion-content\"] p,[data-component-part=\"accordion-content\"] [data-as=\"p\"],[data-component-part=\"accordion-content\"] li{font-size:var(--font-size-body)!important;line-height:1.6!important;color:var(--text-body)!important;font-weight:400!important}.steps{margin-top:24px!important}.step{padding-bottom:24px!important}.mdx-content [data-component-part=\"step-title\"]{font-size:var(--font-size-h3)!important;font-weight:600!important;line-height:1.4!important;color:var(--text-heading)!important;margin-top:0!important;margin-bottom:8px!important}.mdx-content [data-component-part=\"step-title\"] a{color:inherit!important;text-decoration:none!important}.mdx-content [data-component-part=\"step-title\"]:hover a{color:var(--accent)!important}[data-component-part=\"step-number\"]{color:var(--text-muted)!important}[data-component-part=\"step-line\"]{background-color:var(--border)!important}[data-component-part=\"step-content\"]{font-size:var(--font-size-body)!important;line-height:1.6!important;color:var(--text-body)!important}[data-component-part=\"step-content\"] p,[data-component-part=\"step-content\"] [data-as=\"p\"],[data-component-part=\"step-content\"] li{font-size:var(--font-size-body)!important;line-height:1.6!important;color:var(--text-body)!important;font-weight:400!important}[data-component-part=\"step-content\"] a{color:var(--accent)!important;text-decoration:none!important;transition:color 80ms ease}[data-component-part=\"step-content\"] a:hover{color:var(--accent-hover)!important;text-decoration:underline!important}.callout{border-radius:4px!important}[data-component-part=\"callout-content\"]{font-size:var(--font-size-secondary)!important;line-height:1.6!important}[data-component-part=\"callout-content\"] p,[data-component-part=\"callout-content\"] [data-as=\"p\"]{font-size:var(--font-size-secondary)!important;line-height:1.6!important}.mdx-content strong,[data-component-part=\"accordion-content\"] strong{color:var(--text-heading)!important;font-weight:600!important}.mdx-content em,[data-component-part=\"accordion-content\"] em{font-style:italic}.mdx-content blockquote{border-left:3px solid var(--border)!important;padding-left:16px!important;color:var(--text-muted)!important}.toc{font-size:var(--font-size-small)!important}.toc-item a{color:var(--text-muted)!important;transition:color 80ms ease}.toc-item a:hover{color:var(--text-heading)!important}.toc-item[data-active]>a,.toc-item[data-active-deepest]>a{color:var(--accent)!important}#pagination{font-size:var(--font-size-small)!important;color:var(--text-body)!important;border-top:1px solid var(--border)!important;padding-top:16px!important;margin-top:32px!important}#pagination a{color:var(--text-body)!important;transition:color 80ms ease}#pagination a:hover{color:var(--accent)!important}hr{border-color:var(--border)!important}#footer,footer{background:transparent!important;border-top:1px solid var(--border)!important;color:var(--text-muted)!important;margin-top:48px!important;font-size:var(--font-size-small)!important}#footer:not(.advanced-footer),footer:not(.advanced-footer){padding-top:24px!important;padding-bottom:32px!important}#footer.advanced-footer{padding:0!important}#footer.advanced-footer>div{padding-top:32px!important;padding-bottom:32px!important}@media (min-width: 768px){#footer.advanced-footer>div{padding-top:40px!important;padding-bottom:40px!important}}#footer.advanced-footer p{color:var(--text-heading)!important;font-size:var(--font-size-small)!important;font-weight:600!important;margin-bottom:4px!important}#footer.advanced-footer a{color:var(--text-muted)!important;font-size:var(--font-size-small)!important;transition:color 80ms ease}#footer.advanced-footer a:hover{color:var(--text-heading)!important}#footer a{color:var(--text-muted)!important;transition:color 80ms ease}#footer a:hover{color:var(--text-heading)!important}#footer svg{background-color:var(--text-muted)!important;transition:background-color 80ms ease}#footer a:hover svg{background-color:var(--accent)!important}[data-testid=\"sales-agent-background\"]{background:var(--accent)!important}[data-testid=\"sales-agent-background\"]>div{background:transparent!important;opacity:0!important}.intercom-launcher-frame,.intercom-lightweight-app-launcher,.intercom-messenger-frame,[class^=\"intercom-\"][class*=\"frame\"]{border-radius:12px!important;box-shadow:0 8px 24px rgba(26, 31, 54, 0.12), 0 2px 6px rgba(26, 31, 54, 0.06)!important}.intercom-launcher-frame,.intercom-lightweight-app-launcher{background:var(--accent)!important}::selection{background:var(--accent)!important;color:#fff!important}*{scrollbar-color:var(--border-strong) transparent}*::-webkit-scrollbar{width:10px;height:10px}*::-webkit-scrollbar-track{background:transparent}*::-webkit-scrollbar-thumb{background:var(--border-strong);border-radius:5px;border:2px solid var(--page-bg)}*::-webkit-scrollbar-thumb:hover{background:var(--text-muted)}@media (max-width: 1024px){#content-area,#content,#content-container{padding-left:16px!important;padding-right:16px!important}#table-of-contents,#table-of-contents-layout aside{display:none!important}.card-group,.columns{grid-template-columns:1fr!important;gap:10px!important}}@media (max-width: 768px){:root{--font-size-h1: 1.375rem;--font-size-h2: 1.125rem;--font-size-h3: 1rem;--font-size-body: 0.875rem;--font-size-code: 0.75rem}.mdx-content>h2,.mdx-content>div>h2{margin-top:24px!important}.mdx-content>h3,.mdx-content>div>h3{margin-top:16px!important}#content-area,#content,#content-container{padding-left:12px!important;padding-right:12px!important}.mdx-content a.link:has(>div){padding:12px 14px!important}.mdx-content a.link:has(>div)>div:first-child{font-size:var(--font-size-small)!important}.mdx-content a.link:has(>div)>div:last-child{font-size:var(--font-size-tiny)!important}.mdx-content table{display:block!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch;max-width:100%!important}.mdx-content th,.mdx-content td{font-size:var(--font-size-tiny)!important;padding:6px 8px!important;white-space:nowrap}pre,.code-block{overflow-x:auto!important;-webkit-overflow-scrolling:touch;max-width:100%!important}[data-component-part=\"callout-content\"],[data-component-part=\"callout-content\"] p,[data-component-part=\"callout-content\"] [data-as=\"p\"]{font-size:var(--font-size-small)!important}#sidebar,#sidebar-content{width:280px!important}#navbar,#header{padding-left:12px!important;padding-right:12px!important}#topbar-cta-button{font-size:var(--font-size-tiny)!important;padding:5px 10px!important}#pagination{flex-direction:column!important;gap:8px!important}}@media (max-width: 480px){:root{--font-size-h1: 1.25rem;--font-size-h2: 1rem;--font-size-h3: 0.9375rem}#content-area,#content,#content-container{padding-left:12px!important;padding-right:12px!important}#search-input+kbd,#search-bar-entry kbd{display:none!important}}.catalog-page .card{border:1px solid var(--border)!important;border-radius:4px!important;box-shadow:none!important;margin:0 0 6px 0!important;transition:border-color 80ms ease}.catalog-page .card:hover{border-color:var(--border-strong)!important;background:var(--page-bg)!important}.catalog-page .card>div{display:flex!important;align-items:center!important;gap:12px!important;padding:9px 16px!important}.catalog-page .card [data-component-part=\"card-icon\"],.catalog-page .card [data-component-part=\"card-icon\"] svg{width:18px!important;height:18px!important;flex-shrink:0;color:var(--accent)!important;fill:var(--accent)!important}.catalog-page .card .w-full{flex:1!important;min-width:0}.catalog-page .card [data-component-part=\"card-title\"]{display:inline!important;font-size:14px!important;font-weight:500!important;color:var(--text-heading)!important;margin:0 10px 0 0!important;line-height:1.4!important}.catalog-page .card [data-component-part=\"card-content\"]{display:inline!important;font-size:13px!important;color:var(--text-muted)!important;line-height:1.45!important}.catalog-page h3{font-size:13px!important;font-weight:600!important;color:var(--text-muted)!important;text-transform:uppercase;letter-spacing:0.04em;margin:22px 0 10px!important}.catalog-page .card>div>a{display:flex!important;align-items:center!important;gap:12px!important;width:100%!important;border-bottom:none!important}.catalog-page .columns{max-width:100%!important}"},{"filePath":"custom.css","content":"@media (min-width: 1024px){nav#sidebar{height:calc(\n 100dvh - var(--mintlify-slot-header-height, calc(4rem + var(--topbar-tabs-height, 0rem)))\n )!important}}"}],"page":{"pagePath":"api-reference/costs/update-the-global-product-override","slug":"/api-reference/costs/update-the-global-product-override","pageMetadata":{"title":"Update the global product override","description":"Update the default COGS / handling fee applied to product variants\nthat have no per-variant COG line. At least one of `defaultCogs`,\n`globalHandlingFee`, or `currency` must be supplied.\n\nTriggers a per-order COGS recalculation downstream (same SQS message\nthe web UI emits for this change).\n\n**Required scope:** `costs:write`.\n","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /accounts/api/costs/global-product-override","href":"/api-reference/costs/update-the-global-product-override","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n strong: \"strong\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Update the default COGS / handling fee applied to product variants\\nthat have no per-variant COG line. At least one of \", _jsx(_components.code, {\n children: \"defaultCogs\"\n }), \",\\n\", _jsx(_components.code, {\n children: \"globalHandlingFee\"\n }), \", or \", _jsx(_components.code, {\n children: \"currency\"\n }), \" must be supplied.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Triggers a per-order COGS recalculation downstream (same SQS message\\nthe web UI emits for this change).\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Required scope:\"\n }), \" \", _jsx(_components.code, {\n children: \"costs:write\"\n }), \".\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Update the global product override","description":"Update the default COGS / handling fee applied to product variants\nthat have no per-variant COG line. At least one of `defaultCogs`,\n`globalHandlingFee`, or `currency` must be supplied.\n\nTriggers a per-order COGS recalculation downstream (same SQS message\nthe web UI emits for this change).\n\n**Required scope:** `costs:write`.\n","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /accounts/api/costs/global-product-override","href":"/api-reference/costs/update-the-global-product-override","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/upstackdata-afbed50d/b64b07ede631efed/intercom-customize.js","/_mintlify/custom/upstackdata-afbed50d/1cbfb793dc2ec470/upstack-pixel.js","/_mintlify/custom/upstackdata-afbed50d/e2ccc0353f9bb1f8/sidebar-footer-scroll-fix.js"],"openApiReferenceData":{"operation":{"tags":["Costs"],"operationId":"updateGlobalProductOverride","summary":"Update the global product override","description":"Update the default COGS / handling fee applied to product variants\nthat have no per-variant COG line. At least one of `defaultCogs`,\n`globalHandlingFee`, or `currency` must be supplied.\n\nTriggers a per-order COGS recalculation downstream (same SQS message\nthe web UI emits for this change).\n\n**Required scope:** `costs:write`.\n","requestBody":"63d67789-8074-4679-8517-ffadd2318812","responses":{"200":"f172ca93-208b-47a9-81e3-5a19d8e3364c","400":"31621d68-1a2f-4447-826c-e4335745c90a","401":"8588db54-e34a-4fa8-affa-26197076babe","403":"9d6c837f-8bb0-4780-9693-28f0bff9090a"},"method":"put","type":"path","servers":["2bbb3e85-633d-4371-b828-47a29d5899c5"],"security":["f19e0b22-afd0-4760-b88e-dce1773111cb"],"path":"/accounts/api/costs/global-product-override","baseUrlOptions":["https://api.upstackdata.com"],"title":"Update the global product override","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"At least one field is required. The product defaults apply to any variant with no\ncost of its own (no manual COG line and no Shopify cost for the order's date).\n","properties":{"defaultCogs":{"type":"number","minimum":0,"description":"Default COGS as a percentage (0 to 100) of the line item's sale price. A value\nabove 100 is accepted but never applied.\n","uniqueKey":"defaultCogs","typeLabel":"number"},"globalHandlingFee":{"type":"number","minimum":0,"description":"Per-unit handling fee for variants that don't have their own.","uniqueKey":"globalHandlingFee","typeLabel":"number"},"currency":{"type":"string","description":"ISO currency code (e.g. `USD`).","uniqueKey":"currency","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"defaultCogs":{"title":"defaultCogs","value":{"defaultCogs":35,"globalHandlingFee":1.5,"currency":"USD"}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"f172ca93-208b-47a9-81e3-5a19d8e3364c":{"description":"The updated global override configuration.","content":{"application/json":{"schema":{"type":"object","required":["config"],"properties":{"config":{"oneOf":[{"type":"object","title":"Global product override","description":"One stored cost configuration. Which shape you get follows `costType`.","required":["pixelId","costType","createdAt","updatedAt"],"properties":{"pixelId":{"type":"string","description":"The pixel the configuration belongs to.","isRequired":true,"uniqueKey":"config.oneOf.0.pixelId","typeLabel":"string"},"costType":{"type":"string","enum":["global_product_override","order","gateway","shipping","variable","fixed"],"description":"Cost configuration type. Used to filter `/api/costs`.","isRequired":true,"uniqueKey":"config.oneOf.0.costType","typeLabel":"enum\u003cstring>"},"createdAt":{"type":"string","description":"When this configuration was first saved.","isRequired":true,"uniqueKey":"config.oneOf.0.createdAt","typeLabel":"string"},"updatedAt":{"type":"string","description":"When this configuration was last changed.","isRequired":true,"uniqueKey":"config.oneOf.0.updatedAt","typeLabel":"string"},"defaultCogs":{"type":"number","description":"Default COGS as a percentage (0 to 100) of the line item's sale price.","uniqueKey":"config.oneOf.0.defaultCogs","typeLabel":"number"},"globalHandlingFee":{"type":"number","description":"Per-unit handling fee for variants without their own.","uniqueKey":"config.oneOf.0.globalHandlingFee","typeLabel":"number"},"currency":{"type":"string","description":"ISO 4217 currency code of the handling fee.","uniqueKey":"config.oneOf.0.currency","typeLabel":"string"}},"additionalProperties":true,"isRequired":true,"uniqueKey":"config.oneOf.0","typeLabel":"Global product override · object"},{"type":"object","title":"Order costs","description":"One stored cost configuration. Which shape you get follows `costType`.","required":["entries","pixelId","costType","createdAt","updatedAt"],"properties":{"pixelId":{"type":"string","description":"The pixel the configuration belongs to.","isRequired":true,"uniqueKey":"config.oneOf.1.pixelId","typeLabel":"string"},"costType":{"type":"string","enum":["global_product_override","order","gateway","shipping","variable","fixed"],"description":"Cost configuration type. Used to filter `/api/costs`.","isRequired":true,"uniqueKey":"config.oneOf.1.costType","typeLabel":"enum\u003cstring>"},"createdAt":{"type":"string","description":"When this configuration was first saved.","isRequired":true,"uniqueKey":"config.oneOf.1.createdAt","typeLabel":"string"},"updatedAt":{"type":"string","description":"When this configuration was last changed.","isRequired":true,"uniqueKey":"config.oneOf.1.updatedAt","typeLabel":"string"},"entries":{"type":"array","items":{"type":"object","description":"Fields the server adds when it stores a line.","required":["id","createdAt","updatedAt","name","type","currency","category","channel"],"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"config.oneOf.1.entries.items.[INDEX].name","typeLabel":"string"},"type":{"type":"string","enum":["per_order","per_line_item","per_refund_order","per_refund_line_item","by_order_weight","by_line_item_quantity","by_order_quantity","pct_cogs","pct_shipping","pct_total_sales","pct_gross_sales","pct_net_sales"],"isRequired":true,"uniqueKey":"config.oneOf.1.entries.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"currency":{"type":"string","description":"ISO currency code (e.g. `USD`).","isRequired":true,"uniqueKey":"config.oneOf.1.entries.items.[INDEX].currency","typeLabel":"string"},"category":{"type":"string","enum":["cogs","fulfillment","transaction","marketing","agency_fees","opex","other"],"isRequired":true,"uniqueKey":"config.oneOf.1.entries.items.[INDEX].category","typeLabel":"enum\u003cstring>"},"channel":{"type":"string","enum":["online","pos","both"],"isRequired":true,"uniqueKey":"config.oneOf.1.entries.items.[INDEX].channel","typeLabel":"enum\u003cstring>"},"id":{"type":"string","description":"Server-assigned ULID.","isRequired":true,"uniqueKey":"config.oneOf.1.entries.items.[INDEX].id","typeLabel":"string"},"createdAt":{"type":"string","isRequired":true,"uniqueKey":"config.oneOf.1.entries.items.[INDEX].createdAt","typeLabel":"string"},"updatedAt":{"type":"string","isRequired":true,"uniqueKey":"config.oneOf.1.entries.items.[INDEX].updatedAt","typeLabel":"string"},"flatAmount":{"type":"number","minimum":0,"description":"Required for the `per_*` types.","uniqueKey":"config.oneOf.1.entries.items.[INDEX].flatAmount","typeLabel":"number"},"percentRate":{"type":"number","minimum":0,"description":"Required for the `pct_*` types.","uniqueKey":"config.oneOf.1.entries.items.[INDEX].percentRate","typeLabel":"number"},"weightUnit":{"type":"string","enum":["g","kg","oz","lb"],"uniqueKey":"config.oneOf.1.entries.items.[INDEX].weightUnit","typeLabel":"enum\u003cstring>"},"weightIntervals":{"type":"array","items":{"type":"object","description":"A single tier in a weight-based cost table.","required":["weightMin","weightMax","flatAmount"],"properties":{"weightMin":{"type":"number","minimum":0,"isRequired":true,"uniqueKey":"config.oneOf.1.entries.items.[INDEX].weightIntervals.items.[INDEX].weightMin","typeLabel":"number"},"weightMax":{"oneOf":[{"type":"number","isRequired":true,"uniqueKey":"config.oneOf.1.entries.items.[INDEX].weightIntervals.items.[INDEX].weightMax.oneOf.0","typeLabel":"number"},{"type":"null","isRequired":true,"uniqueKey":"config.oneOf.1.entries.items.[INDEX].weightIntervals.items.[INDEX].weightMax.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"config.oneOf.1.entries.items.[INDEX].weightIntervals.items.[INDEX].weightMax","typeLabel":"number | null"},"flatAmount":{"type":"number","minimum":0,"isRequired":true,"uniqueKey":"config.oneOf.1.entries.items.[INDEX].weightIntervals.items.[INDEX].flatAmount","typeLabel":"number"}},"uniqueKey":"config.oneOf.1.entries.items.[INDEX].weightIntervals.items.[INDEX]","typeLabel":"object"},"description":"Required when `type=by_order_weight`.","uniqueKey":"config.oneOf.1.entries.items.[INDEX].weightIntervals","typeLabel":"object[]"},"quantityIntervals":{"type":"array","items":{"type":"object","description":"A single tier in a quantity-based cost table.","required":["quantityMin","quantityMax","flatAmount"],"properties":{"quantityMin":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"config.oneOf.1.entries.items.[INDEX].quantityIntervals.items.[INDEX].quantityMin","typeLabel":"integer"},"quantityMax":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"config.oneOf.1.entries.items.[INDEX].quantityIntervals.items.[INDEX].quantityMax.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"config.oneOf.1.entries.items.[INDEX].quantityIntervals.items.[INDEX].quantityMax.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"config.oneOf.1.entries.items.[INDEX].quantityIntervals.items.[INDEX].quantityMax","typeLabel":"integer | null"},"flatAmount":{"type":"number","minimum":0,"isRequired":true,"uniqueKey":"config.oneOf.1.entries.items.[INDEX].quantityIntervals.items.[INDEX].flatAmount","typeLabel":"number"}},"uniqueKey":"config.oneOf.1.entries.items.[INDEX].quantityIntervals.items.[INDEX]","typeLabel":"object"},"description":"Required when `type=by_line_item_quantity` or `by_order_quantity`.","uniqueKey":"config.oneOf.1.entries.items.[INDEX].quantityIntervals","typeLabel":"object[]"},"filters":{"type":"object","description":"Optional filters that scope when a cost line applies (e.g. only\norders from a specific source). Shape mirrors the order-exclusion\nfilter model — see the web UI's \"Add filter\" form for the full\noperator catalog.\n","additionalProperties":true,"uniqueKey":"config.oneOf.1.entries.items.[INDEX].filters","typeLabel":"object"},"effectiveFrom":{"type":"string","description":"ISO-8601 date this line begins applying (optional, open-ended if omitted).","uniqueKey":"config.oneOf.1.entries.items.[INDEX].effectiveFrom","typeLabel":"string"},"effectiveTo":{"type":"string","description":"ISO-8601 date this line stops applying.","uniqueKey":"config.oneOf.1.entries.items.[INDEX].effectiveTo","typeLabel":"string"}},"uniqueKey":"config.oneOf.1.entries.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"config.oneOf.1.entries","typeLabel":"object[]"}},"additionalProperties":true,"isRequired":true,"uniqueKey":"config.oneOf.1","typeLabel":"Order costs · object"},{"type":"object","title":"Gateway fees","description":"One stored cost configuration. Which shape you get follows `costType`.","required":["entries","pixelId","costType","createdAt","updatedAt"],"properties":{"pixelId":{"type":"string","description":"The pixel the configuration belongs to.","isRequired":true,"uniqueKey":"config.oneOf.2.pixelId","typeLabel":"string"},"costType":{"type":"string","enum":["global_product_override","order","gateway","shipping","variable","fixed"],"description":"Cost configuration type. Used to filter `/api/costs`.","isRequired":true,"uniqueKey":"config.oneOf.2.costType","typeLabel":"enum\u003cstring>"},"createdAt":{"type":"string","description":"When this configuration was first saved.","isRequired":true,"uniqueKey":"config.oneOf.2.createdAt","typeLabel":"string"},"updatedAt":{"type":"string","description":"When this configuration was last changed.","isRequired":true,"uniqueKey":"config.oneOf.2.updatedAt","typeLabel":"string"},"entries":{"type":"array","items":{"type":"object","description":"Fields the server adds when it stores a line.","required":["id","createdAt","updatedAt","name","gatewayName","flatAmount","percentRate","currency"],"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"config.oneOf.2.entries.items.[INDEX].name","typeLabel":"string"},"gatewayName":{"type":"string","description":"Matches the gateway label on Shopify orders (e.g. `shopify_payments`, `paypal`).","isRequired":true,"uniqueKey":"config.oneOf.2.entries.items.[INDEX].gatewayName","typeLabel":"string"},"flatAmount":{"type":"number","minimum":0,"isRequired":true,"uniqueKey":"config.oneOf.2.entries.items.[INDEX].flatAmount","typeLabel":"number"},"percentRate":{"type":"number","minimum":0,"isRequired":true,"uniqueKey":"config.oneOf.2.entries.items.[INDEX].percentRate","typeLabel":"number"},"currency":{"type":"string","isRequired":true,"uniqueKey":"config.oneOf.2.entries.items.[INDEX].currency","typeLabel":"string"},"id":{"type":"string","description":"Server-assigned ULID.","isRequired":true,"uniqueKey":"config.oneOf.2.entries.items.[INDEX].id","typeLabel":"string"},"createdAt":{"type":"string","isRequired":true,"uniqueKey":"config.oneOf.2.entries.items.[INDEX].createdAt","typeLabel":"string"},"updatedAt":{"type":"string","isRequired":true,"uniqueKey":"config.oneOf.2.entries.items.[INDEX].updatedAt","typeLabel":"string"},"effectiveFrom":{"type":"string","uniqueKey":"config.oneOf.2.entries.items.[INDEX].effectiveFrom","typeLabel":"string"},"effectiveTo":{"type":"string","uniqueKey":"config.oneOf.2.entries.items.[INDEX].effectiveTo","typeLabel":"string"}},"uniqueKey":"config.oneOf.2.entries.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"config.oneOf.2.entries","typeLabel":"object[]"}},"additionalProperties":true,"isRequired":true,"uniqueKey":"config.oneOf.2","typeLabel":"Gateway fees · object"},{"type":"object","title":"Shipping costs","description":"One stored cost configuration. Which shape you get follows `costType`.","required":["method","currency","pixelId","costType","createdAt","updatedAt"],"properties":{"pixelId":{"type":"string","description":"The pixel the configuration belongs to.","isRequired":true,"uniqueKey":"config.oneOf.3.pixelId","typeLabel":"string"},"costType":{"type":"string","enum":["global_product_override","order","gateway","shipping","variable","fixed"],"description":"Cost configuration type. Used to filter `/api/costs`.","isRequired":true,"uniqueKey":"config.oneOf.3.costType","typeLabel":"enum\u003cstring>"},"createdAt":{"type":"string","description":"When this configuration was first saved.","isRequired":true,"uniqueKey":"config.oneOf.3.createdAt","typeLabel":"string"},"updatedAt":{"type":"string","description":"When this configuration was last changed.","isRequired":true,"uniqueKey":"config.oneOf.3.updatedAt","typeLabel":"string"},"method":{"type":"string","enum":["shopify_charges","fixed_rate","shipping_profiles"],"description":"Shipping cost attribution method.\n- `shopify_charges` — use the shipping charge captured on each order.\n- `fixed_rate` — apply a flat per-order amount (set `fixedRateAmount`; without it no fixed charge applies).\n- `shipping_profiles` — match shipping zones / weights configured in Shopify.\n","isRequired":true,"uniqueKey":"config.oneOf.3.method","typeLabel":"enum\u003cstring>"},"currency":{"type":"string","isRequired":true,"uniqueKey":"config.oneOf.3.currency","typeLabel":"string"},"fixedRateAmount":{"type":"number","description":"Used when `method` is `fixed_rate`.","uniqueKey":"config.oneOf.3.fixedRateAmount","typeLabel":"number"},"profiles":{"type":"array","description":"Used when `method` is `shipping_profiles`.","items":{"type":"object","description":"Fields the server adds when it stores a line.","required":["id","createdAt","updatedAt","name","isDefault","rateType","currency"],"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"config.oneOf.3.profiles.items.[INDEX].name","typeLabel":"string"},"isDefault":{"type":"boolean","description":"Fallback profile when no country matches. When `true`, `countries` may be empty or omitted.","isRequired":true,"uniqueKey":"config.oneOf.3.profiles.items.[INDEX].isDefault","typeLabel":"boolean"},"rateType":{"type":"string","enum":["flat","weight_tiered"],"isRequired":true,"uniqueKey":"config.oneOf.3.profiles.items.[INDEX].rateType","typeLabel":"enum\u003cstring>"},"currency":{"type":"string","isRequired":true,"uniqueKey":"config.oneOf.3.profiles.items.[INDEX].currency","typeLabel":"string"},"id":{"type":"string","description":"Server-assigned ULID.","isRequired":true,"uniqueKey":"config.oneOf.3.profiles.items.[INDEX].id","typeLabel":"string"},"createdAt":{"type":"string","isRequired":true,"uniqueKey":"config.oneOf.3.profiles.items.[INDEX].createdAt","typeLabel":"string"},"updatedAt":{"type":"string","isRequired":true,"uniqueKey":"config.oneOf.3.profiles.items.[INDEX].updatedAt","typeLabel":"string"},"countries":{"type":"array","items":{"type":"string","uniqueKey":"config.oneOf.3.profiles.items.[INDEX].countries.items.[INDEX]","typeLabel":"string"},"description":"ISO-3166 alpha-2 country codes the profile applies to. Required (min 1) when `isDefault=false`.","uniqueKey":"config.oneOf.3.profiles.items.[INDEX].countries","typeLabel":"string[]"},"flatAmount":{"type":"number","minimum":0,"description":"Required when `rateType=flat`.","uniqueKey":"config.oneOf.3.profiles.items.[INDEX].flatAmount","typeLabel":"number"},"weightUnit":{"type":"string","enum":["g","kg","oz","lb"],"description":"Required when `rateType=weight_tiered`.","uniqueKey":"config.oneOf.3.profiles.items.[INDEX].weightUnit","typeLabel":"enum\u003cstring>"},"weightTiers":{"type":"array","items":{"type":"object","description":"A single tier in a weight-based cost table.","required":["weightMin","weightMax","flatAmount"],"properties":{"weightMin":{"type":"number","minimum":0,"isRequired":true,"uniqueKey":"config.oneOf.3.profiles.items.[INDEX].weightTiers.items.[INDEX].weightMin","typeLabel":"number"},"weightMax":{"oneOf":[{"type":"number","isRequired":true,"uniqueKey":"config.oneOf.3.profiles.items.[INDEX].weightTiers.items.[INDEX].weightMax.oneOf.0","typeLabel":"number"},{"type":"null","isRequired":true,"uniqueKey":"config.oneOf.3.profiles.items.[INDEX].weightTiers.items.[INDEX].weightMax.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"config.oneOf.3.profiles.items.[INDEX].weightTiers.items.[INDEX].weightMax","typeLabel":"number | null"},"flatAmount":{"type":"number","minimum":0,"isRequired":true,"uniqueKey":"config.oneOf.3.profiles.items.[INDEX].weightTiers.items.[INDEX].flatAmount","typeLabel":"number"}},"uniqueKey":"config.oneOf.3.profiles.items.[INDEX].weightTiers.items.[INDEX]","typeLabel":"object"},"description":"Required (min 1 tier) when `rateType=weight_tiered`.","uniqueKey":"config.oneOf.3.profiles.items.[INDEX].weightTiers","typeLabel":"object[]"},"effectiveFrom":{"type":"string","uniqueKey":"config.oneOf.3.profiles.items.[INDEX].effectiveFrom","typeLabel":"string"},"effectiveTo":{"type":"string","uniqueKey":"config.oneOf.3.profiles.items.[INDEX].effectiveTo","typeLabel":"string"},"filters":{"type":"object","description":"Optional filters that scope when a cost line applies (e.g. only\norders from a specific source). Shape mirrors the order-exclusion\nfilter model — see the web UI's \"Add filter\" form for the full\noperator catalog.\n","additionalProperties":true,"uniqueKey":"config.oneOf.3.profiles.items.[INDEX].filters","typeLabel":"object"}},"uniqueKey":"config.oneOf.3.profiles.items.[INDEX]","typeLabel":"object"},"uniqueKey":"config.oneOf.3.profiles","typeLabel":"object[]"}},"additionalProperties":true,"isRequired":true,"uniqueKey":"config.oneOf.3","typeLabel":"Shipping costs · object"},{"type":"object","title":"Variable costs","description":"One stored cost configuration. Which shape you get follows `costType`.","required":["entries","pixelId","costType","createdAt","updatedAt"],"properties":{"pixelId":{"type":"string","description":"The pixel the configuration belongs to.","isRequired":true,"uniqueKey":"config.oneOf.4.pixelId","typeLabel":"string"},"costType":{"type":"string","enum":["global_product_override","order","gateway","shipping","variable","fixed"],"description":"Cost configuration type. Used to filter `/api/costs`.","isRequired":true,"uniqueKey":"config.oneOf.4.costType","typeLabel":"enum\u003cstring>"},"createdAt":{"type":"string","description":"When this configuration was first saved.","isRequired":true,"uniqueKey":"config.oneOf.4.createdAt","typeLabel":"string"},"updatedAt":{"type":"string","description":"When this configuration was last changed.","isRequired":true,"uniqueKey":"config.oneOf.4.updatedAt","typeLabel":"string"},"entries":{"type":"array","items":{"type":"object","description":"Fields the server adds when it stores a line.","required":["id","createdAt","updatedAt","name","type","percentRate","category","channel","currency"],"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"config.oneOf.4.entries.items.[INDEX].name","typeLabel":"string"},"type":{"type":"string","enum":["pct_ad_spend"],"isRequired":true,"uniqueKey":"config.oneOf.4.entries.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"percentRate":{"type":"number","minimum":0,"isRequired":true,"uniqueKey":"config.oneOf.4.entries.items.[INDEX].percentRate","typeLabel":"number"},"category":{"type":"string","enum":["marketing","opex"],"isRequired":true,"uniqueKey":"config.oneOf.4.entries.items.[INDEX].category","typeLabel":"enum\u003cstring>"},"channel":{"type":"string","enum":["online","pos","both"],"isRequired":true,"uniqueKey":"config.oneOf.4.entries.items.[INDEX].channel","typeLabel":"enum\u003cstring>"},"currency":{"type":"string","isRequired":true,"uniqueKey":"config.oneOf.4.entries.items.[INDEX].currency","typeLabel":"string"},"id":{"type":"string","description":"Server-assigned ULID.","isRequired":true,"uniqueKey":"config.oneOf.4.entries.items.[INDEX].id","typeLabel":"string"},"createdAt":{"type":"string","isRequired":true,"uniqueKey":"config.oneOf.4.entries.items.[INDEX].createdAt","typeLabel":"string"},"updatedAt":{"type":"string","isRequired":true,"uniqueKey":"config.oneOf.4.entries.items.[INDEX].updatedAt","typeLabel":"string"},"filters":{"type":"object","description":"Optional filters that scope when a cost line applies (e.g. only\norders from a specific source). Shape mirrors the order-exclusion\nfilter model — see the web UI's \"Add filter\" form for the full\noperator catalog.\n","additionalProperties":true,"uniqueKey":"config.oneOf.4.entries.items.[INDEX].filters","typeLabel":"object"},"effectiveFrom":{"type":"string","uniqueKey":"config.oneOf.4.entries.items.[INDEX].effectiveFrom","typeLabel":"string"},"effectiveTo":{"type":"string","uniqueKey":"config.oneOf.4.entries.items.[INDEX].effectiveTo","typeLabel":"string"}},"uniqueKey":"config.oneOf.4.entries.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"config.oneOf.4.entries","typeLabel":"object[]"}},"additionalProperties":true,"isRequired":true,"uniqueKey":"config.oneOf.4","typeLabel":"Variable costs · object"},{"type":"object","title":"Fixed costs","description":"One stored cost configuration. Which shape you get follows `costType`.","required":["entries","pixelId","costType","createdAt","updatedAt"],"properties":{"pixelId":{"type":"string","description":"The pixel the configuration belongs to.","isRequired":true,"uniqueKey":"config.oneOf.5.pixelId","typeLabel":"string"},"costType":{"type":"string","enum":["global_product_override","order","gateway","shipping","variable","fixed"],"description":"Cost configuration type. Used to filter `/api/costs`.","isRequired":true,"uniqueKey":"config.oneOf.5.costType","typeLabel":"enum\u003cstring>"},"createdAt":{"type":"string","description":"When this configuration was first saved.","isRequired":true,"uniqueKey":"config.oneOf.5.createdAt","typeLabel":"string"},"updatedAt":{"type":"string","description":"When this configuration was last changed.","isRequired":true,"uniqueKey":"config.oneOf.5.updatedAt","typeLabel":"string"},"entries":{"type":"array","items":{"type":"object","description":"Fields the server adds when it stores a line.","required":["id","createdAt","updatedAt","name","flatAmount","frequencyUnit","frequencyInterval","category","currency"],"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"config.oneOf.5.entries.items.[INDEX].name","typeLabel":"string"},"flatAmount":{"type":"number","minimum":0,"isRequired":true,"uniqueKey":"config.oneOf.5.entries.items.[INDEX].flatAmount","typeLabel":"number"},"frequencyUnit":{"type":"string","enum":["day","week","month","quarter","year"],"isRequired":true,"uniqueKey":"config.oneOf.5.entries.items.[INDEX].frequencyUnit","typeLabel":"enum\u003cstring>"},"frequencyInterval":{"type":"integer","minimum":1,"description":"How many `frequencyUnit`s between occurrences (e.g. `frequencyUnit=month`, `frequencyInterval=3` → quarterly).","isRequired":true,"uniqueKey":"config.oneOf.5.entries.items.[INDEX].frequencyInterval","typeLabel":"integer"},"category":{"type":"string","enum":["marketing","opex","agency_fees","other"],"isRequired":true,"uniqueKey":"config.oneOf.5.entries.items.[INDEX].category","typeLabel":"enum\u003cstring>"},"currency":{"type":"string","isRequired":true,"uniqueKey":"config.oneOf.5.entries.items.[INDEX].currency","typeLabel":"string"},"id":{"type":"string","description":"Server-assigned ULID.","isRequired":true,"uniqueKey":"config.oneOf.5.entries.items.[INDEX].id","typeLabel":"string"},"createdAt":{"type":"string","isRequired":true,"uniqueKey":"config.oneOf.5.entries.items.[INDEX].createdAt","typeLabel":"string"},"updatedAt":{"type":"string","isRequired":true,"uniqueKey":"config.oneOf.5.entries.items.[INDEX].updatedAt","typeLabel":"string"},"effectiveFrom":{"type":"string","uniqueKey":"config.oneOf.5.entries.items.[INDEX].effectiveFrom","typeLabel":"string"},"effectiveTo":{"type":"string","uniqueKey":"config.oneOf.5.entries.items.[INDEX].effectiveTo","typeLabel":"string"}},"uniqueKey":"config.oneOf.5.entries.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"config.oneOf.5.entries","typeLabel":"object[]"}},"additionalProperties":true,"isRequired":true,"uniqueKey":"config.oneOf.5","typeLabel":"Fixed costs · object"}],"isRequired":true,"uniqueKey":"config","typeLabel":"Global product override · object | Order costs · object | Gateway fees · object | Shipping costs · object | Variable costs · object | Fixed costs · object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"config":{"pixelId":"\u003cstring>","costType":"global_product_override","createdAt":"\u003cstring>","updatedAt":"\u003cstring>","defaultCogs":123,"globalHandlingFee":123,"currency":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"31621d68-1a2f-4447-826c-e4335745c90a":{"description":"Validation error. Includes an `errors` array with per-field detail.","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string","description":"Human-readable error message.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"errors":{"type":"array","description":"Per-field validation errors (present on 400 responses).","items":{"type":"object","properties":{"message":{"type":"string","uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"},"key":{"type":"string","uniqueKey":"errors.items.[INDEX].key","typeLabel":"string"},"path":{"type":"array","items":{"type":"string","uniqueKey":"errors.items.[INDEX].path.items.[INDEX]","typeLabel":"string"},"uniqueKey":"errors.items.[INDEX].path","typeLabel":"string[]"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>","errors":[{"message":"\u003cstring>","key":"\u003cstring>","path":["\u003cstring>"]}]}}},"exampleType":"generated"}},"exampleType":"generated"},"8588db54-e34a-4fa8-affa-26197076babe":{"description":"The `x-api-key` or `x-pixel-id` header is missing. The request is rejected\nbefore it reaches the API, and the body is `{\"message\": \"Unauthorized\"}`.\nA key that is present but not accepted returns `403`, not `401`.\n","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string","description":"Human-readable error message.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"errors":{"type":"array","description":"Per-field validation errors (present on 400 responses).","items":{"type":"object","properties":{"message":{"type":"string","uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"},"key":{"type":"string","uniqueKey":"errors.items.[INDEX].key","typeLabel":"string"},"path":{"type":"array","items":{"type":"string","uniqueKey":"errors.items.[INDEX].path.items.[INDEX]","typeLabel":"string"},"uniqueKey":"errors.items.[INDEX].path","typeLabel":"string[]"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>","errors":[{"message":"\u003cstring>","key":"\u003cstring>","path":["\u003cstring>"]}]}}},"exampleType":"generated"}},"exampleType":"generated"},"9d6c837f-8bb0-4780-9693-28f0bff9090a":{"description":"The key was rejected, or it is valid but not allowed to do this. Either:\n\n- the key is unknown, revoked, or expired, or the pixel is inactive — the body is\n `{\"Message\": \"User is not authorized to access this resource with an explicit deny\n in an identity-based policy\"}` (note the capital `M`);\n- the key doesn't carry the scope this endpoint needs, or the body `pixelId` doesn't\n match the `x-pixel-id` header — the body is `{\"message\": \"…\"}` as described below.\n","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string","description":"Human-readable error message.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"errors":{"type":"array","description":"Per-field validation errors (present on 400 responses).","items":{"type":"object","properties":{"message":{"type":"string","uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"},"key":{"type":"string","uniqueKey":"errors.items.[INDEX].key","typeLabel":"string"},"path":{"type":"array","items":{"type":"string","uniqueKey":"errors.items.[INDEX].path.items.[INDEX]","typeLabel":"string"},"uniqueKey":"errors.items.[INDEX].path","typeLabel":"string[]"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>","errors":[{"message":"\u003cstring>","key":"\u003cstring>","path":["\u003cstring>"]}]}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"f19e0b22-afd0-4760-b88e-dce1773111cb":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your Upstack API key. Starts with `upstack_`.","scopes":[],"schemeName":"apiKey"},"pixelId":{"type":"apiKey","in":"header","name":"x-pixel-id","description":"The pixel id the request targets.","scopes":[],"schemeName":"pixelId"}}},"servers":{"2bbb3e85-633d-4371-b828-47a29d5899c5":{"url":"https://api.upstackdata.com","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your Upstack API key. Starts with `upstack_`.","scopes":[],"schemeName":"apiKey"},"schema":{"title":"x-api-key","type":"string","description":"Your Upstack API key. Starts with `upstack_`.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"apiKey","name":"x-api-key"},{"scheme":{"type":"apiKey","in":"header","name":"x-pixel-id","description":"The pixel id the request targets.","scopes":[],"schemeName":"pixelId"},"schema":{"title":"x-pixel-id","type":"string","description":"The pixel id the request targets.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"pixelId","name":"x-pixel-id"}],"title":"apiKey \u0026 pixelId"}]},"originalFileLocation":"api-reference/openapi.yaml"},"subdomain":"upstackdata-afbed50d","siteName":"Upstack Data","title":"Update the global product override - Upstack Data","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-04T13:39:43.981Z","originalFileLocation":"api-reference/costs/update-the-global-product-override.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";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=\"Update the default COGS / handling fee applied to product variants that have no per-variant COG line. At least one of defaultCogs, globalHandlingFee, or currency must be supplied. Triggers a per-order COGS recalculation downstream (same SQS message the web UI emits for this change). Required scope: costs:write.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Upstack Data\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/upstackdata-afbed50d/3BK6qL6Jr5lRaaY0/_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/upstackdata-afbed50d/3BK6qL6Jr5lRaaY0/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/upstackdata-afbed50d/3BK6qL6Jr5lRaaY0/_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/upstackdata-afbed50d/3BK6qL6Jr5lRaaY0/_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/upstackdata-afbed50d/3BK6qL6Jr5lRaaY0/_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/upstackdata-afbed50d/3BK6qL6Jr5lRaaY0/_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/upstackdata-afbed50d/3BK6qL6Jr5lRaaY0/_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/upstackdata-afbed50d/3BK6qL6Jr5lRaaY0/_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/upstackdata-afbed50d/3BK6qL6Jr5lRaaY0/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Update the global product override - Upstack Data\">\u003cmeta data-mint-head property=\"og:description\" content=\"Update the default COGS / handling fee applied to product variants that have no per-variant COG line. At least one of defaultCogs, globalHandlingFee, or currency must be supplied. Triggers a per-order COGS recalculation downstream (same SQS message the web UI emits for this change). Required scope: costs:write.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Upstack Data\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.upstackdata.com/api-reference/costs/update-the-global-product-override\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://upstackdata-afbed50d.mintlify.site/_mintlify/api/og/v2?division=COSTS\u0026amp;title=Update+the+global+product+override\u0026amp;description=Update+the+default+COGS+%2F+handling+fee+applied+to+product+variants%0Athat+have+no+per-variant+COG+line.+At+least+one+of+%60defaultCogs%60%2C%0A%60globalHandlingFee%60%2C+or+%60cu\u0026amp;theme=e184da355f0a31f9720589c9\u0026amp;signature=10a0af6ca39d866b945efe3ca3a080655019606d9521b67fb9c3b6a27d03b18c\">\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=\"Update the global product override - Upstack Data\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Update the default COGS / handling fee applied to product variants that have no per-variant COG line. At least one of defaultCogs, globalHandlingFee, or currency must be supplied. Triggers a per-order COGS recalculation downstream (same SQS message the web UI emits for this change). Required scope: costs:write.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://upstackdata-afbed50d.mintlify.site/_mintlify/api/og/v2?division=COSTS\u0026amp;title=Update+the+global+product+override\u0026amp;description=Update+the+default+COGS+%2F+handling+fee+applied+to+product+variants%0Athat+have+no+per-variant+COG+line.+At+least+one+of+%60defaultCogs%60%2C%0A%60globalHandlingFee%60%2C+or+%60cu\u0026amp;theme=e184da355f0a31f9720589c9\u0026amp;signature=10a0af6ca39d866b945efe3ca3a080655019606d9521b67fb9c3b6a27d03b18c\">\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/upstackdata-afbed50d/3BK6qL6Jr5lRaaY0/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Upstack Data\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4230b4\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.upstackdata.com/api-reference/costs/update-the-global-product-override\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/costs/update-the-global-product-override.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.upstackdata.com/#organization\",\"name\":\"Upstack Data\",\"url\":\"https://docs.upstackdata.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/upstackdata-afbed50d/40dgTTn1PLjePhJa/logo/light.svg?fit=max\u0026auto=format\u0026n=40dgTTn1PLjePhJa\u0026q=85\u0026s=598c05fb87860ddc1b6b7640b41e136c\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.upstackdata.com#website\",\"name\":\"Upstack Data\",\"url\":\"https://docs.upstackdata.com\",\"publisher\":{\"@id\":\"https://docs.upstackdata.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.upstackdata.com/api-reference/costs/update-the-global-product-override#webpage\",\"url\":\"https://docs.upstackdata.com/api-reference/costs/update-the-global-product-override\",\"name\":\"Update the global product override\",\"description\":\"Update the default COGS / handling fee applied to product variants that have no per-variant COG line. At least one of defaultCogs, globalHandlingFee, or currency must be supplied. Triggers a per-order COGS recalculation downstream (same SQS message the web UI emits for this change). Required scope: costs:write.\",\"dateModified\":\"2026-11-04T13:39:43.981Z\",\"isPartOf\":{\"@id\":\"https://docs.upstackdata.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.upstackdata.com/api-reference/costs/update-the-global-product-override#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.upstackdata.com/api-reference/costs/update-the-global-product-override#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"COSTS\",\"item\":\"https://docs.upstackdata.com/api-reference/costs/get-cost-configuration\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Update the global product override\",\"item\":\"https://docs.upstackdata.com/api-reference/costs/update-the-global-product-override\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.upstackdata.com/api-reference/costs/update-the-global-product-override#apireference\",\"headline\":\"Update the global product override\",\"name\":\"Update the global product override\",\"description\":\"Update the default COGS / handling fee applied to product variants that have no per-variant COG line. At least one of defaultCogs, globalHandlingFee, or currency must be supplied. Triggers a per-order COGS recalculation downstream (same SQS message the web UI emits for this change). Required scope: costs:write.\",\"url\":\"https://docs.upstackdata.com/api-reference/costs/update-the-global-product-override\",\"mainEntityOfPage\":{\"@id\":\"https://docs.upstackdata.com/api-reference/costs/update-the-global-product-override#webpage\"},\"dateModified\":\"2026-11-04T13:39:43.981Z\",\"publisher\":{\"@id\":\"https://docs.upstackdata.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.upstackdata.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Upstack Data\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Upstack Data","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/get-started/overview"}]},{"tab":"Pixel","pages":[{"title":"Pixel","href":"/pixel"}]},{"tab":"Event Tracking","pages":[{"title":"Event Tracking","href":"/event-tracking"}]},{"tab":"Metrics","pages":[{"title":"Metrics","href":"/reference/metrics"}]},{"tab":"API","groups":[{"group":"OVERVIEW","pages":[{"title":"Introduction","sidebarTitle":"Introduction","href":"/api-reference/introduction"},{"title":"Errors","sidebarTitle":"Errors","href":"/api-reference/errors"},{"title":"Rate limiting","sidebarTitle":"Rate limiting","href":"/api-reference/rate-limiting"}]},{"group":"ACCOUNT","pages":[{"title":"Get account details, owners, and subscription plan","deprecated":null,"version":null,"sidebarTitle":"Get the account","openapi":"/api-reference/openapi.yaml get /accounts/api/account","href":"/api-reference/account/get-the-account"},{"title":"Rename the account","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml patch /accounts/api/account","href":"/api-reference/account/rename-the-account"},{"title":"Get order settings and order exclusion filters","deprecated":null,"version":null,"sidebarTitle":"Get order settings","openapi":"/api-reference/openapi.yaml get /accounts/api/account/settings/order","href":"/api-reference/account/get-order-settings"},{"title":"Replace order settings and order exclusion filters","deprecated":null,"version":null,"sidebarTitle":"Replace order settings","openapi":"/api-reference/openapi.yaml put /accounts/api/account/settings/order","href":"/api-reference/account/replace-order-settings"}]},{"group":"CATALOG","pages":[{"title":"List available measures","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /db-mgmt/api/measures","href":"/api-reference/catalog/list-available-measures"},{"title":"List filter fields for analytics queries","deprecated":null,"version":null,"sidebarTitle":"List filter fields","openapi":"/api-reference/openapi.yaml get /db-mgmt/api/filters","href":"/api-reference/catalog/list-filter-fields"}]},{"group":"ANALYTICS","pages":[{"title":"Run an analytics query with measures and dimensions","deprecated":null,"version":null,"sidebarTitle":"Run an analytics query","openapi":"/api-reference/openapi.yaml post /db-mgmt/api/query","href":"/api-reference/analytics/run-an-analytics-query"},{"title":"Run an attribution query by UTM source, campaign, or ad","deprecated":null,"version":null,"sidebarTitle":"Run an attribution query","openapi":"/api-reference/openapi.yaml post /db-mgmt/api/query-attribution","href":"/api-reference/analytics/run-an-attribution-query"},{"title":"Run a cohort analysis for customer LTV and retention","deprecated":null,"version":null,"sidebarTitle":"Run a cohort analysis","openapi":"/api-reference/openapi.yaml post /db-mgmt/api/query-cohort-analysis","href":"/api-reference/analytics/run-a-cohort-analysis"},{"title":"List channel entities with optional metrics","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /db-mgmt/api/query-channel-details","href":"/api-reference/analytics/list-channel-entities-with-optional-metrics"},{"title":"List ads with daily spend and performance metrics","deprecated":null,"version":null,"sidebarTitle":"List ads with metrics","openapi":"/api-reference/openapi.yaml post /db-mgmt/api/query-ads","href":"/api-reference/analytics/list-ads-with-optional-daily-metrics"}]},{"group":"DASHBOARDS","pages":[{"title":"List dashboard views for a pixel","deprecated":null,"version":null,"sidebarTitle":"List dashboard views","openapi":"/api-reference/openapi.yaml get /accounts/api/dashboard/views","href":"/api-reference/dashboards/list-dashboard-views"},{"title":"Get a dashboard view and its widget configuration","deprecated":null,"version":null,"sidebarTitle":"Get a dashboard view","openapi":"/api-reference/openapi.yaml get /accounts/api/dashboard/views/{dashboardViewId}","href":"/api-reference/dashboards/get-a-dashboard-view"},{"title":"Create a dashboard view from a full configuration","deprecated":null,"version":null,"sidebarTitle":"Create a dashboard view","openapi":"/api-reference/openapi.yaml post /accounts/api/dashboard/views","href":"/api-reference/dashboards/create-a-dashboard-view"},{"title":"Build a dashboard from a list of measures","deprecated":null,"version":null,"sidebarTitle":"Build a dashboard from a measure list","openapi":"/api-reference/openapi.yaml post /accounts/api/dashboard/views/from-preset","href":"/api-reference/dashboards/build-a-dashboard-from-a-measure-list-preset"},{"title":"Duplicate a dashboard view","deprecated":null,"version":null,"sidebarTitle":"Duplicate a dashboard view","openapi":"/api-reference/openapi.yaml post /accounts/api/dashboard/views/{dashboardViewId}/copy","href":"/api-reference/dashboards/duplicate-a-dashboard-view"},{"title":"Update a dashboard view","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml patch /accounts/api/dashboard/views/{dashboardViewId}","href":"/api-reference/dashboards/update-a-dashboard-view"},{"title":"Delete a dashboard view","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /accounts/api/dashboard/views/{dashboardViewId}","href":"/api-reference/dashboards/delete-a-dashboard-view"}]},{"group":"COSTS","pages":[{"title":"Get cost configuration for COGS, shipping, and fees","description":"Read cost settings for product defaults, order fees, payment processing fees, shipping, variable costs, and recurring expenses, all at once or one type at a time.","deprecated":null,"version":null,"sidebarTitle":"Get cost configuration","openapi":"/api-reference/openapi.yaml get /accounts/api/costs","href":"/api-reference/costs/get-cost-configuration"},{"title":"Update the global product override","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /accounts/api/costs/global-product-override","href":"/api-reference/costs/update-the-global-product-override"},{"title":"Update shipping cost settings","description":"Switch the shipping cost attribution method. Pass `fixedRateAmount`\nwhen switching to `fixed_rate`; it is not validated as required, and\nwithout it no fixed charge applies.\n\nTriggers a per-order COGS recalculation downstream.\n\n**Required scope:** `costs:write`.\n","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /accounts/api/costs/shipping-settings","href":"/api-reference/costs/update-shipping-cost-settings"},{"title":"Add a cost line","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /accounts/api/costs/lines","href":"/api-reference/costs/add-a-cost-line"},{"title":"Update an order, payment, shipping, or recurring cost line","deprecated":null,"version":null,"sidebarTitle":"Update a cost line","openapi":"/api-reference/openapi.yaml put /accounts/api/costs/lines/{lineId}","href":"/api-reference/costs/update-a-cost-line"},{"title":"Delete a cost line","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /accounts/api/costs/lines/{lineId}","href":"/api-reference/costs/delete-a-cost-line"}]},{"group":"PRODUCTS","pages":[{"title":"Search products","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /accounts/api/products/search","href":"/api-reference/products/search-products"},{"title":"Get a product variant","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /accounts/api/products/{productId}/{variantId}/cost","href":"/api-reference/products/get-a-product-variant"},{"title":"Set a variant's handling fee","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /accounts/api/products/{productId}/{variantId}/handling-fee","href":"/api-reference/products/set-a-variants-handling-fee"},{"title":"Add a COGS line to a product variant","deprecated":null,"version":null,"sidebarTitle":"Add a COG line","openapi":"/api-reference/openapi.yaml post /accounts/api/products/{productId}/{variantId}/cogs","href":"/api-reference/products/add-a-cog-line-to-a-variant"},{"title":"Update a COGS line on a product variant","deprecated":null,"version":null,"sidebarTitle":"Update a COG line","openapi":"/api-reference/openapi.yaml put /accounts/api/products/{productId}/{variantId}/cogs/{cogId}","href":"/api-reference/products/update-a-cog-line"},{"title":"Delete a COGS line from a product variant","deprecated":null,"version":null,"sidebarTitle":"Delete a COG line","openapi":"/api-reference/openapi.yaml delete /accounts/api/products/{productId}/{variantId}/cogs/{cogId}","href":"/api-reference/products/delete-a-cog-line"}]},{"group":"EVENTS","pages":[{"title":"Send events via Upstack Conversion API","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /tr/api/events","href":"/api-reference/events/send-events-via-upstack-conversion-api"}]}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/cli/install"}]}]},"basePath":"","title":"Update the global product override - Upstack Data","buildId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","deploymentId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-5FCzAcfS.js","utils-SLtAG4EZ.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-2DZi8ZMu.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-D7J3nkzE.js","snippetPresets-D0Alv0AH.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BI4qNJ2c.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BD3uyr8j.js","shallow-D8iEBr5z.js","getApiPlaygroundDisplay-CgNP4lzR.js","CodeSnippet-CX-QHuMs.js","CodeSnippets-VlXE-ZUf.js","Page-D9ithiIZ.js","getPastedJson-DYNQkZ1M.js","icon-CzacdwOi.js","MethodPill-2JVqoYKi.js","DuplicateIcon-_xVXs-U8.js","createIcon-BRHrweLo.js","DynamicMarkdown-mQG_iQiE.js","SectionHeading-DMpJzv8f.js","axios-vUo_bRtp.js","Markdown-5FGIym-8.js","clsx-D-TRO5q5.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CdrJecqK.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-CHlcWBLM.js"]}