Job types
List active job types
/a/JobTypes_list
List active job-type IDs and names for selectors, optionally including a polling timestamp or notification email value.
When to use this endpoint
Use JobTypes_list to populate job-type choices across job, contract, asset, recurring-work, reporting, and notification workflows. Its optional timestamp supports a lightweight changed-since lookup, but the route is not paginated.
Authentication and permissions
The request must authenticate with signed API-key fields or a logged-in CRM session. The handler performs no additional page or role-permission check.
The lookup and any write use the authenticated tenant; an ID from another tenant cannot be addressed through this call.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
last_edited | Datetime string | No | Exclusive raw database comparison: only rows with last_edited > value are returned. The value is not parsed or normalized first. |
fields | JSON array or native array | No | Optional extras last_edited and/or notification_email. id and name are always selected. A bare string such as last_edited decodes to a non-array and is ignored; duplicate extras are not removed. |
Example request
$types = FM_api('JobTypes_list', [
'last_edited' => '2026-09-24 00:00:00',
'fields' => json_encode(['last_edited']),
]);
Example response
[
{"id": 42, "name": "Emergency repair", "last_edited": "2026-09-25 14:30:00"},
{"id": 43, "name": "Inspection", "last_edited": "2026-09-25 15:05:00"}
]
id is explicitly converted to a JSON number. Names and optional fields retain database/JSON-extraction scalar behavior.
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. |
[] | No non-archived row passes the optional timestamp boundary. |
Runtime warning or database error | Duplicate selected extras can produce duplicate SQL column expressions; malformed JSON text is otherwise ignored when it does not decode to an array. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Only rows for which SQL
!archivedis true are returned. Archived1rows and legacynullarchive values are excluded. - The timestamp boundary is strictly greater-than. No ordering is specified, no maximum is enforced, and extra request keys are ignored.
notification_emailis extracted from JSON and can arrive as a JSON-quoted string depending on the database driver; CRM1 callers strip quote characters.
See it in Fieldmotion
CRM1
Job editing, calendars/timelines, reporting, recurring jobs, multi-edit, contract/asset screens, and notification settings all load this route. Filter Network requests for JobTypes_list while opening a Job Type selector.
CRM2
Job/contract/asset modules, list pickers, recurring jobs, reports, and multi-edit use the same route for choices. Production-source searches found no mobile-app caller.
Related endpoints
JobTypes_getByIdexpands selected IDs into more raw fields.JobTypes_listByNamesresolves import names and can create missing types.