When to use this endpoint

Use JobType_setNominal only for the legacy job-type nominal fallback. No production CRM screen caller was found.

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

ParameterTypeRequiredDescription
idInteger stringYesExisting positive job-type ID.
valueStringYesNominal code after trimming. Blank and "0" are rejected. The database column is 10 characters, but this handler performs no length or account-existence validation.

Example request

$result = FM_api('JobType_setNominal', [
	'id' => '42',
	'value' => '4000',
]);

Example response

{
  "ok": 1
}

Errors and unusual responses

ResponseCondition
{"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 ID integer-converts below one.
{"error":"missing or invalid parameter: value"}The trimmed value is blank or falsey.
{"error":"job type does not exist"}No type matches the ID.

Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.

Behaviour and edge cases

  • An equal trimmed value is a no-op and leaves last_edited unchanged.
  • When generating an invoice from a job, a valid customer nominal takes precedence. The type code is tried next, followed by the applicable tenant invoice default.
  • Existing invoices are not changed.

Side effects

  • On change, updates nominal_code and last_edited and advances the job-type cache marker.
  • This focused setter writes no generic field-level audit entry.

See it in Fieldmotion

CRM1

A production-source search found no direct CRM1 caller.

CRM2

A production-source search found no direct CRM2 caller.

Related endpoints