Jobs: lookups and details
Retrieve raw job-type tax settings
/a/Job_getTaxSettingsBasedOnJobType
Read the job type’s saved tax configuration without resolving customer or account defaults.
When to use this endpoint
Read the job type’s saved tax configuration without resolving customer or account defaults.
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 |
|---|---|---|---|
id | Integer string | Yes | Job ID, converted with intval; the result must be positive. This selects a physical job ID, not an app ID or job reference. |
Example request
$result = FM_api('Job_getTaxSettingsBasedOnJobType', ['id' => '1042']);
Example response
"{\"misc_nominal\":\"4000\",\"misc_taxtype\":\"Standard\",\"misc_taxrate\":20}"
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 nonpositive. |
{"error":"no job type tax settings found for this job"} | The active job/type lookup has no truthy tax_settings, or the query fails. |
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 response is a JSON string containing the stored configuration text, not a decoded object. Decode the outer API response, then parse its content if required.
- No required-key check, JSON validity check or fallback is performed. A truthy stored value such as {} is returned as-is; missing/blank values produce the same error as a missing job.
- Only the job is active-filtered; the joined type has no archive/deletion restriction. No calculation, pagination or write occurs.
See it in Fieldmotion
CRM1
Open a job’s Invoice view. pageJobInvoice.js calls Job_getTaxSettingsBasedOnJobType while loading the editor; inspect the encoded string rather than expecting an object.
CRM2
pageJobInvoice.js includes this request in its initial batch alongside Job_getContractInvoiceable and account settings.
Related endpoints
Job_getDefaultTaxSettingsresolves usable job-type settings and then customer/account fallback.Job_invoiceGetreads an already-saved invoice rather than just its default tax configuration.