When to use this endpoint

Use this for inline CRM2 edits where sending an entire layout payload would be unnecessary.

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
id / idsInteger / arrayYesOne invoice ID or a list of IDs.
fieldStringYesMapped invoice field name. For a Workflow-enabled status change only, key=status is also recognized by the delegation pre-check.
valMixedYesReplacement value. For a Workflow-enabled status change only, value is also recognized by the delegated status call. Ordinary mapped writes require field and val.

Example request

$result = FM_api('Invoice_updateField', ['id' => 981, 'field' => 'notes', 'val' => 'Updated']);

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":"missing or invalid parameter: field"}No field/key is supplied.
{"error":"missing or invalid parameter: val"}No value alias is supplied.
{"error":"missing or invalid field"}The name is absent from the invoice field map.

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

Behaviour and edge cases

  • When the field is status and Workflow is enabled, every supplied ID is passed to Invoice_setStatus and processing stops at the first error. Other fields use the generic mapped updater.
  • Status 4 is rejected when real credit notes are enabled. Non-status fields do not run the broader notices, snapshots, row, or recurrence handling in Invoice_updateData.

Side effects

  • Generic writes follow DataProcess field conversion. Workflow status writes run all Invoice_setStatus side effects.

See it in Fieldmotion

CRM1

No direct production CRM1 caller was found.

CRM2

The Job Invoice page uses this route for inline fields; generic mapped components can also submit it.

Related endpoints