Schedule of Rates
Delete one Schedule of Rates row
/a/ScheduleOfRates_delete
Permanently delete one Schedule of Rates row and clear its queued integration links.
When to use this endpoint
Use ScheduleOfRates_delete for the delete action used by CRM1 and CRM2 after the caller has confirmed the row is safe to remove.
Authentication and permissions
The request must establish tenant context with signed API credentials or a logged-in CRM session. The handler checks for the tenant database prefix rather than calling the normal login guard.
No additional page or role permission is checked. The CRM screens apply their own client-side Schedule of Rates permissions.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | Integer string | Yes | Positive tenant-local rate ID. |
Example request
$result = FM_api('ScheduleOfRates_delete', [
'id' => '430001',
]);
Example response
"delete from user123_schedule_of_rates where id=430001"
The success value is the executed SQL text as a JSON string, not an ok object. It includes the tenant table prefix.
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":"missing or invalid parameter: id"} | The ID is absent or integer-converts below 1. |
SQL string | The positive ID does not exist; absence is not 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
- Exactly one ID is targeted. There is no soft-delete state, filtering, pagination, or transaction around the cleanup queries.
- When a session parent/tenant ID is available, queued global
api_syncs_uploadsrows and tenantapi_syncsrows for object typesorand this ID are removed.
Side effects
- Hard-deletes the rate and advances the
scheduleOfRatescache marker. - Fires the tenant-configurable
SOR_editevent with the rate ID. Any configured listeners run synchronously and can add integration-specific side effects. - Does not write generic history or the tenant
deleteslog.
See it in Fieldmotion
CRM1
The Schedule of Rates row action calls this endpoint after a typed confirmation.
CRM2
The Schedule of Rates bulk action first reads archive states, then calls this endpoint sequentially for each selected archived row.
Related endpoints
ScheduleOfRate_deletesupports mapped multi-row filters and writes delete/audit logs, but does not clean integration queues.ScheduleOfRates_setArchivedpreserves a row by archiving it.