Skip to main content

Documentation 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.

The /api/config endpoint is the first request the customer upload page makes on load. It supplies everything the front-end needs to render the upload form: shop branding, pricing rules, available print options, and the URL customers should post their order to. No authentication is required.

GET /api/config

GET /api/config
No authentication required. The server merges values from config.yml, the settings database table, and the pricing database table before responding, so the response always reflects the latest admin-configured values.

Response Fields

shop
object
Branding and operational details for the print shop.
theme
object
Hex color values used to style the customer-facing pages.
pricing
array of objects
Each entry describes the price per page for one combination of paper size, color mode, and print style. Loaded live from the pricing database table.
options
object
Enumeration of valid values for per-document print settings, used to populate the upload form’s dropdowns.
uploadUrl
string
The full URL customers should use to access the upload page. Derived from PUBLIC_URL in .env if set, otherwise auto-detected from the server’s LAN IP and port, e.g. "http://192.168.1.10:8000/upload". This is the URL encoded into the QR code.
adminAccess
string
Always "secret-url". Indicates that the admin dashboard is accessed via the secret URL pattern /admin/<ADMIN_TOKEN>.
currency_symbol
string
Currency symbol used when displaying prices, e.g. "Rs". Read from the currency_symbol row in the settings database table. Only present in the response when a value is configured.

Example Response

{
  "shop": {
    "name": "QR Print Station",
    "address": "Local print shop",
    "phone": "",
    "instructions": ["Add files", "Choose settings", "Submit order"],
    "supported_file_types": ["Common print files"],
    "max_upload_mb": 50
  },
  "theme": {
    "accent": "#166a5b",
    "accent_2": "#e2b23c",
    "background": "#f6f7f2"
  },
  "pricing": [
    {
      "label": "A4 BW Single Side",
      "paper_size": "A4",
      "color_mode": "bw",
      "print_style": "single",
      "price_per_page": 2.0
    },
    {
      "label": "A4 BW Double Side",
      "paper_size": "A4",
      "color_mode": "bw",
      "print_style": "double",
      "price_per_page": 1.5
    },
    {
      "label": "A4 COLOR Single Side",
      "paper_size": "A4",
      "color_mode": "color",
      "print_style": "single",
      "price_per_page": 10.0
    }
  ],
  "options": {
    "paper_sizes": ["A4", "A3", "Letter"],
    "color_modes": { "bw": "Black & white", "color": "Color" },
    "print_styles": { "single": "Single side", "double": "Double side" }
  },
  "uploadUrl": "http://192.168.1.10:8000/upload",
  "adminAccess": "secret-url",
  "currency_symbol": "Rs"
}

GET /qr.png

GET /qr.png
Returns the QR code as an image/png binary. The QR code encodes the uploadUrl value — scanning it navigates a customer’s phone directly to the upload page. No authentication required. The server regenerates the QR image in the background every QR_REFRESH_SECONDS (default 5) seconds and also regenerates it on every request to /qr.png, so the image always reflects the current uploadUrl. The image is cached to qr-codes/upload.png on disk. Response: 200 OK with Content-Type: image/png. Error: 503 Service Unavailable with {"error": "Install qrcode package to render PNG QR"} if the qrcode Python package is not installed.
Print or display the QR PNG on a sign at the counter. Staff can always retrieve the latest version by navigating to http://<server>:<PORT>/qr.png in a browser.

Build docs developers (and LLMs) love