POST /yms/equipment-loads/(?P\d+)/delete¶
What it does¶
#^/yms/equipment-loads/(?P<id>\\d+)/delete$# accepts POST and is declared in app/systems/YMS/container-tracking/api_routes.php:1842 as a regex pattern.
The route handler delegates to ymsContainerApiDeleteEquipmentLoad(). That function is the owner of
this behaviour; the route entry is only dispatch.
Call chain:
- →
ymsContainerApiDeleteEquipmentLoad()—app/systems/YMS/container-tracking/api_routes.php:484 - ↳
ymsContainerBody()—app/systems/YMS/container-tracking/api_routes.php:26
Who calls it¶
No literal caller path was found in frontend/, public/ or new-system/.
The endpoint may be called through a constructed path, a helper wrapper, or only by
an external client. Treat the route table and owner function as the authority.
Input¶
| Where | Key |
|---|---|
path |
id |
Request bodies must not use TYPE, ACTION or USERNAME as contract fields.
Output¶
| Key |
|---|
DELETE |
DELETED_DELIVERY_IDS |
EQUIPMENT_LOAD_ID |
T_DELIVERY |
T_EQUIPMENT_LOAD |
Success is { "data": …, "requestId": "…" }.
Failure is { "error": { "code", "message" }, "requestId": "…" }.
SQL executed¶
SELECT COUNT(*) FROM T_DELIVERY WHERE CLIENT_ID=? AND EQUIPMENT_LOAD_ID=? AND ID IN (
SELECT ID, STATUS, DELIVERY_NUMBER
SELECT EQL.ID, EQL.EQUIPMENT_ID
SELECT ID FROM T_TRANSLOAD
Data¶
Tables reached from the owner function:
T_DELIVERYT_EQUIPMENTT_EQUIPMENT_LOADT_TRANSLOAD
Access¶
- module-gated on
yms.container-tracking, so tenant module access applies
Validation and failure messages¶
- Equipment load id is required.
- Equipment load not found.
- LINKED_TRANSLOAD_EXISTS: Container with transload history cannot be deleted.
- LINKED_DELIVERY_EXECUTED: This container has Delivery history that has already been executed. Review the Delivery record first. (
- LINKED_DELIVERY_EXISTS: Explicit container delete action is required.
These strings come from the owner function and are the messages a client can receive. They are also the cheapest way to tell a rejected request from a broken one.