When to use this endpoint

Use for the older CRM1 User profile or legacy callers needing snake_case database fields. Prefer Users_getById for a selected safe field set, or User_getHrProfile for the normalized HR summary.

Authentication and permissions

Authenticate with signed API-key fields or a logged-in CRM session. Session requests use the dispatcher’s CSRF protection when configured.

Configured TeamAccess authorizes the primary target ID before this handler.

Self reads or explicit Users View receive the full permitted profile. Other users receive only basic label/contact and scheduling fields. Password and push credentials are always removed; trusted login metadata is removed from full responses.

Financial fields require client administrator, explicit Users Edit, or the legacy Salaries permission (general permission bit value 8). Unauthorised list projections omit those fields; explicitly requested table/export financial fields return a permission error.

Parameters

ParameterTypeRequiredDescription
idInteger stringYesOne tenant user ID. Integer conversion is performed by the handler; no pagination or ordering applies.
companyPresence flagNoOnly two legacy platform accounts, IDs 32 and 3819, add company_name from the global company table when this field is present. Else it is ignored; the value itself is not tested.

Example request

$result = FM_api('User_get', [
	'id'=>'1042',
]);

Example response

{
  "id": 1042,
  "name": "Alex Morgan",
  "email": "alex@example.test",
  "has_image": "0",
  "image_id": 0
}

Example shows a permitted full-profile excerpt. Basic lookups omit metadata and personal profile fields. All responses remove password/gcm_id; financial fields depend on authority.

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": "no id parameter"}id is absent, null or integer-converts to zero.
{"error": "user does not exist or is not in your company account"}No row exists in this tenant table.
{"error":"Unable to refresh user photo state"}The photo-state repair fails to persist.

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

Behaviour and edge cases

  • Reads one tenant user. id is an integer; contact JSON remains stored text and sanitized meta is JSON-encoded text. The basic projection is id,name,email,active,vehicle_id,work_location_id,bgcolour,has_image, with permitted financial fields when authorised.
  • No active, temporary-user or parent-membership filter is applied beyond the tenant table/primary ID. The row lookup uses a ten-second local cache.
  • Finds user-photos/1042.jpg. If has_image is false and a file row exists, retrieves the file and checks persistence before returning the refreshed has_image and image_id.
  • Missing id/zero is rejected; a negative converted ID proceeds to lookup and normally returns not found. There is no selected-fields parameter.

Side effects

  • May fetch/rehydrate a photo file and update tenant users.has_image, invalidating users cache. It does not stamp user edit markers, mirror global identity, log that repair or send a message.

See it in Fieldmotion

CRM1

Open a User profile in CRM1 and filter User_get. The Job page also loads the assigned user to obtain labour pricing; Locations uses company=1 for its legacy company label.

CRM2

CRM2 Clock-ins uses User_get to resolve a user’s work base before reading the Location. The main User layout otherwise uses mapped readers.

Related endpoints

  • Users_getById — Fetch a selected, allowlisted projection after obtaining IDs.
  • User_getHrProfile — Read the normalized HR summary and role-sensitive financial fields.
  • User_setName — Change a profile name through the guarded setter.