Marketing
Query mapped lead-source details
/a/MarketingSource_getRequestedDetails
Read selected mapped lead-source fields by ID or exact field filters without pagination.
When to use this endpoint
Use MarketingSource_getRequestedDetails for CRM2 record views, export enrichment, or a bounded batch of known source IDs. Use the compact list route for populating selectors.
Authentication and permissions
The request must authenticate with signed API-key fields or a logged-in CRM session. The handler requires login but performs no additional Marketing-page, create, edit, delete, or role-permission check.
All reads and writes use the authenticated tenant’s tables. CRM1 and CRM2 hide some controls through client-side permissions; these routes do not repeat those UI checks.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
fields | Native array | No | Mapped fields to return. Omission requests id, name, createDate, and lastEdited. Use a native array, not JSON text. |
id or ids | Integer-compatible or native array | No | Limit results to row IDs. id wins when both are present. |
name | String or native array | No | Case-insensitive exact name match, or an exact-name IN list. |
createDate, lastEdited | Integer-compatible or native array | No | Exact stored Unix timestamps after integer conversion. |
order | Mapped field, field object, or native array | No | Optional ordering; an object can use {"id":"name","dir":"desc"}. |
Example request
$rows = FM_api('MarketingSource_getRequestedDetails', [
'id' => ['30124'],
'fields' => ['id', 'name', 'lastEdited'],
]);
Example response
[
{"id":"30124","name":"Trade show","lastEdited":"2026-10-01 15:10: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. |
[] | No source matches every supplied filter. |
Runtime/type error | fields is supplied as JSON text or another scalar instead of a native array. |
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 table has no deleted or active state, so every matching stored row is eligible.
createDateandlastEditedare formatted SQL datetime strings converted from Unix timestamps.- Unknown requested fields are silently skipped;
idis always added. - There is no pagination, default ordering, or implicit limit. Omitting filters returns every source.
See it in Fieldmotion
CRM1
No direct CRM1 caller was found; CRM1 uses MarketingSources_list, MarketingSources_getDT, and MarketingSources_getById.
CRM2
CRM2’s job export widget calls this route to resolve selected marketing-source IDs; the generic lead-source page also derives it for detail reads.
Related endpoints
MarketingSources_listis the lightweight selector feed.MarketingSources_getByIdreturns raw stored timestamp fields.