When to use this endpoint

Remove an existing line from an editable visible parent, then reload the parent totals. Return any allocated quantity before removing its source line.

Authentication and permissions

Authenticate with signed API-key fields or a logged-in CRM session. API keys use their owner’s tenant; session dispatch applies CSRF checks. Office requisition access requires View and Delete on Requisition Order or Requisition Orders. A visible UI control is not sufficient authorization.

Tenant and TeamAccess/legacy department scope apply to headers and to the parent of each line. Deleted parents hide their lines. Scoped users can see their own unlinked requisitions; the legacy department-only rule retains its target-based visibility. There is no additional Requisition feature-entitlement check.

Parameters

ParameterTypeRequiredDescription
idPositive integer / ID listYesUse an explicit line ID (or native/JSON ID list). If both id and roID are supplied, membership is checked.

Example request

$result = FM_api('RequisitionOrderEntry_delete', [
	'id' => '2088',
]);

Example response

{
  "ok": 1
}

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/roID"}No supported selection was provided.
{"error":"requisition entry does not exist"}An explicit line is missing.
{"error":"Return allocated stock before changing requisition materials or quantities"}The deletion would strand allocated material.

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

Behaviour and edge cases

  • Physically removes the selected lines using the existing lifecycle; this change adds no soft-delete columns or migration. Missing explicit IDs are errors; an empty parent selection may be a successful no-op.
  • Requires a visible non-deleted editable parent. The deletion, header totals, parent timestamp, initial containers and audit commit together. Allocated quantities cannot be discarded: return allocated material before removing its source line.
  • Mapped deletion retains the existing requisition_order_entr deletion-audit key. Legacy deletion records a requisition history entry. Existing approval is retained; no physical inventory is moved.

Side effects

  • Deletes lines and atomically recalculates parent line-only total_net/total_tax, timestamps and remaining initial containers. Records history and invalidates line/header caches.

See it in Fieldmotion

CRM1

On CRM1 Requisition details click the row [x] action; filter for RequisitionOrderEntry_delete.

CRM2

No direct caller was found in CRM2 source. Its requisition screen uses mapped layout reads/writes instead of this legacy endpoint.

Related endpoints