API Integration Setup: Hours to 1 day

PrintHub REST API — direct access for full flexibility

No platform, no plugin — pure API. Perfect for custom storefronts, mobile apps, headless commerce or unusual systems.

Overview

Our public REST API is the foundation of every PrintHub integration — even our Shopify app internally calls the same endpoints. Whether you run your own store, a B2B platform, an ERP system or a mobile app, you talk to us directly: JSON in, print job out.

Benefits

Why REST API with PrintHub?

Maximum flexibility

No assumptions about your platform. Whether Laravel, Next.js, Ruby on Rails, Odoo or SAP — if you speak HTTP, you can talk to us.

Risk-free sandbox testing

With pk_test_ keys you simulate any scenario — orders are accepted, validated and shown in the sandbox logs, but never produced.

Webhooks for every relevant event

order.submitted, order.shipped, order.error — we push them HMAC-signed to your URL. No polling loops needed.

Bulk orders for events and seasons

Up to 20 orders in one POST — perfect for Black Friday peaks, event tickets or employee swag.

Setup

Live in Hours to 1 day

Step by step — from zero to your first automated order.

  1. 01

    Create an account and grab your keys

    Register in the partner dashboard. You immediately receive a sandbox key (pk_test_) and a live key (pk_live_).

  2. 02

    Sandbox test via curl

    A single POST /api/orders with pk_test_ confirms that your integration works in principle. You see the result in the sandbox logs.

  3. 03

    Build your production code

    Build your mapping layer (internal product IDs → PrintHub product IDs), error handling and idempotency keys. See the code sample below.

  4. 04

    Register your webhook URL

    Add your public HTTPS URL in the dashboard. We send every status update to it — signed with HMAC-SHA256.

  5. 05

    Top up your wallet and go live

    Each order is debited from your PrintHub wallet. Top up via SEPA or credit card and switch to pk_live_.

Features

What this integration can do

  • REST API with JSON payloads
  • Live and sandbox keys (pk_live_ / pk_test_)
  • Webhooks: order.submitted, order.shipped, order.error
  • Bulk: up to 20 orders per request
  • Rate limit: 60 requests/minute with 429 backoff hints
  • HMAC-SHA256 signature for webhook verification
  • Idempotency keys for safe retries
Code sample

Get started right away

A minimal order via fetch — the same payload works in Node.js, Deno, Bun or the browser.

javascript api.print-hub.com
// Node.js 18+ / Deno / Bun / Cloudflare Workers / Browser
// Erste Bestellung anlegen — mit Sandbox-Key testen, dann pk_live_ nutzen

const response = await fetch('https://api.print-hub.com/api/orders', {
  method: 'POST',
  headers: {
    'X-API-Key': 'pk_test_xxxxxxxxxxxxxxxx',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    external_id: 'order-2026-0001',
    customer: {
      name: 'Maria Musterfrau',
      street: 'Musterstraße 12',
      zip: '20095',
      city: 'Hamburg',
      country: 'DE',
      email: 'maria@example.com',
    },
    items: [
      {
        product_id: 'tasse-weiss-330ml',
        quantity: 2,
        properties: {
          engraving: 'Team Hamburg 2026',
          design_url: 'https://cdn.example.com/design.png',
        },
      },
    ],
  }),
});

const order = await response.json();
console.log(order);
// {
//   order_id: 'ph_ord_8fJ2kL',
//   status: 'submitted',
//   estimated_shipping: '2026-04-15'
// }
Frequently asked

What partners often ask us

How do I authenticate?
Via the X-API-Key header with your sandbox or live key. No OAuth dance, no tokens with expiry — just a key you can rotate in the dashboard.
What rate limits apply?
60 requests per minute per key. On overflow we respond with HTTP 429 and a Retry-After header. Contact us for higher limits.
Where can I find the complete documentation?
On our API page at /api. All endpoints, request/response schemas and error codes are documented there. The OpenAPI spec is linked as well.
Are sandbox orders produced?
No. pk_test_ orders run through the full validation and workflow logic, but are never handed to production or shipping.
Do I need a wallet balance up front?
For live mode: yes. Orders are only accepted when your wallet covers the order value. Top-up works via SEPA, credit card or invoice above a certain volume.

Ready to connect REST API with PrintHub?

In a 30-minute call we go over your setup, catalog and volume — and send you out with a concrete roadmap.