POST /yms/containers/street-turn¶
What it does¶
/yms/containers/street-turn accepts POST and is declared in app/systems/YMS/container-tracking/api_routes.php:1912 as a path.
The route handler delegates to ymsContainerApiStreetTurn(). That function is the owner of
this behaviour; the route entry is only dispatch.
Call chain:
- →
ymsContainerApiStreetTurn()—app/systems/YMS/container-tracking/api_routes.php:1654 - ↳
ymsContainerBody()—app/systems/YMS/container-tracking/api_routes.php:26
Who calls it¶
Called from:
new-system/apps/web/src/adapters/newSystemRouteAllowlist.tspublic/assets/js/modules/shared/container-edit-modal.jspublic/assets/js/modules/shared/popup.core.jspublic/assets/js/modules/tms/street-turn-modal.js
A caller is the strongest available evidence of the intended use.
Input¶
| Where | Key |
|---|---|
body |
EQUIPMENT_ID |
body |
EQUIPMENT_LOAD_ID |
body |
PICKUP_BOOKING_ID |
Request bodies must not use TYPE, ACTION or USERNAME as contract fields.
Output¶
| Key |
|---|
CLIENT_ID |
DELIVERY_ORDER_ID |
EQUIPMENT_ID |
EQUIPMENT_LOAD_ID |
STATUS |
Success is { "data": …, "requestId": "…" }.
Failure is { "error": { "code", "message" }, "requestId": "…" }.
SQL executed¶
SELECT ID FROM T_EQUIPMENT_LOAD WHERE CLIENT_ID = ? AND ID = ? AND EQUIPMENT_ID = ? AND STATUS = 'EMPTY' AND DELETED_AT IS NULL LIMIT 1
SELECT UUID FROM T_BOOKING WHERE CLIENT_ID = ? AND ID = ? AND BOOKING_TYPE = 'EXPORT' AND SHIPPING_LINE = ? AND
SELECT ID, SHIPPING_LINE, SIZE FROM T_EQUIPMENT WHERE CLIENT_ID = ? AND ID = ? AND DELETED_AT IS NULL LIMIT 1
Data¶
Tables reached from the owner function:
T_BOOKINGT_EQUIPMENTT_EQUIPMENT_LOAD
Access¶
- module-gated on
yms.container-tracking, so tenant module access applies
Validation and failure messages¶
- Street turn equipment and booking ids are required.
- Equipment load not found.
- Equipment not found.
- Equipment size is not supported for street turn.
- Pickup booking does not match the container shipping line and size.
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.