The orders API covers the full lifecycle entry point for print jobs. Customers useDocumentation 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.
POST /api/orders to submit documents from the upload page; staff use GET /api/orders and GET /api/orders/:id from the admin dashboard to inspect and manage incoming work.
POST /api/orders
multipart/form-data containing at least one file in the documents field. Per-document print settings are supplied as indexed fields (color_mode_0, print_style_0, etc.) matching the order in which files appear.
The server automatically estimates costs for PDF documents by counting pages and looking up the matching rule in the pricing table. Non-PDF files and PDFs with no matching pricing rule receive a null cost — staff estimate those after review.
Request Fields
Full name of the customer placing the order. Defaults to
"Walk-in customer" if omitted.Customer phone number. Optional. Stored as-is; no validation is applied.
Order-level notes visible to staff, e.g.
"Need urgently". Optional.One or more files to print. Use the same field name
documents for each file — multipart allows repeated field names. At least one file is required; submitting zero files returns a 400 error. Each file’s size must not exceed max_upload_mb (default 50 MB). The total request body must not exceed six times max_upload_mb.Color mode for the document at zero-based index
n. Valid values: bw (black & white) or color. Defaults to bw if omitted.Print style for document
n. Valid values: single (single-sided) or double (double-sided). Defaults to single if omitted.Paper size for document
n, e.g. A4, A3, Letter. Defaults to A4 if omitted.Number of copies of document
n. Must be between 1 and 99. Defaults to 1.Per-document notes for document
n, e.g. "Print on glossy paper". Optional.Response — 201 Created
total_estimated_cost and estimated_cost are null when the document is not a PDF or when no matching pricing rule exists — in that case the cost is estimated after staff review. estimated_total is always present and mirrors total_estimated_cost.
Error Cases
| Status | Condition |
|---|---|
400 Bad Request | No files attached ({"error": "At least one file required"}) |
400 Bad Request | A file exceeds max_upload_mb ({"error": "<filename> exceeds N MB"}) |
400 Bad Request | A file has zero bytes ({"error": "<filename> is empty"}) |
400 Bad Request | copies_<n> is not a valid number |
400 Bad Request | Content-Type is not multipart/form-data |
413 Request Entity Too Large | Total body exceeds 6× max_upload_mb |
Example
documents field and add a matching set of indexed settings for each:
GET /api/orders
created_at descending (newest first). Requires admin authentication via X-Admin-Token header or ?token= query parameter.
Query Parameters
Free-text search across order UUID, customer name, and phone number. Case-insensitive substring match. Returns all orders if omitted.
Filter by order status. Valid values:
new, reviewing, ready, printing, printed, cancelled, failed. Returns all statuses if omitted.Response — 200 OK
A JSON array where each element has the same shape as theorder object in the POST /api/orders response. Every order object always includes document_count, estimated_total, cancel_reason, and failure_reason — these are not additional fields unique to this endpoint, they are part of every order response.
Example
GET /api/orders/:id
Path Parameter
The UUID of the order, e.g.
550e8400-e29b-41d4-a716-446655440000.Response — 200 OK
A single order object with the same shape described inGET /api/orders.
Error Cases
| Status | Body |
|---|---|
404 Not Found | {"error": "Not found"} |
401 Unauthorized | {"error": "Admin token required"} |