When to use this endpoint

Use the delete control beside a stored map in an import/export dialog. This removes the reusable mapping, not previously imported records or an exported file.

Authentication and permissions

Authenticate with signed API-key fields or a logged-in CRM session. A logged-in tenant user is required; there is no additional map-owner or page/role check. Maps are tenant-wide.

Parameters

ParameterTypeRequiredDescription
idPositive integer stringYesActual stored map ID. The synthetic customer default ID -2 cannot be deleted through this route.

Example request

$result = FM_api('Map_delete', ['id' => '1042']);

Example response

{"ok":1,"id":1042}

Errors and unusual responses

ResponseCondition
{"error":"not logged in"}No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs.
{"error":"missing or invalid parameter: id"}Missing, malformed or nonpositive ID.
{"error":"no such map"}No stored row matches the positive ID.
{"error":"configuration read failed"}A required database read fails; no write is committed.
{"error":"configuration write failed"}Persistence or checked history fails; the transaction rolls back.
{"error":"configuration transaction failed"}Transaction begin or commit fails; no success is reported.

Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.

Behaviour and edge cases

  • Validates and locks the stored map before deleting it; missing IDs and failed persistence return errors.
  • The synthetic customer default -2 is not a stored row and cannot be deleted.

Side effects

  • Deletes the stored map, requests the maps cache marker and records checked delete history in the same transaction.
  • No last-edited timestamp, notification or dependent business-record change.

See it in Fieldmotion

CRM1

Open an import or export dialog, then use its saved-map selector. Filter browser Network requests for this endpoint; widgetImport.js and widgetExport.js implement the workflow. Select a stored map and use its delete control.

CRM2

Open the CRM2 import/export dialog and use its saved-map selector. The import widget and widgetExportCRM2.js use the same route and stored JSON-string contract. Select a stored map and use its delete control.

Related endpoints

  • Maps_list can be refreshed to check whether the map remains.
  • Map_save creates a new mapping; it cannot restore a deleted row.