When to use this endpoint

Page the CRM1 recurring-jobs table with its legacy date and identity filters.

Authentication and permissions

Authenticate with signed API-key fields or a logged-in CRM session. All records resolve in the authenticated tenant. This handler has no additional Job edit-bit, department-visibility or owner check.

Parameters

ParameterTypeRequiredDescription
startInteger-like scalarYesZero-based offset >=0; validated before login.
lengthInteger-like scalarNoDefault 0 means no rows; supply a positive page size. No validation or all-rows -1 contract.
drawInteger-like scalarNoInteger echo, default 0.
order[0][column], order[0][dir]DataTables orderNo0=name, 7=expiry, 9 or 11=active; all others=name. Exact desc selects descending. These indices do not line up with every returned cell.
showAll1 flagNoExactly/loosely 1 skips expiry and unknown-target branches only; does not bypass the other supplied filters.
dateFrom, dateTo, nonExpiringDate strings / 1 flagNoWhen dateFrom is present, filter expiry inclusively through dateTo. nonExpiring=1 also includes NULL, values containing 0000, and 2999-12-31. dateTo should accompany dateFrom.
unknown1 flagNoWhen showAll is off, require ID 0 or missing joined customer/asset according to customer_type. Does not independently select all known targets when omitted.
on_arrPositive integer-like scalarNoModes 3–6 compare interval value; other modes compare CSV element count. Not the same as selected weekday/day value.
search[value], rec, clientStringsNosearch matches recurrence/customer/asset names, recurrence ID/expiry/selector; rec matches recurrence ID or name; client resolves customer name and asset name/code. Substring wildcards remain active.
id, department_id, form_idInteger-like scalarsNoPositive id, nonzero department and nonblank form inputs filter exactly.
appointmentTypeInteger-like scalarNoUnavoidable legacy wire name for job type. Nonblank and not -1 matches the string-valued stored metadata key appointment_type using JSON_CONTAINS.

Example request

$result = FM_api('JobRecurrences_getDT', ['start'=>'0', 'length'=>'10', 'showAll'=>'1']);

Example response

{"draw":0,"recordsTotal":"0","recordsFiltered":"0","data":[]}

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: start"}Offset absent/negative.

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

Behaviour and edge cases

  • Returns draw/counts/data. Counts are normally strings; recordsTotal counts all tenant recurrence rows, while recordsFiltered applies all filters. Failed row queries become empty data, not a structured database error.
  • Every data row has 17 cells: ["", id, name, [customer_type,customer_id], notes, user_id, form_id, ids, [every,on_arr], files, edate, cdate, active, department_id, invoice recurrence ID or "", "", ""]. JSON/CSV cells remain stored strings.
  • Date comparisons here use stored date values/server dates, not the checked cleanup’s local cutoff algorithm. No boolean isActive or mapped customerParent filters are supported.
  • Customer and asset joins include identity-type guards, preventing a same-numbered unrelated target from matching. No recurrence active/deleted or user visibility restriction is added.
  • The table no longer repairs membership or customer identity while reading. Returned CSV and target fields are the stored values; explicit checked mutation endpoints handle repairs.

Side effects

  • Read-only: no cached-membership or customer-identity mutation, edit marker, history, scheduler/reminder or next-date reconciliation.

See it in Fieldmotion

CRM1

Jobs → Recurring Jobs: pageJobsRecurring sends DataTables state plus screen filters and consumes the 17-cell row layout. Filter Network for JobRecurrences_getDT.

CRM2

No direct CRM2 call found; Recurring Jobs uses the mapped table path.

Related endpoints