Job types
Get a job type’s tax settings
/a/JobType_getTaxSettings
Read a job type’s stored tax-settings document without decoding it.
When to use this endpoint
Use JobType_getTaxSettings only when the raw scalar contract is required. CRM1 and CRM2 normally obtain the same value through their type table/detail calls.
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 | Job-type ID. Input is integer-converted. |
Example request
$taxSettings = FM_api('JobType_getTaxSettings', [
'id' => '42',
]);
Example response
"{\"misc_nominal\":\"4000\",\"misc_taxtype\":\"Standard\",\"misc_taxrate\":\"20\"}"
The outer API response is a JSON string containing the stored JSON text. Decode the API response, then decode that returned string if an object is needed.
A SQL null value is returned as JSON null; a missing row or failed lookup returns JSON false.
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"} | The integer-converted ID is less than one. |
false | No row matches the ID or the scalar lookup 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 route does not validate or normalize keys. CRM editors use nominal, tax-type, and rate keys for stock, labour, mileage, rates, and miscellaneous lines.
- Job pricing/invoice screens consume applicable type defaults, with other customer or tenant finance defaults participating in their own precedence rules.
- There is no filtering or pagination.
See it in Fieldmotion
CRM1
A production-source search found no direct CRM1 caller. The Job Types settings table returns tax settings through JobTypes_getDT.
CRM2
A production-source search found no direct CRM2 caller. CRM2 requests taxSettings through JobType_getRequestedDetails.
Related endpoints
JobType_setTaxSettingsJSON-encodes and replaces this value.JobType_getRequestedDetailsreturns the value under mapped keytaxSettings.