Invoices
Get the invoice template type
/a/Invoices_templateTypeGet
Return the tenant’s selected invoice-template type.
When to use this endpoint
Use this to decide which invoice layout editor or renderer setting is active.
Authentication and permissions
The request must authenticate with signed API-key fields or a logged-in CRM session and is scoped to the authenticated tenant.
The handler performs no additional invoice page, record-owner, or department permission check unless stated below.
Parameters
This endpoint has no operation-specific parameters.
Example request
$type = FM_api('Invoices_templateTypeGet', []);
Example response
"0"
The raw invoice-type setting is returned without a wrapper and commonly serializes as a string.
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. |
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 handler does not validate or translate the stored integer.
- No parameter affects the result.
See it in Fieldmotion
CRM1
The invoice Word-template settings page reads this after saving the selection.
CRM2
No direct CRM2 caller was found.
Related endpoints
Invoices_templateTypeSetchanges the setting.