API docs

JSON API

The UI is a client of the same public API it documents here. Mutations require the X-CSRF-Token header (issued in the page's meta tag).

Grid queries

One query layer powers HTML, JSON and CSV. Sorting and filtering keys are validated against per-grid whitelists; all values are bound parameters.

GET /api/products Products · 13 columns, 5 filters
GET /api/orders Orders · 15 columns, 5 filters
GET /api/customers Customers · 11 columns, 3 filters
GET /api/employees Employees · 10 columns, 2 filters
GET /api/suppliers Suppliers · 10 columns, 1 filters
GET /api/categories Categories · 7 columns, 1 filters
GET /api/shippers Shippers · 5 columns, 0 filters
GET /api/order-lines Order lines · 8 columns, 3 filters

Query parameters

  • q — free text, space separated tokens AND-ed across searchable columns (cha* for wildcards)
  • sort, dir=asc|desc — any sortable column key
  • page, per_page=10|25|50|100|250
  • f_<key> — text/select filters, e.g. f_status=shipped, f_category_name=Beverages
  • f_<key>_min / _max — numeric ranges · _from / _to — date ranges
  • ids=1,2,3 — restrict to specific rows (used by “export selection”)

Responses include rows, total, pages, summary aggregates, facets (option counts) and the resolved columns metadata.

CRUD

POST /api/<entity>create; 422 returns per-field errors
PATCH /api/<entity>/<id>partial update with diff audit
DELETE /api/<entity>/<id>snapshot kept for undo
POST /api/<entity>/bulk-delete{"ids": [...]}
POST /api/orders/bulk-status{"ids": [...], "status": "picked"}
POST /api/undoreplays the newest delete
POST /api/products/<id>/stock{"delta": 40}
PUT /api/orders/<id>/linesreplaces line items atomically

Editable entities: products, customers, orders, employees, suppliers, categories, shippers.

Downloads & analytics

GET /export/<entity>.csvcurrent filter/sort applied, BOM for Excel
GET /invoices/<id>.pdfA4 invoice with totals and terms
GET /invoices/<id>/packing-slip.pdfprice-free picking document
GET /reports/<key>.csv|.pdf8 reports, period-parameterised
GET /api/metrics?from=&to=KPIs + every chart payload the dashboard draws
GET /api/reports/<key>report rows as JSON
GET /api/search?q=command-palette search across five entities
GET /api/auditaudit trail with entity/action filters

Try it

Pick an endpoint and press Run — responses stream straight into this viewer.