Skip to content

POST /tms/loading-planner

TMS > tms.transload

What it does

/tms/loading-planner accepts POST and is declared in app/systems/TMS/transload/api_routes.php:344 as a path.

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

Call chain:

  1. → tmsTransloadApiLoadingPlannerCreate() — app/systems/TMS/transload/planning_command_api_helper.php:18
  2. ↳ tmsTransloadApiLoadingPlannerRow() — app/systems/TMS/transload/planning_query_api_helper.php:372
  3. ↳ array_uppercase() — app/shared/controller/common_post_helper.php:177

Who calls it

Called from:

  • frontend/pages/system/TMS/transload/inbound-planning.php
  • public/assets/js/modules/tms/loading-planner-modal.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
ID

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

SQL executed

INSERT INTO T_LOADING_PLANNER (

Data

Tables reached from the owner function:

  • T_LOADING_PLANNER

Access

  • module-gated on tms.transload, so tenant module access applies

Validation and failure messages

  • Planner payload is required.

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.