POST,PATCH /yms/fleet-management/assets¶
What it does¶
/yms/fleet-management/assets accepts POST,PATCH and is declared in app/systems/YMS/container-tracking/api_routes.php:1888 as a path.
The route handler delegates to ymsFleetApiSaveAsset(). That function is the owner of
this behaviour; the route entry is only dispatch.
Call chain:
- →
ymsFleetApiSaveAsset()—app/systems/YMS/container-tracking/api_routes.php:1463 - ↳
ymsFleetApiAssertSchema()—app/systems/YMS/container-tracking/api_routes.php:683
Who calls it¶
Called from:
public/assets/js/modules/yms/fleet-management.js
A caller is the strongest available evidence of the intended use.
Input¶
No named input key is visible in the handler or its owner function. The endpoint
either takes no parameters or reads them through a shared helper in app/shared/api/.
Output¶
| Key |
|---|
CURRENT_ODOMETER |
EQUIPMENT_TYPE |
ID |
MAKE |
MODEL |
NAME |
PLATE_NUMBER |
REMARK |
SERIAL_NUMBER |
SIZE |
STATUS |
YARD_NAME |
YEAR |
Success is { "data": …, "requestId": "…" }.
Failure is { "error": { "code", "message" }, "requestId": "…" }.
SQL executed¶
SELECT ID FROM T_EQUIPMENT_INFORMATION
UPDATE T_EQUIPMENT_INFORMATION SET
SELECT COUNT(*) FROM information_schema.TABLES
Data¶
Tables reached from the owner function:
T_EQUIPMENT_INFORMATION
Access¶
- module-gated on
yms.container-tracking, so tenant module access applies
Validation and failure messages¶
- Unit Number already exists.
- Equipment activity schema is not installed. Run the fleet management migration first.
- Equipment activity table is not installed. Run the fleet management migration first.
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.