Import mappings
List reusable import maps by type
/a/ImportMappings_getAll
Retrieve named mapping documents for one import workflow.
When to use this endpoint
Use when opening a manual file-import mapping dialog or configuring a customer SFTP source. Keep the format expected by the consuming importer.
Authentication and permissions
Use signed API-key authentication or a logged-in CRM session. API keys act as their owner; session requests use dispatcher CSRF protection when configured.
Requires a valid tenant account and View on pageImportsMappings. Reads and writes use this account’s tenant tables.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | Text | Yes | Exact import_type value, such as customers. Presence is checked but a blank value is allowed and searches for blank import_type; there is no enum allowlist. |
Example request
$result = FM_api('ImportMappings_getAll', ['type'=>'customers']);
Example response
[
{
"id": "8",
"name": "Customers by name",
"mappings": "{\"Name\":\"name\",\"Account\":\"account_number\"}"
}
]
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. |
{"error": "permission denied"} | The user lacks the required Imports page action. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Returns all tenant maps with the exact requested import_type, ordered by name then ID. type must be text up to 64 bytes; blank is accepted and matches blank types. No enum allowlist, paging, cap or count envelope.
- Returns id, name and JSON-encoded mappings; does not decode the document, associate a source or add custom fields.
Side effects
- Reads data without modifying import settings, imported records, history, queues or notifications.
See it in Fieldmotion
CRM1
In CRM1, start a file import and load the mapping choices; buttonImportPrepare calls ImportMappings_getAll before drawing the dialog.
CRM2
CRM2’s corresponding file-import preparation uses the same getAll route; the separate Mappings table uses getDataTable.
Related endpoints
ImportMappings_save— Save map content and optional SFTP association.ImportCustomersFtp_getImportMaps— Read a source’s selected map.