Forms
List lightweight forms
/a/Forms_list
List lightweight form records for selectors, optionally across types, archive state, fields, or an edit checkpoint.
When to use this endpoint
Use this for form dropdowns and internal synchronisation where full definitions are unnecessary. It is unpaginated and ordered by name.
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 form, department, owner, or page-permission check unless the page below says otherwise. CRM navigation may impose additional UI-only access rules.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | Integer-compatible | No | Exact form type, default 0, used only when types is absent. Known values are 0 Job, 3 Job Table, 4 Quote, 5 Purchase Order, 6 Quote Table, 7 Invoice, 8 Invoice Table, 9 Opportunity, and 10 Opportunity Table. Other historical values can exist.. |
types | Native array or JSON array string | No | Integer-coerced type list. A non-array decoded value makes the endpoint return JSON false. An empty array produces invalid SQL and should not be sent. |
always | Integer-compatible | No | Includes this one archived ID in addition to active rows, while retaining the type filter. Presence activates the behavior even when value is zero. |
all | Mixed | No | Presence discards type and archive filters. A later last_edited condition still applies. |
last_edited | Date/time string | No | Strict lower checkpoint: last_edited > value and strictly earlier than the server’s current timestamp. |
fields | Native array or JSON array string | No | Optional subset of id, last_edited, name, department_id, select_by_default, and type. ID is always selected; unknown names are ignored. Omission returns ID, name, department, default-selection, and type. |
Example request
$forms = FM_api('Forms_list', [
'types' => [0, 4],
'fields' => ['name', 'type', 'department_id'],
]);
Example response
[{"id":"1048","name":"Installation","type":"0","department_id":"3"},{"id":"1042","name":"Service visit","type":"0","department_id":"0"}]
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. |
false | The types value does not resolve to an array. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Archived rows are excluded by default. The
allparameter overrides both type and archive restrictions regardless of its value. - Results are ordered by name with no page limit. Numeric database fields normally remain JSON strings.
- The checkpoint uses server time and exclusive bounds; advance it only after consuming the complete unpaginated result.
See it in Fieldmotion
CRM1
Forms, Job creation/editing, settings, imports, invoices, quotes, reports, and other selectors use this endpoint extensively.
CRM2
The corresponding modules and widgets use the same lightweight list.
Related endpoints
Forms_getByIdretrieves full selected definitions.Forms_searchByNameprovides unrestricted substring search.