Skip to main content

Invoice Items

An invoice item (invoiceitem) is a single line on an invoice. Items can either reference a catalog price — inheriting its unit amount, currency, and tax rate — or be fully ad-hoc with an explicit description and unit_amount. Invoice items can only be added to or removed from draft invoices. Finalized invoices are locked and cannot be mutated. All monetary amounts are integers in minor currency units. For USD, 10000 = $100.00. Base URL: https://invoice.horizonpay.co/api/v1

The invoice item object

string
Unique identifier for the invoice item. Prefixed with ii_.
string
String literal "invoiceitem".
string | null
The price_-prefixed ID of the catalog price this item references. null for ad-hoc lines.
string | null
The prod_-prefixed ID of the parent product. Populated automatically when price is set. null for ad-hoc lines.
string
Description shown on the invoice. Inherited from the product name when a price is referenced, unless overridden.
number
Number of units billed. Must be greater than zero.
string
Unit of measure code. One of: NOS, PCS, KGS, GMS, LTR, MTR, SQF, SQM, HRS, DAY, MON, BOX, SET, OTH.
integer
Unit price in minor currency units. For priced lines, this is taken from the referenced price.
integer
Line total in minor units, after discount and before tax: unit_amount × quantity × (1 − discount_percent / 100).
number
Discount percentage applied to this line. Range: 0100. Defaults to 0.
number
Tax rate percentage applied to this line. Inherited from the price when a price is referenced.
integer
Tax amount in minor units: amount × tax_rate / 100, rounded.

Endpoints

List all line items belonging to a specific invoice. The invoice query parameter is required.Required scope: invoices:read

Query parameters

string
required
The in_-prefixed invoice ID or UUID whose line items you want to retrieve.

Request

Response

Append one line item to a draft invoice. You may reference a catalog price or supply an ad-hoc description and unit amount — not both.Required scope: invoices:writeIdempotency-Key is required for this endpoint. Duplicate requests with the same key will return the same item without creating a second line.

Priced lines vs. ad-hoc lines

Body parameters

string
required
The in_-prefixed ID or UUID of the draft invoice to append the item to.
string
The price_-prefixed ID of a catalog price. When present, unit_amount, tax_rate, and description are inherited from the price and its product unless you explicitly override them.
string
Line-item description. Required for ad-hoc lines (when price is omitted). Defaults to "".
number
Number of units. Must be greater than 0. Defaults to 1.
string
Unit of measure. One of: NOS, PCS, KGS, GMS, LTR, MTR, SQF, SQM, HRS, DAY, MON, BOX, SET, OTH. Defaults to NOS.
integer
Unit price in minor currency units. Required for ad-hoc lines. Omit to use the price’s amount.
number
Discount percentage for this line only. Range: 0100. Defaults to 0.
number
Tax rate percentage. Range: 0100. Omit to inherit from the price.

Request — priced line

Request — ad-hoc line

Response 201 Created

The response envelope contains the full updated invoice object (with all line items and recomputed totals), not just the newly created item.
Retrieve a single invoice item by its ii_-prefixed ID.Required scope: invoices:readThe :id path parameter accepts either the ii_-prefixed public ID or the underlying UUID.

Request

Response 200 OK

Remove a line item from a draft invoice. The invoice’s totals are immediately recomputed.Required scope: invoices:writeYou may optionally pass ?invoice=in_… as a query parameter to scope the lookup to a specific invoice. Without it, all invoices in your workspace are searched.

Request

Response 200 OK

The response contains the full updated invoice with the item removed and totals recomputed.

Supported unit codes


Error responses