Skip to content

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

CallerCredentialScope
Browser storefront (embed.js)Publishable key pk_... as a Bearer token, plus a matching OriginCatalog, quotes, artwork, carts, checkout
Plugin server sideSecret key sk_... as a Bearer tokenEverything a pk can do, plus orders, status links, webhook endpoints
Staff console and Biz AppMAD Login session cookieOwn business only, fails closed
CustomerSigned status link /o/{token}One order, read only
Print floorSigned 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

MethodPathWhoWhat
GET/v1/catalogpk, skProducts, option schema, priceable flag
GET/v1/catalog/{product_id}pk, skOne product
POST/v1/artwork/uploadspk, skStart an upload, returns a PUT target
POST/v1/artwork/{id}/completepk, skPreflight: size, DPI, warnings
POST/v1/quotespk, skSigned quote for product, options, quantity, artwork
POST/v1/cartspk, skCart from payable quotes plus customer and ship-to
POST/v1/carts/{id}/checkoutpk, skOrder plus hosted checkout URL
GET/v1/orderssk, staffList orders, filter by status
GET/v1/orders/{id}sk, staffOrder, lines, events, dispatches
POST/v1/orders/{id}/status-linkssk, staffIssue a new customer link
DELETE/v1/status-links/{link_id}sk, staffRevoke a customer link
POST/v1/orders/{id}/routestaffReroute or resend to a producer
POST/v1/orders/{id}/eventsstaffAdd a status event
GET/v1/status/{token}customerStatus JSON for one order
POST/v1/webhook-endpointsskRegister an outbound webhook
GET/v1/merchantstaffPayout account status
POST/v1/merchant/onboardingstaffHosted payout onboarding link
GET, POST, DELETE/v1/keysstaffList, create (shown once), revoke keys
GET/v1/openapi.jsonanyoneMachine-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.