Contracts
List contract custom values
/a/Contracts_listCustomValues
Return the tenant’s complete contract custom-field template for forms, reports, imports, and exports.
When to use this endpoint
Use Contracts_listCustomValues when a Fieldmotion UI component must discover configured contract custom fields before rendering or selecting columns.
This is a configuration lookup, not a list of values stored on individual contracts.
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
$template = FM_api('Contracts_listCustomValues', []);
Example response
[
{
"name": "Service details",
"draggable": [
{"field_name": "Service tier", "type": "text"}
]
}
]
The response is exactly the decoded/current value returned by settingGet("contracts-template"). Its shape is tenant-controlled and may be an array, string, empty value, or 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. |
null or an empty value | The tenant has no usable contracts-template setting. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- There is no filtering, pagination, transformation, field-type validation, or per-contract lookup.
- The
contracts-templatetenant setting is validated when written through current Setting APIs, but legacy stored shapes are returned as found.
See it in Fieldmotion
CRM1
Open Contract custom details, configure a contract report/document block, or start a contract export. Those components call Contracts_listCustomValues to build available fields.
CRM2
The Contracts export, report-document editor, and form-block editor call the same endpoint before presenting custom fields.
Related endpoints
Contract_setCustomwrites one value under a template field name.Contracts_getExportDataTableacceptscustom:<key>columns discovered here.