Skip to content
  1. Extras
  2. MiniShop3
  3. Development
  4. Web API

REST API

MiniShop3 Web API (api.php) handles the storefront and headless clients: cart, checkout, customer account, public catalog. Manager API (connector.php) runs under a MODX session for the Vue admin and is not covered here.

text
/assets/components/minishop3/api.php?route=/api/v1/...

Route source: core/components/minishop3/config/routes/web.php. Custom routes: core/config/ms3_routes_web.custom.php, add-on fragments: core/config/ms3.routes.d/web/*.php.

Documentation

SectionContents
OverviewEnvelope, middleware, base URL
AuthorizationToken, cookie, Bearer, login, me, refresh
Endpoint mapFull table = web.php
Catalogproduct, category, filters, ACL
CartMutations and cart/get format
Checkoutdelivery/payment list, order, cost, submit
CustomerProfile, addresses, orders, email
Errorscode, errors, error_code, HTTP
CORS and rate limitOrigins, credentials, 429
Examplescurl and TypeScript/$fetch

Routing and custom routes: API Router. Same-origin storefront JS: Frontend JavaScript.