When to use this endpoint

Use Department_get when a legacy caller needs the complete stored row. Prefer Department_getRequestedDetails for named-field selection or filters.

Authentication and permissions

The request must authenticate with signed API-key fields or a logged-in CRM session. The handler performs no additional page or role-permission check.

The lookup and any write use the authenticated tenant; an ID from another tenant cannot be addressed through this call.

Parameters

ParameterTypeRequiredDescription
idInteger stringYesDepartment ID after integer conversion; it must be greater than zero.

Example request

$department = FM_api('Department_get', [
	'id' => '42',
]);

Example response

{
  "id": "42",
  "name": "North region",
  "meta": "{\"customer_types\":[3,7]}",
  "users": "18,24",
  "last_edited": "2026-09-25 10:30:00",
  "cdate": "2026-09-01 09:00:00",
  "assets": "51,52",
  "customers": ""
}

meta and membership values remain encoded strings; numeric database values are also returned as strings.

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: id"}The ID is absent or integer-converts below 1.
falseNo department row has the requested ID.

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

Behaviour and edge cases

  • The table has no deleted/archive flag, so every matching row is eligible.
  • The route returns at most one raw row and has no field selection, filtering, ordering, or pagination.
  • It performs no additional role or administrator permission check.

See it in Fieldmotion

CRM1

Customer and target-selection screens use this route when they already hold a department ID and need its name/details.

CRM2

CRM2 usually uses the mapped requested-details route instead of this raw reader.

Related endpoints