Invoices
Retrieve an invoice recurrence
/a/InvoiceRecurring_get
Retrieve one raw invoice-recurrence row.
When to use this endpoint
Use this to load the recurrence editor. JSON-valued columns are returned as stored strings rather than decoded values.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
id | Positive integer | Yes | Tenant recurrence ID. |
Example request
$recurrence = FM_api('InvoiceRecurring_get', ['id' => '42']);
Example response
{
"id": "42",
"name": "Monthly service invoice",
"active": "1",
"every": "1",
"on_arr": "[\"0\"]",
"meta": "{\"copy_items\":1}"
}
The active recurrence fields are returned, including num_invoices, cdate, edate, customer_id, customer_type, ndate, notes, and last_edited. Internal soft-delete fields are not exposed.
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":"no permission to access api"} | The legacy access bit is set. |
{"error":"missing or invalid parameter: id"} | ID is absent or not positive. |
{"error":"missing invoice recurrence"} | No matching tenant row exists. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- No active-state filter is applied, but soft-deleted recurrences are hidden.
- Database numeric values normally serialize as strings;
on_arrandmetaremain JSON strings.
See it in Fieldmotion
CRM1
The recurrence editor widget loads its record with this endpoint.
CRM2
Both the recurrence page and invoice module use it to populate recurrence dialogs.
Related endpoints
InvoiceRecurring_getRequestedDetailsreturns selected mapped fields.