When to use this endpoint

Use UserClockin_setClockoutNotes for the CRM1 Clock-out detail dialog’s notes box. The value is conventionally a JSON note list but is stored as supplied 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 clockout_notes; omission becomes an empty string. JSON is not parsed or validated.

Example request

$result = FM_api('UserClockin_setClockoutNotes', [
	'id' => '481',
	'notes' => json_encode([[
		'content' => 'End time corrected from timesheet',
		'noteTime' => 1790445600000,
		'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 inspect known note-text keys and can fall back to the session’s general notes when no usable clock-out note is found.

Side effects

  • Updates only clockout_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-out cell, and edit Notes.

CRM2

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

Related endpoints