Invoices

Edits a draft invoice's header (number, dates, terms, notes, payment instructions, tax rate).

Requires ManageInvoices and an Idempotency-Key header. PATCH semantics: only the fields you send change. Only a Draft invoice can be edited (a finalized invoice is immutable — void it and issue a new one). Totals are not editable here: the subtotal comes from the job, so recompute it with POST /api/v1/invoices/{id}/refresh-from-job after the job's lines change. The write is attributed to the user who created the key.

patch/api/v1/invoices/{id}

Request

  • Base URL: https://app.flexonthejob.com
  • URL: https://app.flexonthejob.com/api/v1/invoices/{id}
  • Auth: HTTP bearer

Path parameters

idinteger required

Numeric invoice id.

Request body

invoiceNumberstring nullable

New invoice number shown to the customer (e.g. INV-1042). Omit to leave unchanged; blank is rejected.

invoiceDatestring date-time nullable

New issue date (ISO-8601; the date part is used). Omit to leave unchanged.

dueDatestring date-time nullable

New due date (ISO-8601; the date part is used). Omit to leave unchanged.

taxRatenumber double nullable

New tax rate as a percentage, 0–100 (e.g. 8.25). Omit to leave unchanged.

termsstring nullable

New payment terms printed on the invoice (e.g. Due on Receipt). Omit to leave unchanged; empty string clears it.

notesstring nullable

New customer-facing notes printed on the invoice. Omit to leave unchanged; empty string clears it.

paymentInstructionsstring nullable

New payment instructions printed on the invoice. Omit to leave unchanged; empty string clears it.

Response

The updated invoice.

idinteger

Numeric id, usable in /api/v1/invoices/{id}.

syncIdstring uuid

Stable cross-device id; also the pagination cursor.

invoiceNumberstring

Human-readable invoice number, e.g. INV-1042.

status'Draft' | 'Sent' | 'Viewed' | 'PartiallyPaid' | 'Paid' | 'Overdue' | 'Cancelled' | 'Outstanding' | 'Consolidated'
customerIdinteger nullable

Billed customer id, if any.

customerNamestring nullable

Billed customer name, if any.

jobIdinteger nullable

Job the invoice bills, if any.

jobNumberstring nullable

Job number, if any.

salesOrderIdinteger nullable

Sales order the invoice bills, if any.

descriptionstring nullable

Optional description.

invoiceDatestring date-time

Issue date, ISO-8601 UTC at midnight, e.g. 2026-09-05T00:00:00Z.

dueDatestring date-time

Due date, ISO-8601 UTC at midnight, e.g. 2026-10-05T00:00:00Z.

subtotalnumber double

Sum of lines before tax.

taxAmountnumber double

Tax charged.

totalnumber double

Subtotal plus tax.

amountPaidnumber double

Payments applied.

storeCreditAppliednumber double

Store credit applied.

balanceDuenumber double

Total minus payments and store credit.

isConsolidatedboolean

True when this invoice consolidates other invoices.

consolidatedIntoInvoiceIdinteger nullable

Id of the consolidated invoice that absorbed this one, if any.

sentDatestring date-time nullable

When the invoice was first sent, ISO-8601 UTC (e.g. 2026-09-05T14:30:00Z); null if never sent.

paidDatestring date-time nullable

When the invoice was paid in full, ISO-8601 UTC; null until paid.

createdAtstring date-time

Creation time, ISO-8601 UTC.

updatedAtstring date-time nullable

Last modification time, ISO-8601 UTC; null when never edited. Use with the updatedSince filter to poll for changes.

Changes

No recorded changes to this operation across all 1 revision of this API.