Invoices
Update invoice recurrence data
/a/InvoiceRecurring_updateData
Update multiple mapped fields on one invoice recurrence.
When to use this endpoint
Use this from CRM2 mapped editors. Writable mapped names come from the recurrence map: 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. |
mapped fields | Mixed | At least one | Submit mapped keys and values at top level, such as name, active, every, onArr, notes, or metadata subfields. |
Example request
$result = FM_api('InvoiceRecurring_updateData', [
'id' => '42',
'name' => 'Updated monthly invoice',
'active' => 1,
]);
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":"no fields to update"} | No writable mapped values are supplied. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Type conversion follows the map: integer-like fields are coerced, JSON fields are encoded, and Unix-date fields use the shared processor.
- Unlike
InvoiceRecurring_save, this endpoint does not recalculatendateor maintain the reciprocal job-recurrence link.
Side effects
- Updates selected columns and may send mention notices parsed from the new note-like data. The notice links to the recurrence page.
See it in Fieldmotion
CRM1
No direct CRM1 caller was found.
CRM2
The generic mapped record editor uses this multi-field update pattern.
Related endpoints
InvoiceRecurring_updateFieldchanges one field.InvoiceRecurring_savemaintains scheduling relationships.