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

ResponseCondition
{"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.
  • fields remains 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