Jobs: field and bulk edits
Set a job’s in-progress timestamp
/a/Job_setInProgress
Record the in-progress timestamp consumed by job cost calculations without changing completion status.
When to use this endpoint
Record the in-progress timestamp consumed by job cost calculations without changing completion status.
Read the target job first with Jobs_getSome to obtain the current values and confirm the IDs belong to the intended account.
Authentication and permissions
Authenticate with signed API-key fields or a logged-in CRM session. The request uses the authenticated account’s job IDs, not mobile app IDs.
No extra page, role, assignee, department or client-administrator check is applied by this handler.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | Integer string | Yes | Physical job ID in the authenticated account, converted with intval; must be positive. |
value | Integer string | Yes | Present value converted with intval and stored as meta.statusInProgress.timestamp. Normal cost consumers interpret it as Unix milliseconds. Zero, negatives and nonnumeric text (coerced to zero) are not rejected. |
Example request
$result = FM_api('Job_setInProgress', ['id'=>'1042', 'value'=>'1792573200000']);
Example response
{"ok":1}
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 is absent or converts to a nonpositive integer. |
{"error":"no value provided"} | value is absent or null. |
{"error":"job does not exist"} | No active job is read, including read failure. |
{"error":"Unable to save job"} | The primary database write failed. History and dependent effects are not performed for that failed save. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Requires an active job. Non-array metadata is normalized to an empty collection before statusInProgress is replaced.
- Does not change is_complete or user_status, run completion/workflow actions, or recalculate costs immediately.
- Repeated requests still write/log; no equality check is made.
- The primary UPDATE is checked before history and dependent effects. There is no transaction combining this field write with later cross-object effects; inspect committed-success warnings before retrying.
Side effects
- Writes last_edited and edited_uuid with the changed fields and invalidates the meetings cache.
- Records a job history entry. No mail is sent directly by this setter.
- Replaces the statusInProgress property in the stored metadata. No outsourcing mirror or notifications are invoked.
See it in Fieldmotion
CRM1
No direct CRM1 caller was found in the canonical/legacy route search. This is a focused API setter; other edit flows need not use it.
CRM2
No direct CRM2 caller was found in the canonical/legacy route search. CRM2’s layout-driven updates are a separate contract.
Related endpoints
Job_getStatusreads job status without starting or completing it.Jobs_getSomereads selected job records before editing and verifies the stored result afterward.