GET /tms/bookings/(?P\d+)¶
What it does¶
#^/tms/bookings/(?P<id>\d+)$# accepts GET and is declared in app/systems/TMS/booking/api_routes.php:1636 as a regex pattern.
The route handler delegates to booking_detail(). That function is the owner of
this behaviour; the route entry is only dispatch.
Call chain:
- →
booking_detail()—app/systems/TMS/booking/query_helper.php:438 - ↳
booking_attach_sales_order_reference()—app/systems/TMS/booking/query_helper.php:403 - ↳
booking_sales_order_by_id()—app/systems/TMS/booking/query_helper.php:322
Who calls it¶
No literal caller path was found in frontend/, public/ or new-system/.
The endpoint may be called through a constructed path, a helper wrapper, or only by
an external client. Treat the route table and owner function as the authority.
Input¶
| Where | Key |
|---|---|
path |
id |
Request bodies must not use TYPE, ACTION or USERNAME as contract fields.
Output¶
| Key |
|---|
BOOKING |
CLIENT_ID |
CONTAINERS |
DELIVERY_ORDER |
OUT_REFS |
Success is { "data": …, "requestId": "…" }.
Failure is { "error": { "code", "message" }, "requestId": "…" }.
SQL executed¶
SELECT CPI.ID, CPI.LOAD_NUMBER AS OUT_REF_VALUE, CPI.SORT_ORDER, CPI.ASSIGNED_EQUIPMENT_LOAD_ID FROM T_CUSTOMER_PO CP JOIN T_CUSTOMER_PO_ITEM CPI ON CPI.CLIENT_ID = CP.CLIENT_ID AND CPI.CUSTOMER_PO_UUID = CP.UUID AND CPI.DELETED_AT IS NULL WHERE CP.CLIENT_ID = ? AND CP.TYPE_ID = ? AND CP.BOOKING_ID = ? AND CP.DELETED_AT IS NULL ORDER BY CPI.SORT_ORDER, CPI.ID
SELECT
Data¶
Tables reached from the owner function:
T_BOOKINGT_COMPANYT_CUSTOMER_POT_CUSTOMER_PO_ITEM
Access¶
- module-gated on
tms.booking, so tenant module access applies