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.
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.
Live in Hours to 1 day
Step by step — from zero to your first automated order.
- 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_).
- 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.
- 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.
- 04
Register your webhook URL
Add your public HTTPS URL in the dashboard. We send every status update to it — signed with HMAC-SHA256.
- 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_.
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
Get started right away
A minimal order via fetch — the same payload works in Node.js, Deno, Bun or the browser.
// 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'
// } What partners often ask us
How do I authenticate?
What rate limits apply?
Where can I find the complete documentation?
Are sandbox orders produced?
Do I need a wallet balance up front?
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.