Linkit

POS

Gate, till, catalog, checkout — coupon create has no REST route

POS

Every /api/v1/pos/* route in the Rust manifest is mounted (repocommerce::PgPos + PgShifts). Live Ocima owner JWT, 2026-09-10: GET /pos/gate 200 {enable_pos:false}; catalog / branches / coupon-validate 403 {error:"POS is disabled",code:403} — the handler ran.

There is no REST to create a coupon or a voucher. The previous deployment had no such path either — its dashboard wrote the collection directly — so there is nothing to port. Do not invent them.


Gate

EndpointNotes
GET /api/v1/pos/gate{enable_pos:bool}. Works while POS is off. Authenticated only
PATCH /api/v1/pos/gateTurns the flag on or off. Same guard — no extra role

Every other POS route opens with 403 "POS is disabled" when the flag is false, except GET /pos/gate.

Till routes (/pos/registers*, /pos/shifts*) are tenant PosRegister grants. A 403 there can be RBAC before the gate message (The authorized record is not allowed to perform this action.). Catalog / checkout / stock are RequireAuth + gate.


Catalogue and checkout (Go originals)

EndpointPurpose
GET /api/v1/pos/branchesBranches that can sell
GET /api/v1/pos/catalogCursor page, 2,000 rows; search cap 40. No totals
POST /api/v1/pos/coupons/validateValidate an existing code
POST /api/v1/pos/stockSet stock for a SKU at a branch
POST /api/v1/pos/checkoutComplete a sale
POST /api/v1/pos/orders/{id}/respondMarketplace respond

Held sales, returns, server-priced quote, and a server-rendered receipt never had REST routes: the previous dashboard wrote their collections directly. They are absent (404), not 501.


Till (port-added, V29__pos_till.sql)

EndpointGrant
GET|POST /api/v1/pos/registerslist / create × PosRegister
PATCH|DELETE /api/v1/pos/registers/{id}update / delete
POST /api/v1/pos/shifts/opencreate
GET /api/v1/pos/shifts/currentread
GET /api/v1/pos/shifts/{id}/x-reportread
POST /api/v1/pos/shifts/{id}/movementsupdate
POST /api/v1/pos/shifts/{id}/closeapprove (money limits)

The React register already calls the till. Do not rebuild it.