Skip to content

Quickstart

Open the developer dashboard and create an individual API account:

https://app.batchrelay.com/developers

For local development:

http://localhost:3000/developers

Create a key with:

  • print_orders:write
  • print_orders:read

Copy the key immediately. Batch Relay stores only a hash, prefix, and masked display value.

Terminal window
curl -i -X POST "http://localhost:3000/v1/print-orders" \
-H "Authorization: Bearer br_your_key" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: test-order-001" \
-d '{
"environment": "sandbox",
"externalOrderId": "test-order-001",
"items": [
{
"product": "photo-print-5x7",
"quantity": 1,
"image": {
"url": "https://images.batchrelay.com/team-5x7.jpg"
}
}
],
"shipTo": {
"name": "Test Customer",
"addr1": "1337 Williams Street",
"city": "Spokane",
"state": "WA",
"zip": "99201",
"country": "US"
}
}'

Successful responses use a stable envelope:

{
"data": {
"environment": "sandbox",
"id": "mn7...",
"status": "created"
},
"environment": "sandbox",
"request_id": "req..."
}

To exercise the billing gate without touching production fulfillment:

{
"environment": "sandbox",
"billing": {
"required": true
}
}

If billing is inactive, the API returns 402 billing_required.