Customer SFTP imports
Read customer SFTP connection details
/a/ImportCustomersFtp_getDetails
Retrieve an account-owned source with its password removed from decoded metadata.
When to use this endpoint
Use after discovering a source ID, for a legacy edit form. Saving a blank password preserves the hidden stored value.
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 pageImportsCustomersFtp. Source IDs and counts are restricted to the authenticated account owner; client-supplied ownership cannot expand access.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | Positive integer or decimal integer string | Yes | Use the source or tenant row ID returned by its list/table. Fractions, negative numbers, arrays and out-of-range integers are rejected. This is not the import run token. |
Example request
$result = FM_api('ImportCustomersFtp_getDetails', ['id'=>'18']);
Example response
{
"id": "18",
"owner_id": "1042",
"server": "imports.example.invalid",
"meta": {
"type": "sftp",
"username": "import-reader",
"directory": "incoming",
"import_map": 8
},
"cdate": "2026-11-05 10:00:00",
"last_edited": "2026-11-05 10:00:00",
"status": "0",
"last_import": null,
"hasPassword": true
}
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. |
{"error": "missing or invalid parameter: id"} | A required row ID is missing or invalid. |
{"error": "no such entry"} | The requested owned source or tenant row does not exist. |
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 the owned source row with meta decoded and its password key removed. hasPassword indicates whether a nonempty saved password exists. Database scalar types remain unchanged.
- Disabled sources can be read. This does not connect remotely, validate the selected map or run an import. Missing/foreign source IDs return an error.
Side effects
- Reads data without modifying import settings, imported records, history, queues or notifications.
See it in Fieldmotion
CRM1
In CRM1, open Settings > Imports > Customers FTP. Click Edit; filter requests for ImportCustomersFtp_getDetails.
CRM2
In CRM2, open Imports > Customers FTP. The current editor reads fields from ImportsCustomersFtp_getDataTable instead; no direct getDetails call was found in the current CRM2 page.
Related endpoints
ImportCustomersFtp_save— Configure an owned source.ImportsCustomersFtp_getDataTable— Discover source rows and IDs.ImportCustomersFtp_getImportMaps— Inspect map choices before running.ImportCustomersFtp_runOnce— Understand import writes and remote cleanup.