When to use this endpoint

Use Supplier_restore only from an Admin Console recovery workflow when the exact deleted supplier ID is known. The ordinary CRM deleted-objects tool uses the generic DeletedObjects_restore route instead.

Authentication and permissions

This route requires an authenticated Admin Console login. A normal CRM session and signed external API credentials do not satisfy the login_source=admin-console check.

The deleted supplier must belong to the tenant selected by that Admin Console session.

Parameters

ParameterTypeRequiredDescription
idInteger-compatibleYesPositive ID of a supplier whose deleted marker is currently 1.

Example request

$restored = FM_api('Supplier_restore', [
	'id' => 488104,
]);

Example response

{
  "ok": 1,
  "type": "supplier",
  "id": 488104,
  "label": "Supplier #488104 (Northshore Components)",
  "summary": {"type":"supplier","id":488104,"name":"Northshore Components"}
}

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"}The ID is absent or not positive.
{"error":"admin console login required"}The session is authenticated from ordinary CRM or API credentials rather than Admin Console.
{"error":"deleted supplier not found"}The ID is unknown or the supplier is not currently soft-deleted.

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 supplier’s deleted marker becomes 0 and ddate becomes 0. Other fields are unchanged.
  • The active delete-log entry is marked restored with the restoration time, user ID, and route name.

Side effects

  • Clears the supplier and deletion-log caches.
  • Does not restore accounting-sync links or queued uploads removed by Supplier_delete, and does not clear an existing on-hold marker.

See it in Fieldmotion

CRM1

The CRM1 deleted-objects tool calls DeletedObjects_restore, not this type-specific wrapper.

CRM2

The CRM2 deleted-objects tool also calls DeletedObjects_restore; no direct production caller of Supplier_restore was found.

Related endpoints