Jobs: lookups and details
List job IDs for selectors
/a/Jobs_listIds
Find active jobs for target/invoice selectors with optional customer, relative-date and department filters.
When to use this endpoint
Find active jobs for target/invoice selectors with optional customer, relative-date and department filters.
Authentication and permissions
Authenticate with signed API-key fields or a logged-in CRM session. These calls use the authenticated account’s data; the handler has no additional job-page, department, assignee or client-admin permission check unless stated below.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
customer_id / customer_type | Integer strings | No | Customer expansion runs only when customer_id converts to nonzero and customer_type is explicitly supplied and converts to 0. Other types do not apply a customer filter. |
job_type_id / department_id | Integer strings | No | Nonzero values add exact filters on type_id/department_id. |
days_from / days_to | Integer strings | Together | days_from activates the range; supply days_to with it. Dates are computed from PHP/server today, then midnight is interpreted in the account timezone (UTC fallback). Start is inclusive; midnight after days_to is exclusive. days_to alone is ignored. |
on_app | Integer string | No | Omitted or blank disables the filter. Any supplied nonblank value is converted to integer for equality; 0 is a meaningful filter. |
overdue | String | No | Only the exact truthy token overdue adds due_date |
Example request
$jobs = FM_api('Jobs_listIds', ['customer_id' => '1088', 'customer_type' => '0', 'days_from' => '-30', 'days_to' => '7']);
Example response
{"items":[{"id":"1042","job_ref":"JOB-0042","meeting_time_e":"1791795600","customer_id":"1088","meeting_time":"2026-10-12 09:00:00"}]}
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. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Returns {items:[...]} with id, job_ref, meeting_time_e, customer_id and derived meeting_time. The latter is account-local YYYY-MM-DD HH:MM:SS or blank for an epoch at/below 1000000000; UTC is the timezone fallback.
- Customer expansion includes the selected customer and its immediate parent’s direct jobs, direct-customer jobs whose cached parent1/parent2/parent3 equals the selected customer, and assets owned by that selected customer. It does not include every child/customer descendant or parent-owned asset automatically.
- Customer/asset helper reads do not exclude deleted rows, although selected jobs must be active. Results can therefore refer to archived/deleted related objects.
- Sort is meeting_time_e descending, then id descending. No limit, pagination, free-text search or current-user/permission-department restriction is added.
- The handler writes the JSON response directly and marks OUTPUT_DONE. Query failures are not given a dedicated checked JSON error.
See it in Fieldmotion
CRM1
Open an invoice’s Link Job selector, or a target selector that chooses jobs. pageInvoices.js supplies customer and relative-day bounds; targetSelector.js supplies the relative-day window. Inspect Jobs_listIds and its items envelope.
CRM2
No direct CRM2 caller was found in the reviewed source. For batched job fields, see Jobs_getById.
Related endpoints
Jobs_getByIdfetches selected fields once the selector supplies job IDs.Jobs_getSomeis a full-row timeline reader for known native-array IDs.