When to use this endpoint

Use UserClockin_setClockinNotes for the CRM1 Clock-in detail dialog’s notes box. The value is conventionally a JSON note list but the endpoint treats it as text.

Authentication and permissions

The API call needs an authenticated tenant context, but this legacy handler does not itself call the login guard.

It performs no page-permission or row-ownership check.

Parameters

ParameterTypeRequiredDescription
idInteger stringYesExisting clock-in ID after integer conversion.
notesStringNoComplete replacement for clockin_notes; omission becomes an empty string. JSON is not parsed or validated.

Example request

$result = FM_api('UserClockin_setClockinNotes', [
	'id' => '481',
	'notes' => json_encode([[
		'content' => 'Start time corrected from timesheet',
		'noteTime' => 1790416800000,
		'createdby' => 18,
	]]),
]);

Example response

{
  "ok": 1
}

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 integer-converts below 1.
{"error":"clockin does not exist"}No tenant row has that 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

  • An unchanged string is a successful no-op. The endpoint does not merge note objects.
  • Export adjustment reasons scan note objects for content, notes, note, text, comment, or value, and can fall back to the session’s general notes.

Side effects

  • Updates only clockin_notes and invalidates the user-clock-ins cache. It does not change the offset/time or write generic audit history.

See it in Fieldmotion

CRM1

Open Users → Clock-ins, select the Clock-in cell, and edit Notes.

CRM2

No direct CRM2 caller was found; CRM2 uses UserClockin_updateData for note edits.

Related endpoints