Assets
Get the asset calendar
/a/Assets_getCalendar
Return positional calendar events for non-deleted jobs whose primary customer is an asset.
When to use this endpoint
Use Assets_getCalendar for the legacy Asset Calendar. It is not a general asset-movement calendar and does not include jobs merely linked through an asset field.
Authentication and permissions
The request must authenticate with signed API-key fields or a logged-in CRM session. The handler requires login or an established tenant database context and performs no additional Asset-page or role-permission check unless the page says otherwise.
Every query and write uses the authenticated tenant’s tables. CRM1 and CRM2 may hide actions through client-side permissions that these collection routes do not repeat.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
start / end | Unix timestamp or local date/datetime string | Yes | Range boundaries. Numeric values above 9999 are converted with the server date function; the numeric end has one day added before conversion. The final SQL uses an inclusive start and exclusive end epoch. |
user_ids / statuses / type_ids / department_ids / form_ids | Native arrays | No | Exact integer filters for assigned user, job status, Job Type, department, and form. Empty values add no filter. |
overdue | Truthy value | No | Adds due_date<now and incomplete status 0. The specific supplied value is otherwise ignored. |
Example request
$events = FM_api('Assets_getCalendar', [
'start' => '2026-10-01',
'end' => '2026-11-01',
'statuses' => ['0', '1'],
]);
Example response
[
["7719", "4821", "2026-10-05 09:00:00", "19", "Annual service", "0", 84, ""]
]
Each row is [job ID, asset ID, tenant-local job time, user ID, maintenance description, status, recurrence ID, blank]. Database values generally remain strings; a parsed recurrence ID is an integer.
Errors and unusual responses
| Response | Condition |
|---|---|
{"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 parameter: start"} | start is absent. |
{"error":"missing parameter: end"} | end is absent. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Jobs and their primary asset must be non-deleted. Archived/inactive asset state is not checked. Rows have no explicit order.
- Description comes from a maintenance row only when its
next_app_idis this job; otherwise it isnull. Recurrence ID comes from decoded job metadata. - There is no pagination or count wrapper.
See it in Fieldmotion
CRM1
Open Assets → Calendar, change the visible range or filters, and inspect Assets_getCalendar. CRM1 converts each positional row into a FullCalendar event.
CRM2
No direct production CRM2 caller was found.
Related endpoints
Assets_listJobsreturns IDs for both direct and movement-linked jobs over a range.