Opportunities
List opportunities
/a/Opportunities_list
List every non-deleted opportunity with three fixed relationship fields and optional core values.
When to use this endpoint
Use Opportunities_list for small tenant-wide lookups that need no filtering, names, or paging. Prefer the mapped table/detail routes for bounded work.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
fields | Native array or JSON array | No | May add value, notes, and/or status. Unknown names are ignored; malformed JSON adds nothing. |
Example request
$rows = FM_api('Opportunities_list', [
'fields' => ['value', 'status'],
]);
Example response
[
{"id":"481","user_id":"18","customer_id":"1042","value":"2500","status":"1"}
]
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
id,user_id, andcustomer_idare always returned and cannot be removed throughfields.- Soft-deleted rows are excluded. Database scalar values are returned as strings; no related names/metadata/form values are added.
See it in Fieldmotion
CRM1
No direct production CRM1 caller was found.
CRM2
No direct production CRM2 caller was found; current screens use mapped detail/table APIs.
Related endpoints
Opportunity_getRequestedDetailssupports IDs, filters, mapped fields, and ordering.Opportunities_getDataTableprovides bounded table reads.