Zum Hauptinhalt springen
NowToPrint Hilfe
NowToPrint Hilfe
Hilfe-Center
Getting Started
Platform Overview
Marketplace
Print Shop
Prepress
Design Studio
Orders & Delivery
Notifications
Free Tools
Templates
VDP (Variable Data Printing)
Developer & API
API Reference
OpenAPI Explorer & Spec Reference
Getting StartedAuthenticationEndpointsWebhooksExamplesPartner API Access ModelQuickstart
Webhook Access & DeliveryXJDF API RehberiXJDF Master Data Model
FAQ
Technical Reference
Admin Panel
Developer & APIPartner api
  1. Developer
  2. Partner API
  3. Examples

Examples

Reference snippets for estimates, RFQ launch-disabled handling, and private-beta webhook verification.

Entwicklerdocs2 Min. LesezeitGeprüft 18. Juni 2026

Examples

Use these snippets as starting points, but always validate payloads and response handling against the published contract at /docs/api/openapi.yaml.


cURL: request an estimate

curl -X POST https://api.nowtoprint.com/api/v1/estimate \
  -H "Authorization: Bearer ntp_test_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "category": "brochure",
    "quantity": 500,
    "specifications": {
      "pageCount": 16
    }
  }'

Node.js: handle RFQ launch-disabled response

const response = await fetch('https://api.nowtoprint.com/api/v1/rfq', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.NOWTOPRINT_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': crypto.randomUUID(),
  },
  body: JSON.stringify({
    title: 'Spring brochure batch',
    category: 'brochure',
    quantity: 2500,
    deliveryCity: 'Istanbul',
  }),
});

if (!response.ok) {
  if (response.status === 501) {
    const problem = await response.json();
    console.log('RFQ public launch is disabled for this environment', problem);
    return;
  }

  throw new Error(`RFQ creation failed: ${response.status}`);
}

const rfq = await response.json();
console.log(rfq.id);

RFQ, quote, and order readiness

Do not generate public clients for RFQ detail, supplier quotes, quote acceptance, or orders until those operations are present in /docs/api/openapi.yaml. The current published RFQ create/list operations are launch-disabled and return 501.


Node.js: verify webhook signatures

import crypto from 'node:crypto';

export function verifyWebhookSignature(payload: string, signature: string, secret: string) {
  const digest = crypto.createHmac('sha256', secret).update(payload).digest('hex');
  return signature === `sha256=${digest}`;
}

Use the raw request body for verification before parsing JSON. Webhook event delivery remains pilot/rollout controlled; do not assume quote or order events are public-current production enablements.


Production notes

  • keep keys and webhook secrets in managed server-side secrets
  • do not trust client-side integrations with direct live credentials
  • log request IDs, not credentials
  • treat webhook consumers as idempotent workers for approved pilots
  • do not treat API keys as switches for Master Data data-product GA access

War dieser Artikel hilfreich?

Verwandte Artikel

  • IAM Guide
  • Operational configuration security
  • Organisation Management
  • Registration, Onboarding, and Activation Operations
Edit on GitHub

Last updated on

Webhooks

Private-beta signed webhook handling for approved Partner API event-delivery pilots.

Partner API Access Model

How Partner API access is enabled through package entitlements, rollout state, key registry controls, and contract onboarding.

On this page

ExamplescURL: request an estimateNode.js: handle RFQ launch-disabled responseRFQ, quote, and order readinessNode.js: verify webhook signaturesProduction notes
Ask AI Assistant