Skip to main content
POST
Create line_items

Authorizations

Authorization
string
header
required

API key from Developers → API Keys, sent as Authorization: Bearer .

Headers

Idempotency-Key
string

Any unique string (≤255 chars). A retry with the same key within 24 hours replays the original response (Idempotent-Replayed: true) instead of creating a second record.

Maximum string length: 255

Body

application/json
invoice_id
integer
required

The invoice the line belongs to. Every invoice keeps at least one line — the last line can't be removed; void the invoice instead.

Required range: x >= 1
description
string
required

What the line bills for, up to 255 characters.

Maximum string length: 255
quantity
integer
required

Units billed — a whole number, at least 1.

Required range: 1 <= x <= 2147483647
price
string
required

Unit price, 2 dp, within ±99,999,999.99 — negative for a discount or credit line, exactly as on the invoice screen.

Pattern: ^-?\d+(\.\d{1,2})?$
Example:

"45.00"

billable_item_id
integer
required

The account service or product this line bills — required on every new line. On update, omit it to keep the existing link; a line can never be stripped of its link.

Required range: x >= 1
provider_id
integer | null

The practitioner credited with the line. Defaults to the invoice's practitioner_id when omitted; null is a deliberate no-provider.

metadata
object

Integrator-owned key/value metadata (max 50 keys). Values are strings (≤500 chars), numbers or booleans and read back with the type they were written with. On write, a null value removes the key. Filter with metadata[key]=op:value; number operands compare numerically.

Response

The resource

data
object
Example: