{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Unprice Documentation","colors":{"primary":"#ab6400","light":"#ffc53d","dark":"#ffc53d"},"logo":{"light":"https://mintcdn.com/unprice/vXUWXLNyOcaxnjxH/logo/light.svg?fit=max\u0026auto=format\u0026n=vXUWXLNyOcaxnjxH\u0026q=85\u0026s=ce4a214a5ae95d854ad7e6767a821d25","dark":"https://mintcdn.com/unprice/vXUWXLNyOcaxnjxH/logo/dark.svg?fit=max\u0026auto=format\u0026n=vXUWXLNyOcaxnjxH\u0026q=85\u0026s=617e7d83cd1ffb1b6414f793eefa4683"},"favicon":"https://mintcdn.com/unprice/vXUWXLNyOcaxnjxH/favicon.svg?fit=max\u0026auto=format\u0026n=vXUWXLNyOcaxnjxH\u0026q=85\u0026s=9085d9c2380ef09b41e819234a4a858e","api":{"playground":{"display":"interactive"}},"navbar":{"links":[{"href":"mailto:seb@unprice.dev","label":"Support"},{"href":"https://unprice.dev/manifesto","label":"Manifesto"},{"href":"https://app.unprice.dev","label":"Dashboard"}]},"footer":{"socials":{"github":"https://github.com/jhonsfran1165/unprice"}},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Home","icon":"globe","href":"https://unprice.dev"},{"anchor":"Community","icon":"discord","href":"https://discord.gg/unprice"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"unprice","hasAudioNarration":false,"actualSubdomain":"unprice","customDomains":["docs.unprice.dev"],"gitSource":{"type":"github","owner":"jhonsfran","repo":"unprice","deployBranch":"main","contentDirectory":"apps/docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ad953015f9665f07164b6ac","collectionId":"d6c7c503-af20-47c7-88d4-031a1035a176","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ad953015f9665f07164b6ac"},"entitlements":{},"buildId":"6ad953015f9665f07164b6ac","clientVersion":"0.0.3971","searchFilterCounts":[{"language":"default","tag":"API Reference","count":53},{"language":"default","tag":"Endpoints","count":39},{"language":"default","tag":"SDKs","count":24},{"language":"default","tag":"TypeScript SDK","count":24},{"language":"default","tag":"Errors","count":23},{"language":"default","tag":"Guides","count":20},{"language":"default","tag":"budgets","count":10},{"language":"default","tag":"Budgets","count":7},{"language":"default","tag":"Introduction","count":6},{"language":"default","tag":"Features","count":6}]},"assistantConfig":{},"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":"editor-v7-file-tree","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":"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":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"editor-nav-generations","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":"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":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/analytics/explain-charge","slug":"/api-reference/analytics/explain-charge","pageMetadata":{"title":"explain charge","description":"Explain one invoice line using ledger metadata and rated meter facts.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/analytics/charges/explain","href":"/api-reference/analytics/explain-charge","autogeneratedByOpenApi":true},"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: \"Explain one invoice line using ledger metadata and rated meter facts.\"\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":"explain charge","description":"Explain one invoice line using ledger metadata and rated meter facts.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/analytics/charges/explain","href":"/api-reference/analytics/explain-charge","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"analytics.charges.explain","summary":"explain charge","description":"Explain one invoice line using ledger metadata and rated meter facts.","tags":["analytics"],"x-unprice":{"audience":"public","category":"analytics","docs":{"expose":true},"sdk":{"path":["analytics","charges","explain"]}},"requestBody":"8759028c-69b8-4e4b-ab1d-9a60859913e7","responses":{"200":"abda1828-3ff8-418f-ad15-547fe4c6e0b9","400":"afdf841a-2a86-4bfb-bc99-860b7e85f0cd","401":"4d3c0d40-3d61-434b-b726-e4b1274abb03","403":"b7e1bee7-9d95-4fb0-8ac9-8a3bb6e96b6c","404":"6639ec75-3d95-4163-820f-0e1475e916f7","409":"9132bbe9-1fd1-4979-b26b-2e31e795d188","412":"91c3f18a-ad76-4dd0-adc9-38bc2c656f03","413":"f32cc222-f708-4578-ba0d-96fb7090029d","429":"0d3d58c8-c2ce-4c3d-9a31-9fb1c8c55e89","500":"0dd16197-085a-4489-a5ca-b0d4fed3406e"},"method":"post","type":"path","servers":["2a1f5b6e-fcd9-4479-b8f0-d8e3524b9e6d","4f0ca25b-7a5f-420c-a0d1-fdd91868a1df","3a662e90-2597-4145-b465-c73b343b810b"],"security":["dd889c9d-c52d-49a3-b0ca-a11333122ffc"],"path":"/v1/analytics/charges/explain","baseUrlOptions":["https://api.unprice.dev","http://localhost:8787","https://preview-api.unprice.dev"],"title":"explain charge","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"description":"Explain charge request","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"invoice_id":{"type":"string","isRequired":true,"uniqueKey":"invoice_id","typeLabel":"string"},"entry_id":{"type":"string","isRequired":true,"uniqueKey":"entry_id","typeLabel":"string"},"project_id":{"type":"string","uniqueKey":"project_id","typeLabel":"string"},"limit":{"type":"integer","minimum":1,"maximum":500,"default":100,"uniqueKey":"limit","typeLabel":"integer"},"offset":{"type":"integer","minimum":0,"default":0,"uniqueKey":"offset","typeLabel":"integer"}},"required":["invoice_id","entry_id"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"invoice_id":"\u003cstring>","entry_id":"\u003cstring>","project_id":"\u003cstring>","limit":100,"offset":0}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"abda1828-3ff8-418f-ad15-547fe4c6e0b9":{"description":"Explain charge response","content":{"application/json":{"schema":{"type":"object","properties":{"invoice":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"invoice.id","typeLabel":"string"},"statement_key":{"type":"string","isRequired":true,"uniqueKey":"invoice.statement_key","typeLabel":"string"},"customer_id":{"type":"string","isRequired":true,"uniqueKey":"invoice.customer_id","typeLabel":"string"},"currency":{"type":"string","isRequired":true,"uniqueKey":"invoice.currency","typeLabel":"string"}},"required":["id","statement_key","customer_id","currency"],"isRequired":true,"uniqueKey":"invoice","typeLabel":"object"},"line":{"type":"object","properties":{"entry_id":{"type":"string","isRequired":true,"uniqueKey":"line.entry_id","typeLabel":"string"},"billing_period_id":{"type":"string","isRequired":true,"uniqueKey":"line.billing_period_id","typeLabel":"string"},"kind":{"type":"string","isRequired":true,"uniqueKey":"line.kind","typeLabel":"string"},"amount":{"type":"integer","isRequired":true,"uniqueKey":"line.amount","typeLabel":"integer"},"currency":{"type":"string","isRequired":true,"uniqueKey":"line.currency","typeLabel":"string"}},"required":["entry_id","billing_period_id","kind","amount","currency"],"isRequired":true,"uniqueKey":"line","typeLabel":"object"},"scope":{"type":"object","properties":{"project_id":{"type":"string","isRequired":true,"uniqueKey":"scope.project_id","typeLabel":"string"},"customer_id":{"type":"string","isRequired":true,"uniqueKey":"scope.customer_id","typeLabel":"string"},"feature_slug":{"type":"string","isRequired":true,"uniqueKey":"scope.feature_slug","typeLabel":"string"},"period_key":{"type":"string","isRequired":true,"uniqueKey":"scope.period_key","typeLabel":"string"},"customer_entitlement_id":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"scope.customer_entitlement_id.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"scope.customer_entitlement_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"scope.customer_entitlement_id","typeLabel":"string | null"},"feature_plan_version_id":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"scope.feature_plan_version_id.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"scope.feature_plan_version_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"scope.feature_plan_version_id","typeLabel":"string | null"}},"required":["project_id","customer_id","feature_slug","period_key","customer_entitlement_id","feature_plan_version_id"],"isRequired":true,"uniqueKey":"scope","typeLabel":"object"},"summary":{"type":"object","properties":{"event_count":{"type":"integer","isRequired":true,"uniqueKey":"summary.event_count","typeLabel":"integer"},"total_usage":{"type":"number","isRequired":true,"uniqueKey":"summary.total_usage","typeLabel":"number"},"total_amount":{"type":"integer","isRequired":true,"uniqueKey":"summary.total_amount","typeLabel":"integer"},"latest_amount_after":{"type":"integer","isRequired":true,"uniqueKey":"summary.latest_amount_after","typeLabel":"integer"},"currency":{"type":"string","isRequired":true,"uniqueKey":"summary.currency","typeLabel":"string"},"amount_scale":{"type":"integer","isRequired":true,"uniqueKey":"summary.amount_scale","typeLabel":"integer"},"first_event_at":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"summary.first_event_at.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"summary.first_event_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"summary.first_event_at","typeLabel":"integer | null"},"last_event_at":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"summary.last_event_at.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"summary.last_event_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"summary.last_event_at","typeLabel":"integer | null"},"multi_component_event_count":{"type":"integer","isRequired":true,"uniqueKey":"summary.multi_component_event_count","typeLabel":"integer"}},"required":["event_count","total_usage","total_amount","latest_amount_after","currency","amount_scale","first_event_at","last_event_at","multi_component_event_count"],"isRequired":true,"uniqueKey":"summary","typeLabel":"object"},"pricing":{"type":"object","properties":{"feature_type":{"type":"string","isRequired":true,"uniqueKey":"pricing.feature_type","typeLabel":"string"},"usage_mode":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"pricing.usage_mode.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"pricing.usage_mode.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"pricing.usage_mode","typeLabel":"string | null"},"tier_mode":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"pricing.tier_mode.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"pricing.tier_mode.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"pricing.tier_mode","typeLabel":"string | null"},"unit_of_measure":{"type":"string","isRequired":true,"uniqueKey":"pricing.unit_of_measure","typeLabel":"string"},"description":{"type":"string","isRequired":true,"uniqueKey":"pricing.description","typeLabel":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","isRequired":true,"uniqueKey":"pricing.rows.items.[INDEX].label","typeLabel":"string"},"value":{"type":"string","isRequired":true,"uniqueKey":"pricing.rows.items.[INDEX].value","typeLabel":"string"}},"required":["label","value"],"uniqueKey":"pricing.rows.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"pricing.rows","typeLabel":"object[]"}},"required":["feature_type","usage_mode","tier_mode","unit_of_measure","description","rows"],"isRequired":true,"uniqueKey":"pricing","typeLabel":"object"},"events":{"type":"array","items":{"type":"object","properties":{"event_id":{"type":"string","isRequired":true,"uniqueKey":"events.items.[INDEX].event_id","typeLabel":"string"},"idempotency_key":{"type":"string","isRequired":true,"uniqueKey":"events.items.[INDEX].idempotency_key","typeLabel":"string"},"customer_entitlement_id":{"type":"string","isRequired":true,"uniqueKey":"events.items.[INDEX].customer_entitlement_id","typeLabel":"string"},"grant_id":{"type":"string","isRequired":true,"uniqueKey":"events.items.[INDEX].grant_id","typeLabel":"string"},"feature_plan_version_id":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"events.items.[INDEX].feature_plan_version_id.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"events.items.[INDEX].feature_plan_version_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"events.items.[INDEX].feature_plan_version_id","typeLabel":"string | null"},"feature_slug":{"type":"string","isRequired":true,"uniqueKey":"events.items.[INDEX].feature_slug","typeLabel":"string"},"period_key":{"type":"string","isRequired":true,"uniqueKey":"events.items.[INDEX].period_key","typeLabel":"string"},"event_slug":{"type":"string","isRequired":true,"uniqueKey":"events.items.[INDEX].event_slug","typeLabel":"string"},"aggregation_method":{"type":"string","isRequired":true,"uniqueKey":"events.items.[INDEX].aggregation_method","typeLabel":"string"},"timestamp":{"type":"number","description":"timestamp of the ingested event","isRequired":true,"uniqueKey":"events.items.[INDEX].timestamp","typeLabel":"number"},"created_at":{"type":"number","description":"timestamp of when the fact row was created","isRequired":true,"uniqueKey":"events.items.[INDEX].created_at","typeLabel":"number"},"delta":{"type":"number","isRequired":true,"uniqueKey":"events.items.[INDEX].delta","typeLabel":"number"},"value_after":{"type":"number","isRequired":true,"uniqueKey":"events.items.[INDEX].value_after","typeLabel":"number"},"amount":{"type":"integer","isRequired":true,"uniqueKey":"events.items.[INDEX].amount","typeLabel":"integer"},"amount_after":{"type":"integer","isRequired":true,"uniqueKey":"events.items.[INDEX].amount_after","typeLabel":"integer"},"amount_scale":{"type":"number","enum":[8],"isRequired":true,"uniqueKey":"events.items.[INDEX].amount_scale","typeLabel":"enum\u003cnumber>"},"currency":{"type":"string","minLength":3,"maxLength":3,"isRequired":true,"uniqueKey":"events.items.[INDEX].currency","typeLabel":"string"},"priced_at":{"type":"integer","isRequired":true,"uniqueKey":"events.items.[INDEX].priced_at","typeLabel":"integer"},"tier_index":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"events.items.[INDEX].tier_index.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"events.items.[INDEX].tier_index.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"events.items.[INDEX].tier_index","typeLabel":"integer | null"},"tier_mode":{"oneOf":[{"type":"string","enum":["volume","graduated"],"isRequired":true,"uniqueKey":"events.items.[INDEX].tier_mode.oneOf.0","typeLabel":"enum\u003cstring>"},{"isRequired":true},{"type":"null","isRequired":true,"uniqueKey":"events.items.[INDEX].tier_mode.oneOf.2","typeLabel":"null"},{"isRequired":true},{"type":"null","isRequired":true,"uniqueKey":"events.items.[INDEX].tier_mode.oneOf.4","typeLabel":"null"}],"isRequired":true,"uniqueKey":"events.items.[INDEX].tier_mode","typeLabel":"enum\u003cstring> · null · null"},"pricing_component_count":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"events.items.[INDEX].pricing_component_count","typeLabel":"integer"},"source_type":{"type":"string","enum":["api_key","system","unknown"],"isRequired":true,"uniqueKey":"events.items.[INDEX].source_type","typeLabel":"enum\u003cstring>"},"source_id":{"type":"string","isRequired":true,"uniqueKey":"events.items.[INDEX].source_id","typeLabel":"string"}},"required":["event_id","idempotency_key","customer_entitlement_id","grant_id","feature_plan_version_id","feature_slug","period_key","event_slug","aggregation_method","timestamp","created_at","delta","value_after","amount","amount_after","amount_scale","currency","priced_at","tier_index","tier_mode","pricing_component_count","source_type","source_id"],"uniqueKey":"events.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"events","typeLabel":"object[]"},"answer":{"type":"string","isRequired":true,"uniqueKey":"answer","typeLabel":"string"},"confidence":{"type":"string","enum":["high","medium","low"],"isRequired":true,"uniqueKey":"confidence","typeLabel":"enum\u003cstring>"},"freshness":{"type":"object","properties":{"generatedAt":{"type":"integer","isRequired":true,"uniqueKey":"freshness.generatedAt","typeLabel":"integer"},"dataFrom":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"freshness.dataFrom.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"freshness.dataFrom.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"freshness.dataFrom","typeLabel":"integer | null"},"dataTo":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"freshness.dataTo.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"freshness.dataTo.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"freshness.dataTo","typeLabel":"integer | null"}},"required":["generatedAt","dataFrom","dataTo"],"isRequired":true,"uniqueKey":"freshness","typeLabel":"object"},"evidence":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["event","meter_fact","ingestion_status","ledger_line","billing_period","invoice","plan_version"],"isRequired":true,"uniqueKey":"evidence.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"id":{"type":"string","isRequired":true,"uniqueKey":"evidence.items.[INDEX].id","typeLabel":"string"},"source":{"type":"string","enum":["tinybird","r2","ledger","postgres"],"isRequired":true,"uniqueKey":"evidence.items.[INDEX].source","typeLabel":"enum\u003cstring>"},"timestamp":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"evidence.items.[INDEX].timestamp.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"evidence.items.[INDEX].timestamp.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"evidence.items.[INDEX].timestamp","typeLabel":"integer | null"}},"required":["type","id","source","timestamp"],"uniqueKey":"evidence.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"evidence","typeLabel":"object[]"},"warnings":{"type":"array","items":{"type":"string","uniqueKey":"warnings.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"warnings","typeLabel":"string[]"},"nextActions":{"type":"array","items":{"type":"string","uniqueKey":"nextActions.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"nextActions","typeLabel":"string[]"},"pagination":{"type":"object","properties":{"limit":{"type":"integer","isRequired":true,"uniqueKey":"pagination.limit","typeLabel":"integer"},"offset":{"type":"integer","isRequired":true,"uniqueKey":"pagination.offset","typeLabel":"integer"},"has_more":{"type":"boolean","isRequired":true,"uniqueKey":"pagination.has_more","typeLabel":"boolean"}},"required":["limit","offset","has_more"],"isRequired":true,"uniqueKey":"pagination","typeLabel":"object"}},"required":["invoice","line","scope","summary","pricing","events","answer","confidence","freshness","evidence","warnings","nextActions","pagination"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"invoice":{"id":"\u003cstring>","statement_key":"\u003cstring>","customer_id":"\u003cstring>","currency":"\u003cstring>"},"line":{"entry_id":"\u003cstring>","billing_period_id":"\u003cstring>","kind":"\u003cstring>","amount":123,"currency":"\u003cstring>"},"scope":{"project_id":"\u003cstring>","customer_id":"\u003cstring>","feature_slug":"\u003cstring>","period_key":"\u003cstring>","customer_entitlement_id":"\u003cstring>","feature_plan_version_id":"\u003cstring>"},"summary":{"event_count":123,"total_usage":123,"total_amount":123,"latest_amount_after":123,"currency":"\u003cstring>","amount_scale":123,"first_event_at":123,"last_event_at":123,"multi_component_event_count":123},"pricing":{"feature_type":"\u003cstring>","usage_mode":"\u003cstring>","tier_mode":"\u003cstring>","unit_of_measure":"\u003cstring>","description":"\u003cstring>","rows":[{"label":"\u003cstring>","value":"\u003cstring>"}]},"events":[{"event_id":"\u003cstring>","idempotency_key":"\u003cstring>","customer_entitlement_id":"\u003cstring>","grant_id":"\u003cstring>","feature_plan_version_id":"\u003cstring>","feature_slug":"\u003cstring>","period_key":"\u003cstring>","event_slug":"\u003cstring>","aggregation_method":"\u003cstring>","timestamp":123,"created_at":123,"delta":123,"value_after":123,"amount":123,"amount_after":123,"amount_scale":8,"currency":"\u003cstring>","priced_at":123,"tier_index":123,"tier_mode":"volume","pricing_component_count":1,"source_type":"api_key","source_id":"\u003cstring>"}],"answer":"\u003cstring>","confidence":"high","freshness":{"generatedAt":123,"dataFrom":123,"dataTo":123},"evidence":[{"type":"event","id":"\u003cstring>","source":"tinybird","timestamp":123}],"warnings":["\u003cstring>"],"nextActions":["\u003cstring>"],"pagination":{"limit":123,"offset":123,"has_more":true}}}},"exampleType":"generated"}},"exampleType":"generated"},"afdf841a-2a86-4bfb-bc99-860b7e85f0cd":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"],"description":"A machine readable error code.","example":"BAD_REQUEST","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"docs":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://docs.unprice.dev/api-reference/errors/code/BAD_REQUEST","isRequired":true,"uniqueKey":"error.docs","typeLabel":"string"},"message":{"type":"string","description":"A human readable explanation of what went wrong","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Please always include the requestId in your error report","example":"req_1234","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"oneOf":[{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["invalid_config","slug_conflict","unresolved_reference"],"description":"What kind of failure this is","example":"invalid_config","isRequired":true,"uniqueKey":"error.details.oneOf.0.kind","typeLabel":"enum\u003cstring>"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"JSON path into the submitted document","example":"config.plans[0].version.features[1].featureSlug","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].message","typeLabel":"string"}},"required":["path","message"],"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX]","typeLabel":"object"},"description":"Per-location detail, when the failure has locations","uniqueKey":"error.details.oneOf.0.issues","typeLabel":"object[]"}},"uniqueKey":"error.details.oneOf.0","typeLabel":"object"},{"type":"object","required":["kind","blocked","balance"],"properties":{"kind":{"type":"string","enum":["budget_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.kind","typeLabel":"enum\u003cstring>"},"blocked":{"type":"object","properties":{"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.limitId","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.window","typeLabel":"enum\u003cstring>"},"remaining":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remaining","typeLabel":"string"},"held":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.held","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt","typeLabel":"integer | null"},"remedy":{"type":"string","enum":["release_holds","wait_for_reset","raise_limit"],"description":"release_holds: releasing holds makes the request fit all failing limits. wait_for_reset: resetting the failing windows makes the request fit with holds unchanged. raise_limit: neither action alone is sufficient; one or more limits need a change.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remedy","typeLabel":"enum\u003cstring>"}},"required":["limitId","window","remaining","held","resetsAt","remedy"],"description":"A failing hard limit smaller than the request, or otherwise the one that resets last. Other limits can also block the request. The remedy considers all failing limits.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked","typeLabel":"object"},"balance":{"type":"object","properties":{"remaining":{"oneOf":[{"type":"string","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.0","typeLabel":"string"},{"type":"null","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining","typeLabel":"string | null"},"held":{"type":"string","description":"The sum of open holds and the unreported part of open leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.held","typeLabel":"string"},"limits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].id","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].window","typeLabel":"enum\u003cstring>"},"enforce":{"type":"string","enum":["hard","soft"],"description":"hard denies authorize and charge that would exceed the limit; soft never denies. Either kind is reported in `crossed` once usage passes it, and only a record can pass a hard limit.","example":"hard","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].enforce","typeLabel":"enum\u003cstring>"},"amount":{"type":"string","description":"The limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].amount","typeLabel":"string"},"consumed":{"type":"string","description":"Used in the current period","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].consumed","typeLabel":"string"},"held":{"type":"string","description":"Held by open holds and leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].held","typeLabel":"string"},"remaining":{"type":"string","description":"amount - consumed - held; negative for a soft limit, or a hard limit a record passed","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].remaining","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt","typeLabel":"integer | null"}},"required":["id","window","enforce","amount","consumed","held","remaining","resetsAt"],"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits","typeLabel":"object[]"},"asOf":{"type":"integer","description":"When this balance was computed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.asOf","typeLabel":"integer"}},"required":["remaining","held","limits","asOf"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.1","typeLabel":"object"},{"type":"object","required":["kind","closedAt"],"properties":{"kind":{"type":"string","enum":["budget_closed"],"isRequired":true,"uniqueKey":"error.details.oneOf.2.kind","typeLabel":"enum\u003cstring>"},"closedAt":{"type":"integer","description":"When the budget closed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.2.closedAt","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.2","typeLabel":"object"},{"type":"object","required":["kind","holdId","maximum","actual"],"properties":{"kind":{"type":"string","enum":["hold_amount_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.3.kind","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","pattern":"^h_[1-9][0-9]{0,15}$","description":"The hold, as returned by authorize","example":"h_42","isRequired":true,"uniqueKey":"error.details.oneOf.3.holdId","typeLabel":"string"},"maximum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.maximum","typeLabel":"string"},"actual":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.actual","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.3","typeLabel":"object"},{"type":"object","required":["kind","limitId","minimum","requested"],"properties":{"kind":{"type":"string","enum":["limit_below_usage"],"isRequired":true,"uniqueKey":"error.details.oneOf.4.kind","typeLabel":"enum\u003cstring>"},"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.4.limitId","typeLabel":"string"},"minimum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.minimum","typeLabel":"string"},"requested":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.requested","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.4","typeLabel":"object"},{"type":"object","required":["kind","maximum","retained"],"properties":{"kind":{"type":"string","enum":["window_capacity_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.5.kind","typeLabel":"enum\u003cstring>"},"maximum":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.maximum","typeLabel":"integer"},"retained":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.retained","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.5","typeLabel":"object"},{"type":"object","required":["kind","rejection"],"properties":{"kind":{"type":"string","enum":["release_rejected"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.kind","typeLabel":"enum\u003cstring>"},"rejection":{"oneOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["BUDGET_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0.code","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_RETIRED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2","typeLabel":"object"},{"type":"object","required":["code","holdId","status"],"properties":{"code":{"type":"string","enum":["HOLD_CLOSED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.holdId","typeLabel":"string"},"status":{"type":"string","enum":["settled","released","expired"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.status","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.6","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","docs","message","requestId"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"BAD_REQUEST","docs":"https://docs.unprice.dev/api-reference/errors/code/BAD_REQUEST","message":"\u003cstring>","requestId":"req_1234","details":{"kind":"invalid_config","issues":[{"path":"config.plans[0].version.features[1].featureSlug","message":"\u003cstring>"}]}}}}},"exampleType":"generated"}},"exampleType":"generated"},"4d3c0d40-3d61-434b-b726-e4b1274abb03":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"],"description":"A machine readable error code.","example":"UNAUTHORIZED","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"docs":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://docs.unprice.dev/api-reference/errors/code/UNAUTHORIZED","isRequired":true,"uniqueKey":"error.docs","typeLabel":"string"},"message":{"type":"string","description":"A human readable explanation of what went wrong","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Please always include the requestId in your error report","example":"req_1234","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"oneOf":[{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["invalid_config","slug_conflict","unresolved_reference"],"description":"What kind of failure this is","example":"invalid_config","isRequired":true,"uniqueKey":"error.details.oneOf.0.kind","typeLabel":"enum\u003cstring>"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"JSON path into the submitted document","example":"config.plans[0].version.features[1].featureSlug","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].message","typeLabel":"string"}},"required":["path","message"],"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX]","typeLabel":"object"},"description":"Per-location detail, when the failure has locations","uniqueKey":"error.details.oneOf.0.issues","typeLabel":"object[]"}},"uniqueKey":"error.details.oneOf.0","typeLabel":"object"},{"type":"object","required":["kind","blocked","balance"],"properties":{"kind":{"type":"string","enum":["budget_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.kind","typeLabel":"enum\u003cstring>"},"blocked":{"type":"object","properties":{"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.limitId","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.window","typeLabel":"enum\u003cstring>"},"remaining":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remaining","typeLabel":"string"},"held":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.held","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt","typeLabel":"integer | null"},"remedy":{"type":"string","enum":["release_holds","wait_for_reset","raise_limit"],"description":"release_holds: releasing holds makes the request fit all failing limits. wait_for_reset: resetting the failing windows makes the request fit with holds unchanged. raise_limit: neither action alone is sufficient; one or more limits need a change.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remedy","typeLabel":"enum\u003cstring>"}},"required":["limitId","window","remaining","held","resetsAt","remedy"],"description":"A failing hard limit smaller than the request, or otherwise the one that resets last. Other limits can also block the request. The remedy considers all failing limits.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked","typeLabel":"object"},"balance":{"type":"object","properties":{"remaining":{"oneOf":[{"type":"string","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.0","typeLabel":"string"},{"type":"null","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining","typeLabel":"string | null"},"held":{"type":"string","description":"The sum of open holds and the unreported part of open leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.held","typeLabel":"string"},"limits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].id","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].window","typeLabel":"enum\u003cstring>"},"enforce":{"type":"string","enum":["hard","soft"],"description":"hard denies authorize and charge that would exceed the limit; soft never denies. Either kind is reported in `crossed` once usage passes it, and only a record can pass a hard limit.","example":"hard","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].enforce","typeLabel":"enum\u003cstring>"},"amount":{"type":"string","description":"The limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].amount","typeLabel":"string"},"consumed":{"type":"string","description":"Used in the current period","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].consumed","typeLabel":"string"},"held":{"type":"string","description":"Held by open holds and leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].held","typeLabel":"string"},"remaining":{"type":"string","description":"amount - consumed - held; negative for a soft limit, or a hard limit a record passed","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].remaining","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt","typeLabel":"integer | null"}},"required":["id","window","enforce","amount","consumed","held","remaining","resetsAt"],"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits","typeLabel":"object[]"},"asOf":{"type":"integer","description":"When this balance was computed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.asOf","typeLabel":"integer"}},"required":["remaining","held","limits","asOf"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.1","typeLabel":"object"},{"type":"object","required":["kind","closedAt"],"properties":{"kind":{"type":"string","enum":["budget_closed"],"isRequired":true,"uniqueKey":"error.details.oneOf.2.kind","typeLabel":"enum\u003cstring>"},"closedAt":{"type":"integer","description":"When the budget closed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.2.closedAt","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.2","typeLabel":"object"},{"type":"object","required":["kind","holdId","maximum","actual"],"properties":{"kind":{"type":"string","enum":["hold_amount_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.3.kind","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","pattern":"^h_[1-9][0-9]{0,15}$","description":"The hold, as returned by authorize","example":"h_42","isRequired":true,"uniqueKey":"error.details.oneOf.3.holdId","typeLabel":"string"},"maximum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.maximum","typeLabel":"string"},"actual":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.actual","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.3","typeLabel":"object"},{"type":"object","required":["kind","limitId","minimum","requested"],"properties":{"kind":{"type":"string","enum":["limit_below_usage"],"isRequired":true,"uniqueKey":"error.details.oneOf.4.kind","typeLabel":"enum\u003cstring>"},"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.4.limitId","typeLabel":"string"},"minimum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.minimum","typeLabel":"string"},"requested":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.requested","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.4","typeLabel":"object"},{"type":"object","required":["kind","maximum","retained"],"properties":{"kind":{"type":"string","enum":["window_capacity_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.5.kind","typeLabel":"enum\u003cstring>"},"maximum":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.maximum","typeLabel":"integer"},"retained":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.retained","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.5","typeLabel":"object"},{"type":"object","required":["kind","rejection"],"properties":{"kind":{"type":"string","enum":["release_rejected"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.kind","typeLabel":"enum\u003cstring>"},"rejection":{"oneOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["BUDGET_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0.code","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_RETIRED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2","typeLabel":"object"},{"type":"object","required":["code","holdId","status"],"properties":{"code":{"type":"string","enum":["HOLD_CLOSED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.holdId","typeLabel":"string"},"status":{"type":"string","enum":["settled","released","expired"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.status","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.6","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","docs","message","requestId"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"UNAUTHORIZED","docs":"https://docs.unprice.dev/api-reference/errors/code/UNAUTHORIZED","message":"\u003cstring>","requestId":"req_1234","details":{"kind":"invalid_config","issues":[{"path":"config.plans[0].version.features[1].featureSlug","message":"\u003cstring>"}]}}}}},"exampleType":"generated"}},"exampleType":"generated"},"b7e1bee7-9d95-4fb0-8ac9-8a3bb6e96b6c":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"],"description":"A machine readable error code.","example":"FORBIDDEN","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"docs":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://docs.unprice.dev/api-reference/errors/code/FORBIDDEN","isRequired":true,"uniqueKey":"error.docs","typeLabel":"string"},"message":{"type":"string","description":"A human readable explanation of what went wrong","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Please always include the requestId in your error report","example":"req_1234","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"oneOf":[{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["invalid_config","slug_conflict","unresolved_reference"],"description":"What kind of failure this is","example":"invalid_config","isRequired":true,"uniqueKey":"error.details.oneOf.0.kind","typeLabel":"enum\u003cstring>"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"JSON path into the submitted document","example":"config.plans[0].version.features[1].featureSlug","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].message","typeLabel":"string"}},"required":["path","message"],"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX]","typeLabel":"object"},"description":"Per-location detail, when the failure has locations","uniqueKey":"error.details.oneOf.0.issues","typeLabel":"object[]"}},"uniqueKey":"error.details.oneOf.0","typeLabel":"object"},{"type":"object","required":["kind","blocked","balance"],"properties":{"kind":{"type":"string","enum":["budget_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.kind","typeLabel":"enum\u003cstring>"},"blocked":{"type":"object","properties":{"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.limitId","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.window","typeLabel":"enum\u003cstring>"},"remaining":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remaining","typeLabel":"string"},"held":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.held","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt","typeLabel":"integer | null"},"remedy":{"type":"string","enum":["release_holds","wait_for_reset","raise_limit"],"description":"release_holds: releasing holds makes the request fit all failing limits. wait_for_reset: resetting the failing windows makes the request fit with holds unchanged. raise_limit: neither action alone is sufficient; one or more limits need a change.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remedy","typeLabel":"enum\u003cstring>"}},"required":["limitId","window","remaining","held","resetsAt","remedy"],"description":"A failing hard limit smaller than the request, or otherwise the one that resets last. Other limits can also block the request. The remedy considers all failing limits.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked","typeLabel":"object"},"balance":{"type":"object","properties":{"remaining":{"oneOf":[{"type":"string","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.0","typeLabel":"string"},{"type":"null","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining","typeLabel":"string | null"},"held":{"type":"string","description":"The sum of open holds and the unreported part of open leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.held","typeLabel":"string"},"limits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].id","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].window","typeLabel":"enum\u003cstring>"},"enforce":{"type":"string","enum":["hard","soft"],"description":"hard denies authorize and charge that would exceed the limit; soft never denies. Either kind is reported in `crossed` once usage passes it, and only a record can pass a hard limit.","example":"hard","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].enforce","typeLabel":"enum\u003cstring>"},"amount":{"type":"string","description":"The limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].amount","typeLabel":"string"},"consumed":{"type":"string","description":"Used in the current period","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].consumed","typeLabel":"string"},"held":{"type":"string","description":"Held by open holds and leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].held","typeLabel":"string"},"remaining":{"type":"string","description":"amount - consumed - held; negative for a soft limit, or a hard limit a record passed","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].remaining","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt","typeLabel":"integer | null"}},"required":["id","window","enforce","amount","consumed","held","remaining","resetsAt"],"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits","typeLabel":"object[]"},"asOf":{"type":"integer","description":"When this balance was computed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.asOf","typeLabel":"integer"}},"required":["remaining","held","limits","asOf"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.1","typeLabel":"object"},{"type":"object","required":["kind","closedAt"],"properties":{"kind":{"type":"string","enum":["budget_closed"],"isRequired":true,"uniqueKey":"error.details.oneOf.2.kind","typeLabel":"enum\u003cstring>"},"closedAt":{"type":"integer","description":"When the budget closed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.2.closedAt","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.2","typeLabel":"object"},{"type":"object","required":["kind","holdId","maximum","actual"],"properties":{"kind":{"type":"string","enum":["hold_amount_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.3.kind","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","pattern":"^h_[1-9][0-9]{0,15}$","description":"The hold, as returned by authorize","example":"h_42","isRequired":true,"uniqueKey":"error.details.oneOf.3.holdId","typeLabel":"string"},"maximum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.maximum","typeLabel":"string"},"actual":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.actual","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.3","typeLabel":"object"},{"type":"object","required":["kind","limitId","minimum","requested"],"properties":{"kind":{"type":"string","enum":["limit_below_usage"],"isRequired":true,"uniqueKey":"error.details.oneOf.4.kind","typeLabel":"enum\u003cstring>"},"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.4.limitId","typeLabel":"string"},"minimum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.minimum","typeLabel":"string"},"requested":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.requested","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.4","typeLabel":"object"},{"type":"object","required":["kind","maximum","retained"],"properties":{"kind":{"type":"string","enum":["window_capacity_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.5.kind","typeLabel":"enum\u003cstring>"},"maximum":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.maximum","typeLabel":"integer"},"retained":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.retained","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.5","typeLabel":"object"},{"type":"object","required":["kind","rejection"],"properties":{"kind":{"type":"string","enum":["release_rejected"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.kind","typeLabel":"enum\u003cstring>"},"rejection":{"oneOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["BUDGET_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0.code","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_RETIRED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2","typeLabel":"object"},{"type":"object","required":["code","holdId","status"],"properties":{"code":{"type":"string","enum":["HOLD_CLOSED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.holdId","typeLabel":"string"},"status":{"type":"string","enum":["settled","released","expired"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.status","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.6","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","docs","message","requestId"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"FORBIDDEN","docs":"https://docs.unprice.dev/api-reference/errors/code/FORBIDDEN","message":"\u003cstring>","requestId":"req_1234","details":{"kind":"invalid_config","issues":[{"path":"config.plans[0].version.features[1].featureSlug","message":"\u003cstring>"}]}}}}},"exampleType":"generated"}},"exampleType":"generated"},"6639ec75-3d95-4163-820f-0e1475e916f7":{"description":"The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"],"description":"A machine readable error code.","example":"NOT_FOUND","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"docs":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://docs.unprice.dev/api-reference/errors/code/NOT_FOUND","isRequired":true,"uniqueKey":"error.docs","typeLabel":"string"},"message":{"type":"string","description":"A human readable explanation of what went wrong","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Please always include the requestId in your error report","example":"req_1234","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"oneOf":[{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["invalid_config","slug_conflict","unresolved_reference"],"description":"What kind of failure this is","example":"invalid_config","isRequired":true,"uniqueKey":"error.details.oneOf.0.kind","typeLabel":"enum\u003cstring>"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"JSON path into the submitted document","example":"config.plans[0].version.features[1].featureSlug","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].message","typeLabel":"string"}},"required":["path","message"],"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX]","typeLabel":"object"},"description":"Per-location detail, when the failure has locations","uniqueKey":"error.details.oneOf.0.issues","typeLabel":"object[]"}},"uniqueKey":"error.details.oneOf.0","typeLabel":"object"},{"type":"object","required":["kind","blocked","balance"],"properties":{"kind":{"type":"string","enum":["budget_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.kind","typeLabel":"enum\u003cstring>"},"blocked":{"type":"object","properties":{"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.limitId","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.window","typeLabel":"enum\u003cstring>"},"remaining":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remaining","typeLabel":"string"},"held":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.held","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt","typeLabel":"integer | null"},"remedy":{"type":"string","enum":["release_holds","wait_for_reset","raise_limit"],"description":"release_holds: releasing holds makes the request fit all failing limits. wait_for_reset: resetting the failing windows makes the request fit with holds unchanged. raise_limit: neither action alone is sufficient; one or more limits need a change.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remedy","typeLabel":"enum\u003cstring>"}},"required":["limitId","window","remaining","held","resetsAt","remedy"],"description":"A failing hard limit smaller than the request, or otherwise the one that resets last. Other limits can also block the request. The remedy considers all failing limits.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked","typeLabel":"object"},"balance":{"type":"object","properties":{"remaining":{"oneOf":[{"type":"string","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.0","typeLabel":"string"},{"type":"null","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining","typeLabel":"string | null"},"held":{"type":"string","description":"The sum of open holds and the unreported part of open leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.held","typeLabel":"string"},"limits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].id","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].window","typeLabel":"enum\u003cstring>"},"enforce":{"type":"string","enum":["hard","soft"],"description":"hard denies authorize and charge that would exceed the limit; soft never denies. Either kind is reported in `crossed` once usage passes it, and only a record can pass a hard limit.","example":"hard","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].enforce","typeLabel":"enum\u003cstring>"},"amount":{"type":"string","description":"The limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].amount","typeLabel":"string"},"consumed":{"type":"string","description":"Used in the current period","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].consumed","typeLabel":"string"},"held":{"type":"string","description":"Held by open holds and leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].held","typeLabel":"string"},"remaining":{"type":"string","description":"amount - consumed - held; negative for a soft limit, or a hard limit a record passed","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].remaining","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt","typeLabel":"integer | null"}},"required":["id","window","enforce","amount","consumed","held","remaining","resetsAt"],"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits","typeLabel":"object[]"},"asOf":{"type":"integer","description":"When this balance was computed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.asOf","typeLabel":"integer"}},"required":["remaining","held","limits","asOf"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.1","typeLabel":"object"},{"type":"object","required":["kind","closedAt"],"properties":{"kind":{"type":"string","enum":["budget_closed"],"isRequired":true,"uniqueKey":"error.details.oneOf.2.kind","typeLabel":"enum\u003cstring>"},"closedAt":{"type":"integer","description":"When the budget closed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.2.closedAt","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.2","typeLabel":"object"},{"type":"object","required":["kind","holdId","maximum","actual"],"properties":{"kind":{"type":"string","enum":["hold_amount_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.3.kind","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","pattern":"^h_[1-9][0-9]{0,15}$","description":"The hold, as returned by authorize","example":"h_42","isRequired":true,"uniqueKey":"error.details.oneOf.3.holdId","typeLabel":"string"},"maximum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.maximum","typeLabel":"string"},"actual":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.actual","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.3","typeLabel":"object"},{"type":"object","required":["kind","limitId","minimum","requested"],"properties":{"kind":{"type":"string","enum":["limit_below_usage"],"isRequired":true,"uniqueKey":"error.details.oneOf.4.kind","typeLabel":"enum\u003cstring>"},"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.4.limitId","typeLabel":"string"},"minimum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.minimum","typeLabel":"string"},"requested":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.requested","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.4","typeLabel":"object"},{"type":"object","required":["kind","maximum","retained"],"properties":{"kind":{"type":"string","enum":["window_capacity_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.5.kind","typeLabel":"enum\u003cstring>"},"maximum":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.maximum","typeLabel":"integer"},"retained":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.retained","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.5","typeLabel":"object"},{"type":"object","required":["kind","rejection"],"properties":{"kind":{"type":"string","enum":["release_rejected"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.kind","typeLabel":"enum\u003cstring>"},"rejection":{"oneOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["BUDGET_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0.code","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_RETIRED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2","typeLabel":"object"},{"type":"object","required":["code","holdId","status"],"properties":{"code":{"type":"string","enum":["HOLD_CLOSED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.holdId","typeLabel":"string"},"status":{"type":"string","enum":["settled","released","expired"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.status","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.6","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","docs","message","requestId"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"NOT_FOUND","docs":"https://docs.unprice.dev/api-reference/errors/code/NOT_FOUND","message":"\u003cstring>","requestId":"req_1234","details":{"kind":"invalid_config","issues":[{"path":"config.plans[0].version.features[1].featureSlug","message":"\u003cstring>"}]}}}}},"exampleType":"generated"}},"exampleType":"generated"},"9132bbe9-1fd1-4979-b26b-2e31e795d188":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["CONFLICT"],"description":"A machine readable error code.","example":"CONFLICT","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"docs":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://docs.unprice.dev/api-reference/errors/code/CONFLICT","isRequired":true,"uniqueKey":"error.docs","typeLabel":"string"},"message":{"type":"string","description":"A human readable explanation of what went wrong","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Please always include the requestId in your error report","example":"req_1234","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"oneOf":[{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["invalid_config","slug_conflict","unresolved_reference"],"description":"What kind of failure this is","example":"invalid_config","isRequired":true,"uniqueKey":"error.details.oneOf.0.kind","typeLabel":"enum\u003cstring>"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"JSON path into the submitted document","example":"config.plans[0].version.features[1].featureSlug","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].message","typeLabel":"string"}},"required":["path","message"],"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX]","typeLabel":"object"},"description":"Per-location detail, when the failure has locations","uniqueKey":"error.details.oneOf.0.issues","typeLabel":"object[]"}},"uniqueKey":"error.details.oneOf.0","typeLabel":"object"},{"type":"object","required":["kind","blocked","balance"],"properties":{"kind":{"type":"string","enum":["budget_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.kind","typeLabel":"enum\u003cstring>"},"blocked":{"type":"object","properties":{"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.limitId","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.window","typeLabel":"enum\u003cstring>"},"remaining":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remaining","typeLabel":"string"},"held":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.held","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt","typeLabel":"integer | null"},"remedy":{"type":"string","enum":["release_holds","wait_for_reset","raise_limit"],"description":"release_holds: releasing holds makes the request fit all failing limits. wait_for_reset: resetting the failing windows makes the request fit with holds unchanged. raise_limit: neither action alone is sufficient; one or more limits need a change.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remedy","typeLabel":"enum\u003cstring>"}},"required":["limitId","window","remaining","held","resetsAt","remedy"],"description":"A failing hard limit smaller than the request, or otherwise the one that resets last. Other limits can also block the request. The remedy considers all failing limits.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked","typeLabel":"object"},"balance":{"type":"object","properties":{"remaining":{"oneOf":[{"type":"string","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.0","typeLabel":"string"},{"type":"null","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining","typeLabel":"string | null"},"held":{"type":"string","description":"The sum of open holds and the unreported part of open leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.held","typeLabel":"string"},"limits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].id","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].window","typeLabel":"enum\u003cstring>"},"enforce":{"type":"string","enum":["hard","soft"],"description":"hard denies authorize and charge that would exceed the limit; soft never denies. Either kind is reported in `crossed` once usage passes it, and only a record can pass a hard limit.","example":"hard","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].enforce","typeLabel":"enum\u003cstring>"},"amount":{"type":"string","description":"The limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].amount","typeLabel":"string"},"consumed":{"type":"string","description":"Used in the current period","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].consumed","typeLabel":"string"},"held":{"type":"string","description":"Held by open holds and leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].held","typeLabel":"string"},"remaining":{"type":"string","description":"amount - consumed - held; negative for a soft limit, or a hard limit a record passed","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].remaining","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt","typeLabel":"integer | null"}},"required":["id","window","enforce","amount","consumed","held","remaining","resetsAt"],"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits","typeLabel":"object[]"},"asOf":{"type":"integer","description":"When this balance was computed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.asOf","typeLabel":"integer"}},"required":["remaining","held","limits","asOf"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.1","typeLabel":"object"},{"type":"object","required":["kind","closedAt"],"properties":{"kind":{"type":"string","enum":["budget_closed"],"isRequired":true,"uniqueKey":"error.details.oneOf.2.kind","typeLabel":"enum\u003cstring>"},"closedAt":{"type":"integer","description":"When the budget closed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.2.closedAt","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.2","typeLabel":"object"},{"type":"object","required":["kind","holdId","maximum","actual"],"properties":{"kind":{"type":"string","enum":["hold_amount_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.3.kind","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","pattern":"^h_[1-9][0-9]{0,15}$","description":"The hold, as returned by authorize","example":"h_42","isRequired":true,"uniqueKey":"error.details.oneOf.3.holdId","typeLabel":"string"},"maximum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.maximum","typeLabel":"string"},"actual":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.actual","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.3","typeLabel":"object"},{"type":"object","required":["kind","limitId","minimum","requested"],"properties":{"kind":{"type":"string","enum":["limit_below_usage"],"isRequired":true,"uniqueKey":"error.details.oneOf.4.kind","typeLabel":"enum\u003cstring>"},"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.4.limitId","typeLabel":"string"},"minimum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.minimum","typeLabel":"string"},"requested":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.requested","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.4","typeLabel":"object"},{"type":"object","required":["kind","maximum","retained"],"properties":{"kind":{"type":"string","enum":["window_capacity_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.5.kind","typeLabel":"enum\u003cstring>"},"maximum":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.maximum","typeLabel":"integer"},"retained":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.retained","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.5","typeLabel":"object"},{"type":"object","required":["kind","rejection"],"properties":{"kind":{"type":"string","enum":["release_rejected"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.kind","typeLabel":"enum\u003cstring>"},"rejection":{"oneOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["BUDGET_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0.code","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_RETIRED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2","typeLabel":"object"},{"type":"object","required":["code","holdId","status"],"properties":{"code":{"type":"string","enum":["HOLD_CLOSED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.holdId","typeLabel":"string"},"status":{"type":"string","enum":["settled","released","expired"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.status","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.6","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","docs","message","requestId"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"CONFLICT","docs":"https://docs.unprice.dev/api-reference/errors/code/CONFLICT","message":"\u003cstring>","requestId":"req_1234","details":{"kind":"invalid_config","issues":[{"path":"config.plans[0].version.features[1].featureSlug","message":"\u003cstring>"}]}}}}},"exampleType":"generated"}},"exampleType":"generated"},"91c3f18a-ad76-4dd0-adc9-38bc2c656f03":{"description":"The requested operation cannot be completed because certain conditions were not met. This typically occurs when a required resource state or version check fails.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["PRECONDITION_FAILED"],"description":"A machine readable error code.","example":"PRECONDITION_FAILED","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"docs":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://docs.unprice.dev/api-reference/errors/code/PRECONDITION_FAILED","isRequired":true,"uniqueKey":"error.docs","typeLabel":"string"},"message":{"type":"string","description":"A human readable explanation of what went wrong","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Please always include the requestId in your error report","example":"req_1234","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"oneOf":[{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["invalid_config","slug_conflict","unresolved_reference"],"description":"What kind of failure this is","example":"invalid_config","isRequired":true,"uniqueKey":"error.details.oneOf.0.kind","typeLabel":"enum\u003cstring>"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"JSON path into the submitted document","example":"config.plans[0].version.features[1].featureSlug","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].message","typeLabel":"string"}},"required":["path","message"],"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX]","typeLabel":"object"},"description":"Per-location detail, when the failure has locations","uniqueKey":"error.details.oneOf.0.issues","typeLabel":"object[]"}},"uniqueKey":"error.details.oneOf.0","typeLabel":"object"},{"type":"object","required":["kind","blocked","balance"],"properties":{"kind":{"type":"string","enum":["budget_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.kind","typeLabel":"enum\u003cstring>"},"blocked":{"type":"object","properties":{"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.limitId","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.window","typeLabel":"enum\u003cstring>"},"remaining":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remaining","typeLabel":"string"},"held":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.held","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt","typeLabel":"integer | null"},"remedy":{"type":"string","enum":["release_holds","wait_for_reset","raise_limit"],"description":"release_holds: releasing holds makes the request fit all failing limits. wait_for_reset: resetting the failing windows makes the request fit with holds unchanged. raise_limit: neither action alone is sufficient; one or more limits need a change.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remedy","typeLabel":"enum\u003cstring>"}},"required":["limitId","window","remaining","held","resetsAt","remedy"],"description":"A failing hard limit smaller than the request, or otherwise the one that resets last. Other limits can also block the request. The remedy considers all failing limits.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked","typeLabel":"object"},"balance":{"type":"object","properties":{"remaining":{"oneOf":[{"type":"string","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.0","typeLabel":"string"},{"type":"null","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining","typeLabel":"string | null"},"held":{"type":"string","description":"The sum of open holds and the unreported part of open leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.held","typeLabel":"string"},"limits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].id","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].window","typeLabel":"enum\u003cstring>"},"enforce":{"type":"string","enum":["hard","soft"],"description":"hard denies authorize and charge that would exceed the limit; soft never denies. Either kind is reported in `crossed` once usage passes it, and only a record can pass a hard limit.","example":"hard","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].enforce","typeLabel":"enum\u003cstring>"},"amount":{"type":"string","description":"The limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].amount","typeLabel":"string"},"consumed":{"type":"string","description":"Used in the current period","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].consumed","typeLabel":"string"},"held":{"type":"string","description":"Held by open holds and leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].held","typeLabel":"string"},"remaining":{"type":"string","description":"amount - consumed - held; negative for a soft limit, or a hard limit a record passed","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].remaining","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt","typeLabel":"integer | null"}},"required":["id","window","enforce","amount","consumed","held","remaining","resetsAt"],"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits","typeLabel":"object[]"},"asOf":{"type":"integer","description":"When this balance was computed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.asOf","typeLabel":"integer"}},"required":["remaining","held","limits","asOf"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.1","typeLabel":"object"},{"type":"object","required":["kind","closedAt"],"properties":{"kind":{"type":"string","enum":["budget_closed"],"isRequired":true,"uniqueKey":"error.details.oneOf.2.kind","typeLabel":"enum\u003cstring>"},"closedAt":{"type":"integer","description":"When the budget closed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.2.closedAt","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.2","typeLabel":"object"},{"type":"object","required":["kind","holdId","maximum","actual"],"properties":{"kind":{"type":"string","enum":["hold_amount_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.3.kind","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","pattern":"^h_[1-9][0-9]{0,15}$","description":"The hold, as returned by authorize","example":"h_42","isRequired":true,"uniqueKey":"error.details.oneOf.3.holdId","typeLabel":"string"},"maximum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.maximum","typeLabel":"string"},"actual":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.actual","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.3","typeLabel":"object"},{"type":"object","required":["kind","limitId","minimum","requested"],"properties":{"kind":{"type":"string","enum":["limit_below_usage"],"isRequired":true,"uniqueKey":"error.details.oneOf.4.kind","typeLabel":"enum\u003cstring>"},"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.4.limitId","typeLabel":"string"},"minimum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.minimum","typeLabel":"string"},"requested":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.requested","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.4","typeLabel":"object"},{"type":"object","required":["kind","maximum","retained"],"properties":{"kind":{"type":"string","enum":["window_capacity_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.5.kind","typeLabel":"enum\u003cstring>"},"maximum":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.maximum","typeLabel":"integer"},"retained":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.retained","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.5","typeLabel":"object"},{"type":"object","required":["kind","rejection"],"properties":{"kind":{"type":"string","enum":["release_rejected"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.kind","typeLabel":"enum\u003cstring>"},"rejection":{"oneOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["BUDGET_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0.code","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_RETIRED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2","typeLabel":"object"},{"type":"object","required":["code","holdId","status"],"properties":{"code":{"type":"string","enum":["HOLD_CLOSED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.holdId","typeLabel":"string"},"status":{"type":"string","enum":["settled","released","expired"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.status","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.6","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","docs","message","requestId"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"PRECONDITION_FAILED","docs":"https://docs.unprice.dev/api-reference/errors/code/PRECONDITION_FAILED","message":"\u003cstring>","requestId":"req_1234","details":{"kind":"invalid_config","issues":[{"path":"config.plans[0].version.features[1].featureSlug","message":"\u003cstring>"}]}}}}},"exampleType":"generated"}},"exampleType":"generated"},"f32cc222-f708-4578-ba0d-96fb7090029d":{"description":"The request payload is larger than the server is willing to process.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["PAYLOAD_TOO_LARGE"],"description":"A machine readable error code.","example":"PAYLOAD_TOO_LARGE","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"docs":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://docs.unprice.dev/api-reference/errors/code/PAYLOAD_TOO_LARGE","isRequired":true,"uniqueKey":"error.docs","typeLabel":"string"},"message":{"type":"string","description":"A human readable explanation of what went wrong","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Please always include the requestId in your error report","example":"req_1234","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"oneOf":[{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["invalid_config","slug_conflict","unresolved_reference"],"description":"What kind of failure this is","example":"invalid_config","isRequired":true,"uniqueKey":"error.details.oneOf.0.kind","typeLabel":"enum\u003cstring>"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"JSON path into the submitted document","example":"config.plans[0].version.features[1].featureSlug","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].message","typeLabel":"string"}},"required":["path","message"],"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX]","typeLabel":"object"},"description":"Per-location detail, when the failure has locations","uniqueKey":"error.details.oneOf.0.issues","typeLabel":"object[]"}},"uniqueKey":"error.details.oneOf.0","typeLabel":"object"},{"type":"object","required":["kind","blocked","balance"],"properties":{"kind":{"type":"string","enum":["budget_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.kind","typeLabel":"enum\u003cstring>"},"blocked":{"type":"object","properties":{"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.limitId","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.window","typeLabel":"enum\u003cstring>"},"remaining":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remaining","typeLabel":"string"},"held":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.held","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt","typeLabel":"integer | null"},"remedy":{"type":"string","enum":["release_holds","wait_for_reset","raise_limit"],"description":"release_holds: releasing holds makes the request fit all failing limits. wait_for_reset: resetting the failing windows makes the request fit with holds unchanged. raise_limit: neither action alone is sufficient; one or more limits need a change.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remedy","typeLabel":"enum\u003cstring>"}},"required":["limitId","window","remaining","held","resetsAt","remedy"],"description":"A failing hard limit smaller than the request, or otherwise the one that resets last. Other limits can also block the request. The remedy considers all failing limits.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked","typeLabel":"object"},"balance":{"type":"object","properties":{"remaining":{"oneOf":[{"type":"string","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.0","typeLabel":"string"},{"type":"null","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining","typeLabel":"string | null"},"held":{"type":"string","description":"The sum of open holds and the unreported part of open leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.held","typeLabel":"string"},"limits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].id","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].window","typeLabel":"enum\u003cstring>"},"enforce":{"type":"string","enum":["hard","soft"],"description":"hard denies authorize and charge that would exceed the limit; soft never denies. Either kind is reported in `crossed` once usage passes it, and only a record can pass a hard limit.","example":"hard","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].enforce","typeLabel":"enum\u003cstring>"},"amount":{"type":"string","description":"The limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].amount","typeLabel":"string"},"consumed":{"type":"string","description":"Used in the current period","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].consumed","typeLabel":"string"},"held":{"type":"string","description":"Held by open holds and leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].held","typeLabel":"string"},"remaining":{"type":"string","description":"amount - consumed - held; negative for a soft limit, or a hard limit a record passed","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].remaining","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt","typeLabel":"integer | null"}},"required":["id","window","enforce","amount","consumed","held","remaining","resetsAt"],"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits","typeLabel":"object[]"},"asOf":{"type":"integer","description":"When this balance was computed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.asOf","typeLabel":"integer"}},"required":["remaining","held","limits","asOf"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.1","typeLabel":"object"},{"type":"object","required":["kind","closedAt"],"properties":{"kind":{"type":"string","enum":["budget_closed"],"isRequired":true,"uniqueKey":"error.details.oneOf.2.kind","typeLabel":"enum\u003cstring>"},"closedAt":{"type":"integer","description":"When the budget closed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.2.closedAt","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.2","typeLabel":"object"},{"type":"object","required":["kind","holdId","maximum","actual"],"properties":{"kind":{"type":"string","enum":["hold_amount_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.3.kind","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","pattern":"^h_[1-9][0-9]{0,15}$","description":"The hold, as returned by authorize","example":"h_42","isRequired":true,"uniqueKey":"error.details.oneOf.3.holdId","typeLabel":"string"},"maximum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.maximum","typeLabel":"string"},"actual":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.actual","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.3","typeLabel":"object"},{"type":"object","required":["kind","limitId","minimum","requested"],"properties":{"kind":{"type":"string","enum":["limit_below_usage"],"isRequired":true,"uniqueKey":"error.details.oneOf.4.kind","typeLabel":"enum\u003cstring>"},"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.4.limitId","typeLabel":"string"},"minimum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.minimum","typeLabel":"string"},"requested":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.requested","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.4","typeLabel":"object"},{"type":"object","required":["kind","maximum","retained"],"properties":{"kind":{"type":"string","enum":["window_capacity_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.5.kind","typeLabel":"enum\u003cstring>"},"maximum":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.maximum","typeLabel":"integer"},"retained":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.retained","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.5","typeLabel":"object"},{"type":"object","required":["kind","rejection"],"properties":{"kind":{"type":"string","enum":["release_rejected"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.kind","typeLabel":"enum\u003cstring>"},"rejection":{"oneOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["BUDGET_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0.code","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_RETIRED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2","typeLabel":"object"},{"type":"object","required":["code","holdId","status"],"properties":{"code":{"type":"string","enum":["HOLD_CLOSED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.holdId","typeLabel":"string"},"status":{"type":"string","enum":["settled","released","expired"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.status","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.6","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","docs","message","requestId"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"PAYLOAD_TOO_LARGE","docs":"https://docs.unprice.dev/api-reference/errors/code/PAYLOAD_TOO_LARGE","message":"\u003cstring>","requestId":"req_1234","details":{"kind":"invalid_config","issues":[{"path":"config.plans[0].version.features[1].featureSlug","message":"\u003cstring>"}]}}}}},"exampleType":"generated"}},"exampleType":"generated"},"0d3d58c8-c2ce-4c3d-9a31-9fb1c8c55e89":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["TOO_MANY_REQUESTS"],"description":"A machine readable error code.","example":"TOO_MANY_REQUESTS","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"docs":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://docs.unprice.dev/api-reference/errors/code/TOO_MANY_REQUESTS","isRequired":true,"uniqueKey":"error.docs","typeLabel":"string"},"message":{"type":"string","description":"A human readable explanation of what went wrong","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Please always include the requestId in your error report","example":"req_1234","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"oneOf":[{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["invalid_config","slug_conflict","unresolved_reference"],"description":"What kind of failure this is","example":"invalid_config","isRequired":true,"uniqueKey":"error.details.oneOf.0.kind","typeLabel":"enum\u003cstring>"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"JSON path into the submitted document","example":"config.plans[0].version.features[1].featureSlug","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].message","typeLabel":"string"}},"required":["path","message"],"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX]","typeLabel":"object"},"description":"Per-location detail, when the failure has locations","uniqueKey":"error.details.oneOf.0.issues","typeLabel":"object[]"}},"uniqueKey":"error.details.oneOf.0","typeLabel":"object"},{"type":"object","required":["kind","blocked","balance"],"properties":{"kind":{"type":"string","enum":["budget_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.kind","typeLabel":"enum\u003cstring>"},"blocked":{"type":"object","properties":{"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.limitId","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.window","typeLabel":"enum\u003cstring>"},"remaining":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remaining","typeLabel":"string"},"held":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.held","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt","typeLabel":"integer | null"},"remedy":{"type":"string","enum":["release_holds","wait_for_reset","raise_limit"],"description":"release_holds: releasing holds makes the request fit all failing limits. wait_for_reset: resetting the failing windows makes the request fit with holds unchanged. raise_limit: neither action alone is sufficient; one or more limits need a change.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remedy","typeLabel":"enum\u003cstring>"}},"required":["limitId","window","remaining","held","resetsAt","remedy"],"description":"A failing hard limit smaller than the request, or otherwise the one that resets last. Other limits can also block the request. The remedy considers all failing limits.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked","typeLabel":"object"},"balance":{"type":"object","properties":{"remaining":{"oneOf":[{"type":"string","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.0","typeLabel":"string"},{"type":"null","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining","typeLabel":"string | null"},"held":{"type":"string","description":"The sum of open holds and the unreported part of open leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.held","typeLabel":"string"},"limits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].id","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].window","typeLabel":"enum\u003cstring>"},"enforce":{"type":"string","enum":["hard","soft"],"description":"hard denies authorize and charge that would exceed the limit; soft never denies. Either kind is reported in `crossed` once usage passes it, and only a record can pass a hard limit.","example":"hard","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].enforce","typeLabel":"enum\u003cstring>"},"amount":{"type":"string","description":"The limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].amount","typeLabel":"string"},"consumed":{"type":"string","description":"Used in the current period","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].consumed","typeLabel":"string"},"held":{"type":"string","description":"Held by open holds and leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].held","typeLabel":"string"},"remaining":{"type":"string","description":"amount - consumed - held; negative for a soft limit, or a hard limit a record passed","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].remaining","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt","typeLabel":"integer | null"}},"required":["id","window","enforce","amount","consumed","held","remaining","resetsAt"],"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits","typeLabel":"object[]"},"asOf":{"type":"integer","description":"When this balance was computed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.asOf","typeLabel":"integer"}},"required":["remaining","held","limits","asOf"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.1","typeLabel":"object"},{"type":"object","required":["kind","closedAt"],"properties":{"kind":{"type":"string","enum":["budget_closed"],"isRequired":true,"uniqueKey":"error.details.oneOf.2.kind","typeLabel":"enum\u003cstring>"},"closedAt":{"type":"integer","description":"When the budget closed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.2.closedAt","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.2","typeLabel":"object"},{"type":"object","required":["kind","holdId","maximum","actual"],"properties":{"kind":{"type":"string","enum":["hold_amount_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.3.kind","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","pattern":"^h_[1-9][0-9]{0,15}$","description":"The hold, as returned by authorize","example":"h_42","isRequired":true,"uniqueKey":"error.details.oneOf.3.holdId","typeLabel":"string"},"maximum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.maximum","typeLabel":"string"},"actual":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.actual","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.3","typeLabel":"object"},{"type":"object","required":["kind","limitId","minimum","requested"],"properties":{"kind":{"type":"string","enum":["limit_below_usage"],"isRequired":true,"uniqueKey":"error.details.oneOf.4.kind","typeLabel":"enum\u003cstring>"},"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.4.limitId","typeLabel":"string"},"minimum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.minimum","typeLabel":"string"},"requested":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.requested","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.4","typeLabel":"object"},{"type":"object","required":["kind","maximum","retained"],"properties":{"kind":{"type":"string","enum":["window_capacity_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.5.kind","typeLabel":"enum\u003cstring>"},"maximum":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.maximum","typeLabel":"integer"},"retained":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.retained","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.5","typeLabel":"object"},{"type":"object","required":["kind","rejection"],"properties":{"kind":{"type":"string","enum":["release_rejected"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.kind","typeLabel":"enum\u003cstring>"},"rejection":{"oneOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["BUDGET_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0.code","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_RETIRED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2","typeLabel":"object"},{"type":"object","required":["code","holdId","status"],"properties":{"code":{"type":"string","enum":["HOLD_CLOSED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.holdId","typeLabel":"string"},"status":{"type":"string","enum":["settled","released","expired"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.status","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.6","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","docs","message","requestId"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"TOO_MANY_REQUESTS","docs":"https://docs.unprice.dev/api-reference/errors/code/TOO_MANY_REQUESTS","message":"\u003cstring>","requestId":"req_1234","details":{"kind":"invalid_config","issues":[{"path":"config.plans[0].version.features[1].featureSlug","message":"\u003cstring>"}]}}}}},"exampleType":"generated"}},"exampleType":"generated"},"0dd16197-085a-4489-a5ca-b0d4fed3406e":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"A machine readable error code.","example":"INTERNAL_SERVER_ERROR","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"docs":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://docs.unprice.dev/api-reference/errors/code/INTERNAL_SERVER_ERROR","isRequired":true,"uniqueKey":"error.docs","typeLabel":"string"},"message":{"type":"string","description":"A human readable explanation of what went wrong","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Please always include the requestId in your error report","example":"req_1234","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"oneOf":[{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["invalid_config","slug_conflict","unresolved_reference"],"description":"What kind of failure this is","example":"invalid_config","isRequired":true,"uniqueKey":"error.details.oneOf.0.kind","typeLabel":"enum\u003cstring>"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"JSON path into the submitted document","example":"config.plans[0].version.features[1].featureSlug","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].message","typeLabel":"string"}},"required":["path","message"],"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX]","typeLabel":"object"},"description":"Per-location detail, when the failure has locations","uniqueKey":"error.details.oneOf.0.issues","typeLabel":"object[]"}},"uniqueKey":"error.details.oneOf.0","typeLabel":"object"},{"type":"object","required":["kind","blocked","balance"],"properties":{"kind":{"type":"string","enum":["budget_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.kind","typeLabel":"enum\u003cstring>"},"blocked":{"type":"object","properties":{"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.limitId","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.window","typeLabel":"enum\u003cstring>"},"remaining":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remaining","typeLabel":"string"},"held":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.held","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt","typeLabel":"integer | null"},"remedy":{"type":"string","enum":["release_holds","wait_for_reset","raise_limit"],"description":"release_holds: releasing holds makes the request fit all failing limits. wait_for_reset: resetting the failing windows makes the request fit with holds unchanged. raise_limit: neither action alone is sufficient; one or more limits need a change.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remedy","typeLabel":"enum\u003cstring>"}},"required":["limitId","window","remaining","held","resetsAt","remedy"],"description":"A failing hard limit smaller than the request, or otherwise the one that resets last. Other limits can also block the request. The remedy considers all failing limits.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked","typeLabel":"object"},"balance":{"type":"object","properties":{"remaining":{"oneOf":[{"type":"string","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.0","typeLabel":"string"},{"type":"null","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining","typeLabel":"string | null"},"held":{"type":"string","description":"The sum of open holds and the unreported part of open leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.held","typeLabel":"string"},"limits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].id","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].window","typeLabel":"enum\u003cstring>"},"enforce":{"type":"string","enum":["hard","soft"],"description":"hard denies authorize and charge that would exceed the limit; soft never denies. Either kind is reported in `crossed` once usage passes it, and only a record can pass a hard limit.","example":"hard","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].enforce","typeLabel":"enum\u003cstring>"},"amount":{"type":"string","description":"The limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].amount","typeLabel":"string"},"consumed":{"type":"string","description":"Used in the current period","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].consumed","typeLabel":"string"},"held":{"type":"string","description":"Held by open holds and leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].held","typeLabel":"string"},"remaining":{"type":"string","description":"amount - consumed - held; negative for a soft limit, or a hard limit a record passed","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].remaining","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt","typeLabel":"integer | null"}},"required":["id","window","enforce","amount","consumed","held","remaining","resetsAt"],"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits","typeLabel":"object[]"},"asOf":{"type":"integer","description":"When this balance was computed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.asOf","typeLabel":"integer"}},"required":["remaining","held","limits","asOf"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.1","typeLabel":"object"},{"type":"object","required":["kind","closedAt"],"properties":{"kind":{"type":"string","enum":["budget_closed"],"isRequired":true,"uniqueKey":"error.details.oneOf.2.kind","typeLabel":"enum\u003cstring>"},"closedAt":{"type":"integer","description":"When the budget closed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.2.closedAt","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.2","typeLabel":"object"},{"type":"object","required":["kind","holdId","maximum","actual"],"properties":{"kind":{"type":"string","enum":["hold_amount_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.3.kind","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","pattern":"^h_[1-9][0-9]{0,15}$","description":"The hold, as returned by authorize","example":"h_42","isRequired":true,"uniqueKey":"error.details.oneOf.3.holdId","typeLabel":"string"},"maximum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.maximum","typeLabel":"string"},"actual":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.actual","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.3","typeLabel":"object"},{"type":"object","required":["kind","limitId","minimum","requested"],"properties":{"kind":{"type":"string","enum":["limit_below_usage"],"isRequired":true,"uniqueKey":"error.details.oneOf.4.kind","typeLabel":"enum\u003cstring>"},"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.4.limitId","typeLabel":"string"},"minimum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.minimum","typeLabel":"string"},"requested":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.requested","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.4","typeLabel":"object"},{"type":"object","required":["kind","maximum","retained"],"properties":{"kind":{"type":"string","enum":["window_capacity_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.5.kind","typeLabel":"enum\u003cstring>"},"maximum":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.maximum","typeLabel":"integer"},"retained":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.retained","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.5","typeLabel":"object"},{"type":"object","required":["kind","rejection"],"properties":{"kind":{"type":"string","enum":["release_rejected"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.kind","typeLabel":"enum\u003cstring>"},"rejection":{"oneOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["BUDGET_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0.code","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_RETIRED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2","typeLabel":"object"},{"type":"object","required":["code","holdId","status"],"properties":{"code":{"type":"string","enum":["HOLD_CLOSED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.holdId","typeLabel":"string"},"status":{"type":"string","enum":["settled","released","expired"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.status","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.6","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","docs","message","requestId"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"INTERNAL_SERVER_ERROR","docs":"https://docs.unprice.dev/api-reference/errors/code/INTERNAL_SERVER_ERROR","message":"\u003cstring>","requestId":"req_1234","details":{"kind":"invalid_config","issues":[{"path":"config.plans[0].version.features[1].featureSlug","message":"\u003cstring>"}]}}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"dd889c9d-c52d-49a3-b0ca-a11333122ffc":{"bearerAuth":{"bearerFormat":"root key","type":"http","scheme":"bearer","x-speakeasy-example":"UNPRICE_API_KEY","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"2a1f5b6e-fcd9-4479-b8f0-d8e3524b9e6d":{"url":"https://api.unprice.dev","description":"Production"},"4f0ca25b-7a5f-420c-a0d1-fdd91868a1df":{"url":"http://localhost:8787","description":"Development"},"3a662e90-2597-4145-b465-c73b343b810b":{"url":"https://preview-api.unprice.dev","description":"Preview"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"bearerFormat":"root key","type":"http","scheme":"bearer","x-speakeasy-example":"UNPRICE_API_KEY","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"openapi.json"},"subdomain":"unprice","siteName":"Unprice Documentation","title":"explain charge - Unprice Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-22T00:04:25.738Z","originalFileLocation":"api-reference/analytics/explain-charge.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Explain one invoice line using ledger metadata and rated meter facts.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Unprice Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/unprice/Tby7nRt_ND4FF19p/_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/unprice/Tby7nRt_ND4FF19p/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/unprice/Tby7nRt_ND4FF19p/_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/unprice/Tby7nRt_ND4FF19p/_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/unprice/Tby7nRt_ND4FF19p/_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/unprice/Tby7nRt_ND4FF19p/_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/unprice/Tby7nRt_ND4FF19p/_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/unprice/Tby7nRt_ND4FF19p/_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/unprice/Tby7nRt_ND4FF19p/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"explain charge - Unprice Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Explain one invoice line using ledger metadata and rated meter facts.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Unprice Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.unprice.dev/api-reference/analytics/explain-charge\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://unprice.mintlify.app/_mintlify/api/og/v2?division=analytics\u0026amp;title=explain+charge\u0026amp;description=Explain+one+invoice+line+using+ledger+metadata+and+rated+meter+facts.\u0026amp;theme=812c782abc89301b9ed8faf5\u0026amp;signature=50830b3a9fc8518bf2b84a36297656add95b028ddaae5d1cdc44bdd3d0faf0c9\">\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=\"explain charge - Unprice Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Explain one invoice line using ledger metadata and rated meter facts.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://unprice.mintlify.app/_mintlify/api/og/v2?division=analytics\u0026amp;title=explain+charge\u0026amp;description=Explain+one+invoice+line+using+ledger+metadata+and+rated+meter+facts.\u0026amp;theme=812c782abc89301b9ed8faf5\u0026amp;signature=50830b3a9fc8518bf2b84a36297656add95b028ddaae5d1cdc44bdd3d0faf0c9\">\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/unprice/Tby7nRt_ND4FF19p/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Unprice Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#ab6400\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.unprice.dev/api-reference/analytics/explain-charge\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/analytics/explain-charge.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.unprice.dev/#organization\",\"name\":\"Unprice Documentation\",\"url\":\"https://docs.unprice.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/unprice/vXUWXLNyOcaxnjxH/logo/light.svg?fit=max\u0026auto=format\u0026n=vXUWXLNyOcaxnjxH\u0026q=85\u0026s=ce4a214a5ae95d854ad7e6767a821d25\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.unprice.dev#website\",\"name\":\"Unprice Documentation\",\"url\":\"https://docs.unprice.dev\",\"publisher\":{\"@id\":\"https://docs.unprice.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.unprice.dev/api-reference/analytics/explain-charge#webpage\",\"url\":\"https://docs.unprice.dev/api-reference/analytics/explain-charge\",\"name\":\"explain charge\",\"description\":\"Explain one invoice line using ledger metadata and rated meter facts.\",\"dateModified\":\"2026-10-22T00:04:25.738Z\",\"isPartOf\":{\"@id\":\"https://docs.unprice.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.unprice.dev/api-reference/analytics/explain-charge#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.unprice.dev/api-reference/analytics/explain-charge#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://docs.unprice.dev/api-reference/access/update-acl\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"explain charge\",\"item\":\"https://docs.unprice.dev/api-reference/analytics/explain-charge\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.unprice.dev/api-reference/analytics/explain-charge#apireference\",\"headline\":\"explain charge\",\"name\":\"explain charge\",\"description\":\"Explain one invoice line using ledger metadata and rated meter facts.\",\"url\":\"https://docs.unprice.dev/api-reference/analytics/explain-charge\",\"mainEntityOfPage\":{\"@id\":\"https://docs.unprice.dev/api-reference/analytics/explain-charge#webpage\"},\"dateModified\":\"2026-10-22T00:04:25.738Z\",\"publisher\":{\"@id\":\"https://docs.unprice.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.unprice.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Unprice Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Unprice Documentation","nav":{"global":{"anchors":[{"anchor":"Home","icon":"globe","href":"https://unprice.dev"},{"anchor":"Community","icon":"discord","href":"https://discord.gg/unprice"}]},"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"Budgets","pages":[{"title":"Budgets","href":"/budgets/overview"}]},{"tab":"API Reference","groups":[{"group":"API Documentation","pages":[{"title":"Overview","href":"/api-reference/overview"},{"title":"Authentication","href":"/api-reference/authentication"}]},{"group":"Errors","pages":[{"title":"Introduction","href":"/api-reference/errors/introduction"},{"group":"Errors","pages":[{"title":"BAD_REQUEST","href":"/api-reference/errors/code/BAD_REQUEST"},{"title":"UNAUTHORIZED","href":"/api-reference/errors/code/UNAUTHORIZED"},{"title":"BUDGET_EXCEEDED","href":"/api-reference/errors/code/BUDGET_EXCEEDED"},{"title":"FORBIDDEN","href":"/api-reference/errors/code/FORBIDDEN"},{"title":"INSUFFICIENT_PERMISSIONS","href":"/api-reference/errors/code/INSUFFICIENT_PERMISSIONS"},{"title":"NOT_FOUND","href":"/api-reference/errors/code/NOT_FOUND"},{"title":"CONFLICT","href":"/api-reference/errors/code/CONFLICT"},{"title":"PRECONDITION_FAILED","href":"/api-reference/errors/code/PRECONDITION_FAILED"},{"title":"TOO_MANY_REQUESTS","href":"/api-reference/errors/code/TOO_MANY_REQUESTS"},{"title":"PAYLOAD_TOO_LARGE","href":"/api-reference/errors/code/PAYLOAD_TOO_LARGE"},{"title":"INTERNAL_SERVER_ERROR","href":"/api-reference/errors/code/INTERNAL_SERVER_ERROR"}]}]},{"group":"Endpoints","pages":[{"group":"access","pages":[{"title":"update ACL","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/access/update","href":"/api-reference/access/update-acl"},{"title":"get customer entitlements","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/access/entitlements/list","href":"/api-reference/access/get-customer-entitlements"},{"title":"get current customer entitlements","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/access/entitlements/current","href":"/api-reference/access/get-current-customer-entitlements"},{"title":"get current feature status","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/access/check","href":"/api-reference/access/get-current-feature-status"}]},{"group":"runs","pages":[{"title":"start a budgeted run","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/runs/start","href":"/api-reference/runs/start-a-budgeted-run"},{"title":"apply sync metered event to a run","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/runs/consume/{runId}","href":"/api-reference/runs/apply-sync-metered-event-to-a-run"},{"title":"settle incurred usage against a run","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/runs/settle/{runId}","href":"/api-reference/runs/settle-incurred-usage-against-a-run"},{"title":"end a budgeted run","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/runs/end/{runId}","href":"/api-reference/runs/end-a-budgeted-run"},{"title":"get a budgeted run","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/runs/get/{runId}","href":"/api-reference/runs/get-a-budgeted-run"}]},{"group":"budgets","pages":[{"title":"create or update a budget","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/budgets/upsert","href":"/api-reference/budgets/create-or-update-a-budget"},{"title":"reserve the maximum permitted usage before work runs","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/budgets/authorize","href":"/api-reference/budgets/reserve-the-maximum-permitted-usage-before-work-runs"},{"title":"settle a hold with the actual amount","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/budgets/settle","href":"/api-reference/budgets/settle-a-hold-with-the-actual-amount"},{"title":"release a hold without consuming","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/budgets/release","href":"/api-reference/budgets/release-a-hold-without-consuming"},{"title":"consume an amount if it fits","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/budgets/charge","href":"/api-reference/budgets/consume-an-amount-if-it-fits"},{"title":"record usage that already happened","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/budgets/record","href":"/api-reference/budgets/record-usage-that-already-happened"},{"title":"get a budget and its balance","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/budgets/get","href":"/api-reference/budgets/get-a-budget-and-its-balance"},{"title":"debit capacity for a long-lived process to spend locally","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/budgets/lease","href":"/api-reference/budgets/debit-capacity-for-a-long-lived-process-to-spend-locally"},{"title":"report a lease's usage, and extend or close it","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/budgets/report","href":"/api-reference/budgets/report-a-leases-usage-and-extend-or-close-it"},{"title":"token rates and limits of models","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/budgets/models","href":"/api-reference/budgets/token-rates-and-limits-of-models"}]},{"group":"customers","pages":[{"title":"sign up","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/customers/sign-up","href":"/api-reference/customers/sign-up"},{"title":"change a customer's active plan","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/customers/change-plan","href":"/api-reference/customers/change-a-customers-active-plan"}]},{"group":"usage","pages":[{"title":"ingest raw event","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/usage/record","href":"/api-reference/usage/ingest-raw-event"},{"title":"ingest raw event synchronously for a feature","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/usage/consume","href":"/api-reference/usage/ingest-raw-event-synchronously-for-a-feature"}]},{"group":"ingestionEvents","pages":[{"title":"replay failed ingestion events","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/ingestion-events/replay","href":"/api-reference/ingestionevents/replay-failed-ingestion-events"},{"title":"get ingestion status","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/ingestion-events/status","href":"/api-reference/ingestionevents/get-ingestion-status"}]},{"group":"features","pages":[{"title":"get features","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/features/list","href":"/api-reference/features/get-features"}]},{"group":"invoices","pages":[{"title":"get invoice","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/get/{invoiceId}","href":"/api-reference/invoices/get-invoice"}]},{"group":"monetization","pages":[{"title":"apply monetization configuration","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/monetization/apply","href":"/api-reference/monetization/apply-monetization-configuration"},{"title":"get monetization configuration","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/monetization/get","href":"/api-reference/monetization/get-monetization-configuration"}]},{"group":"paymentMethods","pages":[{"title":"list payment methods","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/payment-methods/list","href":"/api-reference/paymentmethods/list-payment-methods"},{"title":"create payment method","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/payment-methods/create","href":"/api-reference/paymentmethods/create-payment-method"}]},{"group":"planVersions","pages":[{"title":"get plan version","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/plan-versions/get/{planVersionId}","href":"/api-reference/planversions/get-plan-version"},{"title":"list all plan versions","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/plan-versions/list","href":"/api-reference/planversions/list-all-plan-versions"}]},{"group":"subscriptions","pages":[{"title":"get subscription","description":"Get subscription with the active phase for a customer","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/subscriptions/get","href":"/api-reference/subscriptions/get-subscription"}]},{"group":"analytics","pages":[{"title":"explain charge","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/analytics/charges/explain","href":"/api-reference/analytics/explain-charge"},{"title":"get usage","description":"Get usage for a customer in a given range","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/analytics/usage/get","href":"/api-reference/analytics/get-usage"},{"title":"get current billing-period usage","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/analytics/usage/current-billing-period","href":"/api-reference/analytics/get-current-billing-period-usage"}]},{"group":"wallet","pages":[{"title":"get wallet balance","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/wallet/balance","href":"/api-reference/wallet/get-wallet-balance"}]},{"group":"walletCredits","pages":[{"title":"get wallet credit balance","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/wallet-credits/balance/{walletId}","href":"/api-reference/walletcredits/get-wallet-credit-balance"}]}]}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/libraries/ts/sdk/overview"}]}]},"title":"explain charge - Unprice Documentation","buildId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","deploymentId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-rfhihCWU.js","utils-BmH1XFxk.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-BcNsxPKB.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BAES3tkd.js","snippetPresets-DCMQBKLP.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-D6l_bzE9.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BOktbnNh.js","shallow-BCs8SgM7.js","getApiPlaygroundDisplay-DEmW5bJB.js","CodeSnippet-CpZOpB9C.js","CodeSnippets-BOBDqibl.js","Page-D5fEM6aW.js","getPastedJson-DH2JBvmr.js","icon-BBJH-kKh.js","MethodPill-D2Sd5NLC.js","DuplicateIcon-CGgfL2qN.js","createIcon-BKudBBzi.js","DynamicMarkdown-85clUA0i.js","SectionHeading-D0JiMgDx.js","axios-vUo_bRtp.js","Markdown-Cfiy0xZO.js","clsx-rL8ZCCw4.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-aeztFa9U.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BywkCr5C.js"]}