When to use this endpoint

Use this for a direct notes-only save from CRM1 or a job invoice panel.

Authentication and permissions

The request must use a logged-in CRM session or valid signed API credentials and is scoped to that tenant.

Users whose legacy crm_access mask contains bit 64 receive {"error":"no permission to access api"}. No record-owner check is made.

Parameters

ParameterTypeRequiredDescription
idPositive integerYesActive invoice ID.
notesStringYesComplete replacement notes; an empty string clears them.

Example request

$result = FM_api('Invoice_setNotes', ['id' => 981, 'notes' => 'Payment due within 30 days']);

Example response

{
  "ok": 1
}

Errors and unusual responses

ResponseCondition
{"error":"not logged in"}No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs.
{"error":"invoice does not exist"}The invoice is absent or deleted.

Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.

Behaviour and edge cases

  • Paid invoices are editable through this route. An identical value returns warning: no change necessary.

Side effects

  • Updates notes and edit metadata and fires Invoice_edit.

See it in Fieldmotion

CRM1

The main invoice editor and Job page invoice-notes control call this route.

CRM2

No direct production CRM2 caller was found for this route.

Related endpoints