Skip to content

POST /yms/containers/mark-empty

YMS > yms.container-tracking

What it does

/yms/containers/mark-empty accepts POST and is declared in app/systems/YMS/container-tracking/api_routes.php:1920 as a path.

The route handler delegates to ymsContainerApiMarkEmpty(). That function is the owner of this behaviour; the route entry is only dispatch.

Call chain:

  1. → ymsContainerApiMarkEmpty() — app/systems/YMS/container-tracking/api_routes.php:1736
  2. ↳ ymsContainerBody() — app/systems/YMS/container-tracking/api_routes.php:26

Who calls it

Called from:

  • public/assets/js/modules/tms/import-dispatch.js

A caller is the strongest available evidence of the intended use.

Input

Where Key
body EQUIPMENT_ID
body EQUIPMENT_LOAD_ID
body equipmentId
body equipmentLoadId

Request bodies must not use TYPE, ACTION or USERNAME as contract fields.

Output

Key
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 = ?{$equipmentSql} AND DELETED_AT IS NULL LIMIT 1

Data

Tables reached from the owner function:

  • T_EQUIPMENT_LOAD

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.

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.