v1
latestOpenAPI 3.1.02026-07-261444991.2 MBInvoice
Create invoice line item
This creates a one-off fixed fee invoice line item on an Invoice. This can only be done for invoices that are in a draft status.
The behavior depends on which parameters are provided:
- If item_id is provided without name: The item is looked up by ID, and the item's name is used for the line item.
- If name is provided without item_id: An item with the given name is searched for in the account. If found, that item is used. If not found, a new item is created with that name. The new item's name is used for the line item.
- If both item_id and name are provided: The item is looked up by ID for association, but the provided name is used for the line item (not the item's name).
post/invoice_line_items
Request body
Example request
{
"start_date": "2023-09-22",
"end_date": "2023-09-22",
"quantity": 1,
"invoice_id": "4khy3nwzktxv7",
"name": "Item Name",
"amount": "12.00",
"item_id": "4khy3nwzktxv7"
}Response
Created
Example response
{
"amount": "7.00",
"end_date": "2022-02-01T08:00:00+00:00",
"name": "Fixed Fee",
"quantity": 1,
"start_date": "2022-02-01T08:00:00+00:00",
"subtotal": "9.00",
"adjusted_subtotal": "5.00",
"credits_applied": "6.00",
"partially_invoiced_amount": "4.00",
"sub_line_items": [
{
"amount": "9.00",
"name": "Tier One",
"quantity": 5,
"grouping": {
"key": "region",
"value": "west"
}
}
],
"price": {
"discount": {
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"percentage_discount": 0.15
}
}
}