QR Print Station runs a self-hosted Python HTTP server that serves both the customer-facing upload flow and the admin order management dashboard. All API responses use JSON, there is no versioning prefix in any path, and the server ships no external framework — everything is handled by Python’s built-inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/hxmz-axfn07/qr-printing-sfw/llms.txt
Use this file to discover all available pages before exploring further.
http.server.
Base URL
8000, controlled by the PORT variable in .env. When PUBLIC_URL is set, the server advertises that URL instead of the auto-detected LAN address — useful when the machine is behind a reverse proxy or ngrok tunnel.
Authentication
Public endpoints (/api/config, /qr.png, POST /api/orders) require no credentials. Every other endpoint is admin-only. The ADMIN_TOKEN is a free-form secret string set in .env:
is_admin() via three methods, evaluated in this order:
1. Secret URL (dashboard page only)
The admin dashboard HTML page is served at:/admin/ returns 404.
2. Request Header
3. Query Parameter
/files/:doc_id links — so that clicking a document link in the browser opens the file without needing a separate header injection.
Example: header auth
If
ADMIN_TOKEN is empty in .env, the server falls back to an optional ADMIN_PIN cookie mechanism. For production deployments, always set a strong ADMIN_TOKEN.Response Format
All API endpoints returnapplication/json. The general conventions are:
- Success — HTTP 2xx with an endpoint-specific JSON body. Creation responses use
201 Createdand include"ok": true. - Client error — HTTP 4xx with
{"error": "<message>"}. - Server error — HTTP 500 with
{"error": "<message>"}. - Unauthorized — HTTP 401 with
{"error": "Admin token required"}.
Endpoint Index
| Method | Path | Auth | Description |
|---|---|---|---|
GET | /api/config | None | Shop config and pricing |
GET | /qr.png | None | QR code PNG image |
POST | /api/orders | None | Submit a new print order |
GET | /api/orders | Admin | List all orders |
GET | /api/orders/:id | Admin | Get single order |
POST | /api/orders/:id/transition | Admin | Advance order status |
POST | /api/orders/:id/print | Admin | Trigger print command |
GET | /files/:doc_id | Admin | Download/view uploaded file |
POST /api/orders requires no authentication by design — it is the customer submission endpoint, reached by scanning the shop’s QR code. Anyone with network access to the server can submit an order.