curl -X DELETE https://invoice.horizonpay.co/api/v1/invoice-items/ii_Gk2Rw7Lq4Zt9Xn1Vb6Mc3Hs8 \
-H "Authorization: Bearer $INVOICE_AI_API_KEY"import InvoiceAI from '@horizonpay/invoice-ai'
const invoiceai = new InvoiceAI() // reads INVOICE_AI_API_KEY
const invoice = await invoiceai.invoiceItems.del('ii_Gk2Rw7Lq4Zt9Xn1Vb6Mc3Hs8')
console.log(invoice.total)from invoice_ai import InvoiceAI
client = InvoiceAI() # reads INVOICE_AI_API_KEY
invoice = client.invoice_items.delete("ii_Gk2Rw7Lq4Zt9Xn1Vb6Mc3Hs8")
print(invoice.total)Remove an invoice item
Removes a line from a draft and returns the recomputed invoice. A draft keeps at least one line, and finalized invoices are frozen — both 409. Pass invoice to speed up the lookup. Emits invoice.updated.
Scope: invoices:write + business:read
curl -X DELETE https://invoice.horizonpay.co/api/v1/invoice-items/ii_Gk2Rw7Lq4Zt9Xn1Vb6Mc3Hs8 \
-H "Authorization: Bearer $INVOICE_AI_API_KEY"import InvoiceAI from '@horizonpay/invoice-ai'
const invoiceai = new InvoiceAI() // reads INVOICE_AI_API_KEY
const invoice = await invoiceai.invoiceItems.del('ii_Gk2Rw7Lq4Zt9Xn1Vb6Mc3Hs8')
console.log(invoice.total)from invoice_ai import InvoiceAI
client = InvoiceAI() # reads INVOICE_AI_API_KEY
invoice = client.invoice_items.delete("ii_Gk2Rw7Lq4Zt9Xn1Vb6Mc3Hs8")
print(invoice.total)Authorizations
An Invoice-AI API key sent as Authorization: Bearer inv_live_….
Create keys in Settings → API keys; the secret is shown once. Each key carries scopes, and every operation lists the scope it needs (x-required-scope):
business:read— Read your business profile, tax ID and bank detailsclients:read— List and read your clientsclients:write— Create, update and archive clientsproducts:read— List and read products and pricesproducts:write— Create, update and archive products and pricesinvoices:read— List and read invoices, including PDFsinvoices:write— Create, edit and delete draftsinvoices:finalize— Finalize invoices and void theminvoices:send— Email invoices to your clientspayments:write— Mark invoices as paidwebhooks:manage— Manage webhook endpoints
Keys cannot be created or revoked through the API, so a leaked key cannot mint more keys.
Path Parameters
The line, ii_… or UUID.
"ii_Gk2Rw7Lq4Zt9Xn1Vb6Mc3Hs8"
Query Parameters
The invoice the line belongs to, in_… or UUID. Speeds up the lookup.
"in_Pb2Xk7Mv4Qs9Lr1Wd6Tn3Fh8"
Response
The updated draft, without the removed line.
The updated draft.
Show child attributes
Show child attributes