When to use this endpoint

Use for compatibility with the old account template configuration. This endpoint does not validate a document type or change a quote Form.

Authentication and permissions

Authenticate with signed API-key fields or a CRM session. Requires Quotes View (pageQuotes_view); non-admin users blocked by legacy crm_access bit 32 are denied. Client administrators inherit page permissions.

Requires Quotes Edit and client-administrator permission.

Quote visibility follows the account’s department/account-manager customer filters for non-admin users, including signed keys. Export routes additionally require pageMain_exportTableData. Linked Jobs require Jobs View and their TeamAccess scope; invoice enrichment requires Invoices View and the legacy invoice access check.

Parameters

ParameterTypeRequiredDescription
typeInteger-compatible valueYesNonnegative integer text/value only; malformed and fractional values fail. Values retain their opaque legacy meaning rather than being reinterpreted.

Example request

$result = FM_api('Quotes_templateTypeSet', ['type'=>'0']);

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: type"}type omitted/null.
{"error":"you are not an admin"}Not a client administrator.
{"error":"permission denied"}Required Quotes/Export permission is absent or legacy access restrictions apply.

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

Behaviour and edge cases

  • Accepts a nonnegative integer type value as an opaque legacy setting; malformed/fractional values fail. No PDF/Word meaning is inferred for unverified values.
  • Serializes setting updates using the tenant owner lock. Persists site_vars and history in one checked transaction, preserves caller savepoints and clears the settings cache. A failed/uncertain commit returns an error without replay.
  • No direct caller for this endpoint was found in the mobile app or its m-service intermediary.

Side effects

  • Updates the account setting and history in a checked transaction; clears the local settings cache. No email or quote/Form mutation.

See it in Fieldmotion

CRM1

No direct caller found. Legacy Word editing calls Quotes_templateWordGet/Set rather than this type route.

CRM2

No direct caller found. Current quote document configuration is Form-based.

Related endpoints