Invoicing

Update a draft invoice (header and optional full line replace)

Only status=draft can be edited. When lines is present the entire line set is replaced atomically and subtotal/tax/total/amountDue are recomputed. Quantities are decimal units; unitPrice is major currency units; stored amounts are integer cents.

patch/invoices/{id}

Request

  • Base URL: https://ledgerhq.pro/api/v1
  • URL: https://ledgerhq.pro/api/v1/invoices/{id}
  • Auth: one of:
    • HTTP bearer and API key in header x-organization-id
    • HTTP bearer and API key in header x-organization-id

Path parameters

idstring uuid required

Invoice UUID

Request body

ensureCatalogItemsboolean

Create/reuse active catalog items with revenue accounts atomically with the draft

contactIdstring uuid
issueDatestring date
dueDatestring date
referencestring nullable
notesstring nullable
currencyCodestring
expectedUpdatedAtstring date-time

Last observed updatedAt; stale edits return 409

invoiceNumberstring

Response

Updated invoice

Changes

No recorded changes to this operation across all 4 revisions of this API.