Forms
List Job-form fields and departments
/a/Forms_getFieldsAndDepartments
List every active Job form with its raw question definition and department/default-selection metadata.
When to use this endpoint
Use this when a client needs one compact catalogue containing both Job-form fields and department assignment.
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
This endpoint has no operation-specific parameters.
Example request
$forms = FM_api('Forms_getFieldsAndDepartments');
Example response
[{"fields":"[{\"name\":\"Result\",\"type\":\"input\"}]","department_id":"0","id":"1042","name":"Service visit","select_by_default":"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. |
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 type-
0, non-archived forms are returned, ordered by name. fieldsremains a JSON string. Numeric values normally remain strings.- There is no filtering by the current user’s departments and no pagination.
See it in Fieldmotion
CRM1
No production CRM1 caller was found.
CRM2
No production CRM2 caller was found.
Related endpoints
Forms_listoffers selectable fields and type filters.Forms_getFieldNamesByIdsconverts question JSON to compact triples.