Contract types
List contract types
/a/ContractTypes_list
Return every tenant contract type in name order for contract and job selectors.
When to use this endpoint
Use ContractTypes_list to populate a complete contract-type picker. It is intentionally small and accepts no filters.
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
This endpoint has no operation-specific parameters.
Example request
$types = FM_api('ContractTypes_list');
Example response
[
{
"id": "31",
"name": "Planned service",
"disable_invoicing": "0",
"last_edited": "2026-09-25 14:30:00",
"meta": null
}
]
The endpoint returns raw database-column names and all columns. Numeric values normally remain strings; meta remains raw text/null.
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. |
[] | The tenant has no contract types. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Rows are ordered by
nameusing the tenant database collation. There is no pagination, limit, status, or deleted filter. - No request parameter changes the query; extra keys are ignored.
- Tenant feature bit
64controls visibility of the Contracts UI but is not checked by this handler.
See it in Fieldmotion
CRM1
Open a contract, customer/asset Contracts tab, or job editor and inspect the Contract Type/Contract choices; CRM1 loads ContractTypes_list.
CRM2
Contract list/Kanban type filters call ContractTypes_list. CRM2’s type-management table itself uses ContractTypes_getDataTable.
Related endpoints
ContractTypes_getDataTablesupports filtering and paging.ContractTypes_newadds a legacy name-only choice.