Skip to content

POST /yms/containers/closing-complete

YMS > yms.container-tracking

What it does

/yms/containers/closing-complete accepts POST and is declared in app/systems/YMS/container-tracking/api_routes.php:1856 as a path.

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

Call chain:

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

Who calls it

Called from:

  • public/assets/js/modules/shared/kj-table-utilities.js

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

Input

Where Key
body EQUIPMENT_LOAD_ID
body ID
body SEAL_NUMBER

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

Output

Key
EQUIPMENT_LOAD_ID
PHOTO_COUNT
SEAL_NUMBER
STATUS

Success is { "data": …, "requestId": "…" }. Failure is { "error": { "code", "message" }, "requestId": "…" }.

SQL executed

SELECT ID, STATUS FROM T_EQUIPMENT_LOAD
SELECT COUNT(*) FROM T_FILE
UPDATE T_EQUIPMENT_LOAD

Data

Tables reached from the owner function:

  • T_EQUIPMENT_LOAD
  • T_FILE

Access

  • module-gated on yms.container-tracking, so tenant module access applies

Validation and failure messages

  • Equipment load id is required.
  • Seal # is required.
  • Equipment load not found.
  • Only Full containers can be marked Full-Ready.
  • Closing Photos must be {$minPhotos}+

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.