When to use this endpoint

Use the CRM1 Form Data report’s response grid. The definition supplies dynamic column order; each Job contributes one row with raw saved answer values.

Authentication and permissions

Authenticate with a signed API key (acting as its owner) or a logged-in CRM session on the routed account host. Session calls include the dispatcher’s CSRF value when configured. IDs refer to the authenticated tenant unless an explicit cross-account copy is described.

The handler checks tenant context only; it adds no Report Form Data View or Job record-scope predicate. The Form dispatcher prefix adds no Job collection scope. Do not infer API permission enforcement from the report menu.

Parameters

ParameterTypeRequiredDescription
form_idInteger-compatible IDYesJob Form ID. Consumed without a dedicated presence/existence check.
dateFrom, dateToAccount-local date textYesScheduled Job date range. Lower bound is strictly after local dateFrom; upper bound includes dateTo 23:59:59.
lengthInteger-compatible valueYesSQL page length; must be present. Supply a positive length—negative DataTables “all” is not specially handled.
department_idInteger-compatible IDNoNonzero matches Job department OR assignee department membership OR ordinary Customer department.
meetingIdInteger-compatible IDNoLegacy wire name for a nonzero exact Job ID.
fieldsNative name/value objectNoCheckbox answer filters. Value "0" matches stored string zero or a missing answer key; every other value searches for stored string "true". This is not a projection of returned fields.
drawInteger-compatible valueNoDataTables draw counter echoed as an integer; send 0 when not using DataTables.
user_id, customer_idInteger-compatible IDsNoNonzero exact assignee/customer_id filters. customer_id alone does not constrain customer_type.
customer_assetTextNoCase-insensitive Customer name or Asset name/code substring. Blank disables it.
parent_idPositive integer-compatible IDNoOnly ordinary Customer Jobs: current customer_id equals the parent ID or saved customer_details.parent_id equals it. Asset Jobs are excluded when set.
search[value]TextNoDataTables nested search string. Search behavior differs between the grids; see below.
orderNative nested arrayNoOnly order[0][column] and order[0][dir] are used. Exact asc is ascending; otherwise descending. No supplied order means no SQL ordering.
startInteger-compatible offsetNoDefaults 0; length is required separately.

Example request

$rows = FM_api('Form_dataGetDT', [
	'form_id'=>'1042','dateFrom'=>'2026-11-01','dateTo'=>'2026-11-26',
	'start'=>'0','length'=>'25','draw'=>'1',
	'search'=>['value'=>'Northwind'],
	'order'=>[['column'=>'3','dir'=>'asc']],
]);

Example response

{"draw":1,"recordsTotal":"1","recordsFiltered":"1","data":[["JOB-2081",["2081","1088","Alex",null,"JOB-2081"],["0","1045","Northwind",""],"2026-11-26 09:00:00","",1,"Checked"]]}

Database numeric values can be JSON strings. Examples are representative; legacy application errors can use HTTP 200, so inspect the decoded response.

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: length"}length absent.
{"error":"missing parameter: dateFrom"}Missing lower date.
{"error":"missing parameter: dateTo"}Missing upper date.

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

Behaviour and edge cases

  • Only nondeleted Jobs with this form_id are selected; no status/completion restriction. Form archived state is not filtered. recordsTotal counts all nondeleted Jobs for the form before date/search filters; recordsFiltered includes those filters.
  • Each row is [job_ref, [jobID,userID,userName,userParent,job_ref], [customer_type,customerID,displayName,""], account-local scheduled datetime, duration, formNum, ...answers]. customer_type 0 means Customer, 1 Asset. Missing answers are empty strings; answer keys use current field names, in current definition order.
  • Display enrichment distinguishes Customer and Asset IDs, including equal numeric IDs in the two tables. Each row uses that Job’s own form_num rather than a number from an arbitrary Job for the form.
  • Search matches reference, assignee name and Customer/Asset name/code; it does not search general form answers. When customer_asset was also supplied, search reuses that lookup’s Customer/Asset IDs, so the two text filters are not independent name searches.
  • Order columns: 0 reference, 1 user name, 2 Customer name, 3 scheduled epoch, other values Job ID. No stable secondary ordering. Duration is completion minus meta.statusInProgress.timestamp in milliseconds, displayed hours:minutes when both values exist.
  • Checkbox filters search literal serialized JSON fragments, not normalized booleans. Formatting/value representation can affect matching. Date parsing and page sizes are not comprehensively validated.

Side effects

  • Reads only; no completion, answer, status or history changes.

See it in Fieldmotion

CRM1

Open Reports → Form Data for a Job Form, change the date/customer/checkbox filters and page the table. Filter Form_dataGetDT; fields contains checkbox criteria, while columns are read from the form definition.

CRM2

No direct CRM2 caller found for this legacy grid. CRM2’s Form Data page has its own Job/answer data flow and uses these Form CSV endpoints for downloads.

Related endpoints