⚡ LIMITED TIME: USE CODE "NEDJECT30" FOR 30% OFF & 30-DAY EXTENDED FREE TRIAL ON ALL PRO PASSES
NEDJECT
DEVELOPER PLATFORM & API SPECIFICATION // v1.4

NEDJECT PEAR API DOCUMENTATIONPUBLIC GATEWAY

The Nedject Pear API Gateway provides ultra-low-latency programmatic rendering of prepress-grade optical assets: 300 DPI QR Codes, Vector Barcodes (CODE128, EAN13, DataMatrix),CMYK Prepress Separations, and Web NFC NDEF Touches. Protected by strict Network Origin Whitelisting, SHA-256 key hashing, sliding-window rate limiters, and dynamic credit billing.

LOOKING FOR PRINT-READY DESIGNS & API PRACTICE?

Test live product barcode labels (EAN-13), industrial shipping labels (4x5" thermal), freight master cartons (ITF-14), Level-H QR forensics, contactless NFC badges, and CMYK prepress outputs in the interactive testbench.

LAUNCH PRACTICE TESTBENCH
JUMP TO:

1. FOUR-STEP API SETUP & CONNECTION LIFECYCLE

STEP 1

CREATE API KEY

Navigate to your Pear API Gateway and generate a live key. Keys start with ndj_live_.... Only the SHA-256 hash is saved in our database.

Key format: ndj_live_32chars
STEP 2

WHITELIST ORIGINS

Add your client domains or backends to the origin whitelist (e.g. https://store.example.com). Our threat defense blocks requests without matching whitelisted origins.

Defense: Strict Match / 403 Threat Lock
STEP 3

SYNC B2B DEFAULTS

Optionally configure global prepress settings in B2B Configuration (QR Error Correction ‘H’, 300/600 DPI, CMYK separation, Barcode symbologies).

Config API: GET /api/user/config
STEP 4

EXECUTE GENERATION

Send a POST /api/v1/generate call with your Bearer token and origin header. Receive instant vector SVG or high-DPI raster assets.

Latency: < 85ms median

2. AUTHENTICATION & MULTI-LANGUAGE INTEGRATION CODE

curl -X POST https://nedject.com/api/v1/generate \
  -H "Authorization: Bearer ndj_live_YOUR_API_KEY" \
  -H "Origin: https://store.example.com" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "qr",
    "payload": "https://store.example.com/item/4921",
    "format": "svg",
    "options": {
      "dpi": 300,
      "errorCorrection": "H",
      "dotShape": "sharp",
      "photoQRMode": "standard",
      "colorSeparation": "CMYK-FOGRA39",
      "margin": 2
    }
  }'

3. REST ENDPOINT MATRIX & PARAMETER SCHEMAS

POST/api/v1/generate
Optical Render Gateway (Credits Billed)

Primary high-speed optical synthesis pipeline. Processes vector QR codes, prepress DPI formatting, and barcodes.

REQUIRED HEADERS:
  • Authorization: Bearer ndj_live_...
  • Origin: https://whitelisted-domain.com
  • Content-Type: application/json
TELEMETRY RESPONSE HEADERS:
  • x-credits-remaining: Credits left in current billing cycle
  • x-origin-verified: true if Origin header matched whitelist
  • x-ratelimit-remaining: Requests left in 60s sliding window
REQUEST PAYLOAD (JSON):
{
  "type": "qr" | "barcode" | "photo" | "photo-dpi" | "nfc",
  "payload": "https://example.com/asset-data",
  "format": "svg" | "png" | "pdf",
  "options": {
    "dpi": 300 | 600 | 1200,
    "errorCorrection": "L" | "M" | "Q" | "H",
    "colorSeparation": "sRGB" | "CMYK-FOGRA39",
    "dotShape": "sharp" | "square" | "dots" | "rounded" | "squircle" | "diamond" | "pill" | "classy" | "hex",
    "photoQRMode": "standard" | "halftone" | "fusion" | "dither" | "silhouette" | "edge-matrix" | "microdots" | "center-logo",
    "eyeFrameShape": "square" | "rounded" | "circle" | "squircle",
    "eyeBallShape": "square" | "rounded" | "circle" | "diamond",
    "photoContrast": 1.45,
    "photoBrightness": 1.0,
    "photoDotScale": 0.62,
    "photoBWMode": true,
    "symbology": "CODE128" | "EAN13" | "UPC" | "ITF14" | "DATAMATRIX",
    "margin": 2
  }
}
GET / POST/api/user/config
B2B Service Configuration Sync

Read or update a tenant's default prepress parameters programmatically, avoiding hardcoded DPI or symbology values in client code.

READ CONFIG (CURL):
curl -X GET "https://nedject.com/api/user/config?userId=YOUR_USER_ID" \
  -H "Authorization: Bearer YOUR_API_KEY"

4. THREAT CODES, RATE LIMITS & PLAN QUOTAS

HTTP CODEERROR TYPEREASON & THREAT TELEMETRYRESOLUTION ACTION
200 OKSUCCESSOrigin matches whitelist and key is valid. Asset generated.None. Output asset URL returned.
401 UNAUTHORIZEDINVALID_KEYBearer token missing, formatted incorrectly, or revoked.Generate or rotate API key in Pear Gateway.
403 FORBIDDENORIGIN_FORBIDDENThe Origin header did not match any whitelisted origins.Add client domain to whitelist in Pear Gateway.
402 PAYMENT REQUIREDCREDITS_EXHAUSTEDMonthly optical generation credits depleted for current tier.Upgrade to Starter, Pro, or Enterprise in Plans.
429 RATE LIMITRATE_LIMIT_EXCEEDEDRequest volume exceeded sliding 60-second RPM ceiling.Implement exponential backoff retry.
FREE TIER10 Credits / mo20 RPM • 1 Origin
STARTER TIER500 Credits / mo60 RPM • 5 Origins
PRO TIERUNLIMITED CREDITS300 RPM • 15 Origins
ENTERPRISE TIERUNLIMITED CREDITS1200 RPM • Unlimited Origins

5. WEBHOOK RELAYS & HMAC-SHA256 SIGNATURE VERIFICATION

When asynchronous generation batches complete or credit quotas hit low thresholds, Nedject pushes event payloads to your configured webhook URL. Every webhook includes an X-Nedject-Signature header calculated using HMAC-SHA256 and your signing secret.

// Node.js Webhook Verification Middleware
import crypto from 'crypto';

export function verifyNedjectWebhook(
  rawBody: string,
  signatureHeader: string,
  webhookSecret: string
): boolean {
  const computedHash = crypto
    .createHmac('sha256', webhookSecret)
    .update(rawBody)
    .digest('hex');

  return crypto.timingSafeEqual(
    Buffer.from(signatureHeader),
    Buffer.from(computedHash)
  );
}

6. LIVE ENDPOINT TEST RUNNER & SIMULATOR

REALTIME GATEWAY REQUEST
REALTIME GATEWAY RESPONSE:
Click "DISPATCH GATEWAY CALL" to test your headers and credentials against the live pipeline.
Note: Testing in this live sandbox executes against the active /api/v1/generate route.
LIVE HTML5 CANVAS TEMPLATES & IMAGE COMPOSITOR6 TEMPLATES READY

Pear API Gateway Integration Examples & Canvas Templates

KEYWORDS:#api-gateway#curl-optical#node-batch-zip#python-cmyk#go-webhook-hmac#ts-retry-backoff#php-key-rotation#circuit-breaker#gs1-modulo-10#bearer-auth

Canvas Template Image Input & Global Optical Overrides

Choose a studio asset or upload your own logo/photo — templates composite it live onto Canvas.

PHYSICAL PNG DPI TAG
REST v1.4 ENGINE
IMAGE MIX9 SHAPES JSON
Rendering Canvas...
LIVE CANVAS

POST /api/v1/generate // All 9 Dot Geometries Blueprint

Inspects all 9 backend dotShape geometries supported natively by POST /api/v1/generate alongside ?raw=true SVG streaming.

DIMENSIONS:JSON -> Vector SVG / 300 DPI PNG
RESOLUTION:Sub-20ms P99 Latency
STANDARD:Bearer API Key + Origin Check
FINTECH / ERP API
IMAGE MIXINVOICE API
Rendering Canvas...
LIVE CANVAS

Automated Billing Tax Invoice Verification Seal

Programmatic invoice sealing workflow returning crisp QR/Code-128 assets ready to drop into ERP PDF templates.

DIMENSIONS:A4 / A5 Document Injection
RESOLUTION:300 DPI Press Embed
STANDARD:HMAC-SHA256 Signed URI
VECTOR PIPELINE
IMAGE MIX?RAW=TRUE SVG
Rendering Canvas...
LIVE CANVAS

Raw SVG Stream (?raw=true) Photo-QR Generation

Streams raw SVG markup with embedded filtered template artwork and crisp vector finder patterns when ?raw=true is appended.

DIMENSIONS:Infinite Vector Scaling
RESOLUTION:SVG Filter + Image Clip
STANDARD:Content-Type: image/svg+xml
WAREHOUSE ERP
GS1 REST
Rendering Canvas...
LIVE CANVAS

GS1-128 & ITF-14 Warehouse Label Serialization

Server-side REST barcode synthesis for automated WMS picking stations and conveyor label applicators.

DIMENSIONS:4" x 6" Thermal Target
RESOLUTION:300 DPI Monochrome
STANDARD:GS1-128 Modulo-10 Check
WEBHOOK SECURITY
HMAC-SHA256
Rendering Canvas...
LIVE CANVAS

Signed Webhook Telemetry & Verification QR

Asynchronous batch render completion notifications signed with HMAC-SHA256 headers and verification QR.

DIMENSIONS:Async Event Callback
RESOLUTION:TLS 1.3 + SHA-256
STANDARD:Zero-Trust Webhook Verify
RETAIL POS API
IMAGE MIX80MM ESC/POS
Rendering Canvas...
LIVE CANVAS

REST POS Receipt & Loyalty Barcode Output

Generates receipt headers, loyalty QRs, and scannable EAN-13 coupon barcodes in one cloud call.

DIMENSIONS:80 mm Continuous Thermal
RESOLUTION:600 DPI 1-Bit Monochrome
STANDARD:EAN-13 + ISO 18004 QR