List invoice items
Returns the items on an invoice. The list is offset-based and, unless you send limit, returns every item on one page. Takes a secret, trusted or limited token. A limited token must be bound to the invoice and cannot see a draft.
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
invoice_id*stringThe invoice id.
limit?integerHow many items to return on one page, from 1 to 100. The default is 100. A value outside 1 to 100, or one that is not a whole number, is a 400.
1 <= value <= 100100offset?integerFor offset-based lists, how many items to skip before the page starts. Use next_page_offset or previous_page_offset from the page you have. A value that is not a whole number is a 400.
0 <= value0desc?booleanSort in descending order (newest, largest or last first) when true. The default is false. A value other than true or false is a 400.
falsesort_by?stringThe field to sort by. Defaults to date_created.
"date_created""date_modified""product_id""item_id"expand?stringComma-separated child objects to return in full instead of as a URL, for example customer,payments. Use dot notation for nested objects (items.product), up to four levels deep. A single object takes up to 12 paths; a list takes up to 2, applied to every item. Extra paths are dropped without an error. See Expanding objects.
show?stringComma-separated fields to return; all others are left out. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.
hide?stringComma-separated fields to leave out of the response. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.
formatted?booleanWhen true, the object also has a formatted child with amounts and dates as display text in the shopper's language and currency (for example $19.99 or November 7, 2026). The default is false. See Localized formatting.
falseAn offset-based list of invoice items.
application/json- response
An offset-based list of the items on an invoice.
total_items*integerThe number of items in the whole list.
total_pages*integerThe number of pages.
current_page*integerThe page number of this page, starting at 1.
next_page_url*|The URL of the next page, or null on the last page.
urinext_page_offset*|The offset of the next page, or null on the last page.
previous_page_url*|The URL of the previous page, or null on the first page.
uriprevious_page_offset*|The offset of the previous page, or null on the first page.
current_page_url*stringThe URL of this page.
uridata*array<>The items on this page.
curl -X GET 'https://api.comecero.com/api/v1/invoices/string/items'{ "total_items": 1, "total_pages": 1, "current_page": 1, "next_page_url": null, "next_page_offset": null, "previous_page_url": null, "previous_page_offset": null, "current_page_url": "https://api.comecero.com/api/v1/invoices/4827-KTPMW-639/items", "data": [ { "object": "invoice_item", "url": "https://api.comecero.com/api/v1/invoices/4827-KTPMW-639/items/1", "item_id": "1", "invoice_id": "4827-KTPMW-639", "product_id": null, "name": "Website setup, 10 hours", "type": "service", "quantity": 10, "currency": "USD", "price": 95, "subtotal": 950, "tax": 0, "total": 950, "product": null, "meta": null } ]}Delete an invoice DELETE
Deletes an open invoice for good. You cannot delete a closed invoice, a subscription renewal invoice, or one with a completed or pending payment (refund or cancel those payments first). No event fires. Takes a secret or trusted token.
Add an invoice item POST
Adds one item to an open, unpaid invoice. Send a `product_id` for a catalog product, or a `name`, `type` and `reference_price` for a custom item. Adding a product that is already on the invoice replaces that line. Adding a bundle product adds the bundle plus one zero-priced item per product in it, and the response is then a list of all those items. Shipping and promotions are worked out again. You cannot add items once the invoice is closed, paid, scheduled for automatic payment or has a payment in process. Takes a secret or trusted token. Limited tokens may not change items (`403`).