Customers
List direct customer job IDs
/a/Customer_listJobs
Return the IDs of non-deleted jobs addressed directly to one customer.
When to use this endpoint
Use Customer_listJobs when a bulk customer workflow needs a compact set of direct job IDs before applying a job action.
This is not the customer Jobs-table endpoint: it omits dates, status, assignees, child-company jobs, locations, assets, and pagination. Use the full customer Jobs table for that richer view.
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 |
|---|---|---|---|
id | Integer string | Yes | Customer ID. It must convert to a positive integer; the customer record itself is not checked for existence. |
Example request
$result = FM_api('Customer_listJobs', [
'id' => '1088',
]);
Example response
{
"jobs": [
{"id": "7204"},
{"id": "7219"}
]
}
Job IDs are database strings. A nonexistent customer or a customer with no direct, non-deleted jobs returns {"jobs":[]}.
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":"invalid or missing parameter: id"} | id is absent, zero, negative, or non-numeric. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- The query requires
customer_type=0, so jobs addressed to a customer asset or location are not included. - Deleted jobs are always excluded. Job completion state, date, child-company relationship, and customer activity/deletion state do not add further filters.
- There is no explicit ordering, limit, or pagination; callers must not rely on the returned ID order.
See it in Fieldmotion
CRM1
On the Customers list, start the customer deletion workflow. With developer tools open, filter Network requests for Customer_listJobs; CRM1 uses the result count to warn that the customer has jobs before the user confirms deletion.
CRM2
On the CRM2 Customers page, start permanent deletion after any required archive step. Filter Network requests for Customer_listJobs; CRM2 uses the result count in its confirmation message.
Related endpoints
- The customer Jobs data-table endpoint supplies the full filtered customer Jobs table.
Customer_getverifies or retrieves the customer before requesting its jobs.