Developers
MAD Print API v1
One engine behind every storefront. Plugins and widgets are thin clients: they never compute a price, a due date, a route or a status. If a number is needed, ask the API.
Base URL https://pod.madmonkey.media. JSON bodies, money in integer cents (USD). Errors look like { "ok": false, "error": "code", "detail": "sentence" }. Every response carries x-request-id. POSTs honour Idempotency-Key for 24 hours.
Authentication
| Caller | Credential | Scope |
|---|---|---|
| Browser storefront (embed.js) | Publishable key pk_... as a Bearer token, plus a matching Origin | Catalog, quotes, artwork, carts, checkout |
| Plugin server side | Secret key sk_... as a Bearer token | Everything a pk can do, plus orders, status links, webhook endpoints |
| Staff console and Biz App | MAD Login session cookie | Own business only, fails closed |
| Customer | Signed status link /o/{token} | One order, read only |
| Print floor | Signed job link /j/{token} | One job: ticket, files, slip, acknowledge, ship |
A key is a tenant: the business is never read from a request body. Keys are shown once, at creation.
Endpoints
| Method | Path | Who | What |
|---|---|---|---|
GET | /v1/catalog | pk, sk | Products, option schema, priceable flag |
GET | /v1/catalog/{product_id} | pk, sk | One product |
POST | /v1/artwork/uploads | pk, sk | Start an upload, returns a PUT target |
POST | /v1/artwork/{id}/complete | pk, sk | Preflight: size, DPI, warnings |
POST | /v1/quotes | pk, sk | Signed quote for product, options, quantity, artwork |
POST | /v1/carts | pk, sk | Cart from payable quotes plus customer and ship-to |
POST | /v1/carts/{id}/checkout | pk, sk | Order plus hosted checkout URL |
GET | /v1/orders | sk, staff | List orders, filter by status |
GET | /v1/orders/{id} | sk, staff | Order, lines, events, dispatches |
POST | /v1/orders/{id}/status-links | sk, staff | Issue a new customer link |
DELETE | /v1/status-links/{link_id} | sk, staff | Revoke a customer link |
POST | /v1/orders/{id}/route | staff | Reroute or resend to a producer |
POST | /v1/orders/{id}/events | staff | Add a status event |
GET | /v1/status/{token} | customer | Status JSON for one order |
POST | /v1/webhook-endpoints | sk | Register an outbound webhook |
GET | /v1/merchant | staff | Payout account status |
POST | /v1/merchant/onboarding | staff | Hosted payout onboarding link |
GET, POST, DELETE | /v1/keys | staff | List, create (shown once), revoke keys |
GET | /v1/openapi.json | anyone | Machine-readable spec |
Quote refusals return HTTP 422 with one of unknown_product, option_unavailable, quantity_unavailable, cost_unavailable, cost_unconfirmed, artwork_required, artwork_not_ready. A quote with is_estimate: true is labelled ESTIMATE and payable is false.
Drop-in widget
<div data-madprint-widget data-product="dtf_gang_sheet"></div>
<script src="https://pod.madmonkey.media/embed.js" data-key="pk_..." async></script>Outbound webhooks
Events: order.paid, order.routed, order.status_changed, order.shipped, order.on_hold. Each delivery is a POST with header x-madprint-signature: t=<unix>,v1=<hex>, where v1 is HMAC-SHA256 of t + "." + body. Failed deliveries retry after 1 minute, 5 minutes, 30 minutes, 2 hours and 12 hours.
Plugins and surfaces
WordPress
Loads embed.js and calls this API. Install, settings and webhook relay only.
Shopify
Loads embed.js and calls this API. Install, settings and webhook relay only.
Wix
Loads embed.js and calls this API. Install, settings and webhook relay only.
Squarespace
Loads embed.js and calls this API. Install, settings and webhook relay only.
MAD Biz App
Loads embed.js and calls this API. Install, settings and webhook relay only.
This site
Loads embed.js and calls this API. Install, settings and webhook relay only.