Invoices
Update an invoice recurrence field
POST
/a/InvoiceRecurring_updateField
Update one mapped field on an invoice recurrence.
When to use this endpoint
Use this for inline CRM2 edits. Valid field names are drawn from id, name, numInvoices, cDate, eDate, active, every, onArr, customerID, customer, customerType, nDate, notes, lastEdited, meta, metaJobRecurrenceID, and metaCopyItems.
Authentication and permissions
The request must authenticate with signed API-key fields or a logged-in CRM session and is scoped to the authenticated tenant.
The handler performs no additional invoice page, record-owner, or department permission check unless stated below.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | Positive integer | Yes | Recurrence ID. |
field | String | Yes | One writable mapped field name. |
val | Mixed | Yes | Replacement value, converted according to the mapped type. |
Example request
$result = FM_api('InvoiceRecurring_updateField', [
'id' => '42',
'field' => 'name',
'val' => 'Updated monthly invoice',
]);
Example response
{
"ok": 1
}
Errors and unusual responses
| Response | Condition |
|---|---|
{"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: id"} | Shared mapped-update validation rejects the ID. |
{"error":"missing or invalid parameter: field"} | Field is absent or not in the 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
- The shared data processor performs type conversion and updates the mapped database column.
- It does not recalculate the next run or synchronize recurrence relationships.
Side effects
- Updates one recurrence field and its shared edit metadata. It does not send mention notices.
See it in Fieldmotion
CRM1
No direct CRM1 caller was found.
CRM2
Used by generic inline mapped-field controls.
Related endpoints
InvoiceRecurring_updateDataupdates several fields and sends mentions.