Invoices

Creates a draft invoice for a job.

Requires ManageInvoices and an Idempotency-Key header. Bills the job's full price — or, once a finalized invoice exists, only its unbilled remainder (a supplemental invoice). The job's down payment transfers onto the invoice; store credit is applied when requested. Every omitted field defaults exactly as the Generate Invoice page does. The result is a Draft: finalize it with POST /api/v1/invoices/{id}/mark-sent, or discard it with DELETE /api/v1/invoices/{id} (a pending draft blocks a second one).

post/api/v1/invoices/from-job

Request

  • Base URL: https://app.flexonthejob.com
  • URL: https://app.flexonthejob.com/api/v1/invoices/from-job
  • Auth: HTTP bearer

Request body

jobIdinteger

Numeric id of the job to bill.

invoiceNumberstring nullable

Invoice number. Defaults to INV-{jobNumber}, or INV-{jobNumber}-{n} for the n-th invoice on the job.

invoiceDatestring date-time nullable

Issue date (UTC, date part only). Defaults to today.

dueDatestring date-time nullable

Due date (UTC, date part only). Defaults from the customer's payment terms; must not precede invoiceDate.

taxRatenumber double nullable

Tax rate percentage. Defaults to the job's rate; always 0 for a tax-exempt customer.

termsstring nullable

Payment terms text printed on the invoice. Defaults to the customer's terms (e.g. "Net 30").

notesstring nullable

Notes shown to the customer.

paymentInstructionsstring nullable

Payment instructions printed on the invoice. Defaults to the organization's default instructions.

applyStoreCreditboolean

Apply storeCreditToApply of the customer's store credit to the new invoice.

storeCreditToApplynumber double

Store credit amount to apply when applyStoreCredit is true (capped at the customer's balance and the invoice balance). Ignored otherwise.

Response

The new draft invoice; Location points at it.

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.