PAQGEN API
Integration guide

API-only product authenticity.

Use PAQGEN as a backend service for product verification. Approved brands can create product records, upload artwork, generate unit-level QR codes, render print output one unit at a time, and verify customer scans from their own systems.

1Request access

Send company details, use case, and expected QR volume.

2Approval

PAQGEN creates the workspace and maps users to the company.

3Get token

Login returns a token for protected API calls.

4Generate and print

Create QR records, then render only the serial needed for printing.

Authentication

Call POST /api/admin/login with the approved integration user. The response contains a token. Send that token as Authorization: Bearer <token> on protected calls, together with the company code in x-company. Company users only access their own workspace.

POST https://api.paqgen.com/api/admin/login
Content-Type: application/json

{"email":"integration@brand.com","password":"approved-password"}

Response: {"token":"eyJhbGciOi...","user":{"company":"brand_code"}}

Authorization: Bearer eyJhbGciOi...
x-company: brand_code
API printing flow

For production, store artwork once, generate QR token records for the batch, then request printable output by serial number. The customer system can print serial 1, then serial 2, then serial 3, without creating one massive repeated-artwork PDF.

POST /api/batches
GET /api/batches/:id/print-unit?serial=1
GET /api/batches/:id/print-unit?serial=2
GET /api/batches/:id/print-unit?serial=3

System

GET
/api/health

Check uptime and API version.

Access and Admin

POST
/api/contact

Store a public pricing, onboarding, or API access request.

POST
/api/admin/login

Login and receive a Bearer token.

GET
/api/admin/overview

Superadmin overview of companies, users, requests, and API surfaces.

POST
/api/admin/companies

Create or update a company workspace, including logo and website metadata.

POST
/api/admin/users

Create a user and map them to an existing company.

Products and Artwork

GET
/api/products

List products for the active company workspace.

POST
/api/products

Create product details shown on customer verification pages.

POST
/api/designs/upload

Upload packaging artwork and link it to a product.

POST
/api/designs/:id/placement

Save QR position and size on the artwork.

QR Generation and Printing

POST
/api/batches

Generate unique QR records for every physical unit in a batch.

POST
/api/batches/:id/render

Download a full PDF for small batches only.

GET
/api/batches/:id/print-unit?serial=1

Render one printable unit on demand for scalable production printing.

Sales and Unit Status

POST
/api/batches/sales/import

Import sold-unit data from CSV or an authenticated brand-user workflow.

POST
/api/pos/sales

Post idempotent POS/ERP/ecommerce sale events using a revocable company integration key.

GET
/api/batches/shop/lookup?token=...

Restricted Shop Owner lookup showing sale status and scan status separately.

POST
/api/batches/shop/mark-sold

Restricted Shop Owner confirmation for one physical QR unit.

Verification and Reports

POST
/api/verify

Verify a scanned QR token and record genuine, repeat, or invalid scan events.

GET
/api/reports/summary

Product-level generated and verified totals.

GET
/api/reports/metrics

Dashboard totals: generated, verified, repeat, invalid, unused, and total scan events.

GET
/api/reports/scans

Recent scan events for reports and investigations.