curl --request PUT \
--url https://api.useaira.com/v1/invoices/{invoiceId}/line-items/{lineItemId} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"amount": 123,
"name": "<string>",
"subLineItems": [
{
"usage": 123,
"amount": 123
}
]
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resourceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lineItemGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"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": "metric",
"billingModel": "in_full",
"priceTierDivision": "unique_tier"
},
"subLineItems": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "fixed_price",
"name": "<string>",
"description": "<string>",
"usage": 123,
"amount": 123,
"metadata": {
"type": "fixed_price",
"fixedPrice": 123
}
}
],
"adjustments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "monetary_discount",
"amount": 123
}
],
"itemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Updates a line item on a one-off invoice. When subLineItems is provided, the existing sub-line items are replaced.
curl --request PUT \
--url https://api.useaira.com/v1/invoices/{invoiceId}/line-items/{lineItemId} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"amount": 123,
"name": "<string>",
"subLineItems": [
{
"usage": 123,
"amount": 123
}
]
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resourceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lineItemGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"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": "metric",
"billingModel": "in_full",
"priceTierDivision": "unique_tier"
},
"subLineItems": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "fixed_price",
"name": "<string>",
"description": "<string>",
"usage": 123,
"amount": 123,
"metadata": {
"type": "fixed_price",
"fixedPrice": 123
}
}
],
"adjustments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "monetary_discount",
"amount": 123
}
],
"itemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Documentation Index
Fetch the complete documentation index at: https://docs.useaira.com/llms.txt
Use this file to discover all available pages before exploring further.
API Key Authentication.
Schema for updating a line item on a one-off invoice. When subLineItems is provided, existing sub-items are replaced; when omitted, sub-items are left untouched. When subLineItems is non-empty, the sum of subLineItems.amount must equal amount.
Default Response
credit_purchase, contract_minimum_amount, plan_minimum_amount, plan_fixed_amount, metric, additional_charge, one_off, tax_gross_up unit, currency, null Show child attributes
Show child attributes
Show child attributes