Guides
Test mode
Build and test order flows with test orders that never charge, print, ship or notify anyone, and simulate payment, proofs and shipping.
Add "test": true when you create an order and you get a test order. Test orders work on every order endpoint, but nothing real happens. Use them to build an agent, write integration tests and demo the flow.
What's different
| Test order | Live order | |
|---|---|---|
| Created with | "test": true | "test": false or omitted |
mode | "test" | "live" |
| Order id | bbo_test_... | bbo_... |
| Order key | bbk_ | bbk_ |
email | optional | required |
| Shopify | nothing created | a real draft order and invoice |
pay_url | https://; opening it records a test payment | real Shopify checkout |
| Two-step upload URL | accepts and discards the bytes | stores the file |
| Printing, shipping | never | yes |
| Banner & Booth staff notified | never | yes |
Webhooks to notify_url | yes, signed | yes, signed |
POST / | yes | 409 conflict |
| Create rate limit | 100 per hour per IP | 10 per hour per IP |
Everything else is the same: validation, prices, discounts, shipping amounts, deadlines, order edits (PATCH), artwork uploads and preflight, logos and design briefs, automatic previews, proof approval, reorders (a reorder of a test order is also a test order), events and errors. A request that fails on a live order fails the same way on a test order.
Create a test order
curl -s https://api.bannerandbooth.com/v1/orders \
-H "Content-Type: application/json" \
-d '{"items":[{"sku":"BB-TT-6FIT","quantity":2},{"sku":"BB-ACC-WT4","quantity":1}],"test":true}' \
| jq '{id, mode, status, total, artwork, next: [.next_actions[] | {action, sku}]}'{
"id": "bbo_test_2k7xquzbii",
"mode": "test",
"status": "awaiting_payment",
"total": 340.97,
"artwork": { "status": "needed", "needed_for": ["BB-TT-6FIT"], "files": [] },
"next": [
{ "action": "pay", "sku": null },
{ "action": "upload_artwork", "sku": "BB-TT-6FIT" }
]
}BB-ACC-WT4 (canopy weights) is blank hardware, so only the throws need artwork.
Simulate events
POST / with an event moves a test order as if that happened in the real world. It returns the updated order object.
event | Simulates | Order afterward | Webhook |
|---|---|---|---|
paid | The buyer paying | payment., order_number like #TE82T, pay_url: null | order.paid |
proof_ready | Prepress sending a proof | One kind: "human" proof per SKU that needs artwork, status: "pending", note "Simulated prepress proof (test mode)." Pending previews for those SKUs become superseded. Works even before artwork is uploaded. | proof.ready |
in_production | Printing starting | status: "in_ | order. |
shipped | Handing to the carrier | status: "shipped", tracking UPS 1ZTEST0000000000 | order.shipped |
delivered | Delivery | status: "delivered" | order.delivered |
Events aren't checked for order: you can simulate shipped on an unpaid order. Send them in lifecycle order (artwork, proof_ready, approve, paid, in_production, shipped, delivered) so your agent sees realistic states. Opening the test pay_url in a browser does the same as paid.
curl -s -X POST "https://api.bannerandbooth.com/v1/orders/$BB_ORDER_ID/simulate" \
-H "Authorization: Bearer $BB_ORDER_KEY" -H "Content-Type: application/json" \
-d '{"event":"paid"}' | jq '{status, payment: .payment.status, order_number}'import os, requests
API = "https://api.bannerandbooth.com"
auth = {"Authorization": f"Bearer {os.environ['BB_ORDER_KEY']}"}
def simulate(event):
r = requests.post(f"{API}/v1/orders/{os.environ['BB_ORDER_ID']}/simulate",
headers=auth, json={"event": event}, timeout=30)
r.raise_for_status()
return r.json()
print(simulate("paid")["status"])const API = "https://api.bannerandbooth.com";
const { BB_ORDER_ID, BB_ORDER_KEY } = process.env;
async function simulate(event) {
const r = await fetch(`${API}/v1/orders/${BB_ORDER_ID}/simulate`, {
method: "POST",
headers: { Authorization: `Bearer ${BB_ORDER_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ event }),
});
if (!r.ok) throw new Error(JSON.stringify(await r.json()));
return r.json();
}
console.log((await simulate("paid")).status);CLI:
npx -y bannerbooth@latest order simulate bbo_test_2k7xquzbii paidMCP: the simulate_ tool with order_id, order_key and event.
A full test run
This script exercises every step an agent will hit in production. Save it as test_order.sh and run bash test_. It needs curl and jq.
#!/usr/bin/env bash
set -euo pipefail
API=https://api.bannerandbooth.com
order=$(curl -sf "$API/v1/orders" -H "Content-Type: application/json" \
-H "Idempotency-Key: test-run-$(date +%s)" \
-d '{"items":[{"sku":"BB-RB-33STD","quantity":1}],"show":{"name":"Test Expo","date":"2027-03-10","venue":"Javits"},"test":true}')
ID=$(echo "$order" | jq -r .id); KEY=$(echo "$order" | jq -r .order_key)
auth=(-H "Authorization: Bearer $KEY")
echo "created $ID: $(echo "$order" | jq -r .status), deadline $(echo "$order" | jq -r .deadline.status)"
printf '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 335 860"><rect width="335" height="860" fill="#c2411f"/></svg>' > banner.svg
curl -sf -T banner.svg "${auth[@]}" "$API/v1/orders/$ID/artwork?sku=BB-RB-33STD&filename=banner.svg" \
| jq -r '"artwork: " + .order.artwork.status + ", proof: " + .order.proof.status'
sim() { curl -sf -X POST "$API/v1/orders/$ID/simulate" "${auth[@]}" -H "Content-Type: application/json" -d "{\"event\":\"$1\"}"; }
sim proof_ready | jq -r '"after proof_ready: " + .proof.status'
curl -sf -X POST "$API/v1/orders/$ID/proofs/latest/approve" "${auth[@]}" -H "Content-Type: application/json" \
-d '{"approved_by":"Test Runner"}' | jq -r '"after approve: " + .proof.status'
for e in paid in_production shipped delivered; do
sim "$e" | jq -r --arg e "$e" '"after \($e): " + .status'
done
curl -sf "$API/v1/orders/$ID/events" "${auth[@]}" | jq -r '.events[] | "\(.at) \(.type)"'Output:
created bbo_test_cndrcmpigk: awaiting_payment, deadline GREEN
artwork: received, proof: preview_ready
after proof_ready: proof_ready
after approve: approved
after paid: approved
after in_production: in_production
after shipped: shipped
after delivered: delivered
2026-12-01T03:59:02Z order.created
2026-12-01T03:59:03Z artwork.received
2026-12-01T03:59:03Z proof.ready
2026-12-01T03:59:04Z proof.approved
2026-12-01T03:59:04Z order.paid
2026-12-01T03:59:04Z order.in_production
2026-12-01T03:59:04Z order.shipped
2026-12-01T03:59:05Z order.deliveredTesting webhooks
Set notify_url on a test order to an https URL you control. Uploads, proofs, approvals and simulated events send real, signed webhooks, so you can test your receiver end to end. For local development, expose your receiver with an HTTPS tunnel. See Webhooks.
Testing failures
Test orders return the same errors as live ones. Cases worth covering:
| Send | Expect |
|---|---|
"items": [ | 422 unknown_sku |
"shipping_ | 422 unsupported_ |
"zip": "787" in the address | 400 invalid_ |
No Authorization header on GET / | 401 unauthorized |
Same Idempotency-Key, different body | 409 conflict |
Upload with sku not on the order | 422 unknown_sku |
Upload note.txt | 400 invalid_ (unsupported file type) |
approve on latest with no pending proof | 404 not_found |
simulate with "event": "teleport" | 400 invalid_ |
cancel after simulate paid | 409 conflict |
PATCH after simulate paid | 409 conflict |
PATCH with {} | 400 invalid_ ("Nothing to change.") |
Upload after simulate in_ | 409 conflict |
Design brief with only a sku | 400 invalid_ |
Going live
Remove "test": true, add the buyer's email and a shipping address, and confirm the order with the buyer first. See Quickstart: switch to live.