Jobs: recurrence workflows and lists
Find contracts linked to the cached jobs of one recurring sequence
/a/JobRecurrence_getContractDetails
Find contracts linked to the cached jobs of one recurring sequence.
When to use this endpoint
Find contracts linked to the cached jobs of one recurring sequence. Use the recurrence ID, not the example job ID, unless a parameter explicitly says otherwise.
Authentication and permissions
Authenticate with signed API-key fields or a logged-in CRM session. All records resolve in the authenticated tenant. This handler has no additional Job edit-bit, department-visibility or owner check.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | Integer string | Yes | Positive recurrence ID; numeric input is coerced with intval unless stated otherwise. |
Example request
$result = FM_api('JobRecurrence_getContractDetails', ['id'=>'1042']);
Example response
[{"name":"Maintenance","id":"52"}]
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 or invalid parameter: id"} | ID missing/nonpositive. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Reads the saved job-ID cache and joins those jobs to contracts. An absent recurrence or empty cache returns [].
- Distinct name/ID pairs preserve separate contracts with identical names.
- Normalizes positive cached job IDs before SQL. Missing, malformed and duplicate tokens do not become SQL expressions. Only non-deleted jobs and contracts are joined.
- No recurrence-active restriction, pagination, count envelope or specified ordering. An empty normalized cache yields []; the DB helper may still return false on a failed contract query.
Side effects
- Read-only; no cache repair, date refresh, history or scheduler changes.
See it in Fieldmotion
CRM1
No direct CRM1 caller found for this variant; its Contracts cell uses JobRecurrence_getContract.
CRM2
Recurring Jobs requests JobRecurrence_getContractDetails when rendering contract details in moduleRecurring.
Related endpoints
JobRecurrence_getContractprovides the other contract response shape.