POST /tms/transloads/reopen-for-retransload/preview¶
What it does¶
/tms/transloads/reopen-for-retransload/preview accepts POST and is declared in app/systems/TMS/transload/api_routes.php:114 as a path.
The route handler delegates to tmsTransloadReopenPreview(). That function is the owner of
this behaviour; the route entry is only dispatch.
Call chain:
- →
tmsTransloadReopenPreview()—app/systems/TMS/transload/reopen_retransload_helper.php:129 - ↳
tmsTransloadReopenAssertOffice()—app/systems/TMS/transload/reopen_retransload_helper.php:6 - ↳
getEffectiveRoleIds()—config/config.php:1066
Who calls it¶
Called from:
public/assets/js/modules/tms/transload-edit-modal.js
A caller is the strongest available evidence of the intended use.
Input¶
| Where | Key |
|---|---|
body |
PHYSICAL_SOURCE_LOCATION |
body |
TRANSLOAD_ID |
Request bodies must not use TYPE, ACTION or USERNAME as contract fields.
Output¶
| Key |
|---|
BLOCKERS |
COMPLETED_PLANNER |
PHYSICAL_SOURCE_LOCATION |
READ_ONLY |
TRANSLOAD |
Success is { "data": …, "requestId": "…" }.
Failure is { "error": { "code", "message" }, "requestId": "…" }.
SQL executed¶
SELECT ID, COMMODITY_NAME, COMMODITY_QUANTITY, COMMODITY_WEIGHT FROM T_EQUIPMENT_COMMODITY WHERE CLIENT_ID=? AND EQUIPMENT_LOAD_ID=? AND DELETED_AT IS NULL ORDER BY ID
SELECT ROLE_ID FROM T_USER WHERE ID = ? AND CLIENT_ID = ? AND DELETED_AT IS NULL LIMIT 1
Data¶
Tables reached from the owner function:
T_EQUIPMENT_COMMODITY
Access¶
- module-gated on
tms.transload, so tenant module access applies
Validation and failure messages¶
- Reopen for Re-transload is restricted to office users.
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.