OpenAPI 3.1 · Enterprise REST API v1 Base URL: https://dielinegrid.com/api/v1

Enterprise Packaging API & Zero-Downtime Key Rotation

Built for global CPG brands, ERP/PIM connectors (SAP, NetSuite, Shopify), and high-volume print pipelines. Every mutation supports Idempotency-Key deduplication, least-privilege scopes, immutable audit logs, and immediate global Cloudflare Edge KV sync.

Create Sandbox API Key → OpenAPI 3.1 Spec ↗ Security & Loss-Cap Architecture
# 1. Upsert a GS1 Digital Link route with Idempotency-Key
curl -X POST https://dielinegrid.com/api/v1/routes \
  -H "Authorization: Bearer dlg_live_YOUR_KEY" \
  -H "Idempotency-Key: sap-po-2027-00419" \
  -H "Content-Type: application/json" \
  -d '{
    "codeType": "gs1",
    "routingKey": "04006381333931",
    "mode": "redirect",
    "defaultUrl": "https://brands.example.com/dove-bar-100g",
    "title": "Dove Original 100g Carton"
  }'

# 2. Export press-locked 100% K-only DeviceCMYK PDF (0 0 0 1 k)
curl -X POST https://dielinegrid.com/api/v1/cmyk-pdf \
  -H "Authorization: Bearer dlg_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://qr.yourbrand.com/01/04006381333931/10/LOT27A?17=271231","sizeMm":28}' \
  --output carton-k100.pdf

# 3. Zero-Downtime Dual-Key Rotation (24h grace window)
curl -X POST https://dielinegrid.com/api/v1/keys/key_abc123/rotate \
  -H "Authorization: Bearer dlg_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"graceHours": 24}'

Live API Request Runner

Test directly against https://dielinegrid.com/api/v1/* using an API key from /app (or leave blank if already signed in).

Download OpenAPI 3.1 JSON ↗
ENTERPRISE SECURITY RUNBOOK

Zero-Downtime Dual-Key Rotation in 4 Steps

Rotate credentials across distributed factories, SAP connectors, and CI runners without dropping a single packaging request.

STEP 1 · TRIGGER ROTATION

Call POST /api/v1/keys/:id/rotate

Choose a grace window (1, 24, or 168 hours). DielineGrid immediately returns a brand-new dlg_live_ key with identical scopes.

STEP 2 · DUAL-KEY WINDOW

Both keys authenticate cleanly

Existing clusters keep running with the old key while emitting an X-DielineGrid-Key-Warning header so observability alerts confirm which nodes haven't updated yet.

STEP 3 · ROLLOUT SECRETS

Deploy new secret to Vault / KMS

Roll out the replacement secret across AWS Secrets Manager, Azure Key Vault, or Kubernetes pods on your standard release cadence.

STEP 4 · AUTO-EXPIRY OR REVOKE

Old key expires automatically

When grace_until passes, the previous key stops authenticating automatically. For leaked keys, call DELETE /api/v1/keys/:id for immediate global revocation.

Complete API v1 Endpoint Matrix

All endpoints enforce TLS 1.3, peppered SHA-256 key hashing, per-workspace daily hard quotas (429 Retry-After), and least-privilege scopes.

Method & Endpoint Required Scope Idempotency Description
GET /api/v1/routes routes:read Safe GET Paginated list of workspace GS1 1.2 and D2C SKU routes
POST /api/v1/routes routes:write Idempotency-Key Upsert a single GS1 or SKU route with immediate write-through sync to Edge KV
POST /api/v1/routes/batch routes:write Idempotency-Key Atomic ERP/PIM batch upsert for up to 500 SKUs per request
PATCH / DELETE /api/v1/routes/:key routes:write Keyed Update destination URL, rules, or Edge SKU Passport without reprinting cartons
POST /api/v1/cmyk-pdf cmyk:export Stateless Returns pure vector application/pdf (0 0 0 1 k) + POS X-dimension headers
GET / POST /api/v1/keys keys:manage Idempotency-Key List key metadata or issue new prefix-tagged dlg_live_ / dlg_test_ keys
POST /api/v1/keys/:id/rotate keys:manage Idempotency-Key Zero-downtime dual-key rotation with 1h, 24h, or 168h grace window
DELETE /api/v1/keys/:id keys:manage Idempotent Instant emergency revocation across the edge
POST /api/v1/domains + /:id/verify domains:manage Idempotency-Key Register custom brand domain and verify DNS TXT via Cloudflare DoH
GET /api/v1/audit-logs audit:read Safe GET Read immutable compliance log of route, domain, and key lifecycle events
GET /api/v1/export/worker routes:read Safe GET Day-1 Anti-Hostage export: standalone Cloudflare Worker script + KV JSON bundle