The unique identifier of the invoice in our system.
Body
application/json
The custom field values of the invoice, which replace the values that it holds.
customFields
object
required
The values of the tenant's custom fields for invoices, keyed by the key of each custom field. They replace the whole set, so a key that the object leaves out loses its value.
The invoice, with the custom field values that the request saved. Monetary amounts are integers in cents.
id
string<uuid>
required
The unique identifier of the invoice in our system.
idempotencyKey
string
required
A unique key that identifies the invoice for idempotent creation. Supplied by the caller for one-off invoices; generated by the billing engine for contract invoices.
Example:
"padaria-central-2026-11"
customerId
string<uuid>
required
The unique identifier of the customer this invoice bills.
paymentAccountId
string<uuid>
required
The unique identifier of the customer payment account used as the billing account for this invoice.
contractId
string<uuid> | null
required
The unique identifier of the contract that generated this invoice. Null for invoices not generated from a contract (e.g. one-off and imported invoices).
contractInvoiceSequence
integer | null
required
The number of the invoice within its contract, in the order that Aira created the contract's invoices: 1 for the first, 2 for the next, and so on. Every invoice gets its own number, including each invoice of a split across payment accounts and the replacement of a reopened invoice, and a number never changes and is never reused. Null for invoices without a contract.
Required range: x >= 1
issuingAccount
object
required
Snapshot of the legal entity issuing the invoice (the seller), captured at invoice creation.
Show child attributes
billingAccount
object
required
Snapshot of the billed party (the legal entity behind the customer payment account), captured at invoice creation.
Show child attributes
invoiceAllocationStrategy
enum<string>
required
How the originating contract distributes charges across payment accounts: single bills a single payment account; percent_split divides the total between payment accounts by configured percentages; subsidiary_usage_split divides it according to each subsidiary's usage.
Available options:
single,
percent_split,
subsidiary_usage_split
lastCalculatedAt
string<date-time> | null
required
When the invoice amounts were last computed by the billing engine. Null when the invoice has never been calculated.
invoiceNumber
string
required
Human-readable invoice number, built from the customer's invoice prefix plus a sequential counter.
Example:
"ACMEI-0042"
invoiceDate
string<date>
required
The date of the invoice. On a contract invoice it is the date of its billing act: the first day of the first billing cycle that the contract invoices for an activation invoice, and the last day of the billing cycle for a closing invoice. Its line items state the periods that it bills. On a one-off or imported invoice it is the date given when the invoice was created.
memo
string | null
required
Free-form memo attached to the invoice. On contract invoices, it reads "Período a " with the period of the line item that bills most often, such as the month when a monthly fee is billed with an annual fee. When two line items bill equally often, it uses the earlier period. Null when absent.
Example:
"Período 01/11/2026 a 30/11/2026"
subtotalAmount
number
required
Sum of the line item subtotals before adjustments, in cents.
adjustmentAmount
number
required
Net amount of all adjustments applied to the invoice line items (discounts and allocation offsets), in cents. Negative when adjustments reduce the amount owed.
totalAmount
number
required
Final invoice amount, in cents: subtotalAmount + adjustmentAmount.
discountAmount
number
required
The discount portion of adjustmentAmount, in cents (sum of monetary discount adjustments only). Negative when discounts were applied.
status
enum<string>
required
Current status of the invoice lifecycle: open (accumulating charges, editable), in_review (flagged for manual review before issuing), issued (finalized and issued to the customer), synced (registered in the external ERP/payment provider), pending (a payment was initiated and awaits settlement), paid, overdue (unpaid past the due date), canceled, or failed (an issue/sync attempt failed and needs attention).
Available options:
open,
in_review,
issued,
synced,
pending,
paid,
overdue,
canceled,
failed
isLocked
boolean
required
Whether the invoice contents are locked against edits. Aira locks an invoice when it issues or cancels it, together with the other invoices of its allocation group, except when it cancels the invoice because its payment account left the allocation of the contract, which locks only that invoice. A locked invoice stays locked, also when its status later moves to failed.
failureReason
string | null
required
Reason for the most recent failure on the invoice (e.g. an ERP sync or payment issue). Null when the invoice has no active failure.
Example:
"contract_sync_not_found"
source
enum<string>
required
How the invoice originated: contract (generated by a contract billing cycle), one_off (created manually or through the API), or import (ingested from an external system).
Available options:
contract,
one_off,
import
autoIssue
boolean
required
Whether the invoice is issued automatically when its billing cycle closes, without manual review.
amountDue
number | null
required
Outstanding amount due on the invoice, in cents. Null when not tracked.
dueDate
string<date> | null
required
Payment due date of the invoice. Null when no due date is set (e.g. before the invoice is issued).
lineItemGroups
object[]
required
Line item groups on the invoice. Each group gathers the line items generated from one plan instance (or created as a group on one-off invoices).
Show child attributes
standaloneLineItems
object[]
required
Line items that do not belong to any line item group (e.g. contract-level minimum commitments, additional charges, and ungrouped one-off items).
Show child attributes
customFields
object
required
The values of the tenant's custom fields for invoices, keyed by the key of each custom field. The object is empty when the invoice holds no value. A user edits them in the billing app, and PUT /v1/invoices/{id}/custom-fields replaces the whole set, in any status of the invoice.
When Aira last sent the invoice by e-mail to its invoice recipients, in an invoice delivery. Null when Aira has not sent it.
replaceReason
enum<string> | null
required
Why one invoice of the same invoice slot replaced another, on both invoices of the replacement: manually_reopened for a reopening, and contract_allocation_changed when a change to the contract allocation canceled the invoice and a later billing of its billing act replaced it. Null when the invoice replaces no invoice and no invoice replaces it.
Available options:
contract_allocation_changed,
manually_reopened,
null
replacesInvoiceId
string<uuid> | null
required
The unique identifier of the canceled invoice that this invoice replaces in its invoice slot. Null when the invoice replaces no invoice.
replacedByInvoiceId
string<uuid> | null
required
The unique identifier of the invoice that replaces this canceled invoice in its invoice slot. Null when no invoice replaces it.
{"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":"6b08e304c08b84f405fb34a1","clientVersion":"0.0.4340","searchFilterCounts":[{"language":"default","tag":"Referência da API","count":294},{"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":"Dunning","count":11},{"language":"default","tag":"Plan Instances","count":11},{"language":"default","tag":"Contratos","count":10},{"language":"default","tag":"Faturas","count":9}]},"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":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"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/invoices/update-the-custom-fields-of-an-invoice","slug":"/api-reference/invoices/update-the-custom-fields-of-an-invoice","pageMetadata":{"title":"Update the custom fields of an invoice","description":"Replaces the whole set of custom field values of an invoice, in any status, and answers the invoice. A key that the body leaves out loses its value.\n\nRequires the role `invoices:write`.","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","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: \"Replaces the whole set of custom field values of an invoice, in any status, and answers the invoice. A key that the body leaves out loses its value.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Requires the role \", _jsx(_components.code, {\n children: \"invoices:write\"\n }), \".\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Update the custom fields of an invoice","description":"Replaces the whole set of custom field values of an invoice, in any status, and answers the invoice. A key that the body leaves out loses its value.\n\nRequires the role `invoices:write`.","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","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Update the custom fields of an invoice","tags":["Invoices"],"description":"Replaces the whole set of custom field values of an invoice, in any status, and answers the invoice. A key that the body leaves out loses its value.\n\nRequires the role `invoices:write`.","requestBody":"7dacf020-feb8-4a6d-a81e-5ece41732bc7","parameters":["6954941d-f81a-48b3-8f12-f23b5a79ef32"],"x-public-api":true,"x-errors":[{"status":400,"code":"invalid_custom_fields","when":"the `customFields` leave out a required custom field of the tenant for invoices, name a key that is not one, or hold a value that its custom field does not take"},{"status":404,"code":"invoice_not_found","when":"no invoice of the tenant has the `id`"}],"x-required-roles":["invoices:write"],"responses":{"200":"69f55c2c-c0ec-4840-ac22-28df7bc7d46a","400":"7ec6ec2c-85a0-4963-91c3-081b53002d47","401":"e88d3200-c637-4579-9b52-bf0b48b0ec78","403":"26c5a0c2-a4d8-46f6-9df6-2fbb69cb21a0","404":"01eb9ccd-c092-4499-9512-e957b5acef35"},"method":"put","type":"path","servers":["6423522f-10c2-4bfd-9612-2aa2feb25713"],"security":["673eb9be-1b9d-496c-955b-95753f212bd5"],"path":"/v1/invoices/{id}/custom-fields","baseUrlOptions":["https://api.useaira.com"],"title":"Update the custom fields of an invoice","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"6954941d-f81a-48b3-8f12-f23b5a79ef32":{"schema":{"type":"string","format":"uuid","isRequired":true,"description":"The unique identifier of the invoice in our system.","uniqueKey":"","typeLabel":"string\u003cuuid>"},"in":"path","name":"id","required":true,"description":"The unique identifier of the invoice in our system."}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customFields":{"type":"object","description":"The values of the tenant's custom fields for invoices, keyed by the key of each custom field. They replace the whole set, so a key that the object leaves out loses its value.","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"customFields.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"string","uniqueKey":"customFields.additionalProperties.oneOf.1.items.[INDEX]","typeLabel":"string"},"uniqueKey":"customFields.additionalProperties.oneOf.1","typeLabel":"string[]"}],"uniqueKey":"customFields.additionalProperties","typeLabel":"string | string[]"},"example":{"customField1":"value1","customField2":["value2","value3"]},"isRequired":true,"uniqueKey":"customFields","typeLabel":"object"}},"required":["customFields"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"customFields":{"customField1":"value1","customField2":["value2","value3"]}}}},"exampleType":"generated"}},"required":true,"description":"The custom field values of the invoice, which replace the values that it holds.","exampleType":"generated"},"responses":{"69f55c2c-c0ec-4840-ac22-28df7bc7d46a":{"description":"The invoice, with the custom field values that the request saved. Monetary amounts are integers in cents.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier of the invoice in our system.","isRequired":true,"uniqueKey":"id","typeLabel":"string\u003cuuid>"},"idempotencyKey":{"type":"string","description":"A unique key that identifies the invoice for idempotent creation. Supplied by the caller for one-off invoices; generated by the billing engine for contract invoices.","example":"padaria-central-2026-11","isRequired":true,"uniqueKey":"idempotencyKey","typeLabel":"string"},"customerId":{"type":"string","format":"uuid","description":"The unique identifier of the customer this invoice bills.","isRequired":true,"uniqueKey":"customerId","typeLabel":"string\u003cuuid>"},"paymentAccountId":{"type":"string","format":"uuid","description":"The unique identifier of the customer payment account used as the billing account for this invoice.","isRequired":true,"uniqueKey":"paymentAccountId","typeLabel":"string\u003cuuid>"},"contractId":{"oneOf":[{"type":"string","format":"uuid","description":"The unique identifier of the contract that generated this invoice. Null for invoices not generated from a contract (e.g. one-off and imported invoices).","isRequired":true,"uniqueKey":"contractId.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The unique identifier of the contract that generated this invoice. Null for invoices not generated from a contract (e.g. one-off and imported invoices).","isRequired":true,"uniqueKey":"contractId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"contractId","typeLabel":"string\u003cuuid> | null"},"contractInvoiceSequence":{"oneOf":[{"type":"integer","minimum":1,"description":"The number of the invoice within its contract, in the order that Aira created the contract's invoices: 1 for the first, 2 for the next, and so on. Every invoice gets its own number, including each invoice of a split across payment accounts and the replacement of a reopened invoice, and a number never changes and is never reused. Null for invoices without a contract.","isRequired":true,"uniqueKey":"contractInvoiceSequence.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":1,"description":"The number of the invoice within its contract, in the order that Aira created the contract's invoices: 1 for the first, 2 for the next, and so on. Every invoice gets its own number, including each invoice of a split across payment accounts and the replacement of a reopened invoice, and a number never changes and is never reused. Null for invoices without a contract.","isRequired":true,"uniqueKey":"contractInvoiceSequence.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"contractInvoiceSequence","typeLabel":"integer | null"},"issuingAccount":{"type":"object","description":"Snapshot of the legal entity issuing the invoice (the seller), captured at invoice creation.","properties":{"tradeName":{"oneOf":[{"type":"string","description":"Trade name (nome fantasia) of the legal entity. Null when absent.","example":"Padaria Central","isRequired":true,"uniqueKey":"issuingAccount.tradeName.oneOf.0","typeLabel":"string"},{"type":"null","description":"Trade name (nome fantasia) of the legal entity. Null when absent.","example":"Padaria Central","isRequired":true,"uniqueKey":"issuingAccount.tradeName.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"issuingAccount.tradeName","typeLabel":"string | null"},"businessName":{"type":"string","description":"Registered business name (razão social) of the legal entity.","example":"Padaria Central Ltda","isRequired":true,"uniqueKey":"issuingAccount.businessName","typeLabel":"string"},"emails":{"type":"array","items":{"type":"string","format":"email","uniqueKey":"issuingAccount.emails.items.[INDEX]","typeLabel":"string\u003cemail>"},"description":"Billing contact email addresses of the legal entity.","isRequired":true,"uniqueKey":"issuingAccount.emails","typeLabel":"string\u003cemail>[]"},"taxId":{"type":"string","description":"Tax identification number of the legal entity, digits only.","example":"01234567000195","isRequired":true,"uniqueKey":"issuingAccount.taxId","typeLabel":"string"},"taxIdType":{"type":"string","enum":["cnpj","cpf"],"description":"The kind of tax identification number in taxId (e.g. CNPJ for Brazilian companies, CPF for individuals).","isRequired":true,"uniqueKey":"issuingAccount.taxIdType","typeLabel":"enum\u003cstring>"},"zipCode":{"oneOf":[{"type":"string","description":"Postal code of the legal entity address. Null when absent.","example":"01310100","isRequired":true,"uniqueKey":"issuingAccount.zipCode.oneOf.0","typeLabel":"string"},{"type":"null","description":"Postal code of the legal entity address. Null when absent.","example":"01310100","isRequired":true,"uniqueKey":"issuingAccount.zipCode.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"issuingAccount.zipCode","typeLabel":"string | null"},"street":{"oneOf":[{"type":"string","description":"Street of the legal entity address. Null when absent.","example":"Avenida Paulista","isRequired":true,"uniqueKey":"issuingAccount.street.oneOf.0","typeLabel":"string"},{"type":"null","description":"Street of the legal entity address. Null when absent.","example":"Avenida Paulista","isRequired":true,"uniqueKey":"issuingAccount.street.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"issuingAccount.street","typeLabel":"string | null"},"number":{"oneOf":[{"type":"string","description":"Street number of the legal entity address. Null when absent.","example":"1000","isRequired":true,"uniqueKey":"issuingAccount.number.oneOf.0","typeLabel":"string"},{"type":"null","description":"Street number of the legal entity address. Null when absent.","example":"1000","isRequired":true,"uniqueKey":"issuingAccount.number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"issuingAccount.number","typeLabel":"string | null"},"neighborhood":{"oneOf":[{"type":"string","description":"Neighborhood of the legal entity address. Null when absent.","example":"Bela Vista","isRequired":true,"uniqueKey":"issuingAccount.neighborhood.oneOf.0","typeLabel":"string"},{"type":"null","description":"Neighborhood of the legal entity address. Null when absent.","example":"Bela Vista","isRequired":true,"uniqueKey":"issuingAccount.neighborhood.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"issuingAccount.neighborhood","typeLabel":"string | null"},"city":{"oneOf":[{"type":"string","description":"City of the legal entity address. Null when absent.","example":"São Paulo","isRequired":true,"uniqueKey":"issuingAccount.city.oneOf.0","typeLabel":"string"},{"type":"null","description":"City of the legal entity address. Null when absent.","example":"São Paulo","isRequired":true,"uniqueKey":"issuingAccount.city.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"issuingAccount.city","typeLabel":"string | null"},"state":{"oneOf":[{"type":"string","enum":["AC","AL","AP","AM","BA","CE","DF","ES","GO","MA","MT","MS","MG","PA","PB","PR","PE","PI","RJ","RN","RS","RO","RR","SC","SP","SE","TO",null],"description":"State of the legal entity address, as a two-letter code. Null when absent.","isRequired":true,"uniqueKey":"issuingAccount.state.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["AC","AL","AP","AM","BA","CE","DF","ES","GO","MA","MT","MS","MG","PA","PB","PR","PE","PI","RJ","RN","RS","RO","RR","SC","SP","SE","TO",null],"description":"State of the legal entity address, as a two-letter code. Null when absent.","isRequired":true,"uniqueKey":"issuingAccount.state.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"issuingAccount.state","typeLabel":"enum\u003cstring> | null"},"country":{"oneOf":[{"type":"string","enum":["Brasil",null],"description":"Country of the legal entity address. Null when absent.","isRequired":true,"uniqueKey":"issuingAccount.country.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["Brasil",null],"description":"Country of the legal entity address. Null when absent.","isRequired":true,"uniqueKey":"issuingAccount.country.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"issuingAccount.country","typeLabel":"enum\u003cstring> | null"},"complement":{"oneOf":[{"type":"string","description":"Address complement of the legal entity address. Null when absent.","example":"Sala 12","isRequired":true,"uniqueKey":"issuingAccount.complement.oneOf.0","typeLabel":"string"},{"type":"null","description":"Address complement of the legal entity address. Null when absent.","example":"Sala 12","isRequired":true,"uniqueKey":"issuingAccount.complement.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"issuingAccount.complement","typeLabel":"string | null"}},"required":["tradeName","businessName","emails","taxId","taxIdType","zipCode","street","number","neighborhood","city","state","country","complement"],"additionalProperties":false,"isRequired":true,"uniqueKey":"issuingAccount","typeLabel":"object"},"billingAccount":{"type":"object","description":"Snapshot of the billed party (the legal entity behind the customer payment account), captured at invoice creation.","properties":{"tradeName":{"oneOf":[{"type":"string","description":"Trade name (nome fantasia) of the legal entity. Null when absent.","example":"Padaria Central","isRequired":true,"uniqueKey":"billingAccount.tradeName.oneOf.0","typeLabel":"string"},{"type":"null","description":"Trade name (nome fantasia) of the legal entity. Null when absent.","example":"Padaria Central","isRequired":true,"uniqueKey":"billingAccount.tradeName.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billingAccount.tradeName","typeLabel":"string | null"},"businessName":{"type":"string","description":"Registered business name (razão social) of the legal entity.","example":"Padaria Central Ltda","isRequired":true,"uniqueKey":"billingAccount.businessName","typeLabel":"string"},"emails":{"type":"array","items":{"type":"string","format":"email","uniqueKey":"billingAccount.emails.items.[INDEX]","typeLabel":"string\u003cemail>"},"description":"Billing contact email addresses of the legal entity.","isRequired":true,"uniqueKey":"billingAccount.emails","typeLabel":"string\u003cemail>[]"},"taxId":{"type":"string","description":"Tax identification number of the legal entity, digits only.","example":"01234567000195","isRequired":true,"uniqueKey":"billingAccount.taxId","typeLabel":"string"},"taxIdType":{"type":"string","enum":["cnpj","cpf"],"description":"The kind of tax identification number in taxId (e.g. CNPJ for Brazilian companies, CPF for individuals).","isRequired":true,"uniqueKey":"billingAccount.taxIdType","typeLabel":"enum\u003cstring>"},"zipCode":{"oneOf":[{"type":"string","description":"Postal code of the legal entity address. Null when absent.","example":"01310100","isRequired":true,"uniqueKey":"billingAccount.zipCode.oneOf.0","typeLabel":"string"},{"type":"null","description":"Postal code of the legal entity address. Null when absent.","example":"01310100","isRequired":true,"uniqueKey":"billingAccount.zipCode.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billingAccount.zipCode","typeLabel":"string | null"},"street":{"oneOf":[{"type":"string","description":"Street of the legal entity address. Null when absent.","example":"Avenida Paulista","isRequired":true,"uniqueKey":"billingAccount.street.oneOf.0","typeLabel":"string"},{"type":"null","description":"Street of the legal entity address. Null when absent.","example":"Avenida Paulista","isRequired":true,"uniqueKey":"billingAccount.street.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billingAccount.street","typeLabel":"string | null"},"number":{"oneOf":[{"type":"string","description":"Street number of the legal entity address. Null when absent.","example":"1000","isRequired":true,"uniqueKey":"billingAccount.number.oneOf.0","typeLabel":"string"},{"type":"null","description":"Street number of the legal entity address. Null when absent.","example":"1000","isRequired":true,"uniqueKey":"billingAccount.number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billingAccount.number","typeLabel":"string | null"},"neighborhood":{"oneOf":[{"type":"string","description":"Neighborhood of the legal entity address. Null when absent.","example":"Bela Vista","isRequired":true,"uniqueKey":"billingAccount.neighborhood.oneOf.0","typeLabel":"string"},{"type":"null","description":"Neighborhood of the legal entity address. Null when absent.","example":"Bela Vista","isRequired":true,"uniqueKey":"billingAccount.neighborhood.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billingAccount.neighborhood","typeLabel":"string | null"},"city":{"oneOf":[{"type":"string","description":"City of the legal entity address. Null when absent.","example":"São Paulo","isRequired":true,"uniqueKey":"billingAccount.city.oneOf.0","typeLabel":"string"},{"type":"null","description":"City of the legal entity address. Null when absent.","example":"São Paulo","isRequired":true,"uniqueKey":"billingAccount.city.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billingAccount.city","typeLabel":"string | null"},"state":{"oneOf":[{"type":"string","enum":["AC","AL","AP","AM","BA","CE","DF","ES","GO","MA","MT","MS","MG","PA","PB","PR","PE","PI","RJ","RN","RS","RO","RR","SC","SP","SE","TO",null],"description":"State of the legal entity address, as a two-letter code. Null when absent.","isRequired":true,"uniqueKey":"billingAccount.state.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["AC","AL","AP","AM","BA","CE","DF","ES","GO","MA","MT","MS","MG","PA","PB","PR","PE","PI","RJ","RN","RS","RO","RR","SC","SP","SE","TO",null],"description":"State of the legal entity address, as a two-letter code. Null when absent.","isRequired":true,"uniqueKey":"billingAccount.state.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billingAccount.state","typeLabel":"enum\u003cstring> | null"},"country":{"oneOf":[{"type":"string","enum":["Brasil",null],"description":"Country of the legal entity address. Null when absent.","isRequired":true,"uniqueKey":"billingAccount.country.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["Brasil",null],"description":"Country of the legal entity address. Null when absent.","isRequired":true,"uniqueKey":"billingAccount.country.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billingAccount.country","typeLabel":"enum\u003cstring> | null"},"complement":{"oneOf":[{"type":"string","description":"Address complement of the legal entity address. Null when absent.","example":"Sala 12","isRequired":true,"uniqueKey":"billingAccount.complement.oneOf.0","typeLabel":"string"},{"type":"null","description":"Address complement of the legal entity address. Null when absent.","example":"Sala 12","isRequired":true,"uniqueKey":"billingAccount.complement.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billingAccount.complement","typeLabel":"string | null"}},"required":["tradeName","businessName","emails","taxId","taxIdType","zipCode","street","number","neighborhood","city","state","country","complement"],"additionalProperties":false,"isRequired":true,"uniqueKey":"billingAccount","typeLabel":"object"},"invoiceAllocationStrategy":{"type":"string","enum":["single","percent_split","subsidiary_usage_split"],"description":"How the originating contract distributes charges across payment accounts: single bills a single payment account; percent_split divides the total between payment accounts by configured percentages; subsidiary_usage_split divides it according to each subsidiary's usage.","isRequired":true,"uniqueKey":"invoiceAllocationStrategy","typeLabel":"enum\u003cstring>"},"lastCalculatedAt":{"oneOf":[{"type":"string","format":"date-time","description":"When the invoice amounts were last computed by the billing engine. Null when the invoice has never been calculated.","isRequired":true,"uniqueKey":"lastCalculatedAt.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When the invoice amounts were last computed by the billing engine. Null when the invoice has never been calculated.","isRequired":true,"uniqueKey":"lastCalculatedAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lastCalculatedAt","typeLabel":"string\u003cdate-time> | null"},"invoiceNumber":{"type":"string","description":"Human-readable invoice number, built from the customer's invoice prefix plus a sequential counter.","example":"ACMEI-0042","isRequired":true,"uniqueKey":"invoiceNumber","typeLabel":"string"},"invoiceDate":{"type":"string","format":"date","description":"The date of the invoice. On a contract invoice it is the date of its billing act: the first day of the first billing cycle that the contract invoices for an activation invoice, and the last day of the billing cycle for a closing invoice. Its line items state the periods that it bills. On a one-off or imported invoice it is the date given when the invoice was created.","isRequired":true,"uniqueKey":"invoiceDate","typeLabel":"string\u003cdate>"},"memo":{"oneOf":[{"type":"string","description":"Free-form memo attached to the invoice. On contract invoices, it reads \"Período \u003cstart> a \u003cend>\" with the period of the line item that bills most often, such as the month when a monthly fee is billed with an annual fee. When two line items bill equally often, it uses the earlier period. Null when absent.","example":"Período 01/11/2026 a 30/11/2026","isRequired":true,"uniqueKey":"memo.oneOf.0","typeLabel":"string"},{"type":"null","description":"Free-form memo attached to the invoice. On contract invoices, it reads \"Período \u003cstart> a \u003cend>\" with the period of the line item that bills most often, such as the month when a monthly fee is billed with an annual fee. When two line items bill equally often, it uses the earlier period. Null when absent.","example":"Período 01/11/2026 a 30/11/2026","isRequired":true,"uniqueKey":"memo.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"memo","typeLabel":"string | null"},"subtotalAmount":{"type":"number","description":"Sum of the line item subtotals before adjustments, in cents.","isRequired":true,"uniqueKey":"subtotalAmount","typeLabel":"number"},"adjustmentAmount":{"type":"number","description":"Net amount of all adjustments applied to the invoice line items (discounts and allocation offsets), in cents. Negative when adjustments reduce the amount owed.","isRequired":true,"uniqueKey":"adjustmentAmount","typeLabel":"number"},"totalAmount":{"type":"number","description":"Final invoice amount, in cents: subtotalAmount + adjustmentAmount.","isRequired":true,"uniqueKey":"totalAmount","typeLabel":"number"},"discountAmount":{"type":"number","description":"The discount portion of adjustmentAmount, in cents (sum of monetary discount adjustments only). Negative when discounts were applied.","isRequired":true,"uniqueKey":"discountAmount","typeLabel":"number"},"status":{"type":"string","enum":["open","in_review","issued","synced","pending","paid","overdue","canceled","failed"],"description":"Current status of the invoice lifecycle: open (accumulating charges, editable), in_review (flagged for manual review before issuing), issued (finalized and issued to the customer), synced (registered in the external ERP/payment provider), pending (a payment was initiated and awaits settlement), paid, overdue (unpaid past the due date), canceled, or failed (an issue/sync attempt failed and needs attention).","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"isLocked":{"type":"boolean","description":"Whether the invoice contents are locked against edits. Aira locks an invoice when it issues or cancels it, together with the other invoices of its allocation group, except when it cancels the invoice because its payment account left the allocation of the contract, which locks only that invoice. A locked invoice stays locked, also when its status later moves to failed.","isRequired":true,"uniqueKey":"isLocked","typeLabel":"boolean"},"failureReason":{"oneOf":[{"type":"string","description":"Reason for the most recent failure on the invoice (e.g. an ERP sync or payment issue). Null when the invoice has no active failure.","example":"contract_sync_not_found","isRequired":true,"uniqueKey":"failureReason.oneOf.0","typeLabel":"string"},{"type":"null","description":"Reason for the most recent failure on the invoice (e.g. an ERP sync or payment issue). Null when the invoice has no active failure.","example":"contract_sync_not_found","isRequired":true,"uniqueKey":"failureReason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"failureReason","typeLabel":"string | null"},"source":{"type":"string","enum":["contract","one_off","import"],"description":"How the invoice originated: contract (generated by a contract billing cycle), one_off (created manually or through the API), or import (ingested from an external system).","isRequired":true,"uniqueKey":"source","typeLabel":"enum\u003cstring>"},"autoIssue":{"type":"boolean","description":"Whether the invoice is issued automatically when its billing cycle closes, without manual review.","isRequired":true,"uniqueKey":"autoIssue","typeLabel":"boolean"},"amountDue":{"oneOf":[{"type":"number","description":"Outstanding amount due on the invoice, in cents. Null when not tracked.","isRequired":true,"uniqueKey":"amountDue.oneOf.0","typeLabel":"number"},{"type":"null","description":"Outstanding amount due on the invoice, in cents. Null when not tracked.","isRequired":true,"uniqueKey":"amountDue.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"amountDue","typeLabel":"number | null"},"dueDate":{"oneOf":[{"type":"string","format":"date","description":"Payment due date of the invoice. Null when no due date is set (e.g. before the invoice is issued).","isRequired":true,"uniqueKey":"dueDate.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","format":"date","description":"Payment due date of the invoice. Null when no due date is set (e.g. before the invoice is issued).","isRequired":true,"uniqueKey":"dueDate.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"dueDate","typeLabel":"string\u003cdate> | null"},"lineItemGroups":{"type":"array","items":{"type":"object","description":"Schema representing a line item group: a container that gathers the line items generated from one plan instance (or created as a group on one-off invoices). Monetary amounts are integers in cents.","properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier of the line item group in our system.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"idempotencyKey":{"type":"string","description":"A unique key that identifies the group within the invoice. Supplied by the caller for one-off groups; generated by the billing engine otherwise.","example":"servicos-novembro","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].idempotencyKey","typeLabel":"string"},"customerId":{"type":"string","format":"uuid","description":"The unique identifier of the customer whose consumption this group bills.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].customerId","typeLabel":"string\u003cuuid>"},"productId":{"type":"string","format":"uuid","description":"The unique identifier of the product this group belongs to.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].productId","typeLabel":"string\u003cuuid>"},"planId":{"oneOf":[{"type":"string","format":"uuid","description":"The unique identifier of the plan whose instance generated this group. Null for groups not generated from a plan (e.g. on one-off invoices).","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].planId.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The unique identifier of the plan whose instance generated this group. Null for groups not generated from a plan (e.g. on one-off invoices).","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].planId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].planId","typeLabel":"string\u003cuuid> | null"},"planInstanceId":{"oneOf":[{"type":"string","format":"uuid","description":"The unique identifier of the plan instance that generated this group. Null for groups not generated from a plan instance.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].planInstanceId.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The unique identifier of the plan instance that generated this group. Null for groups not generated from a plan instance.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].planInstanceId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].planInstanceId","typeLabel":"string\u003cuuid> | null"},"name":{"type":"string","description":"Display name of the group as it appears on the invoice, typically the plan or product name.","example":"Plano Entregas","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].name","typeLabel":"string"},"startDate":{"type":"string","format":"date","description":"Start of the period that the group shows. On contract invoices, it is the period of the group's line item that bills most often, such as the month when a monthly fee is billed with an annual fee. When two line items bill equally often, it is the earlier period.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].startDate","typeLabel":"string\u003cdate>"},"endDate":{"type":"string","format":"date","description":"End of the period that the group shows, which `startDate` describes.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].endDate","typeLabel":"string\u003cdate>"},"subtotalAmount":{"type":"number","description":"Sum of the group's line item subtotals before adjustments, in cents.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].subtotalAmount","typeLabel":"number"},"adjustmentAmount":{"type":"number","description":"Net amount of the adjustments applied to the group's line items (discounts and allocation offsets), in cents. Negative when adjustments reduce the amount owed.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].adjustmentAmount","typeLabel":"number"},"totalAmount":{"type":"number","description":"Final group amount, in cents: subtotalAmount + adjustmentAmount.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].totalAmount","typeLabel":"number"},"discountAmount":{"type":"number","description":"The discount portion of adjustmentAmount, in cents (sum of monetary discount adjustments only). Negative when discounts were applied.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].discountAmount","typeLabel":"number"},"lineItems":{"type":"array","items":{"type":"object","description":"One amount on an invoice, such as a plan charge, the contract minimum, a tax gross-up (the withheld ISS, the municipal service tax, added on top), a one-off amount or an additional charge.","properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier of the line item in our system.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"idempotencyKey":{"type":"string","description":"A unique key that identifies the line item within the invoice. Supplied by the caller for one-off line items; generated by the billing engine otherwise.","example":"entrega-novembro","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].idempotencyKey","typeLabel":"string"},"customerId":{"type":"string","format":"uuid","description":"The unique identifier of the customer whose consumption this line item bills. On split or consolidated invoices it may be a subsidiary of the invoice's customer.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].customerId","typeLabel":"string\u003cuuid>"},"productId":{"type":"string","format":"uuid","description":"The unique identifier of the product this line item belongs to.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].productId","typeLabel":"string\u003cuuid>"},"resourceId":{"oneOf":[{"type":"string","format":"uuid","description":"The unique identifier of the metered resource behind a usage_based line item. Null for line items not driven by resource usage.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].resourceId.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The unique identifier of the metered resource behind a usage_based line item. Null for line items not driven by resource usage.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].resourceId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].resourceId","typeLabel":"string\u003cuuid> | null"},"licenseId":{"oneOf":[{"type":"string","format":"uuid","description":"The unique identifier of the license behind a license_based line item. Null for line items not driven by a license count.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].licenseId.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The unique identifier of the license behind a license_based line item. Null for line items not driven by a license count.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].licenseId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].licenseId","typeLabel":"string\u003cuuid> | null"},"lineItemGroupId":{"oneOf":[{"type":"string","format":"uuid","description":"The unique identifier of the line item group containing this line item. Null for standalone line items.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].lineItemGroupId.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The unique identifier of the line item group containing this line item. Null for standalone line items.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].lineItemGroupId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].lineItemGroupId","typeLabel":"string\u003cuuid> | null"},"name":{"type":"string","description":"Display name of the line item as it appears on the invoice.","example":"Entregas","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].name","typeLabel":"string"},"scope":{"type":"string","enum":["credit_purchase","contract_minimum_commitment","minimum_commitment","fixed","usage_based","license_based","custom","additional_charge","one_off","tax_gross_up"],"description":"What the line item charges for: usage_based (metered resource consumption), license_based (a license's reported count billed in full), fixed (recurring fixed charge of a plan), custom (custom plan charge, priced by a calculator that Aira writes for the tenant), minimum_commitment (plan-level minimum top-up), contract_minimum_commitment (contract-level minimum top-up), credit_purchase (credit pool top-up), additional_charge (extra charge added manually), one_off (line item of a one-off invoice), or tax_gross_up (tax gross-up charge).","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].scope","typeLabel":"enum\u003cstring>"},"startDate":{"type":"string","format":"date","description":"Start of the period covered by this line item.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].startDate","typeLabel":"string\u003cdate>"},"endDate":{"type":"string","format":"date","description":"End of the period covered by this line item.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].endDate","typeLabel":"string\u003cdate>"},"totalUsage":{"oneOf":[{"type":"number","description":"Total usage billed by the line item, in the unit given by usageFormat. Null for line items without a single usage (e.g. fixed charges without a quantity, and custom line items whose calculator returns no total).","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].totalUsage.oneOf.0","typeLabel":"number"},{"type":"null","description":"Total usage billed by the line item, in the unit given by usageFormat. Null for line items without a single usage (e.g. fixed charges without a quantity, and custom line items whose calculator returns no total).","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].totalUsage.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].totalUsage","typeLabel":"number | null"},"usageFormat":{"oneOf":[{"type":"string","enum":["unit","currency",null],"description":"How to read totalUsage, and the usage of each sub-line item that has no usageFormat of its own: unit means a count of resource units or a fixed charge quantity; currency means a monetary base amount in cents. Null when the line item has no single usage, as a custom line item whose sub-line items bill different kinds of volume, each with its own usageFormat.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].usageFormat.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["unit","currency",null],"description":"How to read totalUsage, and the usage of each sub-line item that has no usageFormat of its own: unit means a count of resource units or a fixed charge quantity; currency means a monetary base amount in cents. Null when the line item has no single usage, as a custom line item whose sub-line items bill different kinds of volume, each with its own usageFormat.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].usageFormat.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].usageFormat","typeLabel":"enum\u003cstring> | null"},"subtotalAmount":{"type":"number","description":"Line item amount before adjustments, in cents (sum of its sub-line item amounts).","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subtotalAmount","typeLabel":"number"},"adjustmentAmount":{"type":"number","description":"Net amount of the adjustments applied to this line item (discounts and allocation offsets), in cents. Negative when adjustments reduce the amount owed.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].adjustmentAmount","typeLabel":"number"},"totalAmount":{"type":"number","description":"Final line item amount, in cents: subtotalAmount + adjustmentAmount.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].totalAmount","typeLabel":"number"},"discountAmount":{"type":"number","description":"The discount portion of adjustmentAmount, in cents (sum of monetary discount adjustments only). Negative when discounts were applied.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].discountAmount","typeLabel":"number"},"metadata":{"oneOf":[{"type":"object","title":"Fixed","description":"Pricing metadata for the line item, where the shape is keyed by type. Always present, but null for line items without pricing metadata: credit_purchase, additional_charge, one_off, and tax_gross_up. It is populated for fixed (the billing timing), usage_based, license_based, minimum_commitment, contract_minimum_commitment, and custom (the definition and the calculation memory) line items.","required":["type","billingTiming"],"properties":{"type":{"type":"string","enum":["fixed"],"description":"Discriminator: metadata for a fixed line item.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.0.type","typeLabel":"enum\u003cstring>"},"billingTiming":{"type":"string","enum":["in_advance","in_arrears"],"description":"Whether the fee was billed in advance of its service period or after it.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.0.billingTiming","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.0","typeLabel":"Fixed · object"},{"type":"object","title":"Usage-based","description":"Pricing metadata for the line item, where the shape is keyed by type. Always present, but null for line items without pricing metadata: credit_purchase, additional_charge, one_off, and tax_gross_up. It is populated for fixed (the billing timing), usage_based, license_based, minimum_commitment, contract_minimum_commitment, and custom (the definition and the calculation memory) line items.","required":["type","billingModel","pricingModel"],"properties":{"type":{"type":"string","enum":["usage_based"],"description":"Discriminator: metadata for a usage_based line item.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.1.type","typeLabel":"enum\u003cstring>"},"billingModel":{"type":"string","enum":["in_full","proration"],"description":"How the metered resource accrues over the billing period: in_full bills the full usage of the period; proration weighs usage by the fraction of the period each amount was held.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.1.billingModel","typeLabel":"enum\u003cstring>"},"pricingModel":{"type":"string","enum":["fixed","per_unit","per_package","percentage","tiered_per_unit","tiered_percentage","tiered_fixed","advanced","custom"],"description":"The pricing model of the plan charge that produced this line item. Charges priced before pricing models existed are reported as advanced.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.1.pricingModel","typeLabel":"enum\u003cstring>"},"priceTierDivision":{"type":"string","enum":["unique_tier","progressive"],"description":"For tier-based pricing models only: how usage was divided across tiers. unique_tier prices all usage at the single tier that contains the total; progressive prices each tier's band separately. Absent for non-tiered models.","uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.1.priceTierDivision","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.1","typeLabel":"Usage-based · object"},{"type":"object","title":"License-based","description":"Pricing metadata for the line item, where the shape is keyed by type. Always present, but null for line items without pricing metadata: credit_purchase, additional_charge, one_off, and tax_gross_up. It is populated for fixed (the billing timing), usage_based, license_based, minimum_commitment, contract_minimum_commitment, and custom (the definition and the calculation memory) line items.","required":["type","billingModel","pricingModel"],"properties":{"type":{"type":"string","enum":["license_based"],"description":"Discriminator: metadata for a license_based line item.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.2.type","typeLabel":"enum\u003cstring>"},"billingModel":{"type":"string","enum":["in_full","proration"],"description":"How the license count accrues over the billing period. Always in_full: the latest reported count is billed in full.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.2.billingModel","typeLabel":"enum\u003cstring>"},"pricingModel":{"type":"string","enum":["fixed","per_unit","per_package","percentage","tiered_per_unit","tiered_percentage","tiered_fixed","advanced","custom"],"description":"The pricing model of the plan charge that produced this line item.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.2.pricingModel","typeLabel":"enum\u003cstring>"},"priceTierDivision":{"type":"string","enum":["unique_tier","progressive"],"description":"For tier-based pricing models only: how the license count was divided across tiers. unique_tier prices the whole count at the single tier that contains the total; progressive prices each tier's band separately. Absent for non-tiered models.","uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.2.priceTierDivision","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.2","typeLabel":"License-based · object"},{"type":"object","title":"Contract minimum commitment","description":"Pricing metadata for the line item, where the shape is keyed by type. Always present, but null for line items without pricing metadata: credit_purchase, additional_charge, one_off, and tax_gross_up. It is populated for fixed (the billing timing), usage_based, license_based, minimum_commitment, contract_minimum_commitment, and custom (the definition and the calculation memory) line items.","required":["type","minimumAmount","minimumAmountApplied"],"properties":{"type":{"type":"string","enum":["contract_minimum_commitment"],"description":"Discriminator: metadata for a contract_minimum_commitment line item.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.3.type","typeLabel":"enum\u003cstring>"},"minimumAmount":{"type":"number","description":"The minimum amount committed for the whole contract in the billing period, in cents.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.3.minimumAmount","typeLabel":"number"},"minimumAmountApplied":{"type":"number","description":"The top-up charged by this line item to reach the committed minimum, in cents: the difference between minimumAmount and what the contract's consumption amounted to.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.3.minimumAmountApplied","typeLabel":"number"}},"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.3","typeLabel":"Contract minimum commitment · object"},{"type":"object","title":"Minimum commitment","description":"Pricing metadata for the line item, where the shape is keyed by type. Always present, but null for line items without pricing metadata: credit_purchase, additional_charge, one_off, and tax_gross_up. It is populated for fixed (the billing timing), usage_based, license_based, minimum_commitment, contract_minimum_commitment, and custom (the definition and the calculation memory) line items.","required":["type","minimumAmount","minimumAmountApplied"],"properties":{"type":{"type":"string","enum":["minimum_commitment"],"description":"Discriminator: metadata for a plan-level minimum_commitment line item.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.4.type","typeLabel":"enum\u003cstring>"},"minimumAmount":{"type":"number","description":"The minimum amount committed for the plan in the billing period, in cents.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.4.minimumAmount","typeLabel":"number"},"minimumAmountApplied":{"type":"number","description":"The top-up charged by this line item to reach the committed minimum, in cents: the difference between minimumAmount and what the plan's consumption amounted to.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.4.minimumAmountApplied","typeLabel":"number"}},"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.4","typeLabel":"Minimum commitment · object"},{"type":"object","title":"Custom","description":"Pricing metadata for the line item, where the shape is keyed by type. Always present, but null for line items without pricing metadata: credit_purchase, additional_charge, one_off, and tax_gross_up. It is populated for fixed (the billing timing), usage_based, license_based, minimum_commitment, contract_minimum_commitment, and custom (the definition and the calculation memory) line items.","required":["type","definitionKey","memory"],"properties":{"type":{"type":"string","enum":["custom"],"description":"Discriminator: metadata for a custom line item.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.5.type","typeLabel":"enum\u003cstring>"},"definitionKey":{"type":"string","description":"The key of the custom charge definition whose calculator priced the charge, following the custom:charge:\u003cslug>:\u003cname> convention.","examples":["custom:charge:padaria-central:entregas"],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.5.definitionKey","typeLabel":"string"},"memory":{"type":"object","additionalProperties":true,"description":"The full calculation memory that the calculator returned, such as every tier it evaluated and the one it billed. Its shape belongs to the definition.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.5.memory","typeLabel":"object"}},"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.5","typeLabel":"Custom · object"},{"type":"null","title":"No metadata","description":"Pricing metadata for the line item, where the shape is keyed by type. Always present, but null for line items without pricing metadata: credit_purchase, additional_charge, one_off, and tax_gross_up. It is populated for fixed (the billing timing), usage_based, license_based, minimum_commitment, contract_minimum_commitment, and custom (the definition and the calculation memory) line items.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata.oneOf.6","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].metadata","typeLabel":"Fixed · object | Usage-based · object | License-based · object | Contract minimum commitment · object | Minimum commitment · object | Custom · object | null"},"subLineItems":{"type":"array","items":{"type":"object","description":"Schema representing a sub-line item: one priced row of a line item's breakdown. The row type dictates the shape of metadata.","properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier of the sub-line item in our system.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"type":{"type":"string","enum":["fixed_price","minimum_amount","price_tier_flat","price_tier_unit","price_tier_package","price_tier_percentage","proration","license_proration","license_proration_tier","unit_price","included_quantity","package_price","percentage","overage","original_amount","fixed_unit_price","custom"],"description":"The kind of priced row: fixed_price and minimum_amount are companions of usage-based charges; unit_price, package_price, percentage, and included_quantity break down single-model pricing; price_tier_* rows break down tiered pricing; overage bills usage beyond the last tier; proration bills per prorated interval; license_proration bills license deltas (removals are negative); original_amount surfaces the pre-adjustment amount of an adjusted line; fixed_unit_price breaks down a fixed charge billed as a quantity times a unit amount; custom bills one component of a custom plan charge.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"name":{"type":"string","description":"Display name of the sub-line item as it appears on the invoice breakdown.","example":"[A partir de 1] Unidades","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].name","typeLabel":"string"},"description":{"oneOf":[{"type":"string","description":"Optional descriptive text for the row. Null when absent.","example":"120 x 2,50","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].description.oneOf.0","typeLabel":"string"},{"type":"null","description":"Optional descriptive text for the row. Null when absent.","example":"120 x 2,50","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].description.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].description","typeLabel":"string | null"},"usage":{"oneOf":[{"type":"number","description":"The usage billed by this row: a count of resource units (the quantity for a fixed_unit_price row), or a monetary base amount in cents for percentage-priced rows (see the row's usageFormat, or the line item usageFormat when the row has none). Null for rows without usage (e.g. companions).","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].usage.oneOf.0","typeLabel":"number"},{"type":"null","description":"The usage billed by this row: a count of resource units (the quantity for a fixed_unit_price row), or a monetary base amount in cents for percentage-priced rows (see the row's usageFormat, or the line item usageFormat when the row has none). Null for rows without usage (e.g. companions).","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].usage.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].usage","typeLabel":"number | null"},"usageFormat":{"oneOf":[{"type":"string","enum":["unit","currency",null],"description":"How to read the usage of this row when the row has a format of its own, as the custom rows of a custom line item do: unit means a count, currency means an amount in cents. Null when the row reads its usage in the line item usageFormat.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].usageFormat.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["unit","currency",null],"description":"How to read the usage of this row when the row has a format of its own, as the custom rows of a custom line item do: unit means a count, currency means an amount in cents. Null when the row reads its usage in the line item usageFormat.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].usageFormat.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].usageFormat","typeLabel":"enum\u003cstring> | null"},"amount":{"type":"number","description":"Amount billed by this row, in cents. The sum of a line item's sub-line amounts equals its subtotalAmount.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].amount","typeLabel":"number"},"metadata":{"oneOf":[{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","fixedPrice"],"properties":{"type":{"type":"string","enum":["fixed_price"],"description":"Discriminator: fixed-price companion row.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.0.type","typeLabel":"enum\u003cstring>"},"fixedPrice":{"type":"number","description":"The fixed amount configured on the charge, in cents.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.0.fixedPrice","typeLabel":"number"}},"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.0","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","minimumAmount","minimumAmountApplied"],"properties":{"type":{"type":"string","enum":["minimum_amount"],"description":"Discriminator: minimum-amount companion row.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.1.type","typeLabel":"enum\u003cstring>"},"minimumAmount":{"type":"number","description":"The minimum amount configured on the charge, in cents.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.1.minimumAmount","typeLabel":"number"},"minimumAmountApplied":{"type":"number","description":"The top-up billed by this row to reach the configured minimum, in cents.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.1.minimumAmountApplied","typeLabel":"number"}},"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.1","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","from","to","fixedPrice"],"properties":{"type":{"type":"string","enum":["price_tier_flat"],"description":"Discriminator: flat-priced tier row.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.2.type","typeLabel":"enum\u003cstring>"},"from":{"type":"number","description":"Lower bound of the tier band, in resource units (inclusive).","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.2.from","typeLabel":"number"},"to":{"oneOf":[{"type":"number","description":"Upper bound of the tier band, in resource units (inclusive). Null for an unbounded final tier.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.2.to.oneOf.0","typeLabel":"number"},{"type":"null","description":"Upper bound of the tier band, in resource units (inclusive). Null for an unbounded final tier.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.2.to.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.2.to","typeLabel":"number | null"},"fixedPrice":{"type":"string","description":"The flat amount billed for the tier, as a decimal currency-unit string.","examples":["150.00"],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.2.fixedPrice","typeLabel":"string"}},"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.2","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","from","to","price","fixedPrice"],"properties":{"type":{"type":"string","enum":["price_tier_unit"],"description":"Discriminator: per-unit priced tier row.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.3.type","typeLabel":"enum\u003cstring>"},"from":{"type":"number","description":"Lower bound of the tier band, in resource units (inclusive).","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.3.from","typeLabel":"number"},"to":{"oneOf":[{"type":"number","description":"Upper bound of the tier band, in resource units (inclusive). Null for an unbounded final tier.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.3.to.oneOf.0","typeLabel":"number"},{"type":"null","description":"Upper bound of the tier band, in resource units (inclusive). Null for an unbounded final tier.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.3.to.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.3.to","typeLabel":"number | null"},"price":{"type":"string","description":"Price per unit within the tier, as a decimal currency-unit string.","examples":["0.25"],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.3.price","typeLabel":"string"},"fixedPrice":{"oneOf":[{"type":"string","description":"Optional flat fee billed on top when the tier applies, as a decimal currency-unit string. Null when the tier has no flat fee.","examples":["10.00"],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.3.fixedPrice.oneOf.0","typeLabel":"string"},{"type":"null","description":"Optional flat fee billed on top when the tier applies, as a decimal currency-unit string. Null when the tier has no flat fee.","examples":["10.00"],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.3.fixedPrice.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.3.fixedPrice","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.3","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","from","to","packageSize","price"],"properties":{"type":{"type":"string","enum":["price_tier_package"],"description":"Discriminator: package-priced tier row.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.4.type","typeLabel":"enum\u003cstring>"},"from":{"type":"number","description":"Lower bound of the tier band, in resource units (inclusive).","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.4.from","typeLabel":"number"},"to":{"oneOf":[{"type":"number","description":"Upper bound of the tier band, in resource units (inclusive). Null for an unbounded final tier.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.4.to.oneOf.0","typeLabel":"number"},{"type":"null","description":"Upper bound of the tier band, in resource units (inclusive). Null for an unbounded final tier.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.4.to.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.4.to","typeLabel":"number | null"},"packageSize":{"type":"number","description":"Number of resource units per package.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.4.packageSize","typeLabel":"number"},"price":{"type":"string","description":"Price per package, as a decimal currency-unit string.","examples":["45.00"],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.4.price","typeLabel":"string"}},"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.4","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","from","to","percentage"],"properties":{"type":{"type":"string","enum":["price_tier_percentage"],"description":"Discriminator: percentage-priced tier row.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.5.type","typeLabel":"enum\u003cstring>"},"from":{"type":"number","description":"Lower bound of the tier band, in cents of the monetary base amount (inclusive).","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.5.from","typeLabel":"number"},"to":{"oneOf":[{"type":"number","description":"Upper bound of the tier band, in cents of the monetary base amount (inclusive). Null for an unbounded final tier.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.5.to.oneOf.0","typeLabel":"number"},{"type":"null","description":"Upper bound of the tier band, in cents of the monetary base amount (inclusive). Null for an unbounded final tier.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.5.to.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.5.to","typeLabel":"number | null"},"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":["2.5"],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.5.percentage","typeLabel":"string"}},"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.5","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","intervalSize","amount","usage","intervalStart","intervalEnd"],"properties":{"type":{"type":"string","enum":["proration"],"description":"Discriminator: proration interval row.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.6.type","typeLabel":"enum\u003cstring>"},"intervalSize":{"type":"number","description":"Length of the interval, in days of the billing cycle.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.6.intervalSize","typeLabel":"number"},"amount":{"type":"string","description":"The prorated amount of the interval, as a decimal currency-unit string: the interval usage priced as if held for the whole cycle, scaled by intervalSize over the cycle length.","examples":["29.0322580645"],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.6.amount","typeLabel":"string"},"usage":{"type":"number","description":"The usage held during the interval.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.6.usage","typeLabel":"number"},"intervalStart":{"type":"string","format":"date","description":"First day of the interval.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.6.intervalStart","typeLabel":"string\u003cdate>"},"intervalEnd":{"type":"string","format":"date","description":"Last day of the interval.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.6.intervalEnd","typeLabel":"string\u003cdate>"}},"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.6","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","changeDate","quantityDelta","quantity","remainingDays","cycleDays","proratedUnitRate","amount"],"properties":{"type":{"type":"string","enum":["license_proration"],"description":"Discriminator: license proration delta row.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.7.type","typeLabel":"enum\u003cstring>"},"changeDate":{"oneOf":[{"type":"string","format":"date","description":"The day the combined license quantity changed. Null on the cycle-start row.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.7.changeDate.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","format":"date","description":"The day the combined license quantity changed. Null on the cycle-start row.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.7.changeDate.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.7.changeDate","typeLabel":"string\u003cdate> | null"},"quantityDelta":{"type":"number","description":"Signed change in the licenses beyond the included quantity (the starting licenses beyond it on the cycle-start row). Negative for removals.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.7.quantityDelta","typeLabel":"number"},"quantity":{"type":"number","description":"The combined license quantity after this change.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.7.quantity","typeLabel":"number"},"remainingDays":{"type":"number","description":"Days from the change (inclusive) to the end of the cycle. Equals cycleDays on the cycle-start row.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.7.remainingDays","typeLabel":"number"},"cycleDays":{"type":"number","description":"Length of the billing cycle, in days.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.7.cycleDays","typeLabel":"number"},"proratedUnitRate":{"type":"string","description":"Absolute effective per-unit rate of the row over the remaining window, as a decimal currency-unit string: |amount| / |quantityDelta|. On a cycle-start row that bills no license, the unit price of the charge.","examples":["16.1290322581"],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.7.proratedUnitRate","typeLabel":"string"},"amount":{"type":"string","description":"The signed prorated amount of the row, as a decimal currency-unit string.","examples":["48.3870967742"],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.7.amount","typeLabel":"string"}},"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.7","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","changeDate","quantityDelta","quantity","remainingDays","cycleDays","proratedUnitRate","amount","planChargeTierId","from","to","unitPrice"],"properties":{"type":{"type":"string","enum":["license_proration_tier"],"description":"Discriminator: tiered license proration delta row.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.type","typeLabel":"enum\u003cstring>"},"changeDate":{"oneOf":[{"type":"string","format":"date","description":"The day the combined license quantity changed. Null on a cycle-start row.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.changeDate.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","format":"date","description":"The day the combined license quantity changed. Null on a cycle-start row.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.changeDate.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.changeDate","typeLabel":"string\u003cdate> | null"},"quantityDelta":{"type":"number","description":"Signed change in the units this band holds (the band's opening occupancy on a cycle-start row). Negative for removals.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.quantityDelta","typeLabel":"number"},"quantity":{"type":"number","description":"The combined license quantity across every band after this change.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.quantity","typeLabel":"number"},"remainingDays":{"type":"number","description":"Days from the change (inclusive) to the end of the cycle. Equals cycleDays on a cycle-start row.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.remainingDays","typeLabel":"number"},"cycleDays":{"type":"number","description":"Length of the billing cycle, in days.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.cycleDays","typeLabel":"number"},"proratedUnitRate":{"type":"string","description":"Absolute effective per-unit rate of the row over the remaining window, as a decimal currency-unit string: |amount| / |quantityDelta|.","examples":["16.1290322581"],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.proratedUnitRate","typeLabel":"string"},"amount":{"type":"string","description":"The signed prorated amount of the row, as a decimal currency-unit string.","examples":["48.3870967742"],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.amount","typeLabel":"string"},"planChargeTierId":{"type":"string","description":"The unique identifier of the plan charge tier this row moved through.","examples":["3c90c3cc-0d44-4b50-8888-8dd25736052a"],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.planChargeTierId","typeLabel":"string"},"from":{"type":"number","description":"Inclusive lower bound of the band, in licenses.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.from","typeLabel":"number"},"to":{"oneOf":[{"type":"number","description":"Inclusive upper bound of the band, in licenses. Null on the last, open-ended band.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.to.oneOf.0","typeLabel":"number"},{"type":"null","description":"Inclusive upper bound of the band, in licenses. Null on the last, open-ended band.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.to.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.to","typeLabel":"number | null"},"unitPrice":{"type":"string","description":"The band's full-cycle price per unit, as a decimal currency-unit string. proratedUnitRate is this scaled by remainingDays over cycleDays.","examples":["25.00"],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.unitPrice","typeLabel":"string"}},"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","price"],"properties":{"type":{"type":"string","enum":["unit_price"],"description":"Discriminator: unit-price row.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.9.type","typeLabel":"enum\u003cstring>"},"price":{"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":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.9.price","typeLabel":"string"}},"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.9","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","includedQuantity"],"properties":{"type":{"type":"string","enum":["included_quantity"],"description":"Discriminator: included-quantity row.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.10.type","typeLabel":"enum\u003cstring>"},"includedQuantity":{"type":"number","description":"Number of resource units included at no charge before billing starts.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.10.includedQuantity","typeLabel":"number"}},"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.10","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","packageSize","price","packagesBilled"],"properties":{"type":{"type":"string","enum":["package_price"],"description":"Discriminator: package-price row.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.11.type","typeLabel":"enum\u003cstring>"},"packageSize":{"type":"number","description":"Number of resource units per package.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.11.packageSize","typeLabel":"number"},"price":{"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":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.11.price","typeLabel":"string"},"packagesBilled":{"type":"number","description":"Number of packages billed: the billable units divided by packageSize, rounded up.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.11.packagesBilled","typeLabel":"number"}},"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.11","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","percentage"],"properties":{"type":{"type":"string","enum":["percentage"],"description":"Discriminator: percentage row.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.12.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, as a decimal string from 0 to 100 (up to 6 decimal places).","examples":["2.5"],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.12.percentage","typeLabel":"string"}},"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.12","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","pricingType","from","price"],"properties":{"type":{"type":"string","enum":["overage"],"description":"Discriminator: overage row.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.13.type","typeLabel":"enum\u003cstring>"},"pricingType":{"type":"string","enum":["per_unit"],"description":"Discriminator: overage billed per unit.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.13.pricingType","typeLabel":"enum\u003cstring>"},"from":{"type":"number","description":"The boundary the overage starts from: the upper bound of the last tier, in resource units.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.13.from","typeLabel":"number"},"price":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"Price per excess unit, as a decimal currency-unit string (up to 6 decimal places).","examples":["0.30"],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.13.price","typeLabel":"string"}},"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.13","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","pricingType","from","percentage"],"properties":{"type":{"type":"string","enum":["overage"],"description":"Discriminator: overage row.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.14.type","typeLabel":"enum\u003cstring>"},"pricingType":{"type":"string","enum":["percentage"],"description":"Discriminator: overage billed as a percentage.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.14.pricingType","typeLabel":"enum\u003cstring>"},"from":{"type":"number","description":"The boundary the overage starts from: the upper bound of the last tier, in cents of the monetary base amount.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.14.from","typeLabel":"number"},"percentage":{"type":"string","pattern":"^(100(\\.0{1,6})?|\\d{1,2}(\\.\\d{1,6})?)$","description":"Percentage applied to the excess base amount, as a decimal string from 0 to 100 (up to 6 decimal places).","examples":["1.5"],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.14.percentage","typeLabel":"string"}},"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.14","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type"],"properties":{"type":{"type":"string","enum":["original_amount"],"description":"Discriminator: original-amount row.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.15.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.15","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","amount"],"properties":{"type":{"type":"string","enum":["fixed_unit_price"],"description":"Discriminator: fixed unit price row.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.16.type","typeLabel":"enum\u003cstring>"},"amount":{"type":"integer","minimum":0,"description":"Amount of one unit, in cents.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.16.amount","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.16","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","key"],"properties":{"type":{"type":"string","enum":["custom"],"description":"Discriminator: custom row.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.17.type","typeLabel":"enum\u003cstring>"},"key":{"type":"string","description":"The key of the component in the sub-line schema of the charge's custom charge definition, such as documents_overage.","examples":["documents_overage"],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.17.key","typeLabel":"string"}},"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.17","typeLabel":"object"}],"isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX].metadata","typeLabel":"object"}},"required":["id","type","name","description","usage","usageFormat","amount","metadata"],"additionalProperties":false,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems.items.[INDEX]","typeLabel":"object"},"description":"Breakdown of the line item amount into priced rows (included quantities, unit/package/tier prices, prorations, companions). Empty for line items without a breakdown.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].subLineItems","typeLabel":"object[]"},"adjustments":{"type":"array","items":{"type":"object","description":"Schema representing an adjustment applied on top of a line item subtotal, such as a discount or an allocation offset.","properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier of the adjustment in our system.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].adjustments.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","description":"Display name of the adjustment as it appears on the invoice.","example":"Desconto de boas-vindas","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].adjustments.items.[INDEX].name","typeLabel":"string"},"type":{"type":"string","enum":["monetary_discount","allocation_offset"],"description":"The kind of adjustment: monetary_discount (a discount applied to the line item) or allocation_offset (the share of the amount moved to another payment account's invoice under a split allocation strategy).","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].adjustments.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"amount":{"type":"number","description":"Amount of the adjustment, in cents. Negative when the adjustment reduces the line item total.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].adjustments.items.[INDEX].amount","typeLabel":"number"}},"required":["id","name","type","amount"],"additionalProperties":false,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].adjustments.items.[INDEX]","typeLabel":"object"},"description":"Adjustments applied on top of the line item subtotal, such as discounts and allocation offsets.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].adjustments","typeLabel":"object[]"},"itemId":{"oneOf":[{"type":"string","format":"uuid","description":"The unique identifier of the catalog item this line bills. Null for line items not backed by a catalog item.","uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].itemId.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The unique identifier of the catalog item this line bills. Null for line items not backed by a catalog item.","uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].itemId.oneOf.1","typeLabel":"null"}],"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX].itemId","typeLabel":"string\u003cuuid> | null"}},"required":["id","idempotencyKey","customerId","productId","resourceId","licenseId","lineItemGroupId","name","scope","startDate","endDate","totalUsage","usageFormat","subtotalAmount","adjustmentAmount","totalAmount","discountAmount","metadata","subLineItems","adjustments"],"additionalProperties":false,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems.items.[INDEX]","typeLabel":"object"},"description":"The line items contained in this group.","isRequired":true,"uniqueKey":"lineItemGroups.items.[INDEX].lineItems","typeLabel":"object[]"}},"required":["id","idempotencyKey","customerId","productId","planId","planInstanceId","name","startDate","endDate","subtotalAmount","adjustmentAmount","totalAmount","discountAmount","lineItems"],"additionalProperties":false,"uniqueKey":"lineItemGroups.items.[INDEX]","typeLabel":"object"},"description":"Line item groups on the invoice. Each group gathers the line items generated from one plan instance (or created as a group on one-off invoices).","isRequired":true,"uniqueKey":"lineItemGroups","typeLabel":"object[]"},"standaloneLineItems":{"type":"array","items":{"type":"object","description":"One amount on an invoice, such as a plan charge, the contract minimum, a tax gross-up (the withheld ISS, the municipal service tax, added on top), a one-off amount or an additional charge.","properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier of the line item in our system.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"idempotencyKey":{"type":"string","description":"A unique key that identifies the line item within the invoice. Supplied by the caller for one-off line items; generated by the billing engine otherwise.","example":"entrega-novembro","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].idempotencyKey","typeLabel":"string"},"customerId":{"type":"string","format":"uuid","description":"The unique identifier of the customer whose consumption this line item bills. On split or consolidated invoices it may be a subsidiary of the invoice's customer.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].customerId","typeLabel":"string\u003cuuid>"},"productId":{"type":"string","format":"uuid","description":"The unique identifier of the product this line item belongs to.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].productId","typeLabel":"string\u003cuuid>"},"resourceId":{"oneOf":[{"type":"string","format":"uuid","description":"The unique identifier of the metered resource behind a usage_based line item. Null for line items not driven by resource usage.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].resourceId.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The unique identifier of the metered resource behind a usage_based line item. Null for line items not driven by resource usage.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].resourceId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].resourceId","typeLabel":"string\u003cuuid> | null"},"licenseId":{"oneOf":[{"type":"string","format":"uuid","description":"The unique identifier of the license behind a license_based line item. Null for line items not driven by a license count.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].licenseId.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The unique identifier of the license behind a license_based line item. Null for line items not driven by a license count.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].licenseId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].licenseId","typeLabel":"string\u003cuuid> | null"},"lineItemGroupId":{"oneOf":[{"type":"string","format":"uuid","description":"The unique identifier of the line item group containing this line item. Null for standalone line items.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].lineItemGroupId.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The unique identifier of the line item group containing this line item. Null for standalone line items.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].lineItemGroupId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].lineItemGroupId","typeLabel":"string\u003cuuid> | null"},"name":{"type":"string","description":"Display name of the line item as it appears on the invoice.","example":"Entregas","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].name","typeLabel":"string"},"scope":{"type":"string","enum":["credit_purchase","contract_minimum_commitment","minimum_commitment","fixed","usage_based","license_based","custom","additional_charge","one_off","tax_gross_up"],"description":"What the line item charges for: usage_based (metered resource consumption), license_based (a license's reported count billed in full), fixed (recurring fixed charge of a plan), custom (custom plan charge, priced by a calculator that Aira writes for the tenant), minimum_commitment (plan-level minimum top-up), contract_minimum_commitment (contract-level minimum top-up), credit_purchase (credit pool top-up), additional_charge (extra charge added manually), one_off (line item of a one-off invoice), or tax_gross_up (tax gross-up charge).","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].scope","typeLabel":"enum\u003cstring>"},"startDate":{"type":"string","format":"date","description":"Start of the period covered by this line item.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].startDate","typeLabel":"string\u003cdate>"},"endDate":{"type":"string","format":"date","description":"End of the period covered by this line item.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].endDate","typeLabel":"string\u003cdate>"},"totalUsage":{"oneOf":[{"type":"number","description":"Total usage billed by the line item, in the unit given by usageFormat. Null for line items without a single usage (e.g. fixed charges without a quantity, and custom line items whose calculator returns no total).","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].totalUsage.oneOf.0","typeLabel":"number"},{"type":"null","description":"Total usage billed by the line item, in the unit given by usageFormat. Null for line items without a single usage (e.g. fixed charges without a quantity, and custom line items whose calculator returns no total).","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].totalUsage.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].totalUsage","typeLabel":"number | null"},"usageFormat":{"oneOf":[{"type":"string","enum":["unit","currency",null],"description":"How to read totalUsage, and the usage of each sub-line item that has no usageFormat of its own: unit means a count of resource units or a fixed charge quantity; currency means a monetary base amount in cents. Null when the line item has no single usage, as a custom line item whose sub-line items bill different kinds of volume, each with its own usageFormat.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].usageFormat.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["unit","currency",null],"description":"How to read totalUsage, and the usage of each sub-line item that has no usageFormat of its own: unit means a count of resource units or a fixed charge quantity; currency means a monetary base amount in cents. Null when the line item has no single usage, as a custom line item whose sub-line items bill different kinds of volume, each with its own usageFormat.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].usageFormat.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].usageFormat","typeLabel":"enum\u003cstring> | null"},"subtotalAmount":{"type":"number","description":"Line item amount before adjustments, in cents (sum of its sub-line item amounts).","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subtotalAmount","typeLabel":"number"},"adjustmentAmount":{"type":"number","description":"Net amount of the adjustments applied to this line item (discounts and allocation offsets), in cents. Negative when adjustments reduce the amount owed.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].adjustmentAmount","typeLabel":"number"},"totalAmount":{"type":"number","description":"Final line item amount, in cents: subtotalAmount + adjustmentAmount.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].totalAmount","typeLabel":"number"},"discountAmount":{"type":"number","description":"The discount portion of adjustmentAmount, in cents (sum of monetary discount adjustments only). Negative when discounts were applied.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].discountAmount","typeLabel":"number"},"metadata":{"oneOf":[{"type":"object","title":"Fixed","description":"Pricing metadata for the line item, where the shape is keyed by type. Always present, but null for line items without pricing metadata: credit_purchase, additional_charge, one_off, and tax_gross_up. It is populated for fixed (the billing timing), usage_based, license_based, minimum_commitment, contract_minimum_commitment, and custom (the definition and the calculation memory) line items.","required":["type","billingTiming"],"properties":{"type":{"type":"string","enum":["fixed"],"description":"Discriminator: metadata for a fixed line item.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.0.type","typeLabel":"enum\u003cstring>"},"billingTiming":{"type":"string","enum":["in_advance","in_arrears"],"description":"Whether the fee was billed in advance of its service period or after it.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.0.billingTiming","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.0","typeLabel":"Fixed · object"},{"type":"object","title":"Usage-based","description":"Pricing metadata for the line item, where the shape is keyed by type. Always present, but null for line items without pricing metadata: credit_purchase, additional_charge, one_off, and tax_gross_up. It is populated for fixed (the billing timing), usage_based, license_based, minimum_commitment, contract_minimum_commitment, and custom (the definition and the calculation memory) line items.","required":["type","billingModel","pricingModel"],"properties":{"type":{"type":"string","enum":["usage_based"],"description":"Discriminator: metadata for a usage_based line item.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.1.type","typeLabel":"enum\u003cstring>"},"billingModel":{"type":"string","enum":["in_full","proration"],"description":"How the metered resource accrues over the billing period: in_full bills the full usage of the period; proration weighs usage by the fraction of the period each amount was held.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.1.billingModel","typeLabel":"enum\u003cstring>"},"pricingModel":{"type":"string","enum":["fixed","per_unit","per_package","percentage","tiered_per_unit","tiered_percentage","tiered_fixed","advanced","custom"],"description":"The pricing model of the plan charge that produced this line item. Charges priced before pricing models existed are reported as advanced.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.1.pricingModel","typeLabel":"enum\u003cstring>"},"priceTierDivision":{"type":"string","enum":["unique_tier","progressive"],"description":"For tier-based pricing models only: how usage was divided across tiers. unique_tier prices all usage at the single tier that contains the total; progressive prices each tier's band separately. Absent for non-tiered models.","uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.1.priceTierDivision","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.1","typeLabel":"Usage-based · object"},{"type":"object","title":"License-based","description":"Pricing metadata for the line item, where the shape is keyed by type. Always present, but null for line items without pricing metadata: credit_purchase, additional_charge, one_off, and tax_gross_up. It is populated for fixed (the billing timing), usage_based, license_based, minimum_commitment, contract_minimum_commitment, and custom (the definition and the calculation memory) line items.","required":["type","billingModel","pricingModel"],"properties":{"type":{"type":"string","enum":["license_based"],"description":"Discriminator: metadata for a license_based line item.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.2.type","typeLabel":"enum\u003cstring>"},"billingModel":{"type":"string","enum":["in_full","proration"],"description":"How the license count accrues over the billing period. Always in_full: the latest reported count is billed in full.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.2.billingModel","typeLabel":"enum\u003cstring>"},"pricingModel":{"type":"string","enum":["fixed","per_unit","per_package","percentage","tiered_per_unit","tiered_percentage","tiered_fixed","advanced","custom"],"description":"The pricing model of the plan charge that produced this line item.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.2.pricingModel","typeLabel":"enum\u003cstring>"},"priceTierDivision":{"type":"string","enum":["unique_tier","progressive"],"description":"For tier-based pricing models only: how the license count was divided across tiers. unique_tier prices the whole count at the single tier that contains the total; progressive prices each tier's band separately. Absent for non-tiered models.","uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.2.priceTierDivision","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.2","typeLabel":"License-based · object"},{"type":"object","title":"Contract minimum commitment","description":"Pricing metadata for the line item, where the shape is keyed by type. Always present, but null for line items without pricing metadata: credit_purchase, additional_charge, one_off, and tax_gross_up. It is populated for fixed (the billing timing), usage_based, license_based, minimum_commitment, contract_minimum_commitment, and custom (the definition and the calculation memory) line items.","required":["type","minimumAmount","minimumAmountApplied"],"properties":{"type":{"type":"string","enum":["contract_minimum_commitment"],"description":"Discriminator: metadata for a contract_minimum_commitment line item.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.3.type","typeLabel":"enum\u003cstring>"},"minimumAmount":{"type":"number","description":"The minimum amount committed for the whole contract in the billing period, in cents.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.3.minimumAmount","typeLabel":"number"},"minimumAmountApplied":{"type":"number","description":"The top-up charged by this line item to reach the committed minimum, in cents: the difference between minimumAmount and what the contract's consumption amounted to.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.3.minimumAmountApplied","typeLabel":"number"}},"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.3","typeLabel":"Contract minimum commitment · object"},{"type":"object","title":"Minimum commitment","description":"Pricing metadata for the line item, where the shape is keyed by type. Always present, but null for line items without pricing metadata: credit_purchase, additional_charge, one_off, and tax_gross_up. It is populated for fixed (the billing timing), usage_based, license_based, minimum_commitment, contract_minimum_commitment, and custom (the definition and the calculation memory) line items.","required":["type","minimumAmount","minimumAmountApplied"],"properties":{"type":{"type":"string","enum":["minimum_commitment"],"description":"Discriminator: metadata for a plan-level minimum_commitment line item.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.4.type","typeLabel":"enum\u003cstring>"},"minimumAmount":{"type":"number","description":"The minimum amount committed for the plan in the billing period, in cents.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.4.minimumAmount","typeLabel":"number"},"minimumAmountApplied":{"type":"number","description":"The top-up charged by this line item to reach the committed minimum, in cents: the difference between minimumAmount and what the plan's consumption amounted to.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.4.minimumAmountApplied","typeLabel":"number"}},"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.4","typeLabel":"Minimum commitment · object"},{"type":"object","title":"Custom","description":"Pricing metadata for the line item, where the shape is keyed by type. Always present, but null for line items without pricing metadata: credit_purchase, additional_charge, one_off, and tax_gross_up. It is populated for fixed (the billing timing), usage_based, license_based, minimum_commitment, contract_minimum_commitment, and custom (the definition and the calculation memory) line items.","required":["type","definitionKey","memory"],"properties":{"type":{"type":"string","enum":["custom"],"description":"Discriminator: metadata for a custom line item.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.5.type","typeLabel":"enum\u003cstring>"},"definitionKey":{"type":"string","description":"The key of the custom charge definition whose calculator priced the charge, following the custom:charge:\u003cslug>:\u003cname> convention.","examples":["custom:charge:padaria-central:entregas"],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.5.definitionKey","typeLabel":"string"},"memory":{"type":"object","additionalProperties":true,"description":"The full calculation memory that the calculator returned, such as every tier it evaluated and the one it billed. Its shape belongs to the definition.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.5.memory","typeLabel":"object"}},"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.5","typeLabel":"Custom · object"},{"type":"null","title":"No metadata","description":"Pricing metadata for the line item, where the shape is keyed by type. Always present, but null for line items without pricing metadata: credit_purchase, additional_charge, one_off, and tax_gross_up. It is populated for fixed (the billing timing), usage_based, license_based, minimum_commitment, contract_minimum_commitment, and custom (the definition and the calculation memory) line items.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].metadata.oneOf.6","typeLabel":"null"}],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].metadata","typeLabel":"Fixed · object | Usage-based · object | License-based · object | Contract minimum commitment · object | Minimum commitment · object | Custom · object | null"},"subLineItems":{"type":"array","items":{"type":"object","description":"Schema representing a sub-line item: one priced row of a line item's breakdown. The row type dictates the shape of metadata.","properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier of the sub-line item in our system.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"type":{"type":"string","enum":["fixed_price","minimum_amount","price_tier_flat","price_tier_unit","price_tier_package","price_tier_percentage","proration","license_proration","license_proration_tier","unit_price","included_quantity","package_price","percentage","overage","original_amount","fixed_unit_price","custom"],"description":"The kind of priced row: fixed_price and minimum_amount are companions of usage-based charges; unit_price, package_price, percentage, and included_quantity break down single-model pricing; price_tier_* rows break down tiered pricing; overage bills usage beyond the last tier; proration bills per prorated interval; license_proration bills license deltas (removals are negative); original_amount surfaces the pre-adjustment amount of an adjusted line; fixed_unit_price breaks down a fixed charge billed as a quantity times a unit amount; custom bills one component of a custom plan charge.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"name":{"type":"string","description":"Display name of the sub-line item as it appears on the invoice breakdown.","example":"[A partir de 1] Unidades","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].name","typeLabel":"string"},"description":{"oneOf":[{"type":"string","description":"Optional descriptive text for the row. Null when absent.","example":"120 x 2,50","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].description.oneOf.0","typeLabel":"string"},{"type":"null","description":"Optional descriptive text for the row. Null when absent.","example":"120 x 2,50","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].description.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].description","typeLabel":"string | null"},"usage":{"oneOf":[{"type":"number","description":"The usage billed by this row: a count of resource units (the quantity for a fixed_unit_price row), or a monetary base amount in cents for percentage-priced rows (see the row's usageFormat, or the line item usageFormat when the row has none). Null for rows without usage (e.g. companions).","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].usage.oneOf.0","typeLabel":"number"},{"type":"null","description":"The usage billed by this row: a count of resource units (the quantity for a fixed_unit_price row), or a monetary base amount in cents for percentage-priced rows (see the row's usageFormat, or the line item usageFormat when the row has none). Null for rows without usage (e.g. companions).","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].usage.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].usage","typeLabel":"number | null"},"usageFormat":{"oneOf":[{"type":"string","enum":["unit","currency",null],"description":"How to read the usage of this row when the row has a format of its own, as the custom rows of a custom line item do: unit means a count, currency means an amount in cents. Null when the row reads its usage in the line item usageFormat.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].usageFormat.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["unit","currency",null],"description":"How to read the usage of this row when the row has a format of its own, as the custom rows of a custom line item do: unit means a count, currency means an amount in cents. Null when the row reads its usage in the line item usageFormat.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].usageFormat.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].usageFormat","typeLabel":"enum\u003cstring> | null"},"amount":{"type":"number","description":"Amount billed by this row, in cents. The sum of a line item's sub-line amounts equals its subtotalAmount.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].amount","typeLabel":"number"},"metadata":{"oneOf":[{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","fixedPrice"],"properties":{"type":{"type":"string","enum":["fixed_price"],"description":"Discriminator: fixed-price companion row.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.0.type","typeLabel":"enum\u003cstring>"},"fixedPrice":{"type":"number","description":"The fixed amount configured on the charge, in cents.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.0.fixedPrice","typeLabel":"number"}},"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.0","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","minimumAmount","minimumAmountApplied"],"properties":{"type":{"type":"string","enum":["minimum_amount"],"description":"Discriminator: minimum-amount companion row.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.1.type","typeLabel":"enum\u003cstring>"},"minimumAmount":{"type":"number","description":"The minimum amount configured on the charge, in cents.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.1.minimumAmount","typeLabel":"number"},"minimumAmountApplied":{"type":"number","description":"The top-up billed by this row to reach the configured minimum, in cents.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.1.minimumAmountApplied","typeLabel":"number"}},"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.1","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","from","to","fixedPrice"],"properties":{"type":{"type":"string","enum":["price_tier_flat"],"description":"Discriminator: flat-priced tier row.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.2.type","typeLabel":"enum\u003cstring>"},"from":{"type":"number","description":"Lower bound of the tier band, in resource units (inclusive).","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.2.from","typeLabel":"number"},"to":{"oneOf":[{"type":"number","description":"Upper bound of the tier band, in resource units (inclusive). Null for an unbounded final tier.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.2.to.oneOf.0","typeLabel":"number"},{"type":"null","description":"Upper bound of the tier band, in resource units (inclusive). Null for an unbounded final tier.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.2.to.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.2.to","typeLabel":"number | null"},"fixedPrice":{"type":"string","description":"The flat amount billed for the tier, as a decimal currency-unit string.","examples":["150.00"],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.2.fixedPrice","typeLabel":"string"}},"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.2","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","from","to","price","fixedPrice"],"properties":{"type":{"type":"string","enum":["price_tier_unit"],"description":"Discriminator: per-unit priced tier row.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.3.type","typeLabel":"enum\u003cstring>"},"from":{"type":"number","description":"Lower bound of the tier band, in resource units (inclusive).","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.3.from","typeLabel":"number"},"to":{"oneOf":[{"type":"number","description":"Upper bound of the tier band, in resource units (inclusive). Null for an unbounded final tier.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.3.to.oneOf.0","typeLabel":"number"},{"type":"null","description":"Upper bound of the tier band, in resource units (inclusive). Null for an unbounded final tier.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.3.to.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.3.to","typeLabel":"number | null"},"price":{"type":"string","description":"Price per unit within the tier, as a decimal currency-unit string.","examples":["0.25"],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.3.price","typeLabel":"string"},"fixedPrice":{"oneOf":[{"type":"string","description":"Optional flat fee billed on top when the tier applies, as a decimal currency-unit string. Null when the tier has no flat fee.","examples":["10.00"],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.3.fixedPrice.oneOf.0","typeLabel":"string"},{"type":"null","description":"Optional flat fee billed on top when the tier applies, as a decimal currency-unit string. Null when the tier has no flat fee.","examples":["10.00"],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.3.fixedPrice.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.3.fixedPrice","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.3","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","from","to","packageSize","price"],"properties":{"type":{"type":"string","enum":["price_tier_package"],"description":"Discriminator: package-priced tier row.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.4.type","typeLabel":"enum\u003cstring>"},"from":{"type":"number","description":"Lower bound of the tier band, in resource units (inclusive).","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.4.from","typeLabel":"number"},"to":{"oneOf":[{"type":"number","description":"Upper bound of the tier band, in resource units (inclusive). Null for an unbounded final tier.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.4.to.oneOf.0","typeLabel":"number"},{"type":"null","description":"Upper bound of the tier band, in resource units (inclusive). Null for an unbounded final tier.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.4.to.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.4.to","typeLabel":"number | null"},"packageSize":{"type":"number","description":"Number of resource units per package.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.4.packageSize","typeLabel":"number"},"price":{"type":"string","description":"Price per package, as a decimal currency-unit string.","examples":["45.00"],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.4.price","typeLabel":"string"}},"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.4","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","from","to","percentage"],"properties":{"type":{"type":"string","enum":["price_tier_percentage"],"description":"Discriminator: percentage-priced tier row.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.5.type","typeLabel":"enum\u003cstring>"},"from":{"type":"number","description":"Lower bound of the tier band, in cents of the monetary base amount (inclusive).","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.5.from","typeLabel":"number"},"to":{"oneOf":[{"type":"number","description":"Upper bound of the tier band, in cents of the monetary base amount (inclusive). Null for an unbounded final tier.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.5.to.oneOf.0","typeLabel":"number"},{"type":"null","description":"Upper bound of the tier band, in cents of the monetary base amount (inclusive). Null for an unbounded final tier.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.5.to.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.5.to","typeLabel":"number | null"},"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":["2.5"],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.5.percentage","typeLabel":"string"}},"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.5","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","intervalSize","amount","usage","intervalStart","intervalEnd"],"properties":{"type":{"type":"string","enum":["proration"],"description":"Discriminator: proration interval row.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.6.type","typeLabel":"enum\u003cstring>"},"intervalSize":{"type":"number","description":"Length of the interval, in days of the billing cycle.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.6.intervalSize","typeLabel":"number"},"amount":{"type":"string","description":"The prorated amount of the interval, as a decimal currency-unit string: the interval usage priced as if held for the whole cycle, scaled by intervalSize over the cycle length.","examples":["29.0322580645"],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.6.amount","typeLabel":"string"},"usage":{"type":"number","description":"The usage held during the interval.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.6.usage","typeLabel":"number"},"intervalStart":{"type":"string","format":"date","description":"First day of the interval.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.6.intervalStart","typeLabel":"string\u003cdate>"},"intervalEnd":{"type":"string","format":"date","description":"Last day of the interval.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.6.intervalEnd","typeLabel":"string\u003cdate>"}},"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.6","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","changeDate","quantityDelta","quantity","remainingDays","cycleDays","proratedUnitRate","amount"],"properties":{"type":{"type":"string","enum":["license_proration"],"description":"Discriminator: license proration delta row.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.7.type","typeLabel":"enum\u003cstring>"},"changeDate":{"oneOf":[{"type":"string","format":"date","description":"The day the combined license quantity changed. Null on the cycle-start row.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.7.changeDate.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","format":"date","description":"The day the combined license quantity changed. Null on the cycle-start row.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.7.changeDate.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.7.changeDate","typeLabel":"string\u003cdate> | null"},"quantityDelta":{"type":"number","description":"Signed change in the licenses beyond the included quantity (the starting licenses beyond it on the cycle-start row). Negative for removals.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.7.quantityDelta","typeLabel":"number"},"quantity":{"type":"number","description":"The combined license quantity after this change.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.7.quantity","typeLabel":"number"},"remainingDays":{"type":"number","description":"Days from the change (inclusive) to the end of the cycle. Equals cycleDays on the cycle-start row.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.7.remainingDays","typeLabel":"number"},"cycleDays":{"type":"number","description":"Length of the billing cycle, in days.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.7.cycleDays","typeLabel":"number"},"proratedUnitRate":{"type":"string","description":"Absolute effective per-unit rate of the row over the remaining window, as a decimal currency-unit string: |amount| / |quantityDelta|. On a cycle-start row that bills no license, the unit price of the charge.","examples":["16.1290322581"],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.7.proratedUnitRate","typeLabel":"string"},"amount":{"type":"string","description":"The signed prorated amount of the row, as a decimal currency-unit string.","examples":["48.3870967742"],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.7.amount","typeLabel":"string"}},"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.7","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","changeDate","quantityDelta","quantity","remainingDays","cycleDays","proratedUnitRate","amount","planChargeTierId","from","to","unitPrice"],"properties":{"type":{"type":"string","enum":["license_proration_tier"],"description":"Discriminator: tiered license proration delta row.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.type","typeLabel":"enum\u003cstring>"},"changeDate":{"oneOf":[{"type":"string","format":"date","description":"The day the combined license quantity changed. Null on a cycle-start row.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.changeDate.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","format":"date","description":"The day the combined license quantity changed. Null on a cycle-start row.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.changeDate.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.changeDate","typeLabel":"string\u003cdate> | null"},"quantityDelta":{"type":"number","description":"Signed change in the units this band holds (the band's opening occupancy on a cycle-start row). Negative for removals.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.quantityDelta","typeLabel":"number"},"quantity":{"type":"number","description":"The combined license quantity across every band after this change.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.quantity","typeLabel":"number"},"remainingDays":{"type":"number","description":"Days from the change (inclusive) to the end of the cycle. Equals cycleDays on a cycle-start row.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.remainingDays","typeLabel":"number"},"cycleDays":{"type":"number","description":"Length of the billing cycle, in days.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.cycleDays","typeLabel":"number"},"proratedUnitRate":{"type":"string","description":"Absolute effective per-unit rate of the row over the remaining window, as a decimal currency-unit string: |amount| / |quantityDelta|.","examples":["16.1290322581"],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.proratedUnitRate","typeLabel":"string"},"amount":{"type":"string","description":"The signed prorated amount of the row, as a decimal currency-unit string.","examples":["48.3870967742"],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.amount","typeLabel":"string"},"planChargeTierId":{"type":"string","description":"The unique identifier of the plan charge tier this row moved through.","examples":["3c90c3cc-0d44-4b50-8888-8dd25736052a"],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.planChargeTierId","typeLabel":"string"},"from":{"type":"number","description":"Inclusive lower bound of the band, in licenses.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.from","typeLabel":"number"},"to":{"oneOf":[{"type":"number","description":"Inclusive upper bound of the band, in licenses. Null on the last, open-ended band.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.to.oneOf.0","typeLabel":"number"},{"type":"null","description":"Inclusive upper bound of the band, in licenses. Null on the last, open-ended band.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.to.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.to","typeLabel":"number | null"},"unitPrice":{"type":"string","description":"The band's full-cycle price per unit, as a decimal currency-unit string. proratedUnitRate is this scaled by remainingDays over cycleDays.","examples":["25.00"],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8.unitPrice","typeLabel":"string"}},"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.8","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","price"],"properties":{"type":{"type":"string","enum":["unit_price"],"description":"Discriminator: unit-price row.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.9.type","typeLabel":"enum\u003cstring>"},"price":{"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":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.9.price","typeLabel":"string"}},"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.9","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","includedQuantity"],"properties":{"type":{"type":"string","enum":["included_quantity"],"description":"Discriminator: included-quantity row.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.10.type","typeLabel":"enum\u003cstring>"},"includedQuantity":{"type":"number","description":"Number of resource units included at no charge before billing starts.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.10.includedQuantity","typeLabel":"number"}},"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.10","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","packageSize","price","packagesBilled"],"properties":{"type":{"type":"string","enum":["package_price"],"description":"Discriminator: package-price row.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.11.type","typeLabel":"enum\u003cstring>"},"packageSize":{"type":"number","description":"Number of resource units per package.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.11.packageSize","typeLabel":"number"},"price":{"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":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.11.price","typeLabel":"string"},"packagesBilled":{"type":"number","description":"Number of packages billed: the billable units divided by packageSize, rounded up.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.11.packagesBilled","typeLabel":"number"}},"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.11","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","percentage"],"properties":{"type":{"type":"string","enum":["percentage"],"description":"Discriminator: percentage row.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.12.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, as a decimal string from 0 to 100 (up to 6 decimal places).","examples":["2.5"],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.12.percentage","typeLabel":"string"}},"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.12","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","pricingType","from","price"],"properties":{"type":{"type":"string","enum":["overage"],"description":"Discriminator: overage row.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.13.type","typeLabel":"enum\u003cstring>"},"pricingType":{"type":"string","enum":["per_unit"],"description":"Discriminator: overage billed per unit.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.13.pricingType","typeLabel":"enum\u003cstring>"},"from":{"type":"number","description":"The boundary the overage starts from: the upper bound of the last tier, in resource units.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.13.from","typeLabel":"number"},"price":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"Price per excess unit, as a decimal currency-unit string (up to 6 decimal places).","examples":["0.30"],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.13.price","typeLabel":"string"}},"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.13","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","pricingType","from","percentage"],"properties":{"type":{"type":"string","enum":["overage"],"description":"Discriminator: overage row.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.14.type","typeLabel":"enum\u003cstring>"},"pricingType":{"type":"string","enum":["percentage"],"description":"Discriminator: overage billed as a percentage.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.14.pricingType","typeLabel":"enum\u003cstring>"},"from":{"type":"number","description":"The boundary the overage starts from: the upper bound of the last tier, in cents of the monetary base amount.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.14.from","typeLabel":"number"},"percentage":{"type":"string","pattern":"^(100(\\.0{1,6})?|\\d{1,2}(\\.\\d{1,6})?)$","description":"Percentage applied to the excess base amount, as a decimal string from 0 to 100 (up to 6 decimal places).","examples":["1.5"],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.14.percentage","typeLabel":"string"}},"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.14","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type"],"properties":{"type":{"type":"string","enum":["original_amount"],"description":"Discriminator: original-amount row.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.15.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.15","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","amount"],"properties":{"type":{"type":"string","enum":["fixed_unit_price"],"description":"Discriminator: fixed unit price row.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.16.type","typeLabel":"enum\u003cstring>"},"amount":{"type":"integer","minimum":0,"description":"Amount of one unit, in cents.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.16.amount","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.16","typeLabel":"object"},{"type":"object","description":"Pricing details of the row, keyed by the row type (and pricingType for overage rows).","required":["type","key"],"properties":{"type":{"type":"string","enum":["custom"],"description":"Discriminator: custom row.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.17.type","typeLabel":"enum\u003cstring>"},"key":{"type":"string","description":"The key of the component in the sub-line schema of the charge's custom charge definition, such as documents_overage.","examples":["documents_overage"],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.17.key","typeLabel":"string"}},"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata.oneOf.17","typeLabel":"object"}],"isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX].metadata","typeLabel":"object"}},"required":["id","type","name","description","usage","usageFormat","amount","metadata"],"additionalProperties":false,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems.items.[INDEX]","typeLabel":"object"},"description":"Breakdown of the line item amount into priced rows (included quantities, unit/package/tier prices, prorations, companions). Empty for line items without a breakdown.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].subLineItems","typeLabel":"object[]"},"adjustments":{"type":"array","items":{"type":"object","description":"Schema representing an adjustment applied on top of a line item subtotal, such as a discount or an allocation offset.","properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier of the adjustment in our system.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].adjustments.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","description":"Display name of the adjustment as it appears on the invoice.","example":"Desconto de boas-vindas","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].adjustments.items.[INDEX].name","typeLabel":"string"},"type":{"type":"string","enum":["monetary_discount","allocation_offset"],"description":"The kind of adjustment: monetary_discount (a discount applied to the line item) or allocation_offset (the share of the amount moved to another payment account's invoice under a split allocation strategy).","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].adjustments.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"amount":{"type":"number","description":"Amount of the adjustment, in cents. Negative when the adjustment reduces the line item total.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].adjustments.items.[INDEX].amount","typeLabel":"number"}},"required":["id","name","type","amount"],"additionalProperties":false,"uniqueKey":"standaloneLineItems.items.[INDEX].adjustments.items.[INDEX]","typeLabel":"object"},"description":"Adjustments applied on top of the line item subtotal, such as discounts and allocation offsets.","isRequired":true,"uniqueKey":"standaloneLineItems.items.[INDEX].adjustments","typeLabel":"object[]"},"itemId":{"oneOf":[{"type":"string","format":"uuid","description":"The unique identifier of the catalog item this line bills. Null for line items not backed by a catalog item.","uniqueKey":"standaloneLineItems.items.[INDEX].itemId.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The unique identifier of the catalog item this line bills. Null for line items not backed by a catalog item.","uniqueKey":"standaloneLineItems.items.[INDEX].itemId.oneOf.1","typeLabel":"null"}],"uniqueKey":"standaloneLineItems.items.[INDEX].itemId","typeLabel":"string\u003cuuid> | null"}},"required":["id","idempotencyKey","customerId","productId","resourceId","licenseId","lineItemGroupId","name","scope","startDate","endDate","totalUsage","usageFormat","subtotalAmount","adjustmentAmount","totalAmount","discountAmount","metadata","subLineItems","adjustments"],"additionalProperties":false,"uniqueKey":"standaloneLineItems.items.[INDEX]","typeLabel":"object"},"description":"Line items that do not belong to any line item group (e.g. contract-level minimum commitments, additional charges, and ungrouped one-off items).","isRequired":true,"uniqueKey":"standaloneLineItems","typeLabel":"object[]"},"customFields":{"type":"object","description":"The values of the tenant's custom fields for invoices, keyed by the key of each custom field. The object is empty when the invoice holds no value. A user edits them in the billing app, and `PUT /v1/invoices/{id}/custom-fields` replaces the whole set, in any status of the invoice.","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"customFields.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"string","uniqueKey":"customFields.additionalProperties.oneOf.1.items.[INDEX]","typeLabel":"string"},"uniqueKey":"customFields.additionalProperties.oneOf.1","typeLabel":"string[]"}],"uniqueKey":"customFields.additionalProperties","typeLabel":"string | string[]"},"default":{},"example":{"customField1":"value1","customField2":["value2","value3"]},"isRequired":true,"uniqueKey":"customFields","typeLabel":"object"},"sentAt":{"oneOf":[{"type":"string","format":"date-time","description":"When Aira last sent the invoice by e-mail to its invoice recipients, in an invoice delivery. Null when Aira has not sent it.","isRequired":true,"uniqueKey":"sentAt.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When Aira last sent the invoice by e-mail to its invoice recipients, in an invoice delivery. Null when Aira has not sent it.","isRequired":true,"uniqueKey":"sentAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sentAt","typeLabel":"string\u003cdate-time> | null"},"replaceReason":{"oneOf":[{"type":"string","enum":["contract_allocation_changed","manually_reopened",null],"description":"Why one invoice of the same invoice slot replaced another, on both invoices of the replacement: manually_reopened for a reopening, and contract_allocation_changed when a change to the contract allocation canceled the invoice and a later billing of its billing act replaced it. Null when the invoice replaces no invoice and no invoice replaces it.","isRequired":true,"uniqueKey":"replaceReason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["contract_allocation_changed","manually_reopened",null],"description":"Why one invoice of the same invoice slot replaced another, on both invoices of the replacement: manually_reopened for a reopening, and contract_allocation_changed when a change to the contract allocation canceled the invoice and a later billing of its billing act replaced it. Null when the invoice replaces no invoice and no invoice replaces it.","isRequired":true,"uniqueKey":"replaceReason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"replaceReason","typeLabel":"enum\u003cstring> | null"},"replacesInvoiceId":{"oneOf":[{"type":"string","format":"uuid","description":"The unique identifier of the canceled invoice that this invoice replaces in its invoice slot. Null when the invoice replaces no invoice.","isRequired":true,"uniqueKey":"replacesInvoiceId.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The unique identifier of the canceled invoice that this invoice replaces in its invoice slot. Null when the invoice replaces no invoice.","isRequired":true,"uniqueKey":"replacesInvoiceId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"replacesInvoiceId","typeLabel":"string\u003cuuid> | null"},"replacedByInvoiceId":{"oneOf":[{"type":"string","format":"uuid","description":"The unique identifier of the invoice that replaces this canceled invoice in its invoice slot. Null when no invoice replaces it.","isRequired":true,"uniqueKey":"replacedByInvoiceId.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The unique identifier of the invoice that replaces this canceled invoice in its invoice slot. Null when no invoice replaces it.","isRequired":true,"uniqueKey":"replacedByInvoiceId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"replacedByInvoiceId","typeLabel":"string\u003cuuid> | null"}},"required":["id","idempotencyKey","customerId","paymentAccountId","contractId","contractInvoiceSequence","issuingAccount","billingAccount","invoiceAllocationStrategy","lastCalculatedAt","invoiceNumber","invoiceDate","memo","subtotalAmount","adjustmentAmount","totalAmount","discountAmount","status","isLocked","failureReason","source","autoIssue","amountDue","dueDate","lineItemGroups","standaloneLineItems","customFields","sentAt","replaceReason","replacesInvoiceId","replacedByInvoiceId"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","idempotencyKey":"padaria-central-2026-11","customerId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","paymentAccountId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","contractId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","contractInvoiceSequence":2,"issuingAccount":{"tradeName":"Padaria Central","businessName":"Padaria Central Ltda","emails":["jsmith@example.com"],"taxId":"01234567000195","taxIdType":"cnpj","zipCode":"01310100","street":"Avenida Paulista","number":"1000","neighborhood":"Bela Vista","city":"São Paulo","state":"AC","country":"Brasil","complement":"Sala 12"},"billingAccount":{"tradeName":"Padaria Central","businessName":"Padaria Central Ltda","emails":["jsmith@example.com"],"taxId":"01234567000195","taxIdType":"cnpj","zipCode":"01310100","street":"Avenida Paulista","number":"1000","neighborhood":"Bela Vista","city":"São Paulo","state":"AC","country":"Brasil","complement":"Sala 12"},"invoiceAllocationStrategy":"single","lastCalculatedAt":"2023-11-07T05:31:56Z","invoiceNumber":"ACMEI-0042","invoiceDate":"2023-12-25","memo":"Período 01/11/2026 a 30/11/2026","subtotalAmount":123,"adjustmentAmount":123,"totalAmount":123,"discountAmount":123,"status":"open","isLocked":true,"failureReason":"contract_sync_not_found","source":"contract","autoIssue":true,"amountDue":123,"dueDate":"2023-12-25","lineItemGroups":[{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","idempotencyKey":"servicos-novembro","customerId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","productId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","planId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","planInstanceId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"Plano Entregas","startDate":"2023-12-25","endDate":"2023-12-25","subtotalAmount":123,"adjustmentAmount":123,"totalAmount":123,"discountAmount":123,"lineItems":[{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","idempotencyKey":"entrega-novembro","customerId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","productId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","resourceId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","licenseId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","lineItemGroupId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"Entregas","scope":"credit_purchase","startDate":"2023-12-25","endDate":"2023-12-25","totalUsage":123,"usageFormat":"unit","subtotalAmount":123,"adjustmentAmount":123,"totalAmount":123,"discountAmount":123,"metadata":{"type":"fixed","billingTiming":"in_advance"},"subLineItems":[{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","type":"fixed_price","name":"[A partir de 1] Unidades","description":"120 x 2,50","usage":123,"usageFormat":"unit","amount":123,"metadata":{"type":"fixed_price","fixedPrice":123}}],"adjustments":[{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"Desconto de boas-vindas","type":"monetary_discount","amount":123}],"itemId":"3c90c3cc-0d44-4b50-8888-8dd25736052a"}]}],"standaloneLineItems":[{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","idempotencyKey":"entrega-novembro","customerId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","productId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","resourceId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","licenseId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","lineItemGroupId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"Entregas","scope":"credit_purchase","startDate":"2023-12-25","endDate":"2023-12-25","totalUsage":123,"usageFormat":"unit","subtotalAmount":123,"adjustmentAmount":123,"totalAmount":123,"discountAmount":123,"metadata":{"type":"fixed","billingTiming":"in_advance"},"subLineItems":[{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","type":"fixed_price","name":"[A partir de 1] Unidades","description":"120 x 2,50","usage":123,"usageFormat":"unit","amount":123,"metadata":{"type":"fixed_price","fixedPrice":123}}],"adjustments":[{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"Desconto de boas-vindas","type":"monetary_discount","amount":123}],"itemId":"3c90c3cc-0d44-4b50-8888-8dd25736052a"}],"customFields":{"customField1":"value1","customField2":["value2","value3"]},"sentAt":"2023-11-07T05:31:56Z","replaceReason":"contract_allocation_changed","replacesInvoiceId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","replacedByInvoiceId":"3c90c3cc-0d44-4b50-8888-8dd25736052a"}}},"exampleType":"generated"}},"exampleType":"generated"},"7ec6ec2c-85a0-4963-91c3-081b53002d47":{"description":"The request cannot succeed as sent.\n\n- `json_schema_validation_error`: a path parameter or the body breaks the schema of the endpoint.\n- `invalid_custom_fields`: the `customFields` leave out a required custom field of the tenant for invoices, name a key that is not one, or hold a value that its custom field does not take.","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","invalid_custom_fields"],"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":"'customFields' is required","code":"json_schema_validation_error"}},"invalid_custom_fields":{"title":"invalid_custom_fields","value":{"message":"Unknown custom field(s) for {entity}: {value}","code":"invalid_custom_fields"}}},"exampleType":"examples"}},"exampleType":"examples"},"e88d3200-c637-4579-9b52-bf0b48b0ec78":{"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"},"26c5a0c2-a4d8-46f6-9df6-2fbb69cb21a0":{"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 invoices: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"},"01eb9ccd-c092-4499-9512-e957b5acef35":{"description":"A record that the request names does not exist in the tenant.\n\n- `invoice_not_found`: no invoice of the tenant has the `id`.","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":["invoice_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":{"invoice_not_found":{"title":"invoice_not_found","value":{"message":"invoice not found","code":"invoice_not_found"}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"673eb9be-1b9d-496c-955b-95753f212bd5":{"ApiKey":{"type":"apiKey","description":"API Key Authentication.","name":"X-API-KEY","in":"header","scopes":[],"schemeName":"ApiKey"}}},"servers":{"6423522f-10c2-4bfd-9612-2aa2feb25713":{"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":"Update the custom fields of an invoice - Aira","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-27T01:55:29.324Z","originalFileLocation":"api-reference/invoices/update-the-custom-fields-of-an-invoice.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=\"Replaces the whole set of custom field values of an invoice, in any status, and answers the invoice. A key that the body leaves out loses its value. Requires the role invoices: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=\"Update the custom fields of an invoice - Aira\">\u003cmeta data-mint-head property=\"og:description\" content=\"Replaces the whole set of custom field values of an invoice, in any status, and answers the invoice. A key that the body leaves out loses its value. Requires the role invoices: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/invoices/update-the-custom-fields-of-an-invoice\">\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=Invoices\u0026amp;title=Update+the+custom+fields+of+an+invoice\u0026amp;description=Replaces+the+whole+set+of+custom+field+values+of+an+invoice%2C+in+any+status%2C+and+answers+the+invoice.+A+key+that+the+body+leaves+out+loses+its+value.%0A%0ARequires+t\u0026amp;theme=8169730228d89f2c41115879\u0026amp;signature=c8e7de57afc1047fd5d184b7c5e2a43668d88ae917d4fc9ce89cd1bce0bc28c4\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Update the custom fields of an invoice - Aira\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Replaces the whole set of custom field values of an invoice, in any status, and answers the invoice. A key that the body leaves out loses its value. Requires the role invoices:write.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://aira-e93056c6.mintlify.site/_mintlify/api/og/v2?division=Invoices\u0026amp;title=Update+the+custom+fields+of+an+invoice\u0026amp;description=Replaces+the+whole+set+of+custom+field+values+of+an+invoice%2C+in+any+status%2C+and+answers+the+invoice.+A+key+that+the+body+leaves+out+loses+its+value.%0A%0ARequires+t\u0026amp;theme=8169730228d89f2c41115879\u0026amp;signature=c8e7de57afc1047fd5d184b7c5e2a43668d88ae917d4fc9ce89cd1bce0bc28c4\">\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/invoices/update-the-custom-fields-of-an-invoice\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/invoices/update-the-custom-fields-of-an-invoice.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/invoices/update-the-custom-fields-of-an-invoice#webpage\",\"url\":\"https://docs.useaira.com/api-reference/invoices/update-the-custom-fields-of-an-invoice\",\"name\":\"Update the custom fields of an invoice\",\"description\":\"Replaces the whole set of custom field values of an invoice, in any status, and answers the invoice. A key that the body leaves out loses its value. Requires the role invoices:write.\",\"dateModified\":\"2026-11-27T01:55:29.324Z\",\"isPartOf\":{\"@id\":\"https://docs.useaira.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.useaira.com/api-reference/invoices/update-the-custom-fields-of-an-invoice#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.useaira.com/api-reference/invoices/update-the-custom-fields-of-an-invoice#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Referência da API\",\"item\":\"https://docs.useaira.com/api-reference/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Invoices\",\"item\":\"https://docs.useaira.com/api-reference/invoices/fetch-invoice\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Update the custom fields of an invoice\",\"item\":\"https://docs.useaira.com/api-reference/invoices/update-the-custom-fields-of-an-invoice\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.useaira.com/api-reference/invoices/update-the-custom-fields-of-an-invoice#apireference\",\"headline\":\"Update the custom fields of an invoice\",\"name\":\"Update the custom fields of an invoice\",\"description\":\"Replaces the whole set of custom field values of an invoice, in any status, and answers the invoice. A key that the body leaves out loses its value. Requires the role invoices:write.\",\"url\":\"https://docs.useaira.com/api-reference/invoices/update-the-custom-fields-of-an-invoice\",\"mainEntityOfPage\":{\"@id\":\"https://docs.useaira.com/api-reference/invoices/update-the-custom-fields-of-an-invoice#webpage\"},\"dateModified\":\"2026-11-27T01:55:29.324Z\",\"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/invoices/update-the-custom-fields-of-an-invoice.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":"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","description":"Reopens a contract invoice: Aira cancels it and creates the invoice that replaces it in its invoice slot, with the additional charges and the manual discounts of the reopened invoice, and answers the replacement. Answers 204 with no body when the contract allocation no longer names the payment account of the invoice, because Aira then cancels the invoice with no replacement.\n\nRequires the role `invoices:write`.","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","description":"Creates an invoice delivery, which Aira sends in the background: an e-mail of the invoice with the subject, the text and the files of the dunning step that the dunning schedule of the customer sends on the issue day. The e-mail goes to the invoice recipients of the payment account of the invoice, or to the recipientEmails of the body.\n\nRequires the role `invoices:write`.","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"}]},{"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","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/plans/","href":"/api-reference/plans/list-plans"}]},{"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":"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":"Update the custom fields of an invoice - 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"]}