Creates a plan of a product with its first plan version, which holds the plan charges of the body and becomes the active plan version of the plan, so a new plan instance of the plan bills those plan charges.
{"docsConfig":{"theme":"luma","$schema":"https://mintlify.com/docs.json","name":"Aira","colors":{"primary":"#542691","light":"#B197FC","dark":"#3F1B6E"},"logo":{"light":"https://mintcdn.com/aira-e93056c6/NIoErVFaJlphCKFi/logo/light.svg?fit=max\u0026auto=format\u0026n=NIoErVFaJlphCKFi\u0026q=85\u0026s=d222c0199c2a89d6e27d97ba6ef28275","dark":"https://mintcdn.com/aira-e93056c6/NIoErVFaJlphCKFi/logo/dark.svg?fit=max\u0026auto=format\u0026n=NIoErVFaJlphCKFi\u0026q=85\u0026s=5ccb5cfecbe2f539cba0bffdece168a1"},"favicon":"https://mintcdn.com/aira-e93056c6/NIoErVFaJlphCKFi/favicon.svg?fit=max\u0026auto=format\u0026n=NIoErVFaJlphCKFi\u0026q=85\u0026s=824a706ab0a0bbf9242b5b7f152905b1","api":{"mdx":{"server":["https://api.useaira.com"]}},"navbar":{"links":[{"href":"mailto:contato@useaira.com","label":"Suporte"}],"primary":{"type":"button","label":"Login","href":"https://app.useaira.com"}},"footer":{"socials":{"linkedin":"https://linkedin.com/company/useaira"}},"search":{},"fonts":{"family":"Geist"},"icons":{"library":"lucide"},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"aira-e93056c6","hasAudioNarration":false,"actualSubdomain":"aira-e93056c6","customDomains":["docs.useaira.com"],"gitSource":{"type":"github","owner":"aira-dev","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6b08f7474bf8de6706371bb7","clientVersion":"0.0.4340","searchFilterCounts":[{"language":"default","tag":"Referência da API","count":330},{"language":"default","tag":"Invoices","count":43},{"language":"default","tag":"Documentação","count":39},{"language":"default","tag":"Guias","count":16},{"language":"default","tag":"Integrações","count":11},{"language":"default","tag":"Contracts","count":11},{"language":"default","tag":"Customers","count":11},{"language":"default","tag":"Dunning","count":11},{"language":"default","tag":"Plan Instances","count":11},{"language":"default","tag":"Contratos","count":10}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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":"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":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"/* vietnamese */\n@font-face {\n font-family: 'Newsreader';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/newsreader/v26/cY9VfjOCX1hbuyalUrK49dLafXjalZCsZBsgBgbCJYQraA.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Newsreader';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/newsreader/v26/cY9VfjOCX1hbuyalUrK49dLafXjalZCsZBsgBgbDJYQraA.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Newsreader';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/newsreader/v26/cY9VfjOCX1hbuyalUrK49dLafXjalZCsZBsgBgbNJYQ.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n#page-title,.aira-display{font-family:\"Newsreader\", Georgia, \"Times New Roman\", serif;font-weight:400}#page-title{font-size:2.125rem;line-height:2.5rem;letter-spacing:-0.02em}@media (min-width: 640px){#page-title{font-size:2.5rem;line-height:2.875rem}}div.eyebrow{font-weight:500;letter-spacing:0.06em;text-transform:uppercase}div.sidebar-group-header{color:rgb(var(--primary));font-size:0.6875rem;font-weight:500;letter-spacing:0.06em;text-transform:uppercase}.dark div.sidebar-group-header{color:rgb(var(--primary-light))}#content-area a.link{color:rgb(var(--primary));font-weight:500;border-bottom-color:rgb(var(--primary-light))}#content-area a.link:hover{border-bottom-color:rgb(var(--primary))}.dark #content-area a.link{color:rgb(var(--primary-light));border-bottom-color:rgb(var(--primary-light) / 0.4)}.dark #content-area a.link:hover{border-bottom-color:rgb(var(--primary-light))}#content-area table thead{border-bottom:none}#content-area table th{background-color:#f3f4f6;color:#4f545b;font-weight:500}#content-area table th:first-child,#content-area table td:first-child{padding-left:0.75rem}#content-area table th:first-child{border-radius:6px 0 0 6px}#content-area table th:last-child{border-radius:0 6px 6px 0}.dark #content-area table th{background-color:rgb(255 255 255 / 0.05);color:#d4d4d8}[data-component-part=\"step-number\"]>div{background-color:rgb(var(--primary) / 0.1);color:rgb(var(--primary))}.dark [data-component-part=\"step-number\"]>div{background-color:rgb(var(--primary-light) / 0.12);color:rgb(var(--primary-light))}"}]}
{"page":{"pagePath":"api-reference/plans/create-plan","slug":"/api-reference/plans/create-plan","pageMetadata":{"title":"Create plan","description":"Creates a plan of a product with its first plan version, which holds the plan charges of the body and becomes the active plan version of the plan, so a new plan instance of the plan bills those plan charges.\n\nRequires the role `plans:write`.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/plans/","href":"/api-reference/plans/create-plan","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Creates a plan of a product with its first plan version, which holds the plan charges of the body and becomes the active plan version of the plan, so a new plan instance of the plan bills those plan charges.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Requires the role \", _jsx(_components.code, {\n children: \"plans:write\"\n }), \".\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create plan","description":"Creates a plan of a product with its first plan version, which holds the plan charges of the body and becomes the active plan version of the plan, so a new plan instance of the plan bills those plan charges.\n\nRequires the role `plans:write`.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/plans/","href":"/api-reference/plans/create-plan","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Create plan","tags":["Plans"],"description":"Creates a plan of a product with its first plan version, which holds the plan charges of the body and becomes the active plan version of the plan, so a new plan instance of the plan bills those plan charges.\n\nRequires the role `plans:write`.","requestBody":"1261327a-a83c-4cc3-8be2-3d606d5f2e9f","x-public-api":true,"x-errors":[{"status":400,"code":"product_not_found","when":"no product of the tenant has the `productId`"},{"status":400,"code":"invalid_plan_charges","when":"a plan charge breaks a rule of plan charges, such as tiers that leave a gap, an item, a resource or a license that the tenant does not have, two minimum commitments with the same billing frequency, or billing frequencies in both months and weeks"},{"status":400,"code":"billing_frequency_not_yet_supported","when":"a license-based charge with the billing model `proration`, or a usage-based charge on a resource with the billing model `proration`, has a billing frequency of more than one month or one week"},{"status":400,"code":"currency_unit_not_found","when":"no currency unit of the tenant has the `currencyUnitCode` of a usage-based charge"}],"x-required-roles":["plans:write"],"responses":{"201":"6b97b1ea-faf5-4a5e-a241-723427c9a8c9","400":"6463dd78-80b7-473f-8268-8f9f7d0a1a0c","401":"9c2d8f60-6d5d-4e38-a8ad-56d162f604ed","403":"39942535-d863-4dbb-8dec-8cddb5c1e681"},"method":"post","type":"path","servers":["d5296371-7705-41a9-914c-32740086e4b0"],"security":["519e228f-206f-45ab-bf65-37e5213eef75"],"path":"/v1/plans/","baseUrlOptions":["https://api.useaira.com"],"title":"Create plan","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"The name of the plan.","example":"Plano Essencial","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"productId":{"type":"string","format":"uuid","description":"The unique identifier of the product that the plan belongs to.","isRequired":true,"uniqueKey":"productId","typeLabel":"string\u003cuuid>"},"planCharges":{"type":"array","minItems":1,"maxItems":100,"items":{"oneOf":[{"type":"object","description":"A fixed charge: bills a flat amount once per period of its billingFrequency, at the boundary its billingTiming picks.","required":["category","itemId","isCustomNameEnabled","pricingModel","pricing"],"conditionallyRequiredProperties":{"name":[{"when":[[{"property":"isCustomNameEnabled","values":[true],"matchesAbsent":true}]]}]},"properties":{"category":{"description":"Discriminator: fixed charge.","enum":["fixed"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.0.category","typeLabel":"enum\u003cstring>"},"isCustomNameEnabled":{"type":"boolean","description":"Whether name is customized for this charge. When false, the name follows the name of the resource of the charge, else of its license, else of its catalog item.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.0.isCustomNameEnabled","typeLabel":"boolean"},"itemId":{"type":"string","format":"uuid","description":"The unique identifier of the catalog item this charge bills.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.0.itemId","typeLabel":"string\u003cuuid>"},"pricingModel":{"type":"string","description":"Fixed and minimum_commitment charges always use fixed pricing.","enum":["fixed"],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.0.pricingModel","typeLabel":"enum\u003cstring>"},"pricing":{"type":"object","description":"Fixed pricing: a flat amount billed once per period of the charge's billingFrequency. The only pricing available for fixed and minimum_commitment charges.","properties":{"model":{"description":"Discriminator: fixed pricing.","enum":["fixed"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.0.pricing.model","typeLabel":"enum\u003cstring>"},"amount":{"type":"integer","minimum":0,"description":"The flat amount billed per period, in cents. For minimum_commitment charges, the minimum the charges sharing its frequency are topped up to.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.0.pricing.amount","typeLabel":"integer"},"quantity":{"type":"integer","minimum":1,"description":"Optional, fixed charges only: the quantity billed. When set, amount is the amount of one unit and each period of the charge's billingFrequency bills quantity x amount.","uniqueKey":"planCharges.items.[INDEX].oneOf.0.pricing.quantity","typeLabel":"integer"}},"required":["model","amount"],"additionalProperties":false,"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.0.pricing","typeLabel":"object"},"name":{"type":"string","minLength":1,"description":"Display name of the charge as it appears on invoices. Required when isCustomNameEnabled is true. When isCustomNameEnabled is false, the name follows the name of the resource of the charge, else of its license, else of its catalog item.","examples":["Mensalidade"],"conditionalRequirements":[{"when":[[{"property":"isCustomNameEnabled","values":[true],"matchesAbsent":true}]]}],"uniqueKey":"planCharges.items.[INDEX].oneOf.0.name","typeLabel":"string"},"billingFrequency":{"type":"object","description":"Optional. The period this charge covers: unit month or week, repeated count times. A write accepts six frequencies: week x 1, week x 2, month x 1 (the default), month x 3, month x 6 and month x 12; any other count is rejected. Fixed and minimum-commitment charges bill at their period boundary; usage-based charges measure their resource over the whole period and license-based charges bill the last count reported before it closes, both priced at the close. Custom charges read their input resources and licenses the same way, and their calculator prices them at the close. Prorated license charges and usage charges on a prorated resource accept only a count of one, month x 1 or week x 1. Defaults to month x 1 when omitted.","properties":{"unit":{"type":"string","enum":["month","week"],"description":"Grid family of the period. All charges on a plan must share one family.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.0.billingFrequency.unit","typeLabel":"enum\u003cstring>"},"count":{"type":"integer","minimum":1,"description":"How many units the period spans.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.0.billingFrequency.count","typeLabel":"integer"}},"required":["unit","count"],"additionalProperties":false,"uniqueKey":"planCharges.items.[INDEX].oneOf.0.billingFrequency","typeLabel":"object"},"billingTiming":{"type":"string","enum":["in_advance","in_arrears"],"description":"Optional. When the charge's flat fee is billed relative to the period it covers (see billingFrequency): in_arrears (the default) bills the period at the close of the cycle that ends it; in_advance bills it at the boundary that opens it (the contract's activation invoice for the periods its first cycle opens, otherwise the close of the cycle just before the period). Only the timing shifts, never the amount. Valid only on fixed charges. Defaults to in_arrears when omitted.","uniqueKey":"planCharges.items.[INDEX].oneOf.0.billingTiming","typeLabel":"enum\u003cstring>"}},"additionalProperties":false,"uniqueKey":"planCharges.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"A minimum commitment charge: at the close of each period of its billingFrequency, tops the plan's charges sharing that frequency up to the configured amount when their total on that calculation stays below it. A plan can have at most one minimum per billing frequency.","required":["category","itemId","isCustomNameEnabled","pricingModel","pricing"],"conditionallyRequiredProperties":{"name":[{"when":[[{"property":"isCustomNameEnabled","values":[true],"matchesAbsent":true}]]}]},"properties":{"category":{"description":"Discriminator: minimum commitment charge.","enum":["minimum_commitment"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.1.category","typeLabel":"enum\u003cstring>"},"isCustomNameEnabled":{"type":"boolean","description":"Whether name is customized for this charge. When false, the name follows the name of the resource of the charge, else of its license, else of its catalog item.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.1.isCustomNameEnabled","typeLabel":"boolean"},"itemId":{"type":"string","format":"uuid","description":"The unique identifier of the catalog item this charge bills.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.1.itemId","typeLabel":"string\u003cuuid>"},"pricingModel":{"type":"string","description":"Fixed and minimum_commitment charges always use fixed pricing.","enum":["fixed"],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.1.pricingModel","typeLabel":"enum\u003cstring>"},"pricing":{"type":"object","description":"Fixed pricing: a flat amount billed once per period of the charge's billingFrequency. The only pricing available for fixed and minimum_commitment charges.","properties":{"model":{"description":"Discriminator: fixed pricing.","enum":["fixed"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.1.pricing.model","typeLabel":"enum\u003cstring>"},"amount":{"type":"integer","minimum":0,"description":"The flat amount billed per period, in cents. For minimum_commitment charges, the minimum the charges sharing its frequency are topped up to.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.1.pricing.amount","typeLabel":"integer"},"quantity":{"type":"integer","minimum":1,"description":"Optional, fixed charges only: the quantity billed. When set, amount is the amount of one unit and each period of the charge's billingFrequency bills quantity x amount.","uniqueKey":"planCharges.items.[INDEX].oneOf.1.pricing.quantity","typeLabel":"integer"}},"required":["model","amount"],"additionalProperties":false,"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.1.pricing","typeLabel":"object"},"name":{"type":"string","minLength":1,"description":"Display name of the charge as it appears on invoices. Required when isCustomNameEnabled is true. When isCustomNameEnabled is false, the name follows the name of the resource of the charge, else of its license, else of its catalog item.","examples":["Mensalidade"],"conditionalRequirements":[{"when":[[{"property":"isCustomNameEnabled","values":[true],"matchesAbsent":true}]]}],"uniqueKey":"planCharges.items.[INDEX].oneOf.1.name","typeLabel":"string"},"billingFrequency":{"type":"object","description":"Optional. The period this charge covers: unit month or week, repeated count times. A write accepts six frequencies: week x 1, week x 2, month x 1 (the default), month x 3, month x 6 and month x 12; any other count is rejected. Fixed and minimum-commitment charges bill at their period boundary; usage-based charges measure their resource over the whole period and license-based charges bill the last count reported before it closes, both priced at the close. Custom charges read their input resources and licenses the same way, and their calculator prices them at the close. Prorated license charges and usage charges on a prorated resource accept only a count of one, month x 1 or week x 1. Defaults to month x 1 when omitted.","properties":{"unit":{"type":"string","enum":["month","week"],"description":"Grid family of the period. All charges on a plan must share one family.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.1.billingFrequency.unit","typeLabel":"enum\u003cstring>"},"count":{"type":"integer","minimum":1,"description":"How many units the period spans.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.1.billingFrequency.count","typeLabel":"integer"}},"required":["unit","count"],"additionalProperties":false,"uniqueKey":"planCharges.items.[INDEX].oneOf.1.billingFrequency","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"planCharges.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"A usage-based charge: prices the consumption of a metered resource according to pricingModel.","required":["category","resourceId","isCustomNameEnabled","pricingModel","pricing","tiers"],"conditionallyRequiredProperties":{"name":[{"when":[[{"property":"isCustomNameEnabled","values":[true],"matchesAbsent":true}]]}]},"properties":{"category":{"description":"Discriminator: usage-based charge.","enum":["usage_based"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.category","typeLabel":"enum\u003cstring>"},"isCustomNameEnabled":{"type":"boolean","description":"Whether name is customized for this charge. When false, the name follows the name of the resource of the charge, else of its license, else of its catalog item.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.isCustomNameEnabled","typeLabel":"boolean"},"resourceId":{"type":"string","format":"uuid","description":"The unique identifier of the metered resource whose usage the charge prices.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.resourceId","typeLabel":"string\u003cuuid>"},"pricingModel":{"type":"string","enum":["per_unit","per_package","percentage","tiered_per_unit","tiered_percentage","tiered_fixed","advanced"],"description":"How the charge is priced: per_unit (price per unit with optional included quantity), per_package (price per started package of units), percentage (a percentage of a monetary base amount), tiered_per_unit / tiered_percentage / tiered_fixed (tier ladder where every tier uses that pricing type), or advanced (tier ladder mixing tier pricing types). per_unit, per_package and tiered_per_unit require a Unit-type resource; percentage and tiered_percentage require a Currency-type resource; tiered_fixed and advanced accept either. Always matches pricing.model.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricingModel","typeLabel":"enum\u003cstring>"},"pricing":{"oneOf":[{"type":"object","description":"Per-unit pricing: every billable unit costs unitPrice, after deducting the included quantity. Not valid for charges on Currency-type resources.","required":["model","unitPrice"],"properties":{"model":{"description":"Discriminator: per-unit pricing.","enum":["per_unit"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.0.model","typeLabel":"enum\u003cstring>"},"unitPrice":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"Price per unit, as a decimal currency-unit string (up to 6 decimal places).","examples":["0.25"],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.0.unitPrice","typeLabel":"string"},"includedQuantity":{"type":"integer","minimum":0,"description":"Optional number of units included at no charge before billing starts.","uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.0.includedQuantity","typeLabel":"integer"},"fixedAmount":{"type":"integer","minimum":0,"description":"Optional flat amount billed once per period of the charge's billingFrequency, on top of the priced quantity, in cents. Rendered as a fixed-price sub-line item when greater than zero.","uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.0.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"Optional floor for the charge, in cents. When the priced quantity plus fixedAmount stays below it, a minimum-amount sub-line item tops the charge up to this value.","uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.0.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.0","typeLabel":"object"},{"type":"object","description":"Per-package pricing: billable units are charged per started package of packageSize units, after deducting the included quantity. Not valid for charges on Currency-type resources.","required":["model","packageSize","packagePrice"],"properties":{"model":{"description":"Discriminator: per-package pricing.","enum":["per_package"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.1.model","typeLabel":"enum\u003cstring>"},"packageSize":{"type":"integer","minimum":1,"description":"Number of resource units per package.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.1.packageSize","typeLabel":"integer"},"packagePrice":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"Price per package, as a decimal currency-unit string (up to 6 decimal places).","examples":["50.00"],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.1.packagePrice","typeLabel":"string"},"includedQuantity":{"type":"integer","minimum":0,"description":"Optional number of units included at no charge before billing starts.","uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.1.includedQuantity","typeLabel":"integer"},"fixedAmount":{"type":"integer","minimum":0,"description":"Optional flat amount billed once per period of the charge's billingFrequency, on top of the priced quantity, in cents. Rendered as a fixed-price sub-line item when greater than zero.","uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.1.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"Optional floor for the charge, in cents. When the priced quantity plus fixedAmount stays below it, a minimum-amount sub-line item tops the charge up to this value.","uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.1.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.1","typeLabel":"object"},{"type":"object","description":"Percentage pricing: a percentage taken over the monetary base amount consumed. Only valid for charges on Currency-type resources.","required":["model","percentage"],"properties":{"model":{"description":"Discriminator: percentage pricing.","enum":["percentage"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.2.model","typeLabel":"enum\u003cstring>"},"percentage":{"type":"string","pattern":"^(100(\\.0{1,6})?|\\d{1,2}(\\.\\d{1,6})?)$","description":"Percentage applied to the base amount, as a decimal string from 0 to 100 (up to 6 decimal places).","examples":["2.5"],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.2.percentage","typeLabel":"string"},"fixedAmount":{"type":"integer","minimum":0,"description":"Optional flat amount billed once per period of the charge's billingFrequency, on top of the priced quantity, in cents. Rendered as a fixed-price sub-line item when greater than zero.","uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.2.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"Optional floor for the charge, in cents. When the priced quantity plus fixedAmount stays below it, a minimum-amount sub-line item tops the charge up to this value.","uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.2.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.2","typeLabel":"object"},{"type":"object","description":"Tiered per-unit pricing: units are priced by the tier ladder defined in the charge's tiers, every tier priced per unit. Not valid for charges on Currency-type resources.","required":["model","tierMode"],"properties":{"model":{"description":"Discriminator: tiered per-unit pricing.","enum":["tiered_per_unit"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.3.model","typeLabel":"enum\u003cstring>"},"tierMode":{"enum":["progressive","volume"],"description":"How the ladder applies: progressive prices each tier's band separately (graduated); volume prices all usage at the single tier containing the total.","type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.3.tierMode","typeLabel":"enum\u003cstring>"},"fixedAmount":{"type":"integer","minimum":0,"description":"Optional flat amount billed once per period of the charge's billingFrequency, on top of the priced quantity, in cents. Rendered as a fixed-price sub-line item when greater than zero.","uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.3.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"Optional floor for the charge, in cents. When the priced quantity plus fixedAmount stays below it, a minimum-amount sub-line item tops the charge up to this value.","uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.3.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.3","typeLabel":"object"},{"type":"object","description":"Tiered percentage pricing: the monetary base amount is priced by the tier ladder defined in the charge's tiers, every tier priced as a percentage. Only valid for charges on Currency-type resources.","required":["model","tierMode"],"properties":{"model":{"description":"Discriminator: tiered percentage pricing.","enum":["tiered_percentage"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.4.model","typeLabel":"enum\u003cstring>"},"tierMode":{"enum":["progressive","volume"],"description":"How the ladder applies: progressive prices each tier's band separately (graduated); volume prices all usage at the single tier containing the total.","type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.4.tierMode","typeLabel":"enum\u003cstring>"},"fixedAmount":{"type":"integer","minimum":0,"description":"Optional flat amount billed once per period of the charge's billingFrequency, on top of the priced quantity, in cents. Rendered as a fixed-price sub-line item when greater than zero.","uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.4.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"Optional floor for the charge, in cents. When the priced quantity plus fixedAmount stays below it, a minimum-amount sub-line item tops the charge up to this value.","uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.4.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.4","typeLabel":"object"},{"type":"object","description":"Tiered fixed pricing: the tier containing the total usage bills its flat amount. Always volume mode. Usage beyond the last tier can be billed through unitOverage or percentageOverage (mutually exclusive); configuring one requires a bounded final tier.","required":["model","tierMode"],"properties":{"model":{"description":"Discriminator: tiered fixed pricing.","enum":["tiered_fixed"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.5.model","typeLabel":"enum\u003cstring>"},"tierMode":{"enum":["progressive","volume"],"description":"Must be volume for tiered fixed pricing: the single tier containing the total usage bills its flat amount.","type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.5.tierMode","typeLabel":"enum\u003cstring>"},"unitOverage":{"type":"object","description":"Optional overage price for units beyond the last tier, for charges on Unit-type resources. Mutually exclusive with percentageOverage.","properties":{"excessUnitPrice":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"Price per unit beyond the last tier, as a decimal currency-unit string (up to 6 decimal places).","examples":["0.30"],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.5.unitOverage.excessUnitPrice","typeLabel":"string"}},"required":["excessUnitPrice"],"additionalProperties":false,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.5.unitOverage","typeLabel":"object"},"percentageOverage":{"type":"object","description":"Optional overage percentage for the base amount beyond the last tier, for charges on Currency-type resources. Mutually exclusive with unitOverage.","properties":{"excessPercentage":{"type":"string","pattern":"^(100(\\.0{1,6})?|\\d{1,2}(\\.\\d{1,6})?)$","description":"Percentage applied to the base amount beyond the last tier, as a decimal string from 0 to 100 (up to 6 decimal places).","examples":["1.5"],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.5.percentageOverage.excessPercentage","typeLabel":"string"}},"required":["excessPercentage"],"additionalProperties":false,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.5.percentageOverage","typeLabel":"object"},"fixedAmount":{"type":"integer","minimum":0,"description":"Optional flat amount billed once per period of the charge's billingFrequency, on top of the priced quantity, in cents. Rendered as a fixed-price sub-line item when greater than zero.","uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.5.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"Optional floor for the charge, in cents. When the priced quantity plus fixedAmount stays below it, a minimum-amount sub-line item tops the charge up to this value.","uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.5.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.5","typeLabel":"object"},{"type":"object","description":"Advanced pricing: a tier ladder mixing tier pricing types (per unit, percentage, per package, flat). On a Unit-type resource the tiers can be per_unit, per_package or flat; on a Currency-type resource, percentage or flat. Also used for charges priced before single pricing models existed.","required":["model","tierMode"],"properties":{"model":{"description":"Discriminator: advanced (mixed-tier) pricing.","enum":["advanced"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.6.model","typeLabel":"enum\u003cstring>"},"tierMode":{"enum":["progressive","volume"],"description":"How the ladder applies: progressive prices each tier's band separately (graduated); volume prices all usage at the single tier containing the total.","type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.6.tierMode","typeLabel":"enum\u003cstring>"},"fixedAmount":{"type":"integer","minimum":0,"description":"Optional flat amount billed once per period of the charge's billingFrequency, on top of the priced quantity, in cents. Rendered as a fixed-price sub-line item when greater than zero.","uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.6.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"Optional floor for the charge, in cents. When the priced quantity plus fixedAmount stays below it, a minimum-amount sub-line item tops the charge up to this value.","uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.6.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing.oneOf.6","typeLabel":"object"}],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.pricing","typeLabel":"object"},"tiers":{"type":"array","items":{"type":"object","description":"A price tier: a band of quantity, from one number to another, with its own price. The tiers of a plan charge form a contiguous ladder over its quantity.","properties":{"from":{"type":"integer","minimum":0,"description":"Lower bound of the tier band (inclusive), in resource units — or cents of the monetary base amount for percentage-priced tiers. The first tier starts at 0 or 1; each subsequent tier starts at the previous tier's to + 1.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].from","typeLabel":"integer"},"to":{"oneOf":[{"type":"integer","minimum":0,"description":"Upper bound of the tier band (inclusive), in the same unit as from. Null makes the final tier unbounded; a finite final bound is only allowed on tiered_fixed charges with an overage price configured.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].to.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":0,"description":"Upper bound of the tier band (inclusive), in the same unit as from. Null makes the final tier unbounded; a finite final bound is only allowed on tiered_fixed charges with an overage price configured.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].to.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].to","typeLabel":"integer | null"},"pricing":{"oneOf":[{"type":"object","description":"Per-unit tier pricing: every unit in the tier band costs unitPrice. Not valid for charges on Currency-type resources.","required":["type","unitPrice","fixedPrice"],"properties":{"type":{"description":"Discriminator: per-unit tier pricing.","enum":["per_unit"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.0.type","typeLabel":"enum\u003cstring>"},"unitPrice":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"Price per unit within the tier, as a decimal currency-unit string (up to 6 decimal places).","examples":["0.20"],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.0.unitPrice","typeLabel":"string"},"fixedPrice":{"oneOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"Optional flat fee billed on top when the tier applies, as a decimal currency-unit string. Only valid on pricingModel tiered_per_unit. Null when the tier has no flat fee.","examples":["10.00"],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.0.fixedPrice.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^\\d+(\\.\\d{1,6})?$","description":"Optional flat fee billed on top when the tier applies, as a decimal currency-unit string. Only valid on pricingModel tiered_per_unit. Null when the tier has no flat fee.","examples":["10.00"],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.0.fixedPrice.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.0.fixedPrice","typeLabel":"string | null"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.0","typeLabel":"object"},{"type":"object","description":"Percentage tier pricing: the base amount in the tier band is billed at a percentage. Only valid for charges on Currency-type resources.","required":["type","percentage"],"properties":{"type":{"description":"Discriminator: percentage tier pricing.","enum":["percentage"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.1.type","typeLabel":"enum\u003cstring>"},"percentage":{"type":"string","pattern":"^(100(\\.0{1,6})?|\\d{1,2}(\\.\\d{1,6})?)$","description":"Percentage applied to the base amount within the tier, as a decimal string from 0 to 100 (up to 6 decimal places).","examples":["1.5"],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.1.percentage","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.1","typeLabel":"object"},{"type":"object","description":"Per-package tier pricing: units in the tier band are charged per started package of packageSize units. Not valid for charges on Currency-type resources.","required":["type","packageSize","packagePrice"],"properties":{"type":{"description":"Discriminator: per-package tier pricing.","enum":["per_package"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.2.type","typeLabel":"enum\u003cstring>"},"packageSize":{"type":"integer","minimum":1,"description":"Number of resource units per package.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.2.packageSize","typeLabel":"integer"},"packagePrice":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"Price per package, as a decimal currency-unit string (up to 6 decimal places).","examples":["45.00"],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.2.packagePrice","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.2","typeLabel":"object"},{"type":"object","description":"Flat tier pricing: usage falling in the tier band is billed a flat amount, regardless of the exact quantity.","required":["type","amount"],"properties":{"type":{"description":"Discriminator: flat tier pricing.","enum":["flat"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.3.type","typeLabel":"enum\u003cstring>"},"amount":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"The flat amount billed for the tier, as a decimal currency-unit string (up to 6 decimal places).","examples":["199.90"],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.3.amount","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing","typeLabel":"object"}},"required":["from","to","pricing"],"additionalProperties":false,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX]","typeLabel":"object"},"description":"The tier ladder of the charge, ordered from the lowest band to the highest. Required non-empty for tier-based pricing models (tiered_per_unit, tiered_percentage, tiered_fixed, advanced); must be empty otherwise.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.tiers","typeLabel":"object[]"},"name":{"type":"string","minLength":1,"description":"Display name of the charge as it appears on invoices. Required when isCustomNameEnabled is true. When isCustomNameEnabled is false, the name follows the name of the resource of the charge, else of its license, else of its catalog item.","examples":["Mensalidade"],"conditionalRequirements":[{"when":[[{"property":"isCustomNameEnabled","values":[true],"matchesAbsent":true}]]}],"uniqueKey":"planCharges.items.[INDEX].oneOf.2.name","typeLabel":"string"},"billingFrequency":{"type":"object","description":"Optional. The period this charge covers: unit month or week, repeated count times. A write accepts six frequencies: week x 1, week x 2, month x 1 (the default), month x 3, month x 6 and month x 12; any other count is rejected. Fixed and minimum-commitment charges bill at their period boundary; usage-based charges measure their resource over the whole period and license-based charges bill the last count reported before it closes, both priced at the close. Custom charges read their input resources and licenses the same way, and their calculator prices them at the close. Prorated license charges and usage charges on a prorated resource accept only a count of one, month x 1 or week x 1. Defaults to month x 1 when omitted.","properties":{"unit":{"type":"string","enum":["month","week"],"description":"Grid family of the period. All charges on a plan must share one family.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.billingFrequency.unit","typeLabel":"enum\u003cstring>"},"count":{"type":"integer","minimum":1,"description":"How many units the period spans.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.billingFrequency.count","typeLabel":"integer"}},"required":["unit","count"],"additionalProperties":false,"uniqueKey":"planCharges.items.[INDEX].oneOf.2.billingFrequency","typeLabel":"object"},"currencyUnitCode":{"type":"string","description":"Code of the currency unit the charge's usage is denominated in, for tenants using the credits module. Defaults to BRL when omitted.","examples":["BRL"],"uniqueKey":"planCharges.items.[INDEX].oneOf.2.currencyUnitCode","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"planCharges.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"A license-based charge: bills the license balance once per period of its billingFrequency, at the close of the period. By default it bills in full the last balance reported before the close; when billingModel is proration, it prorates each change of the balance over the days held.","required":["category","licenseId","isCustomNameEnabled","pricingModel","pricing","tiers"],"conditionallyRequiredProperties":{"name":[{"when":[[{"property":"isCustomNameEnabled","values":[true],"matchesAbsent":true}]]}]},"properties":{"category":{"description":"Discriminator: license-based charge.","enum":["license_based"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.category","typeLabel":"enum\u003cstring>"},"isCustomNameEnabled":{"type":"boolean","description":"Whether name is customized for this charge. When false, the name follows the name of the resource of the charge, else of its license, else of its catalog item.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.isCustomNameEnabled","typeLabel":"boolean"},"licenseId":{"type":"string","format":"uuid","description":"The unique identifier of the license whose reported count the charge bills. The charge bills as the license's own catalog item.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.licenseId","typeLabel":"string\u003cuuid>"},"pricingModel":{"type":"string","enum":["per_unit","per_package","tiered_per_unit","tiered_fixed"],"description":"How the license count is priced: per_unit (price per license with optional included quantity), per_package (price per started package of licenses), or tiered_per_unit / tiered_fixed (tier ladder over the count). Percentage models do not apply: a license count carries no monetary base. Always matches pricing.model.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricingModel","typeLabel":"enum\u003cstring>"},"pricing":{"oneOf":[{"type":"object","description":"Per-unit pricing: every billable unit costs unitPrice, after deducting the included quantity. Not valid for charges on Currency-type resources.","required":["model","unitPrice"],"properties":{"model":{"description":"Discriminator: per-unit pricing.","enum":["per_unit"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.0.model","typeLabel":"enum\u003cstring>"},"unitPrice":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"Price per unit, as a decimal currency-unit string (up to 6 decimal places).","examples":["0.25"],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.0.unitPrice","typeLabel":"string"},"includedQuantity":{"type":"integer","minimum":0,"description":"Optional number of units included at no charge before billing starts.","uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.0.includedQuantity","typeLabel":"integer"},"fixedAmount":{"type":"integer","minimum":0,"description":"Optional flat amount billed once per period of the charge's billingFrequency, on top of the priced quantity, in cents. Rendered as a fixed-price sub-line item when greater than zero.","uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.0.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"Optional floor for the charge, in cents. When the priced quantity plus fixedAmount stays below it, a minimum-amount sub-line item tops the charge up to this value.","uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.0.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.0","typeLabel":"object"},{"type":"object","description":"Per-package pricing: billable units are charged per started package of packageSize units, after deducting the included quantity. Not valid for charges on Currency-type resources.","required":["model","packageSize","packagePrice"],"properties":{"model":{"description":"Discriminator: per-package pricing.","enum":["per_package"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.1.model","typeLabel":"enum\u003cstring>"},"packageSize":{"type":"integer","minimum":1,"description":"Number of resource units per package.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.1.packageSize","typeLabel":"integer"},"packagePrice":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"Price per package, as a decimal currency-unit string (up to 6 decimal places).","examples":["50.00"],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.1.packagePrice","typeLabel":"string"},"includedQuantity":{"type":"integer","minimum":0,"description":"Optional number of units included at no charge before billing starts.","uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.1.includedQuantity","typeLabel":"integer"},"fixedAmount":{"type":"integer","minimum":0,"description":"Optional flat amount billed once per period of the charge's billingFrequency, on top of the priced quantity, in cents. Rendered as a fixed-price sub-line item when greater than zero.","uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.1.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"Optional floor for the charge, in cents. When the priced quantity plus fixedAmount stays below it, a minimum-amount sub-line item tops the charge up to this value.","uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.1.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.1","typeLabel":"object"},{"type":"object","description":"Percentage pricing: a percentage taken over the monetary base amount consumed. Only valid for charges on Currency-type resources.","required":["model","percentage"],"properties":{"model":{"description":"Discriminator: percentage pricing.","enum":["percentage"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.2.model","typeLabel":"enum\u003cstring>"},"percentage":{"type":"string","pattern":"^(100(\\.0{1,6})?|\\d{1,2}(\\.\\d{1,6})?)$","description":"Percentage applied to the base amount, as a decimal string from 0 to 100 (up to 6 decimal places).","examples":["2.5"],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.2.percentage","typeLabel":"string"},"fixedAmount":{"type":"integer","minimum":0,"description":"Optional flat amount billed once per period of the charge's billingFrequency, on top of the priced quantity, in cents. Rendered as a fixed-price sub-line item when greater than zero.","uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.2.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"Optional floor for the charge, in cents. When the priced quantity plus fixedAmount stays below it, a minimum-amount sub-line item tops the charge up to this value.","uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.2.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.2","typeLabel":"object"},{"type":"object","description":"Tiered per-unit pricing: units are priced by the tier ladder defined in the charge's tiers, every tier priced per unit. Not valid for charges on Currency-type resources.","required":["model","tierMode"],"properties":{"model":{"description":"Discriminator: tiered per-unit pricing.","enum":["tiered_per_unit"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.3.model","typeLabel":"enum\u003cstring>"},"tierMode":{"enum":["progressive","volume"],"description":"How the ladder applies: progressive prices each tier's band separately (graduated); volume prices all usage at the single tier containing the total.","type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.3.tierMode","typeLabel":"enum\u003cstring>"},"fixedAmount":{"type":"integer","minimum":0,"description":"Optional flat amount billed once per period of the charge's billingFrequency, on top of the priced quantity, in cents. Rendered as a fixed-price sub-line item when greater than zero.","uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.3.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"Optional floor for the charge, in cents. When the priced quantity plus fixedAmount stays below it, a minimum-amount sub-line item tops the charge up to this value.","uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.3.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.3","typeLabel":"object"},{"type":"object","description":"Tiered percentage pricing: the monetary base amount is priced by the tier ladder defined in the charge's tiers, every tier priced as a percentage. Only valid for charges on Currency-type resources.","required":["model","tierMode"],"properties":{"model":{"description":"Discriminator: tiered percentage pricing.","enum":["tiered_percentage"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.4.model","typeLabel":"enum\u003cstring>"},"tierMode":{"enum":["progressive","volume"],"description":"How the ladder applies: progressive prices each tier's band separately (graduated); volume prices all usage at the single tier containing the total.","type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.4.tierMode","typeLabel":"enum\u003cstring>"},"fixedAmount":{"type":"integer","minimum":0,"description":"Optional flat amount billed once per period of the charge's billingFrequency, on top of the priced quantity, in cents. Rendered as a fixed-price sub-line item when greater than zero.","uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.4.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"Optional floor for the charge, in cents. When the priced quantity plus fixedAmount stays below it, a minimum-amount sub-line item tops the charge up to this value.","uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.4.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.4","typeLabel":"object"},{"type":"object","description":"Tiered fixed pricing: the tier containing the total usage bills its flat amount. Always volume mode. Usage beyond the last tier can be billed through unitOverage or percentageOverage (mutually exclusive); configuring one requires a bounded final tier.","required":["model","tierMode"],"properties":{"model":{"description":"Discriminator: tiered fixed pricing.","enum":["tiered_fixed"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.5.model","typeLabel":"enum\u003cstring>"},"tierMode":{"enum":["progressive","volume"],"description":"Must be volume for tiered fixed pricing: the single tier containing the total usage bills its flat amount.","type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.5.tierMode","typeLabel":"enum\u003cstring>"},"unitOverage":{"type":"object","description":"Optional overage price for units beyond the last tier, for charges on Unit-type resources. Mutually exclusive with percentageOverage.","properties":{"excessUnitPrice":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"Price per unit beyond the last tier, as a decimal currency-unit string (up to 6 decimal places).","examples":["0.30"],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.5.unitOverage.excessUnitPrice","typeLabel":"string"}},"required":["excessUnitPrice"],"additionalProperties":false,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.5.unitOverage","typeLabel":"object"},"percentageOverage":{"type":"object","description":"Optional overage percentage for the base amount beyond the last tier, for charges on Currency-type resources. Mutually exclusive with unitOverage.","properties":{"excessPercentage":{"type":"string","pattern":"^(100(\\.0{1,6})?|\\d{1,2}(\\.\\d{1,6})?)$","description":"Percentage applied to the base amount beyond the last tier, as a decimal string from 0 to 100 (up to 6 decimal places).","examples":["1.5"],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.5.percentageOverage.excessPercentage","typeLabel":"string"}},"required":["excessPercentage"],"additionalProperties":false,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.5.percentageOverage","typeLabel":"object"},"fixedAmount":{"type":"integer","minimum":0,"description":"Optional flat amount billed once per period of the charge's billingFrequency, on top of the priced quantity, in cents. Rendered as a fixed-price sub-line item when greater than zero.","uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.5.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"Optional floor for the charge, in cents. When the priced quantity plus fixedAmount stays below it, a minimum-amount sub-line item tops the charge up to this value.","uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.5.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.5","typeLabel":"object"},{"type":"object","description":"Advanced pricing: a tier ladder mixing tier pricing types (per unit, percentage, per package, flat). On a Unit-type resource the tiers can be per_unit, per_package or flat; on a Currency-type resource, percentage or flat. Also used for charges priced before single pricing models existed.","required":["model","tierMode"],"properties":{"model":{"description":"Discriminator: advanced (mixed-tier) pricing.","enum":["advanced"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.6.model","typeLabel":"enum\u003cstring>"},"tierMode":{"enum":["progressive","volume"],"description":"How the ladder applies: progressive prices each tier's band separately (graduated); volume prices all usage at the single tier containing the total.","type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.6.tierMode","typeLabel":"enum\u003cstring>"},"fixedAmount":{"type":"integer","minimum":0,"description":"Optional flat amount billed once per period of the charge's billingFrequency, on top of the priced quantity, in cents. Rendered as a fixed-price sub-line item when greater than zero.","uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.6.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"Optional floor for the charge, in cents. When the priced quantity plus fixedAmount stays below it, a minimum-amount sub-line item tops the charge up to this value.","uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.6.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing.oneOf.6","typeLabel":"object"}],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.pricing","typeLabel":"object"},"tiers":{"type":"array","items":{"type":"object","description":"A price tier: a band of quantity, from one number to another, with its own price. The tiers of a plan charge form a contiguous ladder over its quantity.","properties":{"from":{"type":"integer","minimum":0,"description":"Lower bound of the tier band (inclusive), in resource units — or cents of the monetary base amount for percentage-priced tiers. The first tier starts at 0 or 1; each subsequent tier starts at the previous tier's to + 1.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].from","typeLabel":"integer"},"to":{"oneOf":[{"type":"integer","minimum":0,"description":"Upper bound of the tier band (inclusive), in the same unit as from. Null makes the final tier unbounded; a finite final bound is only allowed on tiered_fixed charges with an overage price configured.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].to.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":0,"description":"Upper bound of the tier band (inclusive), in the same unit as from. Null makes the final tier unbounded; a finite final bound is only allowed on tiered_fixed charges with an overage price configured.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].to.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].to","typeLabel":"integer | null"},"pricing":{"oneOf":[{"type":"object","description":"Per-unit tier pricing: every unit in the tier band costs unitPrice. Not valid for charges on Currency-type resources.","required":["type","unitPrice","fixedPrice"],"properties":{"type":{"description":"Discriminator: per-unit tier pricing.","enum":["per_unit"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.0.type","typeLabel":"enum\u003cstring>"},"unitPrice":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"Price per unit within the tier, as a decimal currency-unit string (up to 6 decimal places).","examples":["0.20"],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.0.unitPrice","typeLabel":"string"},"fixedPrice":{"oneOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"Optional flat fee billed on top when the tier applies, as a decimal currency-unit string. Only valid on pricingModel tiered_per_unit. Null when the tier has no flat fee.","examples":["10.00"],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.0.fixedPrice.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^\\d+(\\.\\d{1,6})?$","description":"Optional flat fee billed on top when the tier applies, as a decimal currency-unit string. Only valid on pricingModel tiered_per_unit. Null when the tier has no flat fee.","examples":["10.00"],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.0.fixedPrice.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.0.fixedPrice","typeLabel":"string | null"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.0","typeLabel":"object"},{"type":"object","description":"Percentage tier pricing: the base amount in the tier band is billed at a percentage. Only valid for charges on Currency-type resources.","required":["type","percentage"],"properties":{"type":{"description":"Discriminator: percentage tier pricing.","enum":["percentage"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.1.type","typeLabel":"enum\u003cstring>"},"percentage":{"type":"string","pattern":"^(100(\\.0{1,6})?|\\d{1,2}(\\.\\d{1,6})?)$","description":"Percentage applied to the base amount within the tier, as a decimal string from 0 to 100 (up to 6 decimal places).","examples":["1.5"],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.1.percentage","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.1","typeLabel":"object"},{"type":"object","description":"Per-package tier pricing: units in the tier band are charged per started package of packageSize units. Not valid for charges on Currency-type resources.","required":["type","packageSize","packagePrice"],"properties":{"type":{"description":"Discriminator: per-package tier pricing.","enum":["per_package"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.2.type","typeLabel":"enum\u003cstring>"},"packageSize":{"type":"integer","minimum":1,"description":"Number of resource units per package.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.2.packageSize","typeLabel":"integer"},"packagePrice":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"Price per package, as a decimal currency-unit string (up to 6 decimal places).","examples":["45.00"],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.2.packagePrice","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.2","typeLabel":"object"},{"type":"object","description":"Flat tier pricing: usage falling in the tier band is billed a flat amount, regardless of the exact quantity.","required":["type","amount"],"properties":{"type":{"description":"Discriminator: flat tier pricing.","enum":["flat"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.3.type","typeLabel":"enum\u003cstring>"},"amount":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"The flat amount billed for the tier, as a decimal currency-unit string (up to 6 decimal places).","examples":["199.90"],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.3.amount","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing","typeLabel":"object"}},"required":["from","to","pricing"],"additionalProperties":false,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX]","typeLabel":"object"},"description":"The tier ladder of the charge, ordered from the lowest band to the highest. Required non-empty for tier-based pricing models (tiered_per_unit, tiered_fixed); must be empty otherwise.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.tiers","typeLabel":"object[]"},"name":{"type":"string","minLength":1,"description":"Display name of the charge as it appears on invoices. Required when isCustomNameEnabled is true. When isCustomNameEnabled is false, the name follows the name of the resource of the charge, else of its license, else of its catalog item.","examples":["Mensalidade"],"conditionalRequirements":[{"when":[[{"property":"isCustomNameEnabled","values":[true],"matchesAbsent":true}]]}],"uniqueKey":"planCharges.items.[INDEX].oneOf.3.name","typeLabel":"string"},"billingModel":{"type":"string","enum":["in_full","proration"],"description":"Optional. How the license balance bills over the charge's period: in_full (the default) bills the last balance reported before the period closes, for the whole period; proration bills the opening balance at full price plus one prorated delta per change during the cycle. Proration requires per_unit pricing, or tiered_per_unit in progressive mode: only tier unit prices prorate, and tier flat prices bill in full for the bands that the closing balance reaches.","uniqueKey":"planCharges.items.[INDEX].oneOf.3.billingModel","typeLabel":"enum\u003cstring>"},"billingFrequency":{"type":"object","description":"Optional. The period this charge covers: unit month or week, repeated count times. A write accepts six frequencies: week x 1, week x 2, month x 1 (the default), month x 3, month x 6 and month x 12; any other count is rejected. Fixed and minimum-commitment charges bill at their period boundary; usage-based charges measure their resource over the whole period and license-based charges bill the last count reported before it closes, both priced at the close. Custom charges read their input resources and licenses the same way, and their calculator prices them at the close. Prorated license charges and usage charges on a prorated resource accept only a count of one, month x 1 or week x 1. Defaults to month x 1 when omitted.","properties":{"unit":{"type":"string","enum":["month","week"],"description":"Grid family of the period. All charges on a plan must share one family.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.billingFrequency.unit","typeLabel":"enum\u003cstring>"},"count":{"type":"integer","minimum":1,"description":"How many units the period spans.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.billingFrequency.count","typeLabel":"integer"}},"required":["unit","count"],"additionalProperties":false,"uniqueKey":"planCharges.items.[INDEX].oneOf.3.billingFrequency","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"planCharges.items.[INDEX].oneOf.3","typeLabel":"object"},{"type":"object","description":"A custom charge: bills the amount the tenant's Aira-authored calculator computes from the inputs the charge chooses among its custom charge definition's inputs and from the charge's parameter values. Bills in arrears in the tenant's default currency.","required":["category","itemId","customChargeDefinitionId","isCustomNameEnabled","pricingModel","pricing"],"conditionallyRequiredProperties":{"name":[{"when":[[{"property":"isCustomNameEnabled","values":[true],"matchesAbsent":true}]]}]},"properties":{"category":{"description":"Discriminator: custom charge.","enum":["custom"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.4.category","typeLabel":"enum\u003cstring>"},"isCustomNameEnabled":{"type":"boolean","description":"Whether name is customized for this charge. When false, the name follows the name of the resource of the charge, else of its license, else of its catalog item.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.4.isCustomNameEnabled","typeLabel":"boolean"},"itemId":{"type":"string","format":"uuid","description":"The unique identifier of the catalog item this charge bills.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.4.itemId","typeLabel":"string\u003cuuid>"},"customChargeDefinitionId":{"type":"string","format":"uuid","description":"The unique identifier of the custom charge definition the charge follows. Must belong to the tenant.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.4.customChargeDefinitionId","typeLabel":"string\u003cuuid>"},"pricingModel":{"type":"string","description":"Custom charges always use custom pricing: the amount is computed by the tenant's calculator from the charge's parameter values.","enum":["custom"],"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.4.pricingModel","typeLabel":"enum\u003cstring>"},"pricing":{"type":"object","description":"Custom pricing: schema-defined commercial parameters priced by the tenant's Aira-authored calculator. The only pricing available for custom charges.","properties":{"model":{"description":"Discriminator: custom pricing.","enum":["custom"],"type":"string","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.4.pricing.model","typeLabel":"enum\u003cstring>"},"parameters":{"type":"object","additionalProperties":true,"description":"The charge's commercial parameter values, keyed by the field keys of the referenced custom charge definition's parameter schema. Validated against that parameter schema when the charge is saved.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.4.pricing.parameters","typeLabel":"object"}},"required":["model","parameters"],"additionalProperties":false,"isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.4.pricing","typeLabel":"object"},"name":{"type":"string","minLength":1,"description":"Display name of the charge as it appears on invoices. Required when isCustomNameEnabled is true. When isCustomNameEnabled is false, the name follows the name of the resource of the charge, else of its license, else of its catalog item.","examples":["Mensalidade"],"conditionalRequirements":[{"when":[[{"property":"isCustomNameEnabled","values":[true],"matchesAbsent":true}]]}],"uniqueKey":"planCharges.items.[INDEX].oneOf.4.name","typeLabel":"string"},"chosenResourceIds":{"type":"array","items":{"type":"string","format":"uuid","uniqueKey":"planCharges.items.[INDEX].oneOf.4.chosenResourceIds.items.[INDEX]","typeLabel":"string\u003cuuid>"},"uniqueItems":true,"description":"The unique identifiers of the metered resources that the charge chooses as its inputs, from the definition's inputResourceIds. Together with chosenLicenseIds, the charge chooses exactly the definition's chosenInputCount inputs. Omitting it chooses no resource.","uniqueKey":"planCharges.items.[INDEX].oneOf.4.chosenResourceIds","typeLabel":"string\u003cuuid>[]"},"chosenLicenseIds":{"type":"array","items":{"type":"string","format":"uuid","uniqueKey":"planCharges.items.[INDEX].oneOf.4.chosenLicenseIds.items.[INDEX]","typeLabel":"string\u003cuuid>"},"uniqueItems":true,"description":"The unique identifiers of the licenses that the charge chooses as its inputs, from the definition's inputLicenseIds. Together with chosenResourceIds, the charge chooses exactly the definition's chosenInputCount inputs. Omitting it chooses no license.","uniqueKey":"planCharges.items.[INDEX].oneOf.4.chosenLicenseIds","typeLabel":"string\u003cuuid>[]"},"billingFrequency":{"type":"object","description":"Optional. The period this charge covers: unit month or week, repeated count times. A write accepts six frequencies: week x 1, week x 2, month x 1 (the default), month x 3, month x 6 and month x 12; any other count is rejected. Fixed and minimum-commitment charges bill at their period boundary; usage-based charges measure their resource over the whole period and license-based charges bill the last count reported before it closes, both priced at the close. Custom charges read their input resources and licenses the same way, and their calculator prices them at the close. Prorated license charges and usage charges on a prorated resource accept only a count of one, month x 1 or week x 1. Defaults to month x 1 when omitted.","properties":{"unit":{"type":"string","enum":["month","week"],"description":"Grid family of the period. All charges on a plan must share one family.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.4.billingFrequency.unit","typeLabel":"enum\u003cstring>"},"count":{"type":"integer","minimum":1,"description":"How many units the period spans.","isRequired":true,"uniqueKey":"planCharges.items.[INDEX].oneOf.4.billingFrequency.count","typeLabel":"integer"}},"required":["unit","count"],"additionalProperties":false,"uniqueKey":"planCharges.items.[INDEX].oneOf.4.billingFrequency","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"planCharges.items.[INDEX].oneOf.4","typeLabel":"object"}],"uniqueKey":"planCharges.items.[INDEX]","typeLabel":"object"},"description":"The plan charges of the first plan version of the plan, each at the position of its index in the list.","isRequired":true,"uniqueKey":"planCharges","typeLabel":"object[]"},"description":{"oneOf":[{"description":"The description of the plan, or null for none. Leave it out for none.","type":"null","example":"Assinatura mensal com entrega diária de pães.","uniqueKey":"description.oneOf.0","typeLabel":"null"},{"description":"The description of the plan, or null for none. Leave it out for none.","type":"string","example":"Assinatura mensal com entrega diária de pães.","uniqueKey":"description.oneOf.1","typeLabel":"string"}],"uniqueKey":"description","typeLabel":"null | string"}},"required":["name","productId","planCharges"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"name":"Plano Essencial","productId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","planCharges":[{"category":"fixed","isCustomNameEnabled":true,"itemId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","pricingModel":"fixed","pricing":{"model":"fixed","amount":1,"quantity":2},"name":"Mensalidade"}],"description":"Assinatura mensal com entrega diária de pães."}}},"exampleType":"generated"}},"required":true,"description":"The plan to create, with the plan charges of its first plan version.","exampleType":"generated"},"responses":{"6b97b1ea-faf5-4a5e-a241-723427c9a8c9":{"description":"A plan, a reusable set of charges of the catalog, with its product and its active plan version. A contract bills a plan through a plan instance.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier of the plan in our system.","isRequired":true,"uniqueKey":"id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","minLength":1,"description":"The name of the plan.","example":"Plano Essencial","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"description":{"oneOf":[{"description":"The description of the plan, or null when it has none.","type":"null","example":"Assinatura mensal com entrega diária de pães.","isRequired":true,"uniqueKey":"description.oneOf.0","typeLabel":"null"},{"description":"The description of the plan, or null when it has none.","type":"string","example":"Assinatura mensal com entrega diária de pães.","isRequired":true,"uniqueKey":"description.oneOf.1","typeLabel":"string"}],"isRequired":true,"uniqueKey":"description","typeLabel":"null | string"},"product":{"type":"object","description":"The product that the plan belongs to.","properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier of the product in our system.","isRequired":true,"uniqueKey":"product.id","typeLabel":"string\u003cuuid>"},"name":{"description":"The name of the product.","type":"string","minLength":1,"example":"Platform subscription","isRequired":true,"uniqueKey":"product.name","typeLabel":"string"}},"required":["id","name"],"additionalProperties":false,"isRequired":true,"uniqueKey":"product","typeLabel":"object"},"activePlanVersion":{"type":"object","description":"The active plan version of the plan, whose plan charges a new plan instance of the plan bills.","properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier of the plan version in our system.","isRequired":true,"uniqueKey":"activePlanVersion.id","typeLabel":"string\u003cuuid>"},"versionNumber":{"type":"number","minimum":1,"description":"The number of the plan version in its plan, from 1, one more for each new plan version.","isRequired":true,"uniqueKey":"activePlanVersion.versionNumber","typeLabel":"number"},"isActive":{"type":"boolean","description":"Whether the plan version is the active plan version of its plan, whose plan charges a new plan instance of the plan bills. A plan has one active plan version.","isRequired":true,"uniqueKey":"activePlanVersion.isActive","typeLabel":"boolean"},"planCharges":{"type":"array","items":{"oneOf":[{"type":"object","description":"A fixed charge: the same amount in every charge period, billed on the invoice that its billing timing names.","required":["id","position","itemId","productId","name","isCustomNameEnabled","category","pricingModel","pricing","billingFrequency","billingTiming"],"properties":{"category":{"type":"string","description":"The category of the charge: fixed.","enum":["fixed"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.0.category","typeLabel":"enum\u003cstring>"},"id":{"type":"string","format":"uuid","description":"The unique identifier of the plan charge in our system.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.0.id","typeLabel":"string\u003cuuid>"},"position":{"type":"integer","minimum":0,"description":"The position of the charge in the plan, from 0, in the order that the billing app shows.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.0.position","typeLabel":"integer"},"itemId":{"type":"string","format":"uuid","description":"The unique identifier of the item that the charge bills. The line items of the charge name the same item.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.0.itemId","typeLabel":"string\u003cuuid>"},"productId":{"type":"string","format":"uuid","description":"The unique identifier of the product that the charge belongs to.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.0.productId","typeLabel":"string\u003cuuid>"},"name":{"type":"string","minLength":1,"description":"The name of the charge, as the invoices show it.","examples":["Mensalidade"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.0.name","typeLabel":"string"},"isCustomNameEnabled":{"type":"boolean","description":"Whether the charge has a name of its own. When false, the name of the charge is the name of its resource, of its license or of its item.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.0.isCustomNameEnabled","typeLabel":"boolean"},"billingFrequency":{"type":"object","description":"How often the charge bills: each charge period of the charge lasts count units, the charge counts its charge periods from the contract start, and it bills each charge period once. Aira accepts 1 or 2 weeks and 1, 3, 6 or 12 months, and a prorated charge bills every week or every month.","properties":{"unit":{"type":"string","enum":["month","week"],"description":"The unit of the billing frequency: month or week. Every charge of a plan has the same unit.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.0.billingFrequency.unit","typeLabel":"enum\u003cstring>"},"count":{"type":"integer","minimum":1,"description":"The number of units in each charge period of the charge.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.0.billingFrequency.count","typeLabel":"integer"}},"required":["unit","count"],"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.0.billingFrequency","typeLabel":"object"},"pricingModel":{"type":"string","description":"The pricing model of the charge, always fixed.","enum":["fixed"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.0.pricingModel","typeLabel":"enum\u003cstring>"},"pricing":{"type":"object","description":"The price of a fixed charge or of a minimum commitment.","properties":{"model":{"description":"The pricing model of the price: fixed.","enum":["fixed"],"type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.0.pricing.model","typeLabel":"enum\u003cstring>"},"amount":{"type":"integer","minimum":0,"description":"The amount that the charge bills in each charge period, in cents, or the amount of one unit when the charge has a quantity. For a minimum commitment, the least that the charges of the plan with its billing frequency bill.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.0.pricing.amount","typeLabel":"integer"},"quantity":{"type":"integer","minimum":1,"description":"The number of units that a fixed charge bills in each charge period, when it has one, so that each charge period bills quantity times amount. A minimum commitment has none.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.0.pricing.quantity","typeLabel":"integer"}},"required":["model","amount"],"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.0.pricing","typeLabel":"object"},"billingTiming":{"type":"string","enum":["in_advance","in_arrears"],"description":"When the charge bills a charge period: in_arrears bills it on the closing invoice of its last cycle, and in_advance bills it before it starts, on the activation invoice or on the closing invoice of the cycle before. The billing timing moves the invoice, never the amount.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.0.billingTiming","typeLabel":"enum\u003cstring>"}},"additionalProperties":false,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"A minimum commitment: the least that the plan bills in a charge period. When the charges of the plan with the same billing frequency total less, the charge bills the difference. A plan has at most one for each billing frequency.","required":["id","position","itemId","productId","name","isCustomNameEnabled","category","pricingModel","pricing","billingFrequency"],"properties":{"category":{"type":"string","description":"The category of the charge: minimum_commitment.","enum":["minimum_commitment"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.1.category","typeLabel":"enum\u003cstring>"},"id":{"type":"string","format":"uuid","description":"The unique identifier of the plan charge in our system.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.1.id","typeLabel":"string\u003cuuid>"},"position":{"type":"integer","minimum":0,"description":"The position of the charge in the plan, from 0, in the order that the billing app shows.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.1.position","typeLabel":"integer"},"itemId":{"type":"string","format":"uuid","description":"The unique identifier of the item that the charge bills. The line items of the charge name the same item.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.1.itemId","typeLabel":"string\u003cuuid>"},"productId":{"type":"string","format":"uuid","description":"The unique identifier of the product that the charge belongs to.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.1.productId","typeLabel":"string\u003cuuid>"},"name":{"type":"string","minLength":1,"description":"The name of the charge, as the invoices show it.","examples":["Mensalidade"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.1.name","typeLabel":"string"},"isCustomNameEnabled":{"type":"boolean","description":"Whether the charge has a name of its own. When false, the name of the charge is the name of its resource, of its license or of its item.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.1.isCustomNameEnabled","typeLabel":"boolean"},"billingFrequency":{"type":"object","description":"How often the charge bills: each charge period of the charge lasts count units, the charge counts its charge periods from the contract start, and it bills each charge period once. Aira accepts 1 or 2 weeks and 1, 3, 6 or 12 months, and a prorated charge bills every week or every month.","properties":{"unit":{"type":"string","enum":["month","week"],"description":"The unit of the billing frequency: month or week. Every charge of a plan has the same unit.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.1.billingFrequency.unit","typeLabel":"enum\u003cstring>"},"count":{"type":"integer","minimum":1,"description":"The number of units in each charge period of the charge.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.1.billingFrequency.count","typeLabel":"integer"}},"required":["unit","count"],"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.1.billingFrequency","typeLabel":"object"},"pricingModel":{"type":"string","description":"The pricing model of the charge, always fixed.","enum":["fixed"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.1.pricingModel","typeLabel":"enum\u003cstring>"},"pricing":{"type":"object","description":"The price of a fixed charge or of a minimum commitment.","properties":{"model":{"description":"The pricing model of the price: fixed.","enum":["fixed"],"type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.1.pricing.model","typeLabel":"enum\u003cstring>"},"amount":{"type":"integer","minimum":0,"description":"The amount that the charge bills in each charge period, in cents, or the amount of one unit when the charge has a quantity. For a minimum commitment, the least that the charges of the plan with its billing frequency bill.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.1.pricing.amount","typeLabel":"integer"},"quantity":{"type":"integer","minimum":1,"description":"The number of units that a fixed charge bills in each charge period, when it has one, so that each charge period bills quantity times amount. A minimum commitment has none.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.1.pricing.quantity","typeLabel":"integer"}},"required":["model","amount"],"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.1.pricing","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"A usage-based charge: a charge on the usage of a resource in its charge period, priced by its pricing model.","required":["id","position","itemId","productId","name","isCustomNameEnabled","category","pricingModel","pricing","billingFrequency","resourceId","currencyUnit","tiers"],"properties":{"category":{"type":"string","description":"The category of the charge: usage_based.","enum":["usage_based"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.category","typeLabel":"enum\u003cstring>"},"id":{"type":"string","format":"uuid","description":"The unique identifier of the plan charge in our system.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.id","typeLabel":"string\u003cuuid>"},"position":{"type":"integer","minimum":0,"description":"The position of the charge in the plan, from 0, in the order that the billing app shows.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.position","typeLabel":"integer"},"itemId":{"type":"string","format":"uuid","description":"The unique identifier of the item that the charge bills. The line items of the charge name the same item.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.itemId","typeLabel":"string\u003cuuid>"},"productId":{"type":"string","format":"uuid","description":"The unique identifier of the product that the charge belongs to.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.productId","typeLabel":"string\u003cuuid>"},"name":{"type":"string","minLength":1,"description":"The name of the charge, as the invoices show it.","examples":["Mensalidade"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.name","typeLabel":"string"},"isCustomNameEnabled":{"type":"boolean","description":"Whether the charge has a name of its own. When false, the name of the charge is the name of its resource, of its license or of its item.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.isCustomNameEnabled","typeLabel":"boolean"},"billingFrequency":{"type":"object","description":"How often the charge bills: each charge period of the charge lasts count units, the charge counts its charge periods from the contract start, and it bills each charge period once. Aira accepts 1 or 2 weeks and 1, 3, 6 or 12 months, and a prorated charge bills every week or every month.","properties":{"unit":{"type":"string","enum":["month","week"],"description":"The unit of the billing frequency: month or week. Every charge of a plan has the same unit.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.billingFrequency.unit","typeLabel":"enum\u003cstring>"},"count":{"type":"integer","minimum":1,"description":"The number of units in each charge period of the charge.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.billingFrequency.count","typeLabel":"integer"}},"required":["unit","count"],"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.billingFrequency","typeLabel":"object"},"pricingModel":{"type":"string","enum":["per_unit","per_package","percentage","tiered_per_unit","tiered_percentage","tiered_fixed","advanced"],"description":"The pricing model of the charge, the same as pricing.model. per_unit, per_package and tiered_per_unit price a resource in units, percentage and tiered_percentage price a resource in money, and tiered_fixed and advanced price either.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricingModel","typeLabel":"enum\u003cstring>"},"pricing":{"oneOf":[{"type":"object","description":"Per unit: each unit of the charge period past the included quantity costs unitPrice. A charge on a resource in money cannot have it.","required":["model","unitPrice"],"properties":{"model":{"description":"The pricing model of the price: per_unit.","enum":["per_unit"],"type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.0.model","typeLabel":"enum\u003cstring>"},"unitPrice":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"The price of one unit, as a decimal string.","examples":["0.25"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.0.unitPrice","typeLabel":"string"},"includedQuantity":{"type":"integer","minimum":0,"description":"The number of units of each charge period that the charge does not bill, when it has one.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.0.includedQuantity","typeLabel":"integer"},"fixedAmount":{"type":"integer","minimum":0,"description":"An amount that the charge adds in each charge period on top of its priced quantity, in cents, when it has one.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.0.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"The least that the charge bills in a charge period, in cents, when it has one: when the priced quantity plus fixedAmount comes to less, the charge bills this amount.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.0.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.0","typeLabel":"object"},{"type":"object","description":"Per package: the units of the charge period past the included quantity bill packagePrice for each package of packageSize units that they start. A charge on a resource in money cannot have it.","required":["model","packageSize","packagePrice"],"properties":{"model":{"description":"The pricing model of the price: per_package.","enum":["per_package"],"type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.1.model","typeLabel":"enum\u003cstring>"},"packageSize":{"type":"integer","minimum":1,"description":"The number of units in one package.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.1.packageSize","typeLabel":"integer"},"packagePrice":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"The price of one package, as a decimal string.","examples":["50.00"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.1.packagePrice","typeLabel":"string"},"includedQuantity":{"type":"integer","minimum":0,"description":"The number of units of each charge period that the charge does not bill, when it has one.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.1.includedQuantity","typeLabel":"integer"},"fixedAmount":{"type":"integer","minimum":0,"description":"An amount that the charge adds in each charge period on top of its priced quantity, in cents, when it has one.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.1.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"The least that the charge bills in a charge period, in cents, when it has one: when the priced quantity plus fixedAmount comes to less, the charge bills this amount.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.1.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.1","typeLabel":"object"},{"type":"object","description":"Percentage: the charge bills a percentage of the usage of its resource in the charge period. Only a charge on a resource in money has it.","required":["model","percentage"],"properties":{"model":{"description":"The pricing model of the price: percentage.","enum":["percentage"],"type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.2.model","typeLabel":"enum\u003cstring>"},"percentage":{"type":"string","pattern":"^(100(\\.0{1,6})?|\\d{1,2}(\\.\\d{1,6})?)$","description":"The percentage of the usage that the charge bills, as a decimal string from 0 to 100.","examples":["2.5"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.2.percentage","typeLabel":"string"},"fixedAmount":{"type":"integer","minimum":0,"description":"An amount that the charge adds in each charge period on top of its priced quantity, in cents, when it has one.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.2.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"The least that the charge bills in a charge period, in cents, when it has one: when the priced quantity plus fixedAmount comes to less, the charge bills this amount.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.2.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.2","typeLabel":"object"},{"type":"object","description":"Tiered per unit: the tiers of the charge price its units, and each tier prices them per unit. A charge on a resource in money cannot have it.","required":["model","tierMode"],"properties":{"model":{"description":"The pricing model of the price: tiered_per_unit.","enum":["tiered_per_unit"],"type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.3.model","typeLabel":"enum\u003cstring>"},"tierMode":{"enum":["progressive","volume"],"description":"How the tiers price the quantity: progressive splits it across the tiers, and volume prices all of it at the tier that it reaches.","type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.3.tierMode","typeLabel":"enum\u003cstring>"},"fixedAmount":{"type":"integer","minimum":0,"description":"An amount that the charge adds in each charge period on top of its priced quantity, in cents, when it has one.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.3.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"The least that the charge bills in a charge period, in cents, when it has one: when the priced quantity plus fixedAmount comes to less, the charge bills this amount.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.3.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.3","typeLabel":"object"},{"type":"object","description":"Tiered percentage: the tiers of the charge price its usage, and each tier bills a percentage of it. Only a charge on a resource in money has it.","required":["model","tierMode"],"properties":{"model":{"description":"The pricing model of the price: tiered_percentage.","enum":["tiered_percentage"],"type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.4.model","typeLabel":"enum\u003cstring>"},"tierMode":{"enum":["progressive","volume"],"description":"How the tiers price the quantity: progressive splits it across the tiers, and volume prices all of it at the tier that it reaches.","type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.4.tierMode","typeLabel":"enum\u003cstring>"},"fixedAmount":{"type":"integer","minimum":0,"description":"An amount that the charge adds in each charge period on top of its priced quantity, in cents, when it has one.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.4.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"The least that the charge bills in a charge period, in cents, when it has one: when the priced quantity plus fixedAmount comes to less, the charge bills this amount.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.4.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.4","typeLabel":"object"},{"type":"object","description":"Tiered fixed: the tier that the whole quantity reaches bills its flat amount. When the last tier has an end, unitOverage or percentageOverage prices the quantity past it, and a charge never has both.","required":["model","tierMode"],"properties":{"model":{"description":"The pricing model of the price: tiered_fixed.","enum":["tiered_fixed"],"type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.5.model","typeLabel":"enum\u003cstring>"},"tierMode":{"enum":["progressive","volume"],"description":"Always volume, because the tier that the whole quantity reaches bills its flat amount.","type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.5.tierMode","typeLabel":"enum\u003cstring>"},"unitOverage":{"type":"object","description":"The price of the units past the last tier, for a charge on a resource in units or on a license, when the charge has one.","properties":{"excessUnitPrice":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"The price of one unit past the last tier, as a decimal string.","examples":["0.30"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.5.unitOverage.excessUnitPrice","typeLabel":"string"}},"required":["excessUnitPrice"],"additionalProperties":false,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.5.unitOverage","typeLabel":"object"},"percentageOverage":{"type":"object","description":"The percentage of the usage past the last tier that the charge bills, for a charge on a resource in money, when the charge has one.","properties":{"excessPercentage":{"type":"string","pattern":"^(100(\\.0{1,6})?|\\d{1,2}(\\.\\d{1,6})?)$","description":"The percentage of the usage past the last tier that the charge bills, as a decimal string from 0 to 100.","examples":["1.5"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.5.percentageOverage.excessPercentage","typeLabel":"string"}},"required":["excessPercentage"],"additionalProperties":false,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.5.percentageOverage","typeLabel":"object"},"fixedAmount":{"type":"integer","minimum":0,"description":"An amount that the charge adds in each charge period on top of its priced quantity, in cents, when it has one.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.5.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"The least that the charge bills in a charge period, in cents, when it has one: when the priced quantity plus fixedAmount comes to less, the charge bills this amount.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.5.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.5","typeLabel":"object"},{"type":"object","description":"Advanced: tiers of mixed types price the quantity. The tiers of a charge on a resource in units are per_unit, per_package or flat, and those of a charge on a resource in money are percentage or flat. A charge priced before the other pricing models existed has it too.","required":["model","tierMode"],"properties":{"model":{"description":"The pricing model of the price: advanced.","enum":["advanced"],"type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.6.model","typeLabel":"enum\u003cstring>"},"tierMode":{"enum":["progressive","volume"],"description":"How the tiers price the quantity: progressive splits it across the tiers, and volume prices all of it at the tier that it reaches.","type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.6.tierMode","typeLabel":"enum\u003cstring>"},"fixedAmount":{"type":"integer","minimum":0,"description":"An amount that the charge adds in each charge period on top of its priced quantity, in cents, when it has one.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.6.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"The least that the charge bills in a charge period, in cents, when it has one: when the priced quantity plus fixedAmount comes to less, the charge bills this amount.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.6.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing.oneOf.6","typeLabel":"object"}],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.pricing","typeLabel":"object"},"resourceId":{"type":"string","format":"uuid","description":"The unique identifier of the resource whose usage the charge prices.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.resourceId","typeLabel":"string\u003cuuid>"},"currencyUnit":{"oneOf":[{"type":"object","description":"The currency unit that the charge is priced in, or null when the charge has none. A charge with no currency unit or in BRL, the default currency unit, bills money. A charge in any other currency unit, a credit unit, decreases the balance of a credit pool in that unit and bills no money.","properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier of the currency unit in our system.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.currencyUnit.oneOf.0.id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","description":"The name of the currency unit.","examples":["Real"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.currencyUnit.oneOf.0.name","typeLabel":"string"},"code":{"type":"string","description":"The short code of the currency unit.","examples":["BRL"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.currencyUnit.oneOf.0.code","typeLabel":"string"}},"required":["id","name","code"],"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.currencyUnit.oneOf.0","typeLabel":"object"},{"type":"null","description":"The currency unit that the charge is priced in, or null when the charge has none. A charge with no currency unit or in BRL, the default currency unit, bills money. A charge in any other currency unit, a credit unit, decreases the balance of a credit pool in that unit and bills no money.","properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier of the currency unit in our system."},"name":{"type":"string","description":"The name of the currency unit.","examples":["Real"]},"code":{"type":"string","description":"The short code of the currency unit.","examples":["BRL"]}},"required":["id","name","code"],"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.currencyUnit.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.currencyUnit","typeLabel":"object | null"},"tiers":{"type":"array","items":{"type":"object","description":"A price tier of the charge: a band of quantity, from one number to another, with its own price. The first tier starts at 0 or 1, and each tier starts at the to of the tier before it plus 1.","properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier of the tier in our system.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"position":{"type":"integer","minimum":0,"description":"The position of the tier in the charge, from 0, from the lowest band to the highest.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].position","typeLabel":"integer"},"from":{"type":"integer","minimum":0,"description":"The first quantity of the band, which the band includes: a number of units of the resource or of the license, or of cents for a resource in money.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].from","typeLabel":"integer"},"to":{"oneOf":[{"type":"integer","minimum":0,"description":"The last quantity of the band, which the band includes, in the unit of from, or null when the band has no end. The last tier has an end only on a charge with the pricing model tiered_fixed and an overage.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].to.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":0,"description":"The last quantity of the band, which the band includes, in the unit of from, or null when the band has no end. The last tier has an end only on a charge with the pricing model tiered_fixed and an overage.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].to.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].to","typeLabel":"integer | null"},"pricing":{"oneOf":[{"type":"object","description":"Per unit: each unit in the tier costs unitPrice. A charge on a resource in money cannot have it.","required":["type","unitPrice","fixedPrice"],"properties":{"type":{"description":"The type of the tier price: per_unit.","enum":["per_unit"],"type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.0.type","typeLabel":"enum\u003cstring>"},"unitPrice":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"The price of one unit in the tier, as a decimal string.","examples":["0.20"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.0.unitPrice","typeLabel":"string"},"fixedPrice":{"oneOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"An amount that the tier bills on top of its units when the tier applies, as a decimal string, or null when it has none. Only a tier of a charge with the pricing model tiered_per_unit has an amount other than zero.","examples":["10.00"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.0.fixedPrice.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^\\d+(\\.\\d{1,6})?$","description":"An amount that the tier bills on top of its units when the tier applies, as a decimal string, or null when it has none. Only a tier of a charge with the pricing model tiered_per_unit has an amount other than zero.","examples":["10.00"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.0.fixedPrice.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.0.fixedPrice","typeLabel":"string | null"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.0","typeLabel":"object"},{"type":"object","description":"Percentage: the tier bills a percentage of the usage that falls in it. Only a charge on a resource in money has it.","required":["type","percentage"],"properties":{"type":{"description":"The type of the tier price: percentage.","enum":["percentage"],"type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.1.type","typeLabel":"enum\u003cstring>"},"percentage":{"type":"string","pattern":"^(100(\\.0{1,6})?|\\d{1,2}(\\.\\d{1,6})?)$","description":"The percentage of the usage in the tier that the tier bills, as a decimal string from 0 to 100.","examples":["1.5"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.1.percentage","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.1","typeLabel":"object"},{"type":"object","description":"Per package: the units in the tier bill packagePrice for each package of packageSize units that they start. A charge on a resource in money cannot have it.","required":["type","packageSize","packagePrice"],"properties":{"type":{"description":"The type of the tier price: per_package.","enum":["per_package"],"type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.2.type","typeLabel":"enum\u003cstring>"},"packageSize":{"type":"integer","minimum":1,"description":"The number of units in one package.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.2.packageSize","typeLabel":"integer"},"packagePrice":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"The price of one package, as a decimal string.","examples":["45.00"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.2.packagePrice","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.2","typeLabel":"object"},{"type":"object","description":"Flat: the tier bills one amount, whatever the quantity that falls in it.","required":["type","amount"],"properties":{"type":{"description":"The type of the tier price: flat.","enum":["flat"],"type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.3.type","typeLabel":"enum\u003cstring>"},"amount":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"The amount that the tier bills, as a decimal string.","examples":["199.90"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.3.amount","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX].pricing","typeLabel":"object"}},"required":["id","position","from","to","pricing"],"additionalProperties":false,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.tiers.items.[INDEX]","typeLabel":"object"},"description":"The price tiers of the charge, from the lowest band to the highest, for the pricing models tiered_per_unit, tiered_percentage, tiered_fixed and advanced, or an empty list for the other pricing models.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2.tiers","typeLabel":"object[]"}},"additionalProperties":false,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"A license-based charge: a charge on the balance of a license in its charge period, read by its billing model and priced by its pricing model.","required":["id","position","itemId","productId","name","isCustomNameEnabled","category","pricingModel","pricing","billingFrequency","licenseId","billingModel","tiers"],"properties":{"category":{"type":"string","description":"The category of the charge: license_based.","enum":["license_based"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.category","typeLabel":"enum\u003cstring>"},"id":{"type":"string","format":"uuid","description":"The unique identifier of the plan charge in our system.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.id","typeLabel":"string\u003cuuid>"},"position":{"type":"integer","minimum":0,"description":"The position of the charge in the plan, from 0, in the order that the billing app shows.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.position","typeLabel":"integer"},"itemId":{"type":"string","format":"uuid","description":"The unique identifier of the item that the charge bills. The line items of the charge name the same item.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.itemId","typeLabel":"string\u003cuuid>"},"productId":{"type":"string","format":"uuid","description":"The unique identifier of the product that the charge belongs to.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.productId","typeLabel":"string\u003cuuid>"},"name":{"type":"string","minLength":1,"description":"The name of the charge, as the invoices show it.","examples":["Mensalidade"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.name","typeLabel":"string"},"isCustomNameEnabled":{"type":"boolean","description":"Whether the charge has a name of its own. When false, the name of the charge is the name of its resource, of its license or of its item.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.isCustomNameEnabled","typeLabel":"boolean"},"billingFrequency":{"type":"object","description":"How often the charge bills: each charge period of the charge lasts count units, the charge counts its charge periods from the contract start, and it bills each charge period once. Aira accepts 1 or 2 weeks and 1, 3, 6 or 12 months, and a prorated charge bills every week or every month.","properties":{"unit":{"type":"string","enum":["month","week"],"description":"The unit of the billing frequency: month or week. Every charge of a plan has the same unit.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.billingFrequency.unit","typeLabel":"enum\u003cstring>"},"count":{"type":"integer","minimum":1,"description":"The number of units in each charge period of the charge.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.billingFrequency.count","typeLabel":"integer"}},"required":["unit","count"],"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.billingFrequency","typeLabel":"object"},"pricingModel":{"type":"string","enum":["per_unit","per_package","tiered_per_unit","tiered_fixed"],"description":"The pricing model of the charge, the same as pricing.model: per_unit, per_package, tiered_per_unit or tiered_fixed. No percentage applies, because the balance of a license is a count, not an amount of money.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricingModel","typeLabel":"enum\u003cstring>"},"pricing":{"oneOf":[{"type":"object","description":"Per unit: each unit of the charge period past the included quantity costs unitPrice. A charge on a resource in money cannot have it.","required":["model","unitPrice"],"properties":{"model":{"description":"The pricing model of the price: per_unit.","enum":["per_unit"],"type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.0.model","typeLabel":"enum\u003cstring>"},"unitPrice":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"The price of one unit, as a decimal string.","examples":["0.25"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.0.unitPrice","typeLabel":"string"},"includedQuantity":{"type":"integer","minimum":0,"description":"The number of units of each charge period that the charge does not bill, when it has one.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.0.includedQuantity","typeLabel":"integer"},"fixedAmount":{"type":"integer","minimum":0,"description":"An amount that the charge adds in each charge period on top of its priced quantity, in cents, when it has one.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.0.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"The least that the charge bills in a charge period, in cents, when it has one: when the priced quantity plus fixedAmount comes to less, the charge bills this amount.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.0.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.0","typeLabel":"object"},{"type":"object","description":"Per package: the units of the charge period past the included quantity bill packagePrice for each package of packageSize units that they start. A charge on a resource in money cannot have it.","required":["model","packageSize","packagePrice"],"properties":{"model":{"description":"The pricing model of the price: per_package.","enum":["per_package"],"type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.1.model","typeLabel":"enum\u003cstring>"},"packageSize":{"type":"integer","minimum":1,"description":"The number of units in one package.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.1.packageSize","typeLabel":"integer"},"packagePrice":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"The price of one package, as a decimal string.","examples":["50.00"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.1.packagePrice","typeLabel":"string"},"includedQuantity":{"type":"integer","minimum":0,"description":"The number of units of each charge period that the charge does not bill, when it has one.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.1.includedQuantity","typeLabel":"integer"},"fixedAmount":{"type":"integer","minimum":0,"description":"An amount that the charge adds in each charge period on top of its priced quantity, in cents, when it has one.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.1.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"The least that the charge bills in a charge period, in cents, when it has one: when the priced quantity plus fixedAmount comes to less, the charge bills this amount.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.1.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.1","typeLabel":"object"},{"type":"object","description":"Percentage: the charge bills a percentage of the usage of its resource in the charge period. Only a charge on a resource in money has it.","required":["model","percentage"],"properties":{"model":{"description":"The pricing model of the price: percentage.","enum":["percentage"],"type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.2.model","typeLabel":"enum\u003cstring>"},"percentage":{"type":"string","pattern":"^(100(\\.0{1,6})?|\\d{1,2}(\\.\\d{1,6})?)$","description":"The percentage of the usage that the charge bills, as a decimal string from 0 to 100.","examples":["2.5"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.2.percentage","typeLabel":"string"},"fixedAmount":{"type":"integer","minimum":0,"description":"An amount that the charge adds in each charge period on top of its priced quantity, in cents, when it has one.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.2.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"The least that the charge bills in a charge period, in cents, when it has one: when the priced quantity plus fixedAmount comes to less, the charge bills this amount.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.2.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.2","typeLabel":"object"},{"type":"object","description":"Tiered per unit: the tiers of the charge price its units, and each tier prices them per unit. A charge on a resource in money cannot have it.","required":["model","tierMode"],"properties":{"model":{"description":"The pricing model of the price: tiered_per_unit.","enum":["tiered_per_unit"],"type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.3.model","typeLabel":"enum\u003cstring>"},"tierMode":{"enum":["progressive","volume"],"description":"How the tiers price the quantity: progressive splits it across the tiers, and volume prices all of it at the tier that it reaches.","type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.3.tierMode","typeLabel":"enum\u003cstring>"},"fixedAmount":{"type":"integer","minimum":0,"description":"An amount that the charge adds in each charge period on top of its priced quantity, in cents, when it has one.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.3.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"The least that the charge bills in a charge period, in cents, when it has one: when the priced quantity plus fixedAmount comes to less, the charge bills this amount.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.3.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.3","typeLabel":"object"},{"type":"object","description":"Tiered percentage: the tiers of the charge price its usage, and each tier bills a percentage of it. Only a charge on a resource in money has it.","required":["model","tierMode"],"properties":{"model":{"description":"The pricing model of the price: tiered_percentage.","enum":["tiered_percentage"],"type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.4.model","typeLabel":"enum\u003cstring>"},"tierMode":{"enum":["progressive","volume"],"description":"How the tiers price the quantity: progressive splits it across the tiers, and volume prices all of it at the tier that it reaches.","type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.4.tierMode","typeLabel":"enum\u003cstring>"},"fixedAmount":{"type":"integer","minimum":0,"description":"An amount that the charge adds in each charge period on top of its priced quantity, in cents, when it has one.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.4.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"The least that the charge bills in a charge period, in cents, when it has one: when the priced quantity plus fixedAmount comes to less, the charge bills this amount.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.4.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.4","typeLabel":"object"},{"type":"object","description":"Tiered fixed: the tier that the whole quantity reaches bills its flat amount. When the last tier has an end, unitOverage or percentageOverage prices the quantity past it, and a charge never has both.","required":["model","tierMode"],"properties":{"model":{"description":"The pricing model of the price: tiered_fixed.","enum":["tiered_fixed"],"type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.5.model","typeLabel":"enum\u003cstring>"},"tierMode":{"enum":["progressive","volume"],"description":"Always volume, because the tier that the whole quantity reaches bills its flat amount.","type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.5.tierMode","typeLabel":"enum\u003cstring>"},"unitOverage":{"type":"object","description":"The price of the units past the last tier, for a charge on a resource in units or on a license, when the charge has one.","properties":{"excessUnitPrice":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"The price of one unit past the last tier, as a decimal string.","examples":["0.30"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.5.unitOverage.excessUnitPrice","typeLabel":"string"}},"required":["excessUnitPrice"],"additionalProperties":false,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.5.unitOverage","typeLabel":"object"},"percentageOverage":{"type":"object","description":"The percentage of the usage past the last tier that the charge bills, for a charge on a resource in money, when the charge has one.","properties":{"excessPercentage":{"type":"string","pattern":"^(100(\\.0{1,6})?|\\d{1,2}(\\.\\d{1,6})?)$","description":"The percentage of the usage past the last tier that the charge bills, as a decimal string from 0 to 100.","examples":["1.5"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.5.percentageOverage.excessPercentage","typeLabel":"string"}},"required":["excessPercentage"],"additionalProperties":false,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.5.percentageOverage","typeLabel":"object"},"fixedAmount":{"type":"integer","minimum":0,"description":"An amount that the charge adds in each charge period on top of its priced quantity, in cents, when it has one.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.5.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"The least that the charge bills in a charge period, in cents, when it has one: when the priced quantity plus fixedAmount comes to less, the charge bills this amount.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.5.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.5","typeLabel":"object"},{"type":"object","description":"Advanced: tiers of mixed types price the quantity. The tiers of a charge on a resource in units are per_unit, per_package or flat, and those of a charge on a resource in money are percentage or flat. A charge priced before the other pricing models existed has it too.","required":["model","tierMode"],"properties":{"model":{"description":"The pricing model of the price: advanced.","enum":["advanced"],"type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.6.model","typeLabel":"enum\u003cstring>"},"tierMode":{"enum":["progressive","volume"],"description":"How the tiers price the quantity: progressive splits it across the tiers, and volume prices all of it at the tier that it reaches.","type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.6.tierMode","typeLabel":"enum\u003cstring>"},"fixedAmount":{"type":"integer","minimum":0,"description":"An amount that the charge adds in each charge period on top of its priced quantity, in cents, when it has one.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.6.fixedAmount","typeLabel":"integer"},"minimumAmount":{"type":"integer","minimum":0,"description":"The least that the charge bills in a charge period, in cents, when it has one: when the priced quantity plus fixedAmount comes to less, the charge bills this amount.","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.6.minimumAmount","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing.oneOf.6","typeLabel":"object"}],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.pricing","typeLabel":"object"},"licenseId":{"type":"string","format":"uuid","description":"The unique identifier of the license whose balance the charge bills.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.licenseId","typeLabel":"string\u003cuuid>"},"billingModel":{"type":"string","enum":["in_full","proration"],"description":"How the charge reads the balance of its license in a charge period: in_full bills the last balance, and proration weighs each balance by the days that it was in effect.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.billingModel","typeLabel":"enum\u003cstring>"},"tiers":{"type":"array","items":{"type":"object","description":"A price tier of the charge: a band of quantity, from one number to another, with its own price. The first tier starts at 0 or 1, and each tier starts at the to of the tier before it plus 1.","properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier of the tier in our system.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"position":{"type":"integer","minimum":0,"description":"The position of the tier in the charge, from 0, from the lowest band to the highest.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].position","typeLabel":"integer"},"from":{"type":"integer","minimum":0,"description":"The first quantity of the band, which the band includes: a number of units of the resource or of the license, or of cents for a resource in money.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].from","typeLabel":"integer"},"to":{"oneOf":[{"type":"integer","minimum":0,"description":"The last quantity of the band, which the band includes, in the unit of from, or null when the band has no end. The last tier has an end only on a charge with the pricing model tiered_fixed and an overage.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].to.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":0,"description":"The last quantity of the band, which the band includes, in the unit of from, or null when the band has no end. The last tier has an end only on a charge with the pricing model tiered_fixed and an overage.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].to.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].to","typeLabel":"integer | null"},"pricing":{"oneOf":[{"type":"object","description":"Per unit: each unit in the tier costs unitPrice. A charge on a resource in money cannot have it.","required":["type","unitPrice","fixedPrice"],"properties":{"type":{"description":"The type of the tier price: per_unit.","enum":["per_unit"],"type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.0.type","typeLabel":"enum\u003cstring>"},"unitPrice":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"The price of one unit in the tier, as a decimal string.","examples":["0.20"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.0.unitPrice","typeLabel":"string"},"fixedPrice":{"oneOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"An amount that the tier bills on top of its units when the tier applies, as a decimal string, or null when it has none. Only a tier of a charge with the pricing model tiered_per_unit has an amount other than zero.","examples":["10.00"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.0.fixedPrice.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^\\d+(\\.\\d{1,6})?$","description":"An amount that the tier bills on top of its units when the tier applies, as a decimal string, or null when it has none. Only a tier of a charge with the pricing model tiered_per_unit has an amount other than zero.","examples":["10.00"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.0.fixedPrice.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.0.fixedPrice","typeLabel":"string | null"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.0","typeLabel":"object"},{"type":"object","description":"Percentage: the tier bills a percentage of the usage that falls in it. Only a charge on a resource in money has it.","required":["type","percentage"],"properties":{"type":{"description":"The type of the tier price: percentage.","enum":["percentage"],"type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.1.type","typeLabel":"enum\u003cstring>"},"percentage":{"type":"string","pattern":"^(100(\\.0{1,6})?|\\d{1,2}(\\.\\d{1,6})?)$","description":"The percentage of the usage in the tier that the tier bills, as a decimal string from 0 to 100.","examples":["1.5"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.1.percentage","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.1","typeLabel":"object"},{"type":"object","description":"Per package: the units in the tier bill packagePrice for each package of packageSize units that they start. A charge on a resource in money cannot have it.","required":["type","packageSize","packagePrice"],"properties":{"type":{"description":"The type of the tier price: per_package.","enum":["per_package"],"type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.2.type","typeLabel":"enum\u003cstring>"},"packageSize":{"type":"integer","minimum":1,"description":"The number of units in one package.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.2.packageSize","typeLabel":"integer"},"packagePrice":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"The price of one package, as a decimal string.","examples":["45.00"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.2.packagePrice","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.2","typeLabel":"object"},{"type":"object","description":"Flat: the tier bills one amount, whatever the quantity that falls in it.","required":["type","amount"],"properties":{"type":{"description":"The type of the tier price: flat.","enum":["flat"],"type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.3.type","typeLabel":"enum\u003cstring>"},"amount":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"The amount that the tier bills, as a decimal string.","examples":["199.90"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.3.amount","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX].pricing","typeLabel":"object"}},"required":["id","position","from","to","pricing"],"additionalProperties":false,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.tiers.items.[INDEX]","typeLabel":"object"},"description":"The price tiers of the charge, from the lowest band to the highest, for the pricing models tiered_per_unit and tiered_fixed, or an empty list for the other pricing models.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3.tiers","typeLabel":"object[]"}},"additionalProperties":false,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.3","typeLabel":"object"},{"type":"object","description":"A custom plan charge: a charge whose price comes from code that Aira writes for the tenant, from the custom charge definition that the charge follows and from the parameter values of the charge. It bills in arrears, in money.","required":["id","position","itemId","productId","name","isCustomNameEnabled","category","pricingModel","pricing","billingFrequency","customChargeDefinitionId","chosenResourceIds","chosenLicenseIds"],"properties":{"category":{"type":"string","description":"The category of the charge: custom.","enum":["custom"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.4.category","typeLabel":"enum\u003cstring>"},"id":{"type":"string","format":"uuid","description":"The unique identifier of the plan charge in our system.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.4.id","typeLabel":"string\u003cuuid>"},"position":{"type":"integer","minimum":0,"description":"The position of the charge in the plan, from 0, in the order that the billing app shows.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.4.position","typeLabel":"integer"},"itemId":{"type":"string","format":"uuid","description":"The unique identifier of the item that the charge bills. The line items of the charge name the same item.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.4.itemId","typeLabel":"string\u003cuuid>"},"productId":{"type":"string","format":"uuid","description":"The unique identifier of the product that the charge belongs to.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.4.productId","typeLabel":"string\u003cuuid>"},"name":{"type":"string","minLength":1,"description":"The name of the charge, as the invoices show it.","examples":["Mensalidade"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.4.name","typeLabel":"string"},"isCustomNameEnabled":{"type":"boolean","description":"Whether the charge has a name of its own. When false, the name of the charge is the name of its resource, of its license or of its item.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.4.isCustomNameEnabled","typeLabel":"boolean"},"billingFrequency":{"type":"object","description":"How often the charge bills: each charge period of the charge lasts count units, the charge counts its charge periods from the contract start, and it bills each charge period once. Aira accepts 1 or 2 weeks and 1, 3, 6 or 12 months, and a prorated charge bills every week or every month.","properties":{"unit":{"type":"string","enum":["month","week"],"description":"The unit of the billing frequency: month or week. Every charge of a plan has the same unit.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.4.billingFrequency.unit","typeLabel":"enum\u003cstring>"},"count":{"type":"integer","minimum":1,"description":"The number of units in each charge period of the charge.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.4.billingFrequency.count","typeLabel":"integer"}},"required":["unit","count"],"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.4.billingFrequency","typeLabel":"object"},"pricingModel":{"type":"string","description":"The pricing model of the charge, always custom.","enum":["custom"],"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.4.pricingModel","typeLabel":"enum\u003cstring>"},"pricing":{"type":"object","description":"The price of a custom plan charge: the parameter values that the code that Aira writes for the tenant turns into an amount.","properties":{"model":{"description":"The pricing model of the price: custom.","enum":["custom"],"type":"string","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.4.pricing.model","typeLabel":"enum\u003cstring>"},"parameters":{"type":"object","additionalProperties":true,"description":"The parameter values of the charge, by the keys of the parameter schema of its custom charge definition.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.4.pricing.parameters","typeLabel":"object"}},"required":["model","parameters"],"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.4.pricing","typeLabel":"object"},"customChargeDefinitionId":{"type":"string","format":"uuid","description":"The unique identifier of the custom charge definition that the charge follows.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.4.customChargeDefinitionId","typeLabel":"string\u003cuuid>"},"chosenResourceIds":{"type":"array","items":{"type":"string","format":"uuid","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.4.chosenResourceIds.items.[INDEX]","typeLabel":"string\u003cuuid>"},"description":"The unique identifiers of the resources that the charge chose as its inputs, from the input resources of its custom charge definition.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.4.chosenResourceIds","typeLabel":"string\u003cuuid>[]"},"chosenLicenseIds":{"type":"array","items":{"type":"string","format":"uuid","uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.4.chosenLicenseIds.items.[INDEX]","typeLabel":"string\u003cuuid>"},"description":"The unique identifiers of the licenses that the charge chose as its inputs, from the input licenses of its custom charge definition.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.4.chosenLicenseIds","typeLabel":"string\u003cuuid>[]"}},"additionalProperties":false,"uniqueKey":"activePlanVersion.planCharges.items.[INDEX].oneOf.4","typeLabel":"object"}],"uniqueKey":"activePlanVersion.planCharges.items.[INDEX]","typeLabel":"object"},"description":"The plan charges of the plan version.","isRequired":true,"uniqueKey":"activePlanVersion.planCharges","typeLabel":"object[]"}},"required":["id","versionNumber","isActive","planCharges"],"additionalProperties":false,"isRequired":true,"uniqueKey":"activePlanVersion","typeLabel":"object"}},"required":["id","name","description","product","activePlanVersion"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"Plano Essencial","description":"Assinatura mensal com entrega diária de pães.","product":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"Platform subscription"},"activePlanVersion":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","versionNumber":2,"isActive":true,"planCharges":[{"category":"fixed","id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","position":1,"itemId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","productId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"Mensalidade","isCustomNameEnabled":true,"billingFrequency":{"unit":"month","count":2},"pricingModel":"fixed","pricing":{"model":"fixed","amount":1,"quantity":2},"billingTiming":"in_advance"}]}}}},"exampleType":"generated"}},"exampleType":"generated"},"6463dd78-80b7-473f-8268-8f9f7d0a1a0c":{"description":"The request cannot succeed as sent.\n\n- `json_schema_validation_error`: the body breaks the schema of the endpoint.\n- `product_not_found`: no product of the tenant has the `productId`.\n- `invalid_plan_charges`: a plan charge breaks a rule of plan charges, such as tiers that leave a gap, an item, a resource or a license that the tenant does not have, two minimum commitments with the same billing frequency, or billing frequencies in both months and weeks.\n- `billing_frequency_not_yet_supported`: a license-based charge with the billing model `proration`, or a usage-based charge on a resource with the billing model `proration`, has a billing frequency of more than one month or one week.\n- `currency_unit_not_found`: no currency unit of the tenant has the `currencyUnitCode` of a usage-based charge.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A sentence for a person that says what failed. It can change, so a system compares the code instead.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"code":{"type":"string","description":"The identifier of the error, which a system compares to decide what to do. It never changes.","enum":["json_schema_validation_error","product_not_found","invalid_plan_charges","billing_frequency_not_yet_supported","currency_unit_not_found"],"isRequired":true,"uniqueKey":"code","typeLabel":"enum\u003cstring>"},"details":{"oneOf":[{"type":"object","description":"The data of the error, when it has any, such as the fields that failed the validation.","additionalProperties":true,"uniqueKey":"details.oneOf.0","typeLabel":"object"},{"type":"array","items":{"oneOf":[{}],"uniqueKey":"details.oneOf.1.items.[INDEX]","typeLabel":"any"},"description":"The data of the error, when it has any, such as the fields that failed the validation.","uniqueKey":"details.oneOf.1","typeLabel":"any[]"}],"uniqueKey":"details","typeLabel":"object | any[]"},"causations":{"type":"array","description":"The errors that caused this one, when several did, each with its own message, code and details.","items":{"type":"object","properties":{"message":{"type":"string","description":"A sentence for a person that says what failed.","isRequired":true,"uniqueKey":"causations.items.[INDEX].message","typeLabel":"string"},"code":{"type":"string","description":"The identifier of the error.","isRequired":true,"uniqueKey":"causations.items.[INDEX].code","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"description":"The data of the error, when it has any.","uniqueKey":"causations.items.[INDEX].details","typeLabel":"object"}},"required":["message","code"],"additionalProperties":false,"uniqueKey":"causations.items.[INDEX]","typeLabel":"object"},"uniqueKey":"causations","typeLabel":"object[]"}},"required":["message","code"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"json_schema_validation_error":{"title":"json_schema_validation_error","value":{"message":"'name' is required","code":"json_schema_validation_error"}},"product_not_found":{"title":"product_not_found","value":{"message":"default product not found","code":"product_not_found"}},"invalid_plan_charges":{"title":"invalid_plan_charges","value":{"message":"plan charge \"{itemName}\": {reason}","code":"invalid_plan_charges"}},"billing_frequency_not_yet_supported":{"title":"billing_frequency_not_yet_supported","value":{"message":"a license-based charge with the billing model `proration`, or a usage-based charge on a resource with the billing model `proration`, has a billing frequency of more than one month or one week","code":"billing_frequency_not_yet_supported"}},"currency_unit_not_found":{"title":"currency_unit_not_found","value":{"message":"currency unit not found","code":"currency_unit_not_found"}}},"exampleType":"examples"}},"exampleType":"examples"},"9c2d8f60-6d5d-4e38-a8ad-56d162f604ed":{"description":"The request carries no API key.\n\n- `no_authorization`: the request carries no API key in the `X-API-KEY` header.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A sentence for a person that says what failed. It can change, so a system compares the code instead.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"code":{"type":"string","description":"The identifier of the error, which a system compares to decide what to do. It never changes.","enum":["no_authorization"],"isRequired":true,"uniqueKey":"code","typeLabel":"enum\u003cstring>"},"details":{"oneOf":[{"type":"object","description":"The data of the error, when it has any, such as the fields that failed the validation.","additionalProperties":true,"uniqueKey":"details.oneOf.0","typeLabel":"object"},{"type":"array","items":{"oneOf":[{}],"uniqueKey":"details.oneOf.1.items.[INDEX]","typeLabel":"any"},"description":"The data of the error, when it has any, such as the fields that failed the validation.","uniqueKey":"details.oneOf.1","typeLabel":"any[]"}],"uniqueKey":"details","typeLabel":"object | any[]"},"causations":{"type":"array","description":"The errors that caused this one, when several did, each with its own message, code and details.","items":{"type":"object","properties":{"message":{"type":"string","description":"A sentence for a person that says what failed.","isRequired":true,"uniqueKey":"causations.items.[INDEX].message","typeLabel":"string"},"code":{"type":"string","description":"The identifier of the error.","isRequired":true,"uniqueKey":"causations.items.[INDEX].code","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"description":"The data of the error, when it has any.","uniqueKey":"causations.items.[INDEX].details","typeLabel":"object"}},"required":["message","code"],"additionalProperties":false,"uniqueKey":"causations.items.[INDEX]","typeLabel":"object"},"uniqueKey":"causations","typeLabel":"object[]"}},"required":["message","code"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"no_authorization":{"title":"no_authorization","value":{"message":"No authorization provided","code":"no_authorization"}}},"exampleType":"examples"}},"exampleType":"examples"},"39942535-d863-4dbb-8dec-8cddb5c1e681":{"description":"The API key cannot call the endpoint.\n\n- `bad_auth`: the API key does not hold the role that the endpoint requires.\n- `invalid_api_key`: the API key does not exist.\n- `deactivated_api_key`: the API key is deactivated.\n- `revoked_api_key`: the API key is revoked.\n- `expired_api_key`: the API key is past its expiry date.\n- `ip_not_allowed`: the tenant does not allow the IP of the request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A sentence for a person that says what failed. It can change, so a system compares the code instead.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"code":{"type":"string","description":"The identifier of the error, which a system compares to decide what to do. It never changes.","enum":["bad_auth","invalid_api_key","deactivated_api_key","revoked_api_key","expired_api_key","ip_not_allowed"],"isRequired":true,"uniqueKey":"code","typeLabel":"enum\u003cstring>"},"details":{"oneOf":[{"type":"object","description":"The data of the error, when it has any, such as the fields that failed the validation.","additionalProperties":true,"uniqueKey":"details.oneOf.0","typeLabel":"object"},{"type":"array","items":{"oneOf":[{}],"uniqueKey":"details.oneOf.1.items.[INDEX]","typeLabel":"any"},"description":"The data of the error, when it has any, such as the fields that failed the validation.","uniqueKey":"details.oneOf.1","typeLabel":"any[]"}],"uniqueKey":"details","typeLabel":"object | any[]"},"causations":{"type":"array","description":"The errors that caused this one, when several did, each with its own message, code and details.","items":{"type":"object","properties":{"message":{"type":"string","description":"A sentence for a person that says what failed.","isRequired":true,"uniqueKey":"causations.items.[INDEX].message","typeLabel":"string"},"code":{"type":"string","description":"The identifier of the error.","isRequired":true,"uniqueKey":"causations.items.[INDEX].code","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"description":"The data of the error, when it has any.","uniqueKey":"causations.items.[INDEX].details","typeLabel":"object"}},"required":["message","code"],"additionalProperties":false,"uniqueKey":"causations.items.[INDEX]","typeLabel":"object"},"uniqueKey":"causations","typeLabel":"object[]"}},"required":["message","code"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"bad_auth":{"title":"bad_auth","value":{"message":"role plans:write can not be satisfied","code":"bad_auth"}},"invalid_api_key":{"title":"invalid_api_key","value":{"message":"Invalid API key","code":"invalid_api_key"}},"deactivated_api_key":{"title":"deactivated_api_key","value":{"message":"Deactivated API key","code":"deactivated_api_key"}},"revoked_api_key":{"title":"revoked_api_key","value":{"message":"Revoked API key","code":"revoked_api_key"}},"expired_api_key":{"title":"expired_api_key","value":{"message":"Expired API key","code":"expired_api_key"}},"ip_not_allowed":{"title":"ip_not_allowed","value":{"message":"IP not allowed","code":"ip_not_allowed"}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"519e228f-206f-45ab-bf65-37e5213eef75":{"ApiKey":{"type":"apiKey","description":"API Key Authentication.","name":"X-API-KEY","in":"header","scopes":[],"schemeName":"ApiKey"}}},"servers":{"d5296371-7705-41a9-914c-32740086e4b0":{"url":"https://api.useaira.com","description":"API base URL"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","description":"API Key Authentication.","name":"X-API-KEY","in":"header","scopes":[],"schemeName":"ApiKey"},"schema":{"title":"X-API-KEY","type":"string","description":"API Key Authentication.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKey","name":"X-API-KEY"}],"title":"ApiKey"}]},"originalFileLocation":"api-reference/openapi.yaml"},"subdomain":"aira-e93056c6","siteName":"Aira","title":"Create plan - Aira","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-27T03:21:57.579Z","originalFileLocation":"api-reference/plans/create-plan.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Creates a plan of a product with its first plan version, which holds the plan charges of the body and becomes the active plan version of the plan, so a new plan instance of the plan bills those plan charges. Requires the role plans:write.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Aira\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/aira-e93056c6/rFHNG1I4T4E6tM9X/_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/aira-e93056c6/rFHNG1I4T4E6tM9X/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/aira-e93056c6/rFHNG1I4T4E6tM9X/_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/aira-e93056c6/rFHNG1I4T4E6tM9X/_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/aira-e93056c6/rFHNG1I4T4E6tM9X/_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/aira-e93056c6/rFHNG1I4T4E6tM9X/_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/aira-e93056c6/rFHNG1I4T4E6tM9X/_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/aira-e93056c6/rFHNG1I4T4E6tM9X/_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/aira-e93056c6/rFHNG1I4T4E6tM9X/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create plan - Aira\">\u003cmeta data-mint-head property=\"og:description\" content=\"Creates a plan of a product with its first plan version, which holds the plan charges of the body and becomes the active plan version of the plan, so a new plan instance of the plan bills those plan charges. Requires the role plans:write.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Aira\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.useaira.com/api-reference/plans/create-plan\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://aira-e93056c6.mintlify.site/_mintlify/api/og/v2?division=Plans\u0026amp;title=Create+plan\u0026amp;description=Creates+a+plan+of+a+product+with+its+first+plan+version%2C+which+holds+the+plan+charges+of+the+body+and+becomes+the+active+plan+version+of+the+plan%2C+so+a+new+plan\u0026amp;theme=8169730228d89f2c41115879\u0026amp;signature=d818e69c69963af397273d3c6e6ace5343af415566ef3bef41eeeafcf4a70284\">\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=\"Create plan - Aira\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Creates a plan of a product with its first plan version, which holds the plan charges of the body and becomes the active plan version of the plan, so a new plan instance of the plan bills those plan charges. Requires the role plans:write.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://aira-e93056c6.mintlify.site/_mintlify/api/og/v2?division=Plans\u0026amp;title=Create+plan\u0026amp;description=Creates+a+plan+of+a+product+with+its+first+plan+version%2C+which+holds+the+plan+charges+of+the+body+and+becomes+the+active+plan+version+of+the+plan%2C+so+a+new+plan\u0026amp;theme=8169730228d89f2c41115879\u0026amp;signature=d818e69c69963af397273d3c6e6ace5343af415566ef3bef41eeeafcf4a70284\">\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/aira-e93056c6/rFHNG1I4T4E6tM9X/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Aira\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#542691\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.useaira.com/api-reference/plans/create-plan\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/plans/create-plan.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.useaira.com/#organization\",\"name\":\"Aira\",\"url\":\"https://docs.useaira.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/aira-e93056c6/NIoErVFaJlphCKFi/logo/light.svg?fit=max\u0026auto=format\u0026n=NIoErVFaJlphCKFi\u0026q=85\u0026s=d222c0199c2a89d6e27d97ba6ef28275\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.useaira.com#website\",\"name\":\"Aira\",\"url\":\"https://docs.useaira.com\",\"publisher\":{\"@id\":\"https://docs.useaira.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.useaira.com/api-reference/plans/create-plan#webpage\",\"url\":\"https://docs.useaira.com/api-reference/plans/create-plan\",\"name\":\"Create plan\",\"description\":\"Creates a plan of a product with its first plan version, which holds the plan charges of the body and becomes the active plan version of the plan, so a new plan instance of the plan bills those plan charges. Requires the role plans:write.\",\"dateModified\":\"2026-11-27T03:21:57.579Z\",\"isPartOf\":{\"@id\":\"https://docs.useaira.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.useaira.com/api-reference/plans/create-plan#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.useaira.com/api-reference/plans/create-plan#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Referência da API\",\"item\":\"https://docs.useaira.com/api-reference/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Plans\",\"item\":\"https://docs.useaira.com/api-reference/plans/list-plans\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Create plan\",\"item\":\"https://docs.useaira.com/api-reference/plans/create-plan\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.useaira.com/api-reference/plans/create-plan#apireference\",\"headline\":\"Create plan\",\"name\":\"Create plan\",\"description\":\"Creates a plan of a product with its first plan version, which holds the plan charges of the body and becomes the active plan version of the plan, so a new plan instance of the plan bills those plan charges. Requires the role plans:write.\",\"url\":\"https://docs.useaira.com/api-reference/plans/create-plan\",\"mainEntityOfPage\":{\"@id\":\"https://docs.useaira.com/api-reference/plans/create-plan#webpage\"},\"dateModified\":\"2026-11-27T03:21:57.579Z\",\"publisher\":{\"@id\":\"https://docs.useaira.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.useaira.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Aira\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Aira\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/plans/create-plan.md","siteName":"Aira","nav":{"global":null,"tabs":[{"tab":"Documentação","pages":[{"title":"Documentação","href":""}]},{"tab":"Guias","pages":[{"title":"Guias","href":"/clientes/criar-clientes"}]},{"tab":"Integrações","pages":[{"title":"Integrações","href":"/integracoes/visao-geral"}]},{"tab":"Referência da API","groups":[{"group":"Referência da API","pages":[{"title":"Referência da API","sidebarTitle":"Visão geral","icon":"square-terminal","href":"/api-reference/introduction"},{"title":"Autenticação","sidebarTitle":"Autenticação","icon":"key","href":"/api-reference/autenticacao"},{"title":"Paginação e limites","sidebarTitle":"Paginação e limites","icon":"gauge","href":"/api-reference/paginacao-e-limites"},{"title":"Webhooks","sidebarTitle":"Webhooks","icon":"webhook","href":"/api-reference/webhooks"},{"title":"Respostas de erro","sidebarTitle":"Respostas de erro","icon":"circle-x","href":"/api-reference/error-responses"},{"group":"Customers","pages":[{"title":"List customers","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/customers/","href":"/api-reference/customers/list-customers"},{"title":"Create customer","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/customers/","href":"/api-reference/customers/create-customer"},{"title":"Fetch customer","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/customers/{id}","href":"/api-reference/customers/fetch-customer"},{"title":"Update customer","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /v1/customers/{id}","href":"/api-reference/customers/update-customer"},{"title":"Delete customer","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /v1/customers/{id}","href":"/api-reference/customers/delete-customer"},{"title":"Fetch customer by external ID","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/customers/by-external-id/{externalId}","href":"/api-reference/customers/fetch-customer-by-external-id"},{"title":"Update customer by external ID","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /v1/customers/by-external-id/{externalId}","href":"/api-reference/customers/update-customer-by-external-id"},{"title":"Delete customer by external ID","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /v1/customers/by-external-id/{externalId}","href":"/api-reference/customers/delete-customer-by-external-id"},{"title":"Archive customer","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/customers/{id}/archive","href":"/api-reference/customers/archive-customer"},{"title":"Unarchive customer","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/customers/{id}/unarchive","href":"/api-reference/customers/unarchive-customer"},{"title":"List customer subsidiaries","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/customers/{id}/subsidiaries","href":"/api-reference/customers/list-customer-subsidiaries"}]},{"group":"Resources","pages":[{"title":"List resources","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/resources/","href":"/api-reference/resources/list-resources"},{"title":"Create resource","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/resources/","href":"/api-reference/resources/create-resource"},{"title":"Fetch resource","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/resources/{id}","href":"/api-reference/resources/fetch-resource"},{"title":"Update resource","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /v1/resources/{id}","href":"/api-reference/resources/update-resource"},{"title":"Delete resource","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /v1/resources/{id}","href":"/api-reference/resources/delete-resource"},{"title":"Archive resource","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/resources/{id}/archive","href":"/api-reference/resources/archive-resource"},{"title":"Unarchive resource","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/resources/{id}/unarchive","href":"/api-reference/resources/unarchive-resource"}]},{"group":"Revenue Traceability","pages":[{"title":"List revenue items","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/revenue-items/","href":"/api-reference/revenue-traceability/list-revenue-items"},{"title":"List revenue traceabilities","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/revenue-traceability/","href":"/api-reference/revenue-traceability/list-revenue-traceabilities"},{"title":"List the products that a contract bills","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/revenue-traceability/contract-products","href":"/api-reference/revenue-traceability/list-the-products-that-a-contract-bills"},{"title":"Replace revenue traceabilities","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /v1/revenue-traceability/{contractId}","href":"/api-reference/revenue-traceability/replace-revenue-traceabilities"}]},{"group":"Invoices","pages":[{"title":"Fetch invoice","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/invoices/{id}","href":"/api-reference/invoices/fetch-invoice"},{"title":"Fetch invoice by provider ID","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/invoices/by-provider-id/{providerId}","href":"/api-reference/invoices/fetch-invoice-by-provider-id"},{"title":"List invoices","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/invoices/","href":"/api-reference/invoices/list-invoices"},{"title":"Create invoice","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/invoices/","href":"/api-reference/invoices/create-invoice"},{"title":"Download invoice PDF","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/invoices/{id}/pdf","href":"/api-reference/invoices/download-invoice-pdf"},{"title":"List invoice discounts","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/invoices/{invoiceId}/discounts","href":"/api-reference/invoices/list-invoice-discounts"},{"title":"Create invoice discount","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/invoices/{invoiceId}/discounts","href":"/api-reference/invoices/create-invoice-discount"},{"title":"Download the fiscal document of an invoice","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/invoices/{id}/fiscal-invoice/download","href":"/api-reference/invoices/download-the-fiscal-document-of-an-invoice"},{"title":"List the additional charges of an invoice","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/invoices/{invoiceId}/additional-charges","href":"/api-reference/invoices/list-the-additional-charges-of-an-invoice"},{"title":"Add an additional charge to an invoice","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/invoices/{invoiceId}/additional-charges","href":"/api-reference/invoices/add-an-additional-charge-to-an-invoice"},{"title":"List the attachments of an invoice","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/invoices/{invoiceId}/attachments","href":"/api-reference/invoices/list-the-attachments-of-an-invoice"},{"title":"Upload attachments to an invoice","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/invoices/{invoiceId}/attachments","href":"/api-reference/invoices/upload-attachments-to-an-invoice"},{"title":"Download an attachment of an invoice","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/invoices/{invoiceId}/attachments/{attachmentId}/download","href":"/api-reference/invoices/download-an-attachment-of-an-invoice"},{"title":"Download an invoice artifact","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/invoices/{id}/artifacts/{invoiceArtifactId}","href":"/api-reference/invoices/download-an-invoice-artifact"},{"title":"List invoice syncs","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/invoices/sync","href":"/api-reference/invoices/list-invoice-syncs"},{"title":"Fetch invoice status summary","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/invoices/status-summary","href":"/api-reference/invoices/fetch-invoice-status-summary"},{"title":"Fetch a download link of the invoice PDF","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/invoices/{id}/pdf/link","href":"/api-reference/invoices/fetch-a-download-link-of-the-invoice-pdf"},{"title":"Fetch a download link of an invoice artifact","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/invoices/{id}/artifacts/{invoiceArtifactId}/link","href":"/api-reference/invoices/fetch-a-download-link-of-an-invoice-artifact"},{"title":"Fetch a download link of an attachment of an invoice","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/invoices/{invoiceId}/attachments/{attachmentId}/download/link","href":"/api-reference/invoices/fetch-a-download-link-of-an-attachment-of-an-invoice"},{"title":"Fetch a download link of the fiscal document of an invoice","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/invoices/{id}/fiscal-invoice/download/link","href":"/api-reference/invoices/fetch-a-download-link-of-the-fiscal-document-of-an-invoice"},{"title":"Update invoice","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /v1/invoices/{invoiceId}","href":"/api-reference/invoices/update-invoice"},{"title":"Cancel invoice","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/invoices/{invoiceId}/cancel","href":"/api-reference/invoices/cancel-invoice"},{"title":"Mark invoice as in review","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/invoices/{invoiceId}/in-review","href":"/api-reference/invoices/mark-invoice-as-in-review"},{"title":"Issue invoice","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/invoices/{invoiceId}/issue","href":"/api-reference/invoices/issue-invoice"},{"title":"Mark invoice as paid","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/invoices/{invoiceId}/pay","href":"/api-reference/invoices/mark-invoice-as-paid"},{"title":"Recalculate invoices","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/invoices/recalculate","href":"/api-reference/invoices/recalculate-invoices"},{"title":"Create invoice line item group","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/invoices/{invoiceId}/line-item-groups","href":"/api-reference/invoices/create-invoice-line-item-group"},{"title":"Update invoice line item group","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /v1/invoices/{invoiceId}/line-item-groups/{lineItemGroupId}","href":"/api-reference/invoices/update-invoice-line-item-group"},{"title":"Delete invoice line item group","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /v1/invoices/{invoiceId}/line-item-groups/{lineItemGroupId}","href":"/api-reference/invoices/delete-invoice-line-item-group"},{"title":"Create invoice line item","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/invoices/{invoiceId}/line-items","href":"/api-reference/invoices/create-invoice-line-item"},{"title":"Update invoice line item","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /v1/invoices/{invoiceId}/line-items/{lineItemId}","href":"/api-reference/invoices/update-invoice-line-item"},{"title":"Delete invoice line item","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /v1/invoices/{invoiceId}/line-items/{lineItemId}","href":"/api-reference/invoices/delete-invoice-line-item"},{"title":"Update invoice discount","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /v1/invoices/{invoiceId}/discounts/{discountId}","href":"/api-reference/invoices/update-invoice-discount"},{"title":"Delete invoice discount","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /v1/invoices/{invoiceId}/discounts/{discountId}","href":"/api-reference/invoices/delete-invoice-discount"},{"title":"Undo a manual mark as paid","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/invoices/{id}/unpay","href":"/api-reference/invoices/undo-a-manual-mark-as-paid"},{"title":"Reopen an invoice","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/invoices/{id}/reopen","href":"/api-reference/invoices/reopen-an-invoice"},{"title":"Update the custom fields of an invoice","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /v1/invoices/{id}/custom-fields","href":"/api-reference/invoices/update-the-custom-fields-of-an-invoice"},{"title":"Send an invoice by e-mail","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/invoices/{id}/send-email","href":"/api-reference/invoices/send-an-invoice-by-e-mail"},{"title":"Replace an additional charge of an invoice","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /v1/invoices/{invoiceId}/additional-charges/{lineItemId}","href":"/api-reference/invoices/replace-an-additional-charge-of-an-invoice"},{"title":"Delete an additional charge of an invoice","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /v1/invoices/{invoiceId}/additional-charges/{lineItemId}","href":"/api-reference/invoices/delete-an-additional-charge-of-an-invoice"},{"title":"Delete an attachment of an invoice","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /v1/invoices/{invoiceId}/attachments/{attachmentId}","href":"/api-reference/invoices/delete-an-attachment-of-an-invoice"},{"title":"Update an attachment of an invoice","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml patch /v1/invoices/{invoiceId}/attachments/{attachmentId}","href":"/api-reference/invoices/update-an-attachment-of-an-invoice"},{"title":"Retry failed invoice syncs","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/invoices/sync/retry","href":"/api-reference/invoices/retry-failed-invoice-syncs"}]},{"group":"Events","pages":[{"title":"List events","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/events/","href":"/api-reference/events/list-events"},{"title":"Ingest events","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/events/ingest","href":"/api-reference/events/ingest-events"},{"title":"Archive events","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /v1/events/archive","href":"/api-reference/events/archive-events"},{"title":"Overwrite event","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /v1/events/{idempotencyKey}","href":"/api-reference/events/overwrite-event"}]},{"group":"Licenses","pages":[{"title":"Report license balances","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/licenses/report-balances","href":"/api-reference/licenses/report-license-balances"},{"title":"List licenses","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/licenses/","href":"/api-reference/licenses/list-licenses"},{"title":"Create license","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/licenses/","href":"/api-reference/licenses/create-license"},{"title":"Fetch license","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/licenses/{id}","href":"/api-reference/licenses/fetch-license"},{"title":"Update license","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /v1/licenses/{id}","href":"/api-reference/licenses/update-license"},{"title":"Delete license","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /v1/licenses/{id}","href":"/api-reference/licenses/delete-license"},{"title":"Archive license","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/licenses/{id}/archive","href":"/api-reference/licenses/archive-license"},{"title":"Unarchive license","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/licenses/{id}/unarchive","href":"/api-reference/licenses/unarchive-license"},{"title":"List license balances","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/licenses/{id}/balances","href":"/api-reference/licenses/list-license-balances"},{"title":"List license balance history","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/licenses/{id}/balances/{customerExternalId}/history","href":"/api-reference/licenses/list-license-balance-history"}]},{"group":"Contracts","pages":[{"title":"List contracts","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/contracts/","href":"/api-reference/contracts/list-contracts"},{"title":"Create contract","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/contracts/","href":"/api-reference/contracts/create-contract"},{"title":"Update draft contract","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /v1/contracts/{id}/draft","href":"/api-reference/contracts/update-draft-contract"},{"title":"Update active contract","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /v1/contracts/{id}/active","href":"/api-reference/contracts/update-active-contract"},{"title":"Activate contract","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/contracts/{id}/activate","href":"/api-reference/contracts/activate-contract"},{"title":"Duplicate contract","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/contracts/{id}/duplicate","href":"/api-reference/contracts/duplicate-contract"},{"title":"List contract recurring discounts","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/contracts/{id}/recurring-discounts","href":"/api-reference/contracts/list-contract-recurring-discounts"},{"title":"Create contract recurring discount","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/contracts/{id}/recurring-discounts","href":"/api-reference/contracts/create-contract-recurring-discount"},{"title":"Deactivate contract recurring discount","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/contracts/{id}/recurring-discounts/{contractRecurringDiscountId}/deactivate","href":"/api-reference/contracts/deactivate-contract-recurring-discount"},{"title":"Update contract recurring discount","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml patch /v1/contracts/{id}/recurring-discounts/{contractRecurringDiscountId}","href":"/api-reference/contracts/update-contract-recurring-discount"},{"title":"Fetch contract","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/contracts/{id}","href":"/api-reference/contracts/fetch-contract"}]},{"group":"Plan Instances","pages":[{"title":"List plan instances","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/plan-instances/","href":"/api-reference/plan-instances/list-plan-instances"},{"title":"Create plan instance","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/plan-instances/","href":"/api-reference/plan-instances/create-plan-instance"},{"title":"Fetch plan instance","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/plan-instances/{id}","href":"/api-reference/plan-instances/fetch-plan-instance"},{"title":"Update plan instance","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /v1/plan-instances/{id}","href":"/api-reference/plan-instances/update-plan-instance"},{"title":"Delete plan instance","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /v1/plan-instances/{id}","href":"/api-reference/plan-instances/delete-plan-instance"},{"title":"Cancel plan instance","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/plan-instances/{id}/cancel","href":"/api-reference/plan-instances/cancel-plan-instance"},{"title":"Apply rate adjustment to plan instances","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/plan-instances/rate-adjust","href":"/api-reference/plan-instances/apply-rate-adjustment-to-plan-instances"},{"title":"Update plan instances to latest plan version","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/plan-instances/update-to-latest-plan-version","href":"/api-reference/plan-instances/update-plan-instances-to-latest-plan-version"},{"title":"List plan instance versions","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/plan-instance-versions/","href":"/api-reference/plan-instances/list-plan-instance-versions"},{"title":"Fetch plan instance version","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/plan-instance-versions/{id}","href":"/api-reference/plan-instances/fetch-plan-instance-version"},{"title":"Restore plan instance version","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/plan-instance-versions/{id}/rollback","href":"/api-reference/plan-instances/restore-plan-instance-version"}]},{"group":"Plans","pages":[{"title":"List plans","description":"Lists the plans of the tenant, newest first, each with the product that it belongs to.\n\nRequires the role `plans:read`.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/plans/","href":"/api-reference/plans/list-plans"},{"title":"Create plan","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/plans/","href":"/api-reference/plans/create-plan"},{"title":"Fetch plan","description":"Fetches a plan by id, with its product and the plan charges of its active plan version.\n\nRequires the role `plans:read`.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/plans/{id}","href":"/api-reference/plans/fetch-plan"},{"title":"Update plan","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /v1/plans/{id}","href":"/api-reference/plans/update-plan"},{"title":"Delete plan","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /v1/plans/{id}","href":"/api-reference/plans/delete-plan"},{"title":"Restore plan version","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/plans/version/{id}/rollback","href":"/api-reference/plans/restore-plan-version"},{"title":"List plan versions","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/plans/{id}/versions","href":"/api-reference/plans/list-plan-versions"},{"title":"Fetch plan version","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/plans/version/{id}","href":"/api-reference/plans/fetch-plan-version"}]},{"group":"Legal Entities","pages":[{"title":"List legal entities","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/legal-entities/","href":"/api-reference/legal-entities/list-legal-entities"}]},{"group":"Watchtower","pages":[{"title":"Upload a contract PDF for ingestion","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/watchtower/contract-ingestion","href":"/api-reference/watchtower/upload-a-contract-pdf-for-ingestion"}]},{"group":"Payment Accounts","pages":[{"title":"Create payment account","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/payment-accounts/","href":"/api-reference/payment-accounts/create-payment-account"},{"title":"Update payment account","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /v1/payment-accounts/{id}","href":"/api-reference/payment-accounts/update-payment-account"},{"title":"Archive payment account","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/payment-accounts/{id}/archive","href":"/api-reference/payment-accounts/archive-payment-account"},{"title":"Unarchive payment account","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/payment-accounts/{id}/unarchive","href":"/api-reference/payment-accounts/unarchive-payment-account"},{"title":"Set default payment account","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/payment-accounts/{id}/set-default","href":"/api-reference/payment-accounts/set-default-payment-account"},{"title":"List customer payment accounts","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/payment-accounts/by-customer","href":"/api-reference/payment-accounts/list-customer-payment-accounts"}]},{"group":"Products","pages":[{"title":"List products","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/products/","href":"/api-reference/products/list-products"},{"title":"Create product","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/products/","href":"/api-reference/products/create-product"},{"title":"Update product","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /v1/products/{id}","href":"/api-reference/products/update-product"},{"title":"Delete product","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /v1/products/{id}","href":"/api-reference/products/delete-product"},{"title":"Archive product","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/products/{id}/archive","href":"/api-reference/products/archive-product"},{"title":"Unarchive product","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/products/{id}/unarchive","href":"/api-reference/products/unarchive-product"}]},{"group":"Items","pages":[{"title":"List items","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/items/","href":"/api-reference/items/list-items"},{"title":"Create item","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/items/","href":"/api-reference/items/create-item"},{"title":"Update item","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /v1/items/{id}","href":"/api-reference/items/update-item"},{"title":"Delete item","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /v1/items/{id}","href":"/api-reference/items/delete-item"},{"title":"Archive item","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/items/{id}/archive","href":"/api-reference/items/archive-item"},{"title":"Unarchive item","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/items/{id}/unarchive","href":"/api-reference/items/unarchive-item"}]},{"group":"Emails","pages":[{"title":"List emails","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/emails/","href":"/api-reference/emails/list-emails"},{"title":"Fetch email","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/emails/{id}","href":"/api-reference/emails/fetch-email"},{"title":"Download email attachment","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/emails/{id}/attachments/{attachmentIndex}/download","href":"/api-reference/emails/download-email-attachment"},{"title":"Fetch a download link of an email attachment","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/emails/{id}/attachments/{attachmentIndex}/download/link","href":"/api-reference/emails/fetch-a-download-link-of-an-email-attachment"}]},{"group":"Tenants","pages":[{"title":"Fetch tenant settings","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/tenants/settings","href":"/api-reference/tenants/fetch-tenant-settings"}]},{"group":"Webhooks","pages":[{"title":"List webhook settings","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/webhook-settings/","href":"/api-reference/webhooks/list-webhook-settings"},{"title":"Create webhook settings","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/webhook-settings/","href":"/api-reference/webhooks/create-webhook-settings"},{"title":"Fetch webhook settings","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/webhook-settings/{id}","href":"/api-reference/webhooks/fetch-webhook-settings"},{"title":"Delete webhook settings","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /v1/webhook-settings/{id}","href":"/api-reference/webhooks/delete-webhook-settings"},{"title":"Update webhook settings","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml patch /v1/webhook-settings/{id}","href":"/api-reference/webhooks/update-webhook-settings"}]},{"group":"Api Keys","pages":[{"title":"List API keys","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/api-keys/","href":"/api-reference/api-keys/list-api-keys"},{"title":"Create API key","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/api-keys/","href":"/api-reference/api-keys/create-api-key"},{"title":"Update API key","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml patch /v1/api-keys/{id}","href":"/api-reference/api-keys/update-api-key"}]},{"group":"Payments","pages":[{"title":"Fetch payment","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/payments/{id}","href":"/api-reference/payments/fetch-payment"},{"title":"Download the boleto or Pix file of a payment","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/payments/{id}/files/download","href":"/api-reference/payments/download-the-boleto-or-pix-file-of-a-payment"},{"title":"Fetch a download link of the boleto or Pix of a payment","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/payments/{id}/files/download/link","href":"/api-reference/payments/fetch-a-download-link-of-the-boleto-or-pix-of-a-payment"}]},{"group":"Dunning","pages":[{"title":"List dunning schedules","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/dunning-schedules/","href":"/api-reference/dunning/list-dunning-schedules"},{"title":"Create dunning schedule","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/dunning-schedules/","href":"/api-reference/dunning/create-dunning-schedule"},{"title":"Fetch dunning settings","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/dunning-schedules/settings","href":"/api-reference/dunning/fetch-dunning-settings"},{"title":"Update dunning settings","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /v1/dunning-schedules/settings","href":"/api-reference/dunning/update-dunning-settings"},{"title":"Upload dunning e-mail logo","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/dunning-schedules/settings/logo","href":"/api-reference/dunning/upload-dunning-e-mail-logo"},{"title":"Fetch dunning schedule","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/dunning-schedules/{id}","href":"/api-reference/dunning/fetch-dunning-schedule"},{"title":"Update dunning schedule","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /v1/dunning-schedules/{id}","href":"/api-reference/dunning/update-dunning-schedule"},{"title":"Delete dunning schedule","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /v1/dunning-schedules/{id}","href":"/api-reference/dunning/delete-dunning-schedule"},{"title":"Archive dunning schedule","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/dunning-schedules/{id}/archive","href":"/api-reference/dunning/archive-dunning-schedule"},{"title":"Unarchive dunning schedule","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/dunning-schedules/{id}/unarchive","href":"/api-reference/dunning/unarchive-dunning-schedule"},{"title":"Duplicate dunning schedule","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/dunning-schedules/{id}/duplicate","href":"/api-reference/dunning/duplicate-dunning-schedule"}]},{"group":"Email Domains","pages":[{"title":"List email domains","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/email-domains/","href":"/api-reference/email-domains/list-email-domains"},{"title":"Register email domain","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/email-domains/","href":"/api-reference/email-domains/register-email-domain"},{"title":"Delete email domain","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /v1/email-domains/{id}","href":"/api-reference/email-domains/delete-email-domain"},{"title":"Verify email domain","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/email-domains/{id}/verify","href":"/api-reference/email-domains/verify-email-domain"}]}]}]}]},"basePath":"","title":"Create plan - Aira","deploymentId":"dpl_EtLmMeZHkKGqAjV1DiX4ZXCriDj3","buildId":"dpl_EtLmMeZHkKGqAjV1DiX4ZXCriDj3","dynamics":["c2aa737661","b0f84f53ff","a9bb46feb3","2b790eda92"],"chunks":["OpenApiReferenceProvider-CWRF67qg.js","snippetPresets-BR8BoZAC.js","utils-D5WEoDBM.js","style-to-object-BY3JEAdk.js","utils-B79vXYXV.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-C59iNs-S.js","conditional-requirements-CFM0id0Q.js","cloneDeep-455jK_K_.js","_Uint8Array-BEecbuUl.js","isObject-FP1Yky1u.js","Page-UFatEFaf.js","api-description-markdown-Cny85OC3.js","DynamicMarkdown-Czhs88Hc.js","CodeSnippet-Bkkti1IB.js","use-playground-group-access-BLvLSz8w.js","SectionHeading-B08KBUKT.js","ApiExamples-CFRHL52q.js","usePlaygroundInputsStore-Caip2xMX.js","shallow-BS-qcxmX.js","isEqual-CEpbaqh9.js","CodeSnippets-B-R0FAqw.js","MethodPill-D8OvWg5y.js","getPastedJson-tB5m0_yh.js","Check2Icon-CeP__a4S.js","axios-CsQoIw0U.js","Markdown-LI7DSqeK.js","AssistantPageLink-bYxdsqKl.js","dist-DXTH2WLA.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}