Skip to main content
PUT
/
v1
/
invoices
/
{invoiceId}
/
line-item-groups
/
{lineItemGroupId}
Update invoice line item group
curl --request PUT \
  --url https://api.useaira.com/v1/invoices/{invoiceId}/line-item-groups/{lineItemGroupId} \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "startDate": "2023-12-25",
  "endDate": "2023-12-25",
  "name": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "idempotencyKey": "<string>",
  "customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "planId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "startDate": "2023-12-25",
  "endDate": "2023-12-25",
  "subtotalAmount": 123,
  "adjustmentAmount": 123,
  "totalAmount": 123,
  "discountAmount": 123,
  "lineItems": [
    {
      "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.

Authorizations

X-API-KEY
string
header
required

API Key Authentication.

Path Parameters

invoiceId
string<uuid>
required
lineItemGroupId
string<uuid>
required

Body

application/json

Schema for updating an invoice line item group. Updates name, start date, and end date.

startDate
string<date>
required
endDate
string<date>
required
name
string | null

Optional group name; defaults to the product name when null.

Response

Default Response

id
string<uuid>
required
idempotencyKey
string
required
customerId
string<uuid>
required
productId
string<uuid>
required
planId
string<uuid> | null
required
name
string
required
startDate
string<date>
required
endDate
string<date>
required
subtotalAmount
number
required
adjustmentAmount
number
required
totalAmount
number
required
discountAmount
number
required
lineItems
object[]
required