Remove a line item from an invoice
Removes one line item and recalculates the invoice total. The response hands back the item as it was, so you can log or reinstate it.
Any time entries that were billed through this line item go back to unbilled and can be invoiced again.
Only invoices that have not been paid for work here. An invoice that is
paid, partially paid, or has a payment in progress is closed to changes
and returns 403.
Path Parameters
- Type: integerinvoice
_id requiredId of the invoice the line item belongs to.
- Type: integeridrequired
Id of the line item.
Responses
- application/json
- application/json
- application/json
- application/json
- application/json
Request Example for delete/public-api/v1/invoices/{invoice_id}/invoice_items/{id}
curl https://app.hellobonsai.com/public-api/v1/invoices/1/invoice_items/1 \
--request DELETE \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
"data": {
"id": 4471,
"name": "Design",
"description": "Homepage and pricing page",
"amount": "2.0",
"rate": "100.0",
"unit_type": "per_hour",
"total": "200.0"
},
"meta": {
"request_id": "b1f0d2c4-7a9e-4c3b-8d5f-1e2a3b4c5d6e"
}
}