POST,PATCH /tms/bookings/form¶
What it does¶
/tms/bookings/form accepts POST,PATCH and is declared in app/systems/TMS/booking/api_routes.php:1628 as a path.
The route handler delegates to tmsBookingApiFormMutation(). That function is the owner of
this behaviour; the route entry is only dispatch.
Call chain:
- →
tmsBookingApiFormMutation()—app/systems/TMS/booking/api_routes.php:281 - ↳
tmsBookingOutRefMutationIntent()—app/systems/TMS/booking/api_routes.php:68 - ↳
tmsOutRefMutationIntent()—app/systems/TMS/delivery/out_ref_helper.php:8
Who calls it¶
Called from:
new-system/apps/web/src/adapters/newSystemRouteAllowlist.tspublic/assets/js/modules/shared/popup.core.js
A caller is the strongest available evidence of the intended use.
Input¶
| Where | Key |
|---|---|
query |
mode |
Request bodies must not use TYPE, ACTION or USERNAME as contract fields.
Output¶
| Key |
|---|
T_BOOKING |
T_DELIVERY_ORDER |
T_EQUIPMENT_LOAD |
Success is { "data": …, "requestId": "…" }.
Failure is { "error": { "code", "message" }, "requestId": "…" }.
Data¶
No table reference is visible in the owner function body.
Access¶
- module-gated on
tms.booking, so tenant module access applies
Validation and failure messages¶
- Booking deletion is not supported through the legacy form.
- Sales order links must be changed through Booking Save.
- Equipment load deletion is not supported through the Booking form.
- Outbound order links must be changed through Outbound Save.
- Workflow must be changed for exactly one Booking.
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.