How to fulfill sticker orders through the Printed Simply API
When someone buys a sticker in your store, your server can look up its size and material, quote the shipment, then send the design and delivery address to Printed Simply. Keep the returned order ID with the original sale so you can follow it through shipping.
Match each design to a sticker SKU
Look up the product with GET /products/{sku} under the API base URL. This example uses sticker-die-cut-3x3 and a prepared 3 × 3 inch sample design. For your store, supply a reachable artwork URL and choose a quantity supported by that exact SKU. One five-sheet pack counts as one unit.
Quote and submit one test sale
Get a test key from Developer Tools. Set it in your server environment as PRINTEDSIMPLY_API_KEY. Save this example as stickers.mjs and run it once with Node.js 20 or later. A test order simulates fulfillment and costs $0.
import { randomUUID } from "node:crypto"
import { writeFile } from "node:fs/promises"
const base = "https://printedsimply.com/api/v1"
const key = process.env.PRINTEDSIMPLY_API_KEY
if (!key?.startsWith("ps_test_")) throw new Error("Use a test key for this example.")
const headers = { "x-api-key": key, "Content-Type": "application/json" }
async function post(path, body, extraHeaders = {}) {
const response = await fetch(base + path, {
method: "POST",
headers: { ...headers, ...extraHeaders },
body: JSON.stringify(body),
})
const result = await response.json()
if (!response.ok) throw new Error(result.error?.message || String(response.status))
return result.data
}
const order = {
"items": [
{ "sku": "sticker-die-cut-3x3", "quantity": 100,
"artwork_url": "https://printedsimply.com/samples/sticker-3x3.png" }
],
"address_to": {
"name": "Jane Doe", "address1": "123 Main St",
"city": "Austin", "state": "TX", "zip": "78701", "country": "US"
},
"shipping": { "method": "standard" }
}
const quote = await post("/orders/quote", {
items: order.items.map(({ sku, quantity }) => ({ sku, quantity })),
address_to: order.address_to,
shipping: order.shipping,
})
console.log("Quote in cents:", quote.breakdown)
// Save this test sale locally so a retry can reuse the exact body and key.
const body = { ...order, quote_token: quote.quote_token, reference: "demo-" + randomUUID() }
await writeFile(body.reference + ".json", JSON.stringify(body), { flag: "wx", mode: 0o600 })
const confirmation = await post("/order", body, { "Idempotency-Key": body.reference })
console.log(confirmation.order_id, confirmation.test_mode, confirmation.charged)The quote includes goods and shipping in cents. When tax is quoted, breakdown.total_with_tax_cents includes it. For a live sale, review the amount and the quote’s expiry before submitting. If the customer changes the basket or address, request a fresh quote.
An example of the three values printed for a successful sandbox order is test_ord_… true $0.00. Save the actual order_id from the response. Each live storefront sale needs its own reference.
Handle a timeout or a shipment update
If confirmation gets interrupted, look up the sale with GET /orders?reference=…. For a retry within the 24-hour idempotency window, resend the exact saved body and key. Running the whole example again starts a separate test sale. Use the saved demo JSON for a retry.
Subscribe your store to order.shipped. Verify each webhook signature and record its event ID before sending a customer email, so a replay only triggers one notification. See webhook setup and signature verification and the API retry rules.