Sunrise2D

API reference

Everything the dashboard does, you can do over HTTP. Base URL https://stampwright.com.

Authentication

Send your API key as a bearer token. Find it under Settings.

curl https://stampwright.com/api/products \
  -H "Authorization: Bearer YOUR_API_KEY"

The audit and QR endpoints are public. Product and account endpoints require an API key.

Readiness audit

POST /api/audit

Score a catalog. Public, rate limited to 10 requests per hour per IP.

curl -X POST https://stampwright.com/api/audit \
  -H "Content-Type: application/json" \
  -d '{
    "email": "you@yourbrand.com",
    "company": "Your Brand Co.",
    "csv": "gtin,name,url\n036000291452,Hot Sauce,\n"
  }'

Returns a readiness score (0–100), a letter grade, a summary, a prioritized checklist, and per-row findings. Header row must include a gtin or upc column; name and url are optional.

GET /api/audit/{id}

Retrieve a stored report. Anyone with the report link can read it, and no API key is required.

QR codes

GET /api/qr/{gtin}.svg

Returns an SVG with physical dimensions in millimeters and a 4-module quiet zone. Verify the printed result before production.

ParameterDefaultNotes
module0.5Module size in mm. Minimum 0.396 for retail POS.
eccML, M, Q, H. M is the packaging default. Higher settings add modules and increase the physical size.
lotNoneAI (10) batch/lot
serialNoneAI (21) serial number
cpvNoneAI (22) consumer product variant
curl "https://stampwright.com/api/qr/036000291452.svg?module=0.5&lot=LOT2027A" -o code.svg

GET /api/qr/{gtin}.json

Returns the same symbol with its width, module count, quiet zone, and any warning about the retail POS minimum size.

Products and resolver routes

PUT /api/products/{gtin}

Create or update a product and its resolver destinations.

curl -X PUT https://stampwright.com/api/products/036000291452 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Hot Sauce 12oz",
    "attributes": { "17": "270630" },
    "links": [
      { "linkType": "gs1:pip", "href": "https://yourbrand.com/hot-sauce", "default": true }
    ],
    "approved": true
  }'

approved must be true for links to go live. Requests without approval are held as staged changes. A published route may already be used by printed packaging.

GET /api/products

Download every product and resolver route on the account as JSON with one request.

Resolver

The resolver is public. Point-of-sale systems and phones request these routes directly.

RequestReturns
/01/{gtin14}307 to the default destination
/01/{gtin14}?linkType=gs1:pip307 to that specific link type
/01/{gtin14}?linkType=allFull linkset as JSON
Accept: application/linkset+jsonSame linkset, content-negotiated
/01/{gtin14}/10/{lot}Lot-specific route, including approved recall destinations
/.well-known/gs1resolverResolver self-description

Errors and limits

CodeMeaning
400Invalid input. The body identifies the GTIN or AI value that failed.
401Missing or invalid API key
402Plan GTIN limit reached
413Catalog too large for the free audit
429Rate limited. See X-RateLimit-Reset.

For a bad check digit, the response includes the expected digit.