Opportunities
Retrieve requested opportunity details
/a/Opportunity_getRequestedDetails
Read selected mapped fields for one, many, or all non-deleted opportunities.
When to use this endpoint
Use Opportunity_getRequestedDetails for CRM2 batched detail/cache reads or exact mapped filters. Unlike the table endpoint, it has no pagination or count envelope.
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 | No | Keys to return. Omission selects the whole map: id, userID, user, customerID, customer, value, notes, status, source, createDate, lastEdited, quote, quoteID, isStarred, reason, formID, formValues, subformValues, createdBy, customValues, type, metaCallback, metaCallbackNotes, metaJob, and deleted. Unknown keys are ignored; id is always returned. |
id / ids | Integer string or native array | No | One/many row IDs. id takes precedence. Without either, the route can return every matching non-deleted opportunity. |
Mapped field filters | Scalar or native array | No | Numeric values use integer equality/IN; quoted fields use exact case-insensitive equality/IN. Composite picker filters may be supplied as objects containing id. |
order | Native field-name/object array | No | Mapped ordering. Objects accept id and optional dir=desc; invalid fields are skipped. |
advanceSearch | Native array | No | Shared mapped advanced conditions. |
Example request
$rows = FM_api('Opportunity_getRequestedDetails', [
'ids' => [481, 482],
'fields' => ['id', 'customer', 'user', 'value', 'status', 'metaCallback'],
]);
Example response
[
{"id":"481","customer":{"id":"1042"},"user":{"id":"18"},"value":"2500","status":"1","metaCallback":"2026-10-01 09:00:00"}
]
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. |
Runtime type error | A supplied fields/IDs/filter/order/advanced-search value has an unsupported shape. The handler performs little structural validation. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Soft-deleted rows are always excluded. Missing IDs return an empty array.
- Epoch fields become SQL datetime strings. JSON subpaths are parsed; picker aliases such as
customer,user, andquoteIDare objects with anid. - The route does not enrich IDs with customer/user/status/source names and has no feature/page permission check.
See it in Fieldmotion
CRM1
No direct production CRM1 caller was found.
CRM2
The shared detail cache derives this endpoint from table opportunity and batches IDs/fields requested by layouts and widgets.
Related endpoints
Opportunity_getLayoutDetailsadds CRM2’s combined form widget field.Opportunities_getDataTableadds paging, search, counts, and restricted-user filtering.