Skip to main content

1. Start in Test Mode

Create an isolated anonymous session with no signup or copied API key:
The token is a short-lived secret. The Batch Relay CLI performs this bootstrap and secure local storage automatically when its first stateful command runs. For durable CI or account-owned sandbox records, create a key with print_orders:write and print_orders:read in the developer dashboard. Test API keys use the br_test_ prefix. Live API keys use br_. Send both to https://api.batchrelay.com. The durable credential record selects Test Mode or Live Mode after authentication; a request field cannot change it. See Keyless Test Mode for the raw HTTP session flow.

2. Inspect provider offers

Use a provider-neutral prepared order. The image is already prepared in its required orientation. This sample uses print-5x7, whose template_requirement is optional. You may submit prepared artwork directly or use a render first. Designed products require a succeeded Batch Relay render. Do not send a legacy composite product as a fulfillment line. Read the product’s provider offers before you create an order quote:
Offers show the exact unit cost, provider, availability, and pricing revision for a canonical product configuration. They are discovery data, not a full order price. Each print-order asset accepts exactly one of url or asset_id. Quote creation copies a URL into managed storage; an existing asset_id is reused in place.

3. Create a quote

Send the order inside the required quote wrapper to POST /v1/print-orders/quote. Choose studio_default or explicitly choose one provider. The selected provider must fulfill every line. Batch Relay never silently switches to another provider. If the preferred provider cannot fulfill the order, use the structured failure to choose another provider and create a new quote. The quote freezes selected offers, shipping, tax, the API access fee, total, and relevant revisions for 15 minutes. Save its ID. The source URL can disappear after the quote succeeds without breaking the accepted order. The request body has this shape. Use the generated API reference for the full order schema:
The 201 response includes expires_at, the resolved provider, a complete price object, and provider_offer_lines. Each offer line records the exact offer, unit cost, quantity, and line subtotal frozen for that order line.

4. Submit the frozen quote

Submission requires the server-created quote ID and an Idempotency-Key. It cannot change the provider or any frozen price at quote time. If the quote has expired, create a new quote rather than recalculating a total locally. See the canonical OpenAPI document for the complete request and response schemas.