Skip to content

POST /yms/scale/check-out/execute

YMS > yms.scale

What it does

/yms/scale/check-out/execute accepts POST and is declared in app/systems/YMS/scale/api_routes.php:336 as a path.

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

Call chain:

  1. → ymsScaleApiExecuteCheckout() — app/systems/YMS/scale/api_routes.php:223
  2. ↳ ymsScaleApiAssertCheckoutRelationship() — app/systems/YMS/scale/api_routes.php:141

Who calls it

Called from:

  • public/assets/js/modules/yms/scale-portal.js

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

Input

Where Key
body FLOW
body ITEMS
body ORDER_ID
body SCALE_TICKET

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

Output

The response is produced by a shared helper, so the key set is not visible at the route. Read the owner function to confirm the shape before writing a client.

SQL executed

SELECT B.ID FROM {$table} B

Data

No table reference is visible in the owner function body.

Access

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

Validation and failure messages

  • Scale flow is required.
  • Check-out requires saved order items.
  • Scale ticket save failed.
  • Check-out requires an order and scale ticket.
  • Scale ticket does not belong to this order.

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.