When to use this endpoint

Use UserClockin_setNotes for the CRM1 Clock-ins Notes dialog. The normal value is a JSON note array.

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.
notesJSON textNoComplete replacement for the JSON column; omission becomes an empty string. The handler does not validate JSON before attempting the write.

Example request

$result = FM_api('UserClockin_setNotes', [
	'id' => '481',
	'notes' => json_encode([[
		'content' => 'Approved by supervisor',
		'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 stored string is a successful no-op. Notes are replaced rather than merged.
  • General notes are used as the fallback adjustment reason when a changed start/end has no usable dedicated note.

Side effects

  • Attempts to update only notes and invalidates the user-clock-ins cache. It creates no generic audit history.

See it in Fieldmotion

CRM1

Open the Notes cell on Users → Clock-ins and edit the note list.

CRM2

No direct CRM2 caller was found; CRM2 uses UserClockin_updateData.

Related endpoints