# API-account activation and sandbox claims Source: https://docs.batchrelay.com/activation Current OpenAPI routes, implementation boundaries, and runtime prerequisites. > The checked-in Go OpenAPI and public `batchrelay` CLI define the management > routes and commands below. This is source-contract and CLI-help evidence, not > proof that a deployed API has its management session, Clerk verification, > Convex activation adapter, or Stripe configuration enabled. API keys remain the credential for product operations. The OpenAPI management routes require a `managementSession`, and the CLI provides the public browser entry point: ```bash theme={null} batchrelay auth login batchrelay auth status batchrelay auth logout ``` Never put management tokens, anonymous session tokens, claim codes, or Stripe setup URLs in profile JSON, diagnostics, or command output. ## Claim sandbox work An anonymous Test Mode bearer session creates a one-time claim code, then an authorized management session submits that code to its chosen account. The source code's OpenAPI contract is: ```text theme={null} POST /v1/anonymous-sessions/current/claim-codes POST /v1/api-accounts/{account_id}/sandbox-claim ``` The first route requires the anonymous bearer token and an idempotency key; it returns a write-only `code` and `expires_at`. The second requires a management session, an idempotency key, and `{ "claim_code": "..." }`. It returns the account record, not the code. The local Convex activation module has a durable, single-use claim design for eligible Test workspace manifests, form drafts, catalog drafts, and studio grants. It expressly excludes sandbox orders, provider submissions, API keys, billing records, and credentials. The Go-to-Convex runtime adapter still must be configured and deployed before this is an available customer workflow. Retries for the same destination are designed to be idempotent; a redemption for another destination must fail. The CLI commands use explicit account IDs, stable idempotency keys, and JSON request primitives. `sandbox claim-code` reads the saved anonymous session; `sandbox claim` uses the signed-in management session. ```bash theme={null} batchrelay sandbox claim-code --idempotency-key claim-code-20260829 batchrelay sandbox claim acct_example \ --file claim.json --idempotency-key claim-20260829 ``` `claim.json` contains the OpenAPI `SandboxClaimRequest`, for example `{ "claim_code": "..." }`. The CLI deliberately does not print a second credential as a convenience argument. ## OpenAPI management routes ```text theme={null} GET /v1/api-accounts POST /v1/api-accounts GET /v1/api-accounts/{account_id} GET /v1/api-accounts/{account_id}/activation POST /v1/api-accounts/{account_id}/agreements/{agreement_id}/accept POST /v1/api-accounts/{account_id}/billing/setup-sessions POST /v1/api-accounts/{account_id}/activate ``` `POST /v1/api-accounts` accepts `owner_type` (`individual` or `studio`) and a `studio_id` only for a studio owner. Agreement acceptance accepts `{ "version": "..." }`. Billing setup starts a Stripe-hosted setup session; Batch Relay does not accept card data. The matching CLI uses generic, file-backed request primitives rather than inventing a parallel flag surface: ```bash theme={null} batchrelay accounts create --file account.json batchrelay accounts get acct_example batchrelay accounts list batchrelay accounts activation status acct_example batchrelay accounts activation accept acct_example terms \ --file agreement.json --idempotency-key terms-20260829 batchrelay accounts billing setup acct_example --file billing-setup.json batchrelay accounts activation activate acct_example \ --idempotency-key activation-20260829 ``` `account.json` is `CreateAPIAccountRequest` (`owner_type`, and `studio_id` for a studio account); `agreement.json` is `AgreementAcceptance` (`version`). Use `batchrelay --help` for the currently pinned command syntax. The current OpenAPI `APIAccountActivation` response contains `account_id`, `status`, `agreements_current`, and `billing_ready`. It does **not** yet expose the Convex module's detailed `missing_steps` list, nor does it define a `live_activation_required` error. Do not build a client dependency on either until the Go adapter, OpenAPI, and deployed API are updated together. The local activation boundary records versioned policy ID/document-hash acceptance with server time and actor, and requires current agreements, active billing/default payment method, account readiness, and studio readiness before switching the default environment to Live. The server-side Clerk OAuth verifier and Stripe billing activation are still fail-closed/not deployed: the presence of CLI commands or OpenAPI operations does not make a management token, payment-method setup, or Live activation available. Those remain trusted Go service boundaries, not Convex work. # Create a one-time anonymous session claim code Source: https://docs.batchrelay.com/api-reference/anonymous-sessions/create-a-one-time-anonymous-session-claim-code https://api.batchrelay.com/openapi.json post /v1/anonymous-sessions/current/claim-codes # Accept a versioned agreement Source: https://docs.batchrelay.com/api-reference/api-accounts/accept-a-versioned-agreement https://api.batchrelay.com/openapi.json post /v1/api-accounts/{account_id}/agreements/{agreement_id}/accept # Activate an API account Source: https://docs.batchrelay.com/api-reference/api-accounts/activate-an-api-account https://api.batchrelay.com/openapi.json post /v1/api-accounts/{account_id}/activate # Claim an account sandbox Source: https://docs.batchrelay.com/api-reference/api-accounts/claim-an-account-sandbox https://api.batchrelay.com/openapi.json post /v1/api-accounts/{account_id}/sandbox-claim # Create an individual or studio-owned API account Source: https://docs.batchrelay.com/api-reference/api-accounts/create-an-individual-or-studio-owned-api-account https://api.batchrelay.com/openapi.json post /v1/api-accounts A verified individual may create their own individual account. A studio account is created only after server-side studio owner/admin authorization. # Get an authorized API account Source: https://docs.batchrelay.com/api-reference/api-accounts/get-an-authorized-api-account https://api.batchrelay.com/openapi.json get /v1/api-accounts/{account_id} # Get API account activation status Source: https://docs.batchrelay.com/api-reference/api-accounts/get-api-account-activation-status https://api.batchrelay.com/openapi.json get /v1/api-accounts/{account_id}/activation # Get API account usage and spend summary Source: https://docs.batchrelay.com/api-reference/api-accounts/get-api-account-usage-and-spend-summary https://api.batchrelay.com/openapi.json get /v1/usage # List authorized API accounts Source: https://docs.batchrelay.com/api-reference/api-accounts/list-authorized-api-accounts https://api.batchrelay.com/openapi.json get /v1/api-accounts # Start hosted payment-method setup Source: https://docs.batchrelay.com/api-reference/api-accounts/start-hosted-payment-method-setup https://api.batchrelay.com/openapi.json post /v1/api-accounts/{account_id}/billing/setup-sessions Creates a server-side Stripe-hosted setup session for an authorized account. No card data is accepted by Batch Relay. A completed browser redirect does not activate billing; the verified Stripe webhook does. # Create a remote API key Source: https://docs.batchrelay.com/api-reference/api-keys/create-a-remote-api-key https://api.batchrelay.com/openapi.json post /v1/api-accounts/{account_id}/keys # List remote API keys Source: https://docs.batchrelay.com/api-reference/api-keys/list-remote-api-keys https://api.batchrelay.com/openapi.json get /v1/api-accounts/{account_id}/keys # Revoke a remote API key Source: https://docs.batchrelay.com/api-reference/api-keys/revoke-a-remote-api-key https://api.batchrelay.com/openapi.json post /v1/api-accounts/{account_id}/keys/{key_id}/revoke # Rotate a remote API key Source: https://docs.batchrelay.com/api-reference/api-keys/rotate-a-remote-api-key https://api.batchrelay.com/openapi.json post /v1/api-accounts/{account_id}/keys/{key_id}/rotate # Cancel an asset session Source: https://docs.batchrelay.com/api-reference/asset-sessions/cancel-an-asset-session https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/asset-sessions/{session_id}/cancel # Create an asset session Source: https://docs.batchrelay.com/api-reference/asset-sessions/create-an-asset-session https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/asset-sessions # Finalize an asset session Source: https://docs.batchrelay.com/api-reference/asset-sessions/finalize-an-asset-session https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/asset-sessions/{session_id}/finalize # Get an asset session Source: https://docs.batchrelay.com/api-reference/asset-sessions/get-an-asset-session https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/asset-sessions/{session_id} # Upload a session asset Source: https://docs.batchrelay.com/api-reference/asset-sessions/upload-a-session-asset https://api.batchrelay.com/openapi.json put /v1/studios/{studio_id}/asset-sessions/{session_id}/assets/{asset_id} # List studio-scoped managed assets Source: https://docs.batchrelay.com/api-reference/assets/list-studio-scoped-managed-assets https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/assets Lists only managed assets bound to the selected studio and current credential lane. It requires studio_assets:read plus an exact studio grant or studio ownership. # Create an isolated Test Mode session Source: https://docs.batchrelay.com/api-reference/authentication/create-an-isolated-test-mode-session https://api.batchrelay.com/openapi.json post /v1/anonymous-sessions Creates a short-lived anonymous Test Mode bearer session for evaluation. The session is isolated from every other session and cannot access Live Mode, billing, studios, or events. Calls must use the public API host so the edge can apply abuse controls. # Get safe API-key or dashboard authentication context Source: https://docs.batchrelay.com/api-reference/authentication/get-safe-api-key-or-dashboard-authentication-context https://api.batchrelay.com/openapi.json get /v1/auth/status # Get a published browser-preview package Source: https://docs.batchrelay.com/api-reference/browser-previews/get-a-published-browser-preview-package https://api.batchrelay.com/openapi.json get /v1/templates/{template_id}/outputs/{output_id}/browser-preview Requires a studio-owned API account and templates:read. During the compatibility period, print_orders:read is also accepted. Only a published or superseded immutable revision may be resolved; draft editor revisions are unavailable. The package is the output-scoped visual node discovery surface: browser_document contains the published browser nodes and placement data, while input_slots provides authoritative surface/variant/node_id to render slot_key mappings for image nodes. Browser documents and decorative assets are constrained to one published output; assets use same-origin content URLs and never expose storage locators. This visual proof package is not a fulfillment contract and its preview artifacts cannot be submitted for fulfillment. # Get browser-preview proof status Source: https://docs.batchrelay.com/api-reference/browser-previews/get-browser-preview-proof-status https://api.batchrelay.com/openapi.json get /v1/browser-previews/{render_id} # Queue a short-lived browser proof render Source: https://docs.batchrelay.com/api-reference/browser-previews/queue-a-short-lived-browser-proof-render https://api.batchrelay.com/openapi.json post /v1/templates/{template_id}/outputs/{output_id}/browser-preview Requires a studio-owned API account and template_previews:write. During the compatibility period, print_orders:write is also accepted. Image inputs must be authorized immutable asset IDs; local pan and zoom are checkpointed into a managed crop asset before this request. The fixed 96-DPI JPEG profile is preview-only and never fulfillment artwork. # Stream a short-lived browser-preview artifact Source: https://docs.batchrelay.com/api-reference/browser-previews/stream-a-short-lived-browser-preview-artifact https://api.batchrelay.com/openapi.json get /v1/browser-previews/{render_id}/artifacts/{artifact_id}/content # Stream an authorized browser-preview source asset Source: https://docs.batchrelay.com/api-reference/browser-previews/stream-an-authorized-browser-preview-source-asset https://api.batchrelay.com/openapi.json get /v1/templates/{template_id}/outputs/{output_id}/browser-preview/assets/{asset_ref}/content # Get a semantic field definition Source: https://docs.batchrelay.com/api-reference/catalog/get-a-semantic-field-definition https://api.batchrelay.com/openapi.json get /v1/catalog/semantic-fields/{semantic_key} # Get one active product Source: https://docs.batchrelay.com/api-reference/catalog/get-one-active-product https://api.batchrelay.com/openapi.json get /v1/catalog/products/{product_id} Returns active products and their approved shared provider offers for this deployment environment. Deprecated product IDs return product_not_found. # List active products Source: https://docs.batchrelay.com/api-reference/catalog/list-active-products https://api.batchrelay.com/openapi.json get /v1/catalog/products Lists active immutable products plus a discovery-only family view. Provider offers are projected from the approved shared pricebook for this deployment environment. Orders and quotes always use the concrete product ID and revision. Deprecated catalog records remain available only to trusted historical decoding and are not publicly discoverable. # List exact published provider offers Source: https://docs.batchrelay.com/api-reference/catalog/list-exact-published-provider-offers https://api.batchrelay.com/openapi.json get /v1/catalog/products/{product_id}/offers Returns canonical provider-neutral discovery offers from the approved shared pricebook for this deployment environment. Unknown or unavailable offers are intentionally unpriced. Fulfillment constraints are discovery data, not a provider submission guarantee. Provider-native SKU and UID values are never exposed. # List semantic field definitions Source: https://docs.batchrelay.com/api-reference/catalog/list-semantic-field-definitions https://api.batchrelay.com/openapi.json get /v1/catalog/semantic-fields # List V1 automation shipping services Source: https://docs.batchrelay.com/api-reference/catalog/list-v1-automation-shipping-services https://api.batchrelay.com/openapi.json get /v1/catalog/shipping-services Zapier-safe public discovery metadata for currently supported automation choices. Base amounts and eligibility are schedule guidance only: the exact quote may be higher or the service may be unavailable. Quote the complete order to determine its final available service and charge. One-day service values remain accepted by order endpoints but are intentionally not published until generally supported. # Create a studio-scoped guest checkout link Source: https://docs.batchrelay.com/api-reference/checkout-links/create-a-studio-scoped-guest-checkout-link https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/checkout-links Requires checkout_links:write and print_orders:write plus access to the explicit studio. Anonymous sessions cannot use this management lane. The credential persists the sandbox or production checkout lane: a br_test_ key creates an explicitly sandboxed, non-payable link with preview_status=non_payable and no URL; an explicitly production link is payable, subject to normal guest-checkout policy and payment readiness. A historical missing-lane staff or guardian link remains compatibility-payable only when it has no machine API-key provenance. A missing-lane machine link fails closed. Live creation returns share_url only for the first successful create response. Reusing an idempotency key with a different request fingerprint returns checkout_link_conflict. # Get a studio-scoped checkout link Source: https://docs.batchrelay.com/api-reference/checkout-links/get-a-studio-scoped-checkout-link https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/checkout-links/{link_id} Requires checkout_links:read and print_orders:read plus access to the explicit studio. The response never returns the checkout token, recipient identity, or payment-provider data. # Get checkout payment status Source: https://docs.batchrelay.com/api-reference/checkout-links/get-checkout-payment-status https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/checkout-links/{link_id}/status # List studio checkout links Source: https://docs.batchrelay.com/api-reference/checkout-links/list-studio-checkout-links https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/checkout-links # Prepare a payable checkout URL Source: https://docs.batchrelay.com/api-reference/checkout-links/prepare-a-payable-checkout-url https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/checkout-links/{link_id}/prepare Requires checkout_links:write, offers:apply, print_orders:write, and Idempotency-Key. The authoritative checkout owner resolves catalog totals and the selected offer, reserves the offer, and creates the Stripe Checkout Session. A Test Mode key remains non-payable and never receives a URL. # Recover a prepared checkout URL Source: https://docs.batchrelay.com/api-reference/checkout-links/recover-a-prepared-checkout-url https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/checkout-links/{link_id}/recover Requires checkout_links:write, offers:apply, print_orders:write, and the same Idempotency-Key used for preparation. The server returns an existing authoritative Live Mode URL or an explicit non-payable Test Mode result. # Revoke a studio-scoped checkout link Source: https://docs.batchrelay.com/api-reference/checkout-links/revoke-a-studio-scoped-checkout-link https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/checkout-links/{link_id}/revoke Requires checkout_links:write and print_orders:write plus access to the explicit studio. Only a currently revocable link can transition; revocation never creates or returns a replacement token. # Check a private upload link Source: https://docs.batchrelay.com/api-reference/consumer-printing/check-a-private-upload-link https://api.batchrelay.com/openapi.json get /v1/consumer/uploads Private guest photo workflow. Session and image ownership, expiration and lane are enforced. All responses are no-store and no-referrer. # Create a private single-use browser upload link Source: https://docs.batchrelay.com/api-reference/consumer-printing/create-a-private-single-use-browser-upload-link https://api.batchrelay.com/openapi.json post /v1/consumer/sessions/{session_id}/upload-links Private guest photo workflow. Session and image ownership, expiration and lane are enforced. All responses are no-store and no-referrer. # Create a separate guest print session Source: https://docs.batchrelay.com/api-reference/consumer-printing/create-a-separate-guest-print-session https://api.batchrelay.com/openapi.json post /v1/consumer/sessions Create a guest capability with server-verified caller attribution and admission budgets. Tokens are returned once. Browser handoff uses a single-use code and rotates the session token. All responses are no-store and no-referrer. Shipping supports all 50 U.S. states and DC; Alaska and Hawaii require Expedited. Territories are unsupported. # Create a single-use 30-minute browser handoff Source: https://docs.batchrelay.com/api-reference/consumer-printing/create-a-single-use-30-minute-browser-handoff https://api.batchrelay.com/openapi.json post /v1/consumer/sessions/{session_id}/handoffs All responses are no-store and no-referrer. Shipping supports all 50 U.S. states and DC; Alaska and Hawaii require Expedited. Territories are unsupported. # Create or reuse a hosted Checkout from an owned frozen quote Source: https://docs.batchrelay.com/api-reference/consumer-printing/create-or-reuse-a-hosted-checkout-from-an-owned-frozen-quote https://api.batchrelay.com/openapi.json post /v1/consumer/sessions/{session_id}/checkout Stable idempotency; return origin configured server-side. Paid fulfillment begins only after signed event amount/currency/livemode/session/ownership checks and durable tax accounting. Responses are no-store. Caller prices, provider identifiers and payment methods are never accepted. All responses are no-store and no-referrer. Shipping supports all 50 U.S. states and DC; Alaska and Hawaii require Expedited. Territories are unsupported. # Exchange a single-use handoff and rotate the session token Source: https://docs.batchrelay.com/api-reference/consumer-printing/exchange-a-single-use-handoff-and-rotate-the-session-token https://api.batchrelay.com/openapi.json post /v1/consumer/handoffs/exchange All responses are no-store and no-referrer. Shipping supports all 50 U.S. states and DC; Alaska and Hawaii require Expedited. Territories are unsupported. # Freeze cart, recipient, retail price, authoritative shipping and tax Source: https://docs.batchrelay.com/api-reference/consumer-printing/freeze-cart-recipient-retail-price-authoritative-shipping-and-tax https://api.batchrelay.com/openapi.json post /v1/consumer/sessions/{session_id}/quotes Responses are no-store. Caller prices, provider identifiers and payment methods are never accepted. All responses are no-store and no-referrer. Shipping supports all 50 U.S. states and DC; Alaska and Hawaii require Expedited. Territories are unsupported. # Import a public HTTPS image into owned managed artwork Source: https://docs.batchrelay.com/api-reference/consumer-printing/import-a-public-https-image-into-owned-managed-artwork https://api.batchrelay.com/openapi.json post /v1/consumer/sessions/{session_id}/assets Public HTTPS hosts only; private networks and unsafe redirects rejected. Full decode, 16MiB and25MP bounds. Responses are no-store. Caller prices, provider identifiers and payment methods are never accepted. All responses are no-store and no-referrer. Shipping supports all 50 U.S. states and DC; Alaska and Hawaii require Expedited. Territories are unsupported. # List privately owned uploaded photos Source: https://docs.batchrelay.com/api-reference/consumer-printing/list-privately-owned-uploaded-photos https://api.batchrelay.com/openapi.json get /v1/consumer/sessions/{session_id}/photos Private guest photo workflow. Session and image ownership, expiration and lane are enforced. All responses are no-store and no-referrer. # List published consumer listings, retail prices and caller-aware availability Source: https://docs.batchrelay.com/api-reference/consumer-printing/list-published-consumer-listings-retail-prices-and-caller-aware-availability https://api.batchrelay.com/openapi.json get /v1/consumer/catalog Responses are no-store. Caller prices, provider identifiers and payment methods are never accepted. All responses are no-store and no-referrer. Shipping supports all 50 U.S. states and DC; Alaska and Hawaii require Expedited. Territories are unsupported. # Pay a frozen quote with a shared payment token Source: https://docs.batchrelay.com/api-reference/consumer-printing/pay-a-frozen-quote-with-a-shared-payment-token https://api.batchrelay.com/openapi.json post /v1/consumer/purchases All responses are no-store and no-referrer. Shipping supports all 50 U.S. states and DC; Alaska and Hawaii require Expedited. Territories are unsupported. # Privately ingest an authorized host file Source: https://docs.batchrelay.com/api-reference/consumer-printing/privately-ingest-an-authorized-host-file https://api.batchrelay.com/openapi.json post /v1/consumer/sessions/{session_id}/host-files Private guest photo workflow. Session and image ownership, expiration and lane are enforced. All responses are no-store and no-referrer. # Read an owned artwork preview without public storage capabilities Source: https://docs.batchrelay.com/api-reference/consumer-printing/read-an-owned-artwork-preview-without-public-storage-capabilities https://api.batchrelay.com/openapi.json get /v1/consumer/sessions/{session_id}/assets/{asset_id}/preview Authenticated image bytes, no-store. Returns metadata-stripped JPEG scaled to1000px from the immutable artwork. All responses are no-store and no-referrer. Shipping supports all 50 U.S. states and DC; Alaska and Hawaii require Expedited. Territories are unsupported. # Read an owned order status and valid pending checkout resume link Source: https://docs.batchrelay.com/api-reference/consumer-printing/read-an-owned-order-status-and-valid-pending-checkout-resume-link https://api.batchrelay.com/openapi.json get /v1/consumer/sessions/{session_id}/orders/{order_id} Responses are no-store. Caller prices, provider identifiers and payment methods are never accepted. All responses are no-store and no-referrer. Shipping supports all 50 U.S. states and DC; Alaska and Hawaii require Expedited. Territories are unsupported. # Read the exact immutable quote binding Source: https://docs.batchrelay.com/api-reference/consumer-printing/read-the-exact-immutable-quote-binding https://api.batchrelay.com/openapi.json get /v1/consumer/sessions/{session_id}/quotes/{quote_id} Private guest photo workflow. Session and image ownership, expiration and lane are enforced. All responses are no-store and no-referrer. # Read the exact owned guest session Source: https://docs.batchrelay.com/api-reference/consumer-printing/read-the-exact-owned-guest-session https://api.batchrelay.com/openapi.json get /v1/consumer/sessions/{session_id} Responses are no-store. Caller prices, provider identifiers and payment methods are never accepted. All responses are no-store and no-referrer. Shipping supports all 50 U.S. states and DC; Alaska and Hawaii require Expedited. Territories are unsupported. # Render a crop and advance its authoritative preview generation Source: https://docs.batchrelay.com/api-reference/consumer-printing/render-a-crop-and-advance-its-authoritative-preview-generation https://api.batchrelay.com/openapi.json post /v1/consumer/sessions/{session_id}/assets/{asset_id}/crops Private guest photo workflow. Session and image ownership, expiration and lane are enforced. All responses are no-store and no-referrer. # Replace a guest cart using owned artwork Source: https://docs.batchrelay.com/api-reference/consumer-printing/replace-a-guest-cart-using-owned-artwork https://api.batchrelay.com/openapi.json put /v1/consumer/sessions/{session_id}/cart Total quantity1..100. Artwork must be fully decoded and exactly5:7 or4:5 with rotation allowed. Responses are no-store. Caller prices, provider identifiers and payment methods are never accepted. All responses are no-store and no-referrer. Shipping supports all 50 U.S. states and DC; Alaska and Hawaii require Expedited. Territories are unsupported. # Upload image bytes using a private single-use link Source: https://docs.batchrelay.com/api-reference/consumer-printing/upload-image-bytes-using-a-private-single-use-link https://api.batchrelay.com/openapi.json put /v1/consumer/uploads Private guest photo workflow. Session and image ownership, expiration and lane are enforced. All responses are no-store and no-referrer. # Upload local prepared image bytes Source: https://docs.batchrelay.com/api-reference/consumer-printing/upload-local-prepared-image-bytes https://api.batchrelay.com/openapi.json put /v1/consumer/sessions/{session_id}/assets Full-decode JPEG/PNG/TIFF/WebP; at most16MiB and25MP. Exact prepared crop ratio validated before checkout; rotation allowed, no automatic crop. Responses are no-store. Caller prices, provider identifiers and payment methods are never accepted. All responses are no-store and no-referrer. Shipping supports all 50 U.S. states and DC; Alaska and Hawaii require Expedited. Territories are unsupported. # Get explicitly authorized purchaser context for a studio order event Source: https://docs.batchrelay.com/api-reference/event-context/get-explicitly-authorized-purchaser-context-for-a-studio-order-event https://api.batchrelay.com/openapi.json get /v1/event-records/{event_id}/buyer Requires a studio-owned API key with events.orders.buyer.read, a current studio grant, and explicit buyer-context access enabled on the active event integration for the same environment. Tenant and environment come from the API key and stored event; neither can be selected by the request. Supports storefront order and completed-checkout events. Returns purchaser name and email, never child details, shipping recipient, phone, or address. Contacts may be null or redacted. Anonymous sessions are not supported. Responses are Cache-Control: no-store. # Apply one reviewed bulk athlete team change Source: https://docs.batchrelay.com/api-reference/event-team-changes/apply-one-reviewed-bulk-athlete-team-change https://api.batchrelay.com/openapi.json post /v1/event-team-changes/apply Requires an active studio-owned API account with the event_teams:write scope. Submit only the confirmation returned by prepare plus a stable command_id. Convex atomically rechecks the confirmation fingerprint and current roster. A stale or already-invalid confirmation returns 409; clients must prepare a new review rather than retrying it. # Prepare a studio-owned bulk athlete team change Source: https://docs.batchrelay.com/api-reference/event-team-changes/prepare-a-studio-owned-bulk-athlete-team-change https://api.batchrelay.com/openapi.json post /v1/event-team-changes/prepare Requires an active studio-owned API account with the event_teams:write scope. The server derives the studio from the API key and rechecks event/team ownership in Convex. Prepare returns an opaque, short-lived confirmation bound to the reviewed roster; it does not apply membership changes. # Cancel an event image import Source: https://docs.batchrelay.com/api-reference/image-imports/cancel-an-event-image-import https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/events/{event_id}/image-imports/{import_id}/cancel # Commit an event image import Source: https://docs.batchrelay.com/api-reference/image-imports/commit-an-event-image-import https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/events/{event_id}/image-imports/{import_id}/commit # Create an event image import Source: https://docs.batchrelay.com/api-reference/image-imports/create-an-event-image-import https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/events/{event_id}/image-imports # Get an event image import Source: https://docs.batchrelay.com/api-reference/image-imports/get-an-event-image-import https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/events/{event_id}/image-imports/{import_id} # Review an event image import Source: https://docs.batchrelay.com/api-reference/image-imports/review-an-event-image-import https://api.batchrelay.com/openapi.json patch /v1/studios/{studio_id}/events/{event_id}/image-imports/{import_id} # Copy one external image into Batch Relay-managed fulfillment storage Source: https://docs.batchrelay.com/api-reference/managed-assets/copy-one-external-image-into-batch-relay-managed-fulfillment-storage https://api.batchrelay.com/openapi.json post /v1/assets/ingest Requires print_orders:write and an Idempotency-Key up to 200 characters. Anonymous Test Mode sessions use a separate managed-ingest request limit, not byte metering. Supply exactly one source: an externally routable HTTPS url is downloaded with SSRF protections, content-validated, SHA-256-addressed, and written immutably to the fulfillment R2 scope; an asset_id is resolved as a ready unexpired same-account external asset or a finalized same-studio platform image and is never copied. Source URLs are not fulfillment URLs and are not retained in the managed asset record. # Create a server-calculated API order quote Source: https://docs.batchrelay.com/api-reference/print-orders/create-a-server-calculated-api-order-quote https://api.batchrelay.com/openapi.json post /v1/print-orders/quote Requires print_orders:write through an API key or anonymous Test Mode session and Idempotency-Key. The server derives the fulfillment lane from the credential. Price, tax, shipping, and platform fee are server-calculated and frozen for 15 minutes. Routing is explicit: studio_default never falls back, single_provider must fulfill every line, and best_available split fulfillment is currently unavailable until group-level durable failure handling is complete. Managed image metadata is authoritative. Exact button and paired trader-card artwork can omit dpi. Optional account/lane-gated preparation downsizes eligible direct artwork to 300 PPI before freezing the quote; it never crops, stretches, pads, or upscales. The original request still determines idempotency. No successful quote references a pending preparation. See artwork input preparation documentation for format, color, shape, and minimum-resolution requirements. # Get an account-scoped API print order Source: https://docs.batchrelay.com/api-reference/print-orders/get-an-account-scoped-api-print-order https://api.batchrelay.com/openapi.json get /v1/print-orders/{order_id} # List account-scoped API print orders Source: https://docs.batchrelay.com/api-reference/print-orders/list-account-scoped-api-print-orders https://api.batchrelay.com/openapi.json get /v1/print-orders # Submit a quoted API print order Source: https://docs.batchrelay.com/api-reference/print-orders/submit-a-quoted-api-print-order https://api.batchrelay.com/openapi.json post /v1/print-orders Requires a scoped API key or an anonymous Test Mode session and Idempotency-Key. Anonymous sessions always use sandbox, no-charge simulation. Live API keys retain billable production behavior. The quote is account/environment scoped and freezes exactly one resolved provider; submission cannot alter it or split a mixed-provider order. # Validate a non-authorizing prepared-media print order Source: https://docs.batchrelay.com/api-reference/print-orders/validate-a-non-authorizing-prepared-media-print-order https://api.batchrelay.com/openapi.json post /v1/print-orders/validate Accepts exactly one JSON object up to 2 MiB and rejects unknown fields. environment is used only for structural preflight and cannot quote, create, pay for, upload media for, or submit an order. Authenticated quote and submission routes derive their fulfillment lane from the API credential. Clients must fetch the catalog and use the selected product revision's asset requirements, text requirements, and options. This read-only preflight never downloads or transforms image sources; its result does not establish source-image readiness. Authoritative image inspection, DPI inference, and any enabled preparation happen during authenticated quote creation. # Apply one reviewed sandbox-to-Live promotion plan Source: https://docs.batchrelay.com/api-reference/sandbox-promotions/apply-one-reviewed-sandbox-to-live-promotion-plan https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/sandbox-promotions/{promotion_id}/apply Requires a production br_ API key with sandbox_promotions:apply, the exact studio grant, Idempotency-Key, and the reviewed plan version plus SHA-256. Content-Type must be application/json and the strict body limit is 32 KiB. Convex atomically rechecks current Live revisions and returns 409 if any conflict prevents the whole apply; a conflict never reports or implies partial success. A preparing or blocked plan cannot be applied. # Create an immutable sandbox-to-Live promotion plan Source: https://docs.batchrelay.com/api-reference/sandbox-promotions/create-an-immutable-sandbox-to-live-promotion-plan https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/sandbox-promotions Requires a production br_ API key with sandbox_promotions:read and the exact studio grant; br_test_ keys and anonymous Test Mode sessions are never allowed to plan or apply Live changes. Content-Type must be application/json and the strict body limit is 32 KiB. Select one or more sections. Creating a plan can start trusted internal copying of already-stored sandbox media into production storage. The API never accepts or returns bytes, storage IDs, object keys, or signed URLs; preparing means that internal media staging is not yet settled and gives no readiness guarantee. # Get a bounded sandbox-to-Live promotion plan Source: https://docs.batchrelay.com/api-reference/sandbox-promotions/get-a-bounded-sandbox-to-live-promotion-plan https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/sandbox-promotions/{promotion_id} Requires a production br_ API key with sandbox_promotions:read and the exact studio grant. Returns public resource mappings, user-visible before/after fields, bounded warnings and errors, and version fingerprints only; it excludes provider payloads, object keys, storage identifiers, secret material, signed URLs, prices tied to customer context, and raw source documents. # Roll back one applied sandbox-to-Live promotion Source: https://docs.batchrelay.com/api-reference/sandbox-promotions/roll-back-one-applied-sandbox-to-live-promotion https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/sandbox-promotions/{promotion_id}/rollback Requires a production br_ API key with sandbox_promotions:apply, the exact studio grant, Idempotency-Key, and the applied version plus SHA-256. Content-Type must be application/json and the strict body limit is 32 KiB. Convex returns 409 when newer Live edits make rollback unsafe; clients must inspect the current plan instead of assuming an inverse change can be applied. # Atomically replace a studio storefront assortment Source: https://docs.batchrelay.com/api-reference/storefront/atomically-replace-a-studio-storefront-assortment https://api.batchrelay.com/openapi.json patch /v1/studios/{studio_id}/storefront Requires storefronts:write, a Live key, expected_published_revision, and Idempotency-Key. PATCH immediately publishes a new immutable assortment revision; this API has no storefront draft or publish endpoint yet. Forwarded delegated OAuth is independently verified for current token state, exact action scope and attributed key-creator identity. Calls without a delegated token retain existing direct API-key behavior. # Get a studio storefront assortment Source: https://docs.batchrelay.com/api-reference/storefront/get-a-studio-storefront-assortment https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/storefront Requires storefronts:read. The public API deliberately exposes one storefront per studio, not internal loadouts or loadout IDs. Forwarded delegated OAuth is independently verified for current token state, exact action scope and attributed key-creator identity. Calls without a delegated token retain existing direct API-key behavior. # Read Studio events analytics Source: https://docs.batchrelay.com/api-reference/studio-analytics/read-studio-events-analytics https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/analytics/events Requires analytics:read and an exact active Studio grant. Dates are inclusive from and exclusive to, at most 366 civil days, in the supplied IANA timezone. Currency USD is supported. The credential selects Test or Live; query lane overrides and unknown or repeated filters are rejected. Refunds observed later restate the original sales cohort. Null metrics and coverage disclose unavailable accounting. Returns aggregate sales only; no customer data. Cursor binds report revision and filters. Private no-store response. Forwarded delegated OAuth is independently verified for current token state, exact action scope and attributed key-creator identity. Calls without a delegated token retain existing direct API-key behavior. # Read Studio sales analytics Source: https://docs.batchrelay.com/api-reference/studio-analytics/read-studio-sales-analytics https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/analytics/sales Requires analytics:read and an exact active Studio grant. Dates are inclusive from and exclusive to, at most 366 civil days, in the supplied IANA timezone. Currency USD is supported. The credential selects Test or Live; query lane overrides and unknown or repeated filters are rejected. Refunds observed later restate the original sales cohort. Null metrics and coverage disclose unavailable accounting. Returns aggregate sales only; no customer data. Cursor binds report revision and filters. Private no-store response. Forwarded delegated OAuth is independently verified for current token state, exact action scope and attributed key-creator identity. Calls without a delegated token retain existing direct API-key behavior. # Read Studio sellables analytics Source: https://docs.batchrelay.com/api-reference/studio-analytics/read-studio-sellables-analytics https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/analytics/sellables Requires analytics:read and an exact active Studio grant. Dates are inclusive from and exclusive to, at most 366 civil days, in the supplied IANA timezone. Currency USD is supported. The credential selects Test or Live; query lane overrides and unknown or repeated filters are rejected. Refunds observed later restate the original sales cohort. Null metrics and coverage disclose unavailable accounting. Returns aggregate sales only; no customer data. Cursor binds report revision and filters. Private no-store response. Forwarded delegated OAuth is independently verified for current token state, exact action scope and attributed key-creator identity. Calls without a delegated token retain existing direct API-key behavior. # Get a studio asset upload session Source: https://docs.batchrelay.com/api-reference/studio-assets/get-a-studio-asset-upload-session https://api.batchrelay.com/openapi.json get /v1/studio-assets/sessions/{session_id} Requires studio_assets:write. Session IDs are bindings, not credentials: the API key and durable owner studio are rechecked. Object keys and storage details are never returned. # Reserve a studio-scoped original-asset upload session Source: https://docs.batchrelay.com/api-reference/studio-assets/reserve-a-studio-scoped-original-asset-upload-session https://api.batchrelay.com/openapi.json post /v1/studio-assets/sessions Requires an active studio-owned API account and the studio_assets:write scope. Each file supplies a stable local_id and its lowercase SHA-256 before any upload grant is created. Convex resolves the API key's owner studio, reconciles matching ready bytes only within that studio and event, and returns upload_required or already_uploaded per local_id. Neither studio_id, storage bucket, nor object_key may be supplied. An identical retry with the same Idempotency-Key returns the same lifecycle binding; reuse for a different reservation conflicts. # Upload bytes for one reserved studio asset Source: https://docs.batchrelay.com/api-reference/studio-assets/upload-bytes-for-one-reserved-studio-asset https://api.batchrelay.com/openapi.json put /v1/studio-assets/sessions/{session_id}/assets/{asset_id} Requires studio_assets:write and an upload_required reconciliation entry. Content-Type and Content-Length must exactly match the reservation and the streamed bytes must match its SHA-256. The API marks the asset uploading through Convex, uses only the server-derived R2 object key, computes MD5/SHA-256 while streaming to R2, then marks uploaded and finalizes. It never fetches, crops, renders, or accepts caller-selected storage paths. # List privacy-safe studio management activity Source: https://docs.batchrelay.com/api-reference/studio-audit/list-privacy-safe-studio-management-activity https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/activity Lists append-only, privacy-safe studio management activity from selected API write boundaries. It is not a raw lifecycle, fulfillment, or delivery feed and never returns request bodies, secrets, or PII. # Finalize a managed asset upload Source: https://docs.batchrelay.com/api-reference/studio-catalog-assets/finalize-a-managed-asset-upload https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/assets/uploads/{upload_session_id}/finalize Requires studio_assets:write and a Live key. upload_session_id is the idempotency identity; the storage receipt is accepted only for that temporary session. # Get managed asset metadata Source: https://docs.batchrelay.com/api-reference/studio-catalog-assets/get-managed-asset-metadata https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/assets/{asset_id} Requires studio_assets:read. No raw asset URL is returned. # Reserve a managed asset upload Source: https://docs.batchrelay.com/api-reference/studio-catalog-assets/reserve-a-managed-asset-upload https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/assets/uploads Requires studio_assets:write, a Live key, and Idempotency-Key. upload_url is a short-lived upload capability: do not log or persist it. Stable asset responses expose only opaque metadata and IDs. # Archive a package Source: https://docs.batchrelay.com/api-reference/studio-catalog/archive-a-package https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/packages/{package_id}/archive Forwarded delegated OAuth is independently verified for current token state, exact action scope and attributed key-creator identity. Calls without a delegated token retain existing direct API-key behavior. # Archive a product Source: https://docs.batchrelay.com/api-reference/studio-catalog/archive-a-product https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/products/{product_id}/archive Forwarded delegated OAuth is independently verified for current token state, exact action scope and attributed key-creator identity. Calls without a delegated token retain existing direct API-key behavior. # Create a draft package Source: https://docs.batchrelay.com/api-reference/studio-catalog/create-a-draft-package https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/packages Requires studio_catalog:write, a Live key, and Idempotency-Key. Forwarded delegated OAuth is independently verified for current token state, exact action scope and attributed key-creator identity. Calls without a delegated token retain existing direct API-key behavior. # Create a draft studio product Source: https://docs.batchrelay.com/api-reference/studio-catalog/create-a-draft-studio-product https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/products Requires studio_catalog:write, a Live key, and Idempotency-Key. Test keys never write Live catalog data. Forwarded delegated OAuth is independently verified for current token state, exact action scope and attributed key-creator identity. Calls without a delegated token retain existing direct API-key behavior. # Create a product variant Source: https://docs.batchrelay.com/api-reference/studio-catalog/create-a-product-variant https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/products/{product_id}/variants Requires studio_catalog:write, a Live key, and Idempotency-Key. Forwarded delegated OAuth is independently verified for current token state, exact action scope and attributed key-creator identity. Calls without a delegated token retain existing direct API-key behavior. # Get a package Source: https://docs.batchrelay.com/api-reference/studio-catalog/get-a-package https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/packages/{package_id} Forwarded delegated OAuth is independently verified for current token state, exact action scope and attributed key-creator identity. Calls without a delegated token retain existing direct API-key behavior. # Get a studio product Source: https://docs.batchrelay.com/api-reference/studio-catalog/get-a-studio-product https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/products/{product_id} Forwarded delegated OAuth is independently verified for current token state, exact action scope and attributed key-creator identity. Calls without a delegated token retain existing direct API-key behavior. # Get the published baseline for a draft Source: https://docs.batchrelay.com/api-reference/studio-catalog/get-the-published-baseline-for-a-draft https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/packages/{package_id}/publication-baseline Returns the published source and its fingerprint for a reviewed publication, or new/unknown when no authoritative source is available. # Get the published baseline for a draft Source: https://docs.batchrelay.com/api-reference/studio-catalog/get-the-published-baseline-for-a-draft-1 https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/products/{product_id}/publication-baseline Returns the published source and its fingerprint for a reviewed publication, or new/unknown when no authoritative source is available. # List a studio's retail products Source: https://docs.batchrelay.com/api-reference/studio-catalog/list-a-studios-retail-products https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/products Requires studio_catalog:read. Canonical /v1/catalog/products remains a separate read-only provider-neutral catalog. Forwarded delegated OAuth is independently verified for current token state, exact action scope and attributed key-creator identity. Calls without a delegated token retain existing direct API-key behavior. # List product variants Source: https://docs.batchrelay.com/api-reference/studio-catalog/list-product-variants https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/products/{product_id}/variants Forwarded delegated OAuth is independently verified for current token state, exact action scope and attributed key-creator identity. Calls without a delegated token retain existing direct API-key behavior. # List studio packages Source: https://docs.batchrelay.com/api-reference/studio-catalog/list-studio-packages https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/packages Forwarded delegated OAuth is independently verified for current token state, exact action scope and attributed key-creator identity. Calls without a delegated token retain existing direct API-key behavior. # Publish a package Source: https://docs.batchrelay.com/api-reference/studio-catalog/publish-a-package https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/packages/{package_id}/publish Requires the catalog publish permission and Idempotency-Key. Delegated Live publication requires reviewed source and baseline fingerprints and expected versions. API-key callers retain the existing request contract. # Publish a product Source: https://docs.batchrelay.com/api-reference/studio-catalog/publish-a-product https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/products/{product_id}/publish Requires the catalog publish permission and Idempotency-Key. Delegated Live publication requires reviewed source and baseline fingerprints and expected versions. API-key callers retain the existing request contract. # Recover a catalog draft creation result by its original idempotency key Source: https://docs.batchrelay.com/api-reference/studio-catalog/recover-a-catalog-draft-creation-result-by-its-original-idempotency-key https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/packages/creation-requests/{idempotency_key} Read only. Returns the current resource created by this exact actor, client, Studio, credential lane and creation key. A 404 does not authorize a replacement creation or prove an earlier request was never in flight. Retain the original key. # Recover a catalog draft creation result by its original idempotency key Source: https://docs.batchrelay.com/api-reference/studio-catalog/recover-a-catalog-draft-creation-result-by-its-original-idempotency-key-1 https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/products/creation-requests/{idempotency_key} Read only. Returns the current resource created by this exact actor, client, Studio, credential lane and creation key. A 404 does not authorize a replacement creation or prove an earlier request was never in flight. Retain the original key. # Restore a package Source: https://docs.batchrelay.com/api-reference/studio-catalog/restore-a-package https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/packages/{package_id}/restore Forwarded delegated OAuth is independently verified for current token state, exact action scope and attributed key-creator identity. Calls without a delegated token retain existing direct API-key behavior. # Restore a product Source: https://docs.batchrelay.com/api-reference/studio-catalog/restore-a-product https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/products/{product_id}/restore Forwarded delegated OAuth is independently verified for current token state, exact action scope and attributed key-creator identity. Calls without a delegated token retain existing direct API-key behavior. # Update a package draft Source: https://docs.batchrelay.com/api-reference/studio-catalog/update-a-package-draft https://api.batchrelay.com/openapi.json patch /v1/studios/{studio_id}/packages/{package_id} Requires catalog write permission and expected_edit_version. Updating a published item creates a draft. Delegated Live edits also require expected_source_fingerprint. Package edits support name, description, price and a complete lines and add_ons pair. API-key callers retain the existing request contract. # Update a product draft Source: https://docs.batchrelay.com/api-reference/studio-catalog/update-a-product-draft https://api.batchrelay.com/openapi.json patch /v1/studios/{studio_id}/products/{product_id} Requires catalog write permission and expected_edit_version. Updating a published item creates a draft. Delegated Live edits also require expected_source_fingerprint. Product edits support name, description and price. API-key callers retain the existing request contract. # Create a draft event form revision Source: https://docs.batchrelay.com/api-reference/studio-management/create-a-draft-event-form-revision https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/events/{event_id}/form-revisions Requires forms:write, a credential selecting the isolated Test or Live lane, and Idempotency-Key. Test mutations use isolated sandbox records; Live writes retain server policy gates. Convex validates studio/event/definition tenancy and stale base-revision semantics. # Create an unpublished event for the header-selected studio Source: https://docs.batchrelay.com/api-reference/studio-management/create-an-unpublished-event-for-the-header-selected-studio https://api.batchrelay.com/openapi.json post /v1/events Requires events:write, X-Studio-ID, and Idempotency-Key. Creates an unpublished event; publishing is a separate readiness-checked operation. # Get a reusable form definition Source: https://docs.batchrelay.com/api-reference/studio-management/get-a-reusable-form-definition https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/form-definitions/{form_definition_id} # Get an event for the header-selected studio Source: https://docs.batchrelay.com/api-reference/studio-management/get-an-event-for-the-header-selected-studio https://api.batchrelay.com/openapi.json get /v1/events/{event_id} Requires events:read and X-Studio-ID. # Get one event form revision Source: https://docs.batchrelay.com/api-reference/studio-management/get-one-event-form-revision https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/events/{event_id}/form-revisions/{form_revision_id} # List an event's form revisions Source: https://docs.batchrelay.com/api-reference/studio-management/list-an-events-form-revisions https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/events/{event_id}/form-revisions # List events for one explicit studio Source: https://docs.batchrelay.com/api-reference/studio-management/list-events-for-one-explicit-studio https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/events # List events for the header-selected studio Source: https://docs.batchrelay.com/api-reference/studio-management/list-events-for-the-header-selected-studio https://api.batchrelay.com/openapi.json get /v1/events Requires events:read and X-Studio-ID. The API never infers a studio from the credential or a local profile. # List reusable form definitions Source: https://docs.batchrelay.com/api-reference/studio-management/list-reusable-form-definitions https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/form-definitions # List studios available to this API credential Source: https://docs.batchrelay.com/api-reference/studio-management/list-studios-available-to-this-api-credential https://api.batchrelay.com/openapi.json get /v1/studios Requires studios:read. This is the only studio-scoped discovery operation without a studio_id path parameter. Every subsequent studio, event, and form request names its target studio explicitly; the credential and Convex both recheck tenancy. # Publish an editable event form revision Source: https://docs.batchrelay.com/api-reference/studio-management/publish-an-editable-event-form-revision https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/events/{event_id}/form-revisions/{form_revision_id}/publish Requires forms:publish, a credential selecting the isolated Test or Live lane, Idempotency-Key, and expected_edit_version. Convex atomically rejects stale versions, invalid drafts, and attempts to alter published revisions. # Update an editable event form revision Source: https://docs.batchrelay.com/api-reference/studio-management/update-an-editable-event-form-revision https://api.batchrelay.com/openapi.json patch /v1/studios/{studio_id}/events/{event_id}/form-revisions/{form_revision_id} Requires forms:write and a credential selecting the isolated Test or Live lane. expected_edit_version is required; published revisions are immutable and stale revisions conflict. # Cancel a draft or scheduled message Source: https://docs.batchrelay.com/api-reference/studio-messages/cancel-a-draft-or-scheduled-message https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/messages/{message_id}/cancel # Create an immutable correction Source: https://docs.batchrelay.com/api-reference/studio-messages/create-an-immutable-correction https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/messages/{message_id}/corrections # Create or schedule an operational event message Source: https://docs.batchrelay.com/api-reference/studio-messages/create-or-schedule-an-operational-event-message https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/messages Requires messages:write, a production studio credential with an exact active studio grant, owner/admin authorization, and Idempotency-Key. Transactional alert emails never contain the freeform body. # Get an operational message Source: https://docs.batchrelay.com/api-reference/studio-messages/get-an-operational-message https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/messages/{message_id} # List a studio's operational messages Source: https://docs.batchrelay.com/api-reference/studio-messages/list-a-studios-operational-messages https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/messages # List read and delivery facts without recipient addresses Source: https://docs.batchrelay.com/api-reference/studio-messages/list-read-and-delivery-facts-without-recipient-addresses https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/messages/{message_id}/recipients # Activate a studio offer Source: https://docs.batchrelay.com/api-reference/studio-offers/activate-a-studio-offer https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/offers/{offer_id}/activate # Append a studio offer revision Source: https://docs.batchrelay.com/api-reference/studio-offers/append-a-studio-offer-revision https://api.batchrelay.com/openapi.json patch /v1/studios/{studio_id}/offers/{offer_id} Offer terms are immutable after creation. PATCH appends a new revision and requires expected_revision plus Idempotency-Key; stale revisions fail with 409. The authorized mutation projection contains the latest candidate revision, so offers:write is sufficient. # Create a studio offer Source: https://docs.batchrelay.com/api-reference/studio-offers/create-a-studio-offer https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/offers Requires offers:write, a production or Test Mode API key, the exact studio grant, and Idempotency-Key. The request supplies only policy terms and selectors; the server owns Stripe provisioning, totals, and eligibility. # Get a studio offer Source: https://docs.batchrelay.com/api-reference/studio-offers/get-a-studio-offer https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/offers/{offer_id} # List offer redemptions Source: https://docs.batchrelay.com/api-reference/studio-offers/list-offer-redemptions https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/offers/{offer_id}/redemptions # List studio offers Source: https://docs.batchrelay.com/api-reference/studio-offers/list-studio-offers https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/offers Requires offers:read and the exact studio grant. The projection contains server-owned lifecycle, immutable revision, usage, and bounded margin metadata; it never exposes Stripe provider identifiers or secrets. # Pause a studio offer Source: https://docs.batchrelay.com/api-reference/studio-offers/pause-a-studio-offer https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/offers/{offer_id}/pause # Preview studio offer margin Source: https://docs.batchrelay.com/api-reference/studio-offers/preview-studio-offer-margin https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/offers/{offer_id}/margin-preview Requires margins:read. The preview uses server catalog and provider-cost evidence. Unknown or stale cost facts remain explicitly marked in cost_status and are never replaced with caller-supplied costs. # Resume a studio offer Source: https://docs.batchrelay.com/api-reference/studio-offers/resume-a-studio-offer https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/offers/{offer_id}/resume # Revoke a studio offer Source: https://docs.batchrelay.com/api-reference/studio-offers/revoke-a-studio-offer https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/offers/{offer_id}/revoke # Schedule a studio offer Source: https://docs.batchrelay.com/api-reference/studio-offers/schedule-a-studio-offer https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/offers/{offer_id}/schedule Schedule requires a future starts_at and an expected revision. The durable offer service owns the transition and activation time. # Apply studio order refund Source: https://docs.batchrelay.com/api-reference/studio-operations/apply-studio-order-refund https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/refund-requests Requires refunds:write. Explicit exact confirmation and financial revision required. Pre-syncs Stripe, rechecks role/grant/balance and uses existing refund request/approval/execution engine. Accepted is not succeeded. Retry the same key/preview after interruption. No provider cancellation. # Archive studio event Source: https://docs.batchrelay.com/api-reference/studio-operations/archive-studio-event https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/events/{event_id}/archive Requires events:write. Closes new sales and registration while preserving buyer access and history. # Archive studio form definition Source: https://docs.batchrelay.com/api-reference/studio-operations/archive-studio-form-definition https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/form-definitions/{form_definition_id}/archive Requires forms:write. History is retained. Delete rejects any event, revision or team reference and incomplete dependency scan. # Create studio event with setup Source: https://docs.batchrelay.com/api-reference/studio-operations/create-studio-event-with-setup https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/events Requires events:write. Atomic unpublished creation. Optional forms additionally require forms:write. Same-Studio form/template/team references only; no implicit publication. # Create studio form definition Source: https://docs.batchrelay.com/api-reference/studio-operations/create-studio-form-definition https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/form-definitions Requires forms:write. Creates reusable source from full form_spec. Stable option/field IDs, conditions, extensions and semantics round-trip. # Delete studio event Source: https://docs.batchrelay.com/api-reference/studio-operations/delete-studio-event https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/events/{event_id}/delete Requires events:delete. Unused drafts only. Bounded dependency scan fails closed; referenced history must be archived. # Delete studio event form revision Source: https://docs.batchrelay.com/api-reference/studio-operations/delete-studio-event-form-revision https://api.batchrelay.com/openapi.json delete /v1/studios/{studio_id}/events/{event_id}/form-revisions/{form_revision_id} Requires forms:delete. Only an unused draft revision can be removed. Published and referenced revisions remain immutable. # Delete studio form definition Source: https://docs.batchrelay.com/api-reference/studio-operations/delete-studio-form-definition https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/form-definitions/{form_definition_id}/delete Requires forms:delete. History is retained. Delete rejects any event, revision or team reference and incomplete dependency scan. # Get studio athlete Source: https://docs.batchrelay.com/api-reference/studio-operations/get-studio-athlete https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/athletes/{athlete_id} Requires customers:read. # Get studio customer Source: https://docs.batchrelay.com/api-reference/studio-operations/get-studio-customer https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/customers/{customer_id} Requires customers:read. # Get studio event Source: https://docs.batchrelay.com/api-reference/studio-operations/get-studio-event https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/events/{event_id} Requires events:read. Complete event metadata. Existing /v1/events/{event_id} alias uses X-Studio-ID. # Get studio event readiness Source: https://docs.batchrelay.com/api-reference/studio-operations/get-studio-event-readiness https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/events/{event_id}/readiness Requires events:read. Authoritative readiness blockers and warnings. # Get studio order delivery Source: https://docs.batchrelay.com/api-reference/studio-operations/get-studio-order-delivery https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/orders/{order_id}/delivery Requires orders:read. Shipped physical goods report shipped_delivery_unconfirmed. Payment, fulfillment and digital delivery remain distinct. # Get studio order refund eligibility Source: https://docs.batchrelay.com/api-reference/studio-operations/get-studio-order-refund-eligibility https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/orders/{order_id}/refund-eligibility Requires refunds:read. Owner/admin only. Existing policy and digital-only exceptions. Returns current stored balance and financial revision. # Get studio order refund status Source: https://docs.batchrelay.com/api-reference/studio-operations/get-studio-order-refund-status https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/refund-requests/{request_id} Requires refunds:read. Authoritative stored lifecycle. Test is explicitly simulated. Pending/uncertain requests retain their reservation; resume the same request. Read polling does not create a second refund. # Get studio retail order Source: https://docs.batchrelay.com/api-reference/studio-operations/get-studio-retail-order https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/orders/{order_id} Requires orders:read. Detail adds buyer, immutable line_items and complete delivery breakdown. Missing historical purchased lines return an empty array. # List studio customer athletes Source: https://docs.batchrelay.com/api-reference/studio-operations/list-studio-customer-athletes https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/customers/{customer_id}/athletes Requires customers:read. Explicit active guardian-athlete links only. No inferred households. # List studio outstanding orders Source: https://docs.batchrelay.com/api-reference/studio-operations/list-studio-outstanding-orders https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/outstanding-orders Requires orders:read. Page of unpaid, disputed, unfulfilled, Studio action, production, digital pending or delivery-unconfirmed work. No fabricated whole-Studio count. # List studio retail orders Source: https://docs.batchrelay.com/api-reference/studio-operations/list-studio-retail-orders https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/orders Requires orders:read. Storefront purchases, distinct from /v1/print-orders. Stable descending purchase time and tie-breaker. Empty filtered pages may continue. Historical purchase snapshots remain authoritative. # Prepare studio order refund Source: https://docs.batchrelay.com/api-reference/studio-operations/prepare-studio-order-refund https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/refund-previews Requires refunds:write. Owner/admin only. Durable 15-minute preview with exact customer/order, original-payment destination and keep-delivery allocations. Percentage defaults to original amount paid; half-up cent rounding. Production pre-syncs authoritative Stripe refunds. Does not reserve or move money. # Publish studio event Source: https://docs.batchrelay.com/api-reference/studio-operations/publish-studio-event https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/events/{event_id}/publish Requires events:publish. Rechecks authoritative readiness. Form publication is separate. # Restore studio event Source: https://docs.batchrelay.com/api-reference/studio-operations/restore-studio-event https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/events/{event_id}/restore Requires events:write. Restores an unpublished draft. # Restore studio form definition Source: https://docs.batchrelay.com/api-reference/studio-operations/restore-studio-form-definition https://api.batchrelay.com/openapi.json post /v1/studios/{studio_id}/form-definitions/{form_definition_id}/restore Requires forms:write. History is retained. Delete rejects any event, revision or team reference and incomplete dependency scan. # Search studio customers Source: https://docs.batchrelay.com/api-reference/studio-operations/search-studio-customers https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/customers Requires customers:read. Returns minimal masked candidates. Select an exact customer or athlete before accessing a family or changing an order. Page coverage is not a Studio total. # Update studio event Source: https://docs.batchrelay.com/api-reference/studio-operations/update-studio-event https://api.batchrelay.com/openapi.json patch /v1/studios/{studio_id}/events/{event_id} Requires events:write. Expected version required. Omitted values preserve data, nullable dates/type/year clear values. Name changes preserve slug. Explicit slug changes preserve a compatibility redirect. # Update studio form definition Source: https://docs.batchrelay.com/api-reference/studio-operations/update-studio-form-definition https://api.batchrelay.com/openapi.json patch /v1/studios/{studio_id}/form-definitions/{form_definition_id} Requires forms:write. Expected version required. Does not rewrite event-owned revisions or prior submissions. # Check API health Source: https://docs.batchrelay.com/api-reference/system/check-api-health https://api.batchrelay.com/openapi.json get /healthz # Get this OpenAPI document Source: https://docs.batchrelay.com/api-reference/system/get-this-openapi-document https://api.batchrelay.com/openapi.json get /openapi.json # Create a render from a published template Source: https://docs.batchrelay.com/api-reference/template-renders/create-a-render-from-a-published-template https://api.batchrelay.com/openapi.json post /v1/templates/{template_id}/renders Requires a studio-owned API account with template_renders:write. During the compatibility period, print_orders:write is also accepted. Accepts explicit stable slot IDs only. Omit revision_id to resolve the latest published revision; the response snapshots the resolved immutable revision. The service does not infer input order or fetch arbitrary caller URLs. Convex durably queues this job; the local API does not embed or dispatch the private renderer. # Get a template render and its output artifacts Source: https://docs.batchrelay.com/api-reference/template-renders/get-a-template-render-and-its-output-artifacts https://api.batchrelay.com/openapi.json get /v1/renders/{render_id} Requires the studio-owned API account that owns the render and templates:read. During the compatibility period, print_orders:read is also accepted. # Get one published output's render contract Source: https://docs.batchrelay.com/api-reference/template-renders/get-one-published-outputs-render-contract https://api.batchrelay.com/openapi.json get /v1/templates/{template_id}/outputs/{output_id}/contract Requires a studio-owned API account with templates:read. During the compatibility period, print_orders:read is also accepted. Omit revision_id to resolve the latest published revision. Only published or superseded immutable revisions are eligible; draft editor revisions are never returned. The selected output's used slots and physical surfaces are returned, while arbitrary editor nodes, placement geometry, and transforms remain outside this contract. Returned slot key is the only runtime input identity; ordinal, label, and semantic suggestion are revision-local discovery metadata. Use the published browser-preview package when a client needs visual node identity or browser-side placement data. # List studio template renders Source: https://docs.batchrelay.com/api-reference/template-renders/list-studio-template-renders https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/renders Requires templates:read; print_orders:read remains accepted during the compatibility period. # Get one studio template Source: https://docs.batchrelay.com/api-reference/templates/get-one-studio-template https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/templates/{template_id} Requires templates:read; print_orders:read remains accepted during the compatibility period. # List a template's compatible canonical products Source: https://docs.batchrelay.com/api-reference/templates/list-a-templates-compatible-canonical-products https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/templates/{template_id}/outputs Requires templates:read; print_orders:read remains accepted during the compatibility period. # List published studio templates Source: https://docs.batchrelay.com/api-reference/templates/list-published-studio-templates https://api.batchrelay.com/openapi.json get /v1/studios/{studio_id}/templates Requires templates:read; print_orders:read remains accepted during the compatibility period. # Authentication Source: https://docs.batchrelay.com/authentication Use an anonymous Test Mode session or a scoped API key to authenticate v1 API requests. Stateful API requests authenticate with a bearer token: ```http theme={null} Authorization: Bearer br_test_your_test_key ``` Batch Relay accepts three public bearer modes: | Credential | Environment | Use | | - | - | - | | `br_anon_...` | Test Mode only | Keyless evaluation and first agent or CLI use. | | `br_test_...` | Test Mode only | Persistent development, CI, and account-owned sandbox records. | | `br_...` | Live Mode | Billable production work. | Create an isolated anonymous session without signup at `POST /v1/anonymous-sessions`, or let the CLI create and store one automatically. See [Keyless Test Mode](/keyless-test-mode). Create, view, and revoke API keys from: ```text theme={null} https://app.batchrelay.com/developers ``` ## Scopes | Scope | Purpose | | - | - | | `print_orders:write` | Create print orders. | | `print_orders:read` | Read print-order status. | | `usage:read` | Read usage summary. | | `webhooks:read` | Read webhook configuration. | | `webhooks:write` | Create or change webhook configuration. | | `studios:read` | List studios available to the credential. | | `events:read` | Read event metadata for an authorized studio. | | `events.orders.buyer.read` | Retrieve storefront purchaser name and email from a retained event. Requires an explicit active Studio integration opt-in and matching ownership or Studio grant. Anonymous keys are excluded. | | `forms:read` | Read reusable form definitions and event form revisions. | | `forms:write` | Create and update draft event form revisions. | | `forms:publish` | Publish a draft event form revision. | | `event_teams:write` | Prepare and apply an authorized bulk event-team change. | | `studio_assets:read` | Read a studio asset-session or managed-asset lifecycle record. | | `studio_assets:write` | Reserve, upload, finalize, cancel, or use studio assets for authorized event-image import work. | | `studio_catalog:read` | Read a studio's products and packages. | | `studio_catalog:write` | Create or change server-owned product and package drafts. | | `studio_catalog:publish` | Publish studio catalog changes. | | `storefronts:read` | Read the current published storefront assortment. | | `storefronts:write` | Atomically replace a studio's published storefront assortment. | | `checkout_links:read` | Read lifecycle metadata for a studio checkout link. | | `checkout_links:write` | Create or revoke a studio checkout link. Requires the matching `print_orders` scope too. | | `offers:read` | List or read studio offers and read their redemption history. | | `offers:write` | Create, revise, activate, schedule, pause, resume, or revoke a studio offer. | | `offers:apply` | Select and apply a studio offer when creating, preparing, or recovering a checkout link. Requires the matching checkout-link and `print_orders` scopes too. | | `margins:read` | Preview an offer's estimated margin using server catalog and cost evidence. | | `sandbox_promotions:read` | Create and review a bounded sandbox-to-Live promotion plan. Requires a Live API key. | | `sandbox_promotions:apply` | Apply or roll back a reviewed sandbox promotion. Requires a Live API key. | | `semantic_fields:read` | Read the semantic-field vocabulary when granted; the current public catalog endpoint does not require a bearer token. | Studio management always uses an explicit studio ID in the request path. A studio-owned key can access only its owning studio. An individual key must have an active grant for the requested studio, and both the key and grant must carry the required scope. Studio offer management also enforces studio roles: owners and admins can change offers, while authorized staff can read them. `offers:write` does not implicitly grant `offers:read`. Checkout-link creation, preparation, and recovery require `offers:apply` because those operations resolve the selected or automatic offer; see [Studio discounts and offers](/studio-offers). Anonymous credentials cannot access studio management. Test keys may read studio management resources, but only Live Mode keys can create, update, or publish form revisions, change studio catalog drafts, or replace storefront assortments. Checkout-link management is an isolated exception for Test Mode: only an account-owned key beginning with `br_test_` can select its sandbox management lane. Anonymous sessions cannot create, read, or revoke checkout links. The credential record, not an `environment` field in the request, chooses the lane; Test Mode has no implicit promotion into Live Mode. Sandbox promotions are different. They require a Live `br_...` API key plus an authorized studio grant and the matching `sandbox_promotions` scope. Test keys, anonymous sessions, and OAuth sessions cannot promote studio configuration. See [Promote sandbox studio setup](/sandbox-promotions). Semantic-field vocabulary reads are public and do not require a bearer token: `GET /v1/catalog/semantic-fields`. ## Missing or invalid credentials The hosted API returns `401 invalid_api_key` for an invalid API key and `401 invalid_anonymous_session` for an invalid, revoked, or expired anonymous session. A missing bearer credential on a stateful route returns `invalid_api_key`; create an anonymous session first or use the CLI bootstrap. ```json theme={null} { "code": "invalid_api_key", "message": "A valid Batch Relay API key is required.", "error": "A valid Batch Relay API key is required.", "docs_url": "https://docs.batchrelay.com/errors#invalid_api_key", "request_id": "req..." } ``` ## Revocation Revoked keys stop working immediately. Create a new key if a bearer token is exposed. Anonymous sessions expire after seven days by default and cannot be renewed. Create a new session after expiry. Treat `br_anon_...` exactly like another secret while it is active. ## Test and Live keys Send Test and Live API keys to `https://api.batchrelay.com`. The stored API-key record selects Test Mode or Live Mode and is authoritative. The `br_test_` prefix helps identify a Test key, but does not choose the lane by itself. Never put Live API keys or production provider credentials in test, development, local test, or client configuration. # Billing Source: https://docs.batchrelay.com/billing Understand API billing setup, billing gates, and charge tracking. Production API usage requires active billing. ## Add billing Open the developer dashboard and click **Add billing**. Batch Relay uses Stripe test mode in development. Use Stripe's test card: ```text theme={null} 4242 4242 4242 4242 ``` Any future expiration date, CVC, and ZIP code are accepted in Stripe test mode. ## Billing states | State | Meaning | | - | - | | `not_configured` | No usable billing method is attached. | | `active` | Billing setup is complete. | | `past_due` | Billing needs attention. | | `disabled` | API billing is disabled. | ## Sandbox billing tests Sandbox order creation is normally free. To test billing without production fulfillment, include: ```json theme={null} { "billing": { "required": true } } ``` Inactive billing returns: ```http theme={null} HTTP/1.1 402 Payment Required ``` ```json theme={null} { "error": { "code": "billing_required", "message": "This sandbox request requires active billing for billing-flow testing." }, "request_id": "req..." } ``` ## Total charged The developer dashboard reports captured API charges. During setup-mode testing, saved cards do not create charges, so the total remains `$0.00` until PaymentIntent-based order charging is enabled. # Catalog ownership and projection Source: https://docs.batchrelay.com/catalog-projection Keep fulfillment data canonical in Batch Relay and retail data local to each studio. > The checked-in Go API and OpenAPI define the canonical public catalog reads > below. The Convex projection code and its five-minute cron are implemented > locally, but they are not evidence that a deployment has the approved catalog > origin configured or that the cron has been deployed. Batch Relay's Go catalog is the only owner of canonical product IDs, revisions, prepared-artwork requirements, provider-neutral lifecycle state. Approved pricebook versions supply provider offers and their pricing revisions. The public API publishes that data through `GET /v1/catalog/products` and `GET /v1/catalog/products/{product_id}/offers`. The canonical source is the Go catalog exposed by one public API/OpenAPI surface: ```text theme={null} GET /v1/catalog/products GET /v1/catalog/products/{product_id} GET /v1/catalog/products/{product_id}/offers ``` `/products` returns active immutable products and an ETag; `/offers` returns published provider offers, configuration, availability, verified unit costs, and pricing revisions without exposing provider-native SKU/UID values. Quotes and orders use a concrete product ID and revision. Convex may keep a read projection in `canonicalProducts` for indexed storefront, editor, package, checkout, and image-preflight reads. It must not become a second fulfillment catalog or cost table. Studio retail prices remain studio-owned Convex data. ```text theme={null} Go catalog -> public catalog API -> Convex canonicalProducts -> web application ``` ## Revision and conditional refresh The local projection records the last successful checksum/source origin, active item count, and synchronization time. Its internal cron is scheduled every five minutes and checks the deployment-owned Go API origin with `If-None-Match`. That schedule remains inactive until the Convex deployment has `BATCH_RELAY_CATALOG_API_BASE_URL` configured and the code/cron is deployed. * `304 Not Modified` writes nothing. * An unchanged checksum writes nothing. * A changed revision upserts active products idempotently. * Products absent from an active upstream list are removed from new pickers but historical revisions and order evidence remain readable. * A malformed or partial response preserves the last good projection and raises an operations alert. Any web-app "Fetch products from Batch Relay API" control is a recovery tool only once its adapter is configured and deployed. Its result should state whether the projection changed and identify the upstream ETag/checksum. ## ETag recovery semantics Treat an ETag as an opaque validator. Do not construct it, compare it as a version number, or persist a partially fetched replacement catalog. On a timeout, validation failure, or non-success response, retain the prior ETag and last-good projection. Retry the next scheduled pass or use the recovery control after correcting the upstream problem. ## Provider status RPL is deferred and unknown. A product, offer, price, availability result, or canary must not imply that RPL is ready until Batch Relay has verified its catalog and executor. Protected staff reads project approved pricebook offers with the exact product revision, configuration, provider, environment, units per quantity, and standard or account scope. Account overrides take precedence over standard rows. A missing row means no approved cost. Canonical product metadata and public default offers cannot supply a fallback for these protected reads. # Checkout Links Source: https://docs.batchrelay.com/checkout-links Prepare and revoke studio-scoped guest checkout links safely. Checkout links prepare the existing guest-checkout ledger. They do not create a Stripe Payment Link or Checkout Session; the web `/pay/{token}` experience is the only Checkout Session owner. Creation persists the credential-selected checkout lane (`sandbox` or `production`) on the link. Use an explicit studio path and an account-owned API key with the checkout-link and print-order scopes. Creating, preparing, or recovering a checkout link also requires `offers:apply`, because checkout resolves an explicit or automatic offer. | Operation | Required scopes | | - | - | | Create, prepare, or recover | `checkout_links:write`, `print_orders:write`, `offers:apply` | | Read link or status | `checkout_links:read`, `print_orders:read` | | Revoke | `checkout_links:write`, `print_orders:write` | The key must be authorized for the named studio. Individual keys additionally need the matching studio grant. Anonymous sessions cannot use these endpoints. ## Create a link ```http theme={null} POST /v1/studios/{studio_id}/checkout-links Idempotency-Key: your-stable-workflow-id ``` The request names an event, a recipient context, and one sellable item or package. It can optionally be `customizable` and set `expires_at`. The server rejects price, tax, payment, provider, token, and unknown fields; it resolves the current published retail amount itself. A requested expiration must be in the future and no more than seven days away. Omitting it defaults to seven days. The optional `promotion` field selects one `code`, `offer_id`, or `automatic: true`. If omitted, the API selects the active automatic storewide offer. The handler therefore requires `offers:apply` even when the request does not include a promotion selector. The selected offer is checked against the event, recipient, sellable, date window, and usage limits by the checkout service. For example, a code selector is `"promotion": {"code": "FALL2026"}`. An offer ID or automatic selection use `"promotion": {"offer_id": "off_example"}` or `"promotion": {"automatic": true}`. Supply exactly one selector; prices and discount amounts remain server-owned. ```json theme={null} { "event_id": "evt_example", "recipient": { "guardian_id": "guardian_example", "athlete_event_entry_id": "entry_example" }, "sellable": { "type": "item", "id": "catalog_item_example", "quantity": 1 } } ``` For a new Live Mode link, Batch Relay first requires the studio's payment readiness. If that check cannot pass, creation fails closed and no link or bearer URL is issued. A successful `201` returns `share_url` exactly once. It is a bearer capability: deliver it only through the intended private channel and do not store it in logs. The idempotency key is bound to a stable request fingerprint, including the recipient context, sellable, quantity, expiry, customization choice, and prepared-asset or digital configuration inputs. Replaying the same request returns the same lifecycle record without another `share_url` or token. Reuse of the same key with a different request returns `409 checkout_link_conflict`. ## Test Mode behavior A `br_test_` key selects an isolated Test Mode management lane. Creation returns `preview_status: "non_payable"` and no URL. The persisted sandbox link is an authenticated management record, not a payment capability, and has no live payment or provider effect. Test Mode does not promote a link, quote, recipient context, or token into Live Mode. Create a separate Live Mode link when that work is approved. A sandbox promotion does not include checkout links. After promoting a storefront or catalog configuration, create new Live Mode links for the approved recipients. Test links remain non-payable. ## Read and revoke ```http theme={null} GET /v1/studios/{studio_id}/checkout-links/{link_id} POST /v1/studios/{studio_id}/checkout-links/{link_id}/revoke ``` Both return safe lifecycle metadata: `id`, `expires_at`, `status`, `revocable`, and a subtotal when present. Reads never expose the token, recipient identity, payment-provider details, or retail line data. Revocation is a lifecycle transition, not deletion; an already non-revocable link returns `409 checkout_link_conflict` and no replacement token is minted. Guest payment respects the persisted lane: an explicitly sandboxed link is non-payable, while an explicitly production link is payable, subject to normal guest-checkout lifecycle and storefront-policy checks. For historical rows that predate lane persistence, compatibility is deliberately narrow: staff or guardian links with no machine API-key provenance remain payable; missing-lane machine links fail closed. The service never infers production from current studio policy. ## Stable errors Creation can return `400 idempotency_key_required`, `409 checkout_link_conflict`, `422 invalid_checkout_link`, or `503 checkout_link_unavailable`. Read and revoke can also return `403 checkout_link_forbidden` and `404 checkout_link_not_found`. See [Idempotency](/idempotency) for retry guidance and [Sandbox Testing](/sandbox-testing) for the Test Mode boundary. # Errors Source: https://docs.batchrelay.com/errors Read and recover from Batch Relay API errors. Batch Relay returns a flat JSON error envelope. Read `code` in client code and keep `request_id` when contacting support. ```json theme={null} { "code": "invalid_api_key", "message": "A valid Batch Relay API key is required.", "error": "A valid Batch Relay API key is required.", "docs_url": "https://docs.batchrelay.com/errors#invalid_api_key", "request_id": "req_771a19ae3f936e3f6a051e2d38f47d04" } ``` The hosted API returns `401 invalid_api_key` when the bearer token is missing, unknown, revoked, or belongs to another API environment. Do not parse the human message to distinguish those cases. ## Common public API codes | Code | HTTP | What to do | | - | -: | - | | `invalid_api_key` | 401 | Send a current key for the target environment. | | `invalid_anonymous_session` | 401 | Create a new anonymous session; the current token is invalid, revoked, or expired. | | `anonymous_session_rate_limited` | 429 | Wait for the `Retry-After` interval or use an account-owned Test API key. | | `anonymous_session_unavailable` | 503 | Retry later or use an existing Test API key. | | `anonymous_session_edge_unavailable` | 503 | Use `https://api.batchrelay.com`; session issuance must pass through the public gateway. | | `api_key_forbidden` | 403 | Create a key with the route's required scope. | | `idempotency_key_required` | 400 | Send a non-empty `Idempotency-Key` where the route requires one. | | `invalid_request_json` | 400 | Fix the JSON body and remove unknown fields. | | `order_validation_failed` | 422 | Fetch the current catalog and correct the product, options, media, or address. | | `invalid_provider_selection` | 422 | Use one supported provider ID or remove an invalid explicit choice. | | `preferred_provider_incomplete` | 422 | The selected provider cannot fulfill every line. Review `unsupported_lines`, then submit a new quote request with an explicit provider. | | `split_fulfillment_unavailable` | 422 | Split fulfillment is not enabled. Use `studio_default` or `single_provider` for a complete single-provider order. | | `provider_product_unavailable` | 422 | Change the product or provider. Batch Relay does not substitute a lab. | | `shipping_service_unavailable` | 422 | Re-quote the order or choose another currently eligible service. | | `provider_shipping_quote_required` | 422 | Quote the complete order before attempting payment or submit. | | `shipping_frozen_quote_required` | 422 | One-day shipping cannot be used until the provider quote can be frozen. | | `quote_id_required` | 400 | Submit a server-created quote ID. | | `quote_not_found` | 404 | Check that the quote belongs to the same account and environment. | | `quote_expired` | 409 | Create a new quote. | | `idempotency_conflict` | 409 | Use a new idempotency key for materially different input. | | `payment_method_required` | 402 | Add an active billing method in the developer dashboard. | | `fulfillment_unavailable` | 503 | The selected provider lane is not enabled. Do not retry by changing providers silently. | | `provider_routing_unconfigured` | 503 | Provider routing is not configured on this deployment. Retry after the service is restored. | | `live_mode_billing_unavailable` | 503 | Live Mode billing is not configured on this deployment. | | `endpoint_not_found` | 404 | Check the OpenAPI document for the exact path and method. | | `checkout_link_forbidden` | 403 | Use a non-anonymous key with the matching checkout-link and print-order scopes plus an authorized studio grant. | | `checkout_link_not_found` | 404 | Check the explicit studio ID and link ID; the link may not be visible to this credential. | | `checkout_link_conflict` | 409 | The link is no longer revocable, cannot make that lifecycle transition, or the same idempotency key has a different request fingerprint. Do not expect a replacement token. | | `invalid_checkout_link` | 422 | Correct the recipient context, sellable, quantity, or expiry. Price and payment fields are not accepted. | | `checkout_link_unavailable` | 503 | Retry later with the same idempotency key for creation. | | `invalid_promotion_request` | 400 | Correct the promotion request. | | `sandbox_promotion_forbidden` | 403 | Use a Live key with the selected studio grant and required promotion scope. | | `sandbox_promotion_not_found` | 404 | Check the studio and promotion IDs. | | `sandbox_promotion_conflict` | 409 | Fetch the promotion and create a fresh plan after resolving the changed state. | | `invalid_sandbox_promotion` | 422 | Resolve the reported block in Test Mode, then create a new plan. | | `sandbox_promotion_unavailable` | 503 | Retry the same operation with the same idempotency key. | | `sandbox_promotion_failed` | 502 | Preserve the request ID and inspect the safe response details. | ## Preferred provider cannot fulfill the order `preferred_provider_incomplete` is a structured `422` response from quote creation. It is not consent to choose a different provider or to split the order: ```json theme={null} { "code": "preferred_provider_incomplete", "selected_provider": "whcc", "unsupported_lines": [ { "line_index": 0, "product_id": "print-5x7", "available": false, "reason_code": "..." } ], "available_single_providers": [], "split_fulfillment_available": false, "docs_url": "https://docs.batchrelay.com/errors#preferred_provider_incomplete", "request_id": "req..." } ``` `unsupported_lines` identifies the original zero-based order line and a stable reason code. `available_single_providers` lists whole-order alternatives when available. Submit a new request using `single_provider` to choose one. Do not retry with `best_available`: split fulfillment remains unavailable and returns `split_fulfillment_unavailable`. ## Managed asset errors | Code | HTTP | What to do | | - | -: | - | | `invalid_asset_source` | 422 | Supply exactly one of `url` or `asset_id`. | | `unsafe_asset_url` | 422 | Use a publicly routable HTTPS URL without credentials or private-network resolution. | | `invalid_asset_media` | 422 | Upload JPEG, PNG, or TIFF bytes with safe dimensions and a matching `Content-Type`. | | `asset_too_large` | 413 | Reduce the source image below the 16 MiB ingestion limit. | | `managed_asset_resolution_unavailable` | 503 | The deployment cannot resolve managed assets. Retry only after the service is restored. | | `asset_ingestion_failed` | 502 | The deployment could not ingest the source image. Confirm that the source is reachable over HTTPS. | The pending managed-assets diagnostic rollout replaces generic source-fetch failures with `source_fetch_failed` (`502`). It distinguishes a non-2xx source response, timeout, unreachable host, and invalid media without exposing the upstream response body. ## Other route-specific codes Some dashboard, internal, Stripe-webhook, settlement, and template-render routes return more specific codes. The live OpenAPI document is the route-level contract. For an unexpected code, preserve the `request_id` and inspect the route's documented response before retrying. # Asset sessions and event image imports Source: https://docs.batchrelay.com/event-image-imports Stage, review, and commit event images without binding files before review. > The checked-in Go OpenAPI and handler tests define these routes, but a usable > deployment also needs the studio-asset and event-image-import adapters, > authorized API-key scopes, backing state stores, and deployment configuration. > Do not treat source routes or CLI help as deployment evidence. The public > `batchrelay` CLI source provides a Smart Crop V2 folder workflow and a raw > request alternative. Public HTTPS source ingestion and durable image-import > commit remain fail-closed until their server adapters are configured and > deployed. An asset session is studio-scoped and carries a declared purpose and destination. The current route contract does not promise one universal session implementation for every catalog, branding, event, and template use case. Permanent records should reference Batch Relay asset IDs, never a third-party URL. ```text theme={null} create session -> upload or ingest -> finalize -> prepare import -> review -> commit ``` The current OpenAPI session routes are: ```text theme={null} POST /v1/studios/{studio_id}/asset-sessions GET /v1/studios/{studio_id}/asset-sessions/{session_id} PUT /v1/studios/{studio_id}/asset-sessions/{session_id}/assets/{asset_id} POST /v1/studios/{studio_id}/asset-sessions/{session_id}/finalize POST /v1/studios/{studio_id}/asset-sessions/{session_id}/cancel ``` The current OpenAPI event-import routes are: ```text theme={null} POST /v1/studios/{studio_id}/events/{event_id}/image-imports GET /v1/studios/{studio_id}/events/{event_id}/image-imports/{import_id} PATCH /v1/studios/{studio_id}/events/{event_id}/image-imports/{import_id} POST /v1/studios/{studio_id}/events/{event_id}/image-imports/{import_id}/commit POST /v1/studios/{studio_id}/events/{event_id}/image-imports/{import_id}/cancel ``` An import request references an `asset_session_id`, an `expected_session_revision`, and a manifest. A raw request may use either a `staged` or `smart_crop_masters_preview` manifest; the latter also carries the frozen `smart_crop_manifest` document. Nothing should bind to the event until the durable commit adapter rechecks the current state. ## Resolution policy Every requested output reports source pixels, output inches, effective PPI, grade, and a human message. | Grade | Effective PPI | Result | | - | - | - | | `ready` | 300 or higher | Accept normally. | | `warning` | 150 to 299 | Show the warning in review. | | `blocked` | Below 150 | Require an explicit override. | A below-minimum override requires both an acknowledgement and a non-empty reason. Batch Relay records the actor, time, policy version, affected output, effective PPI, and reason. It does not upscale the source or suppress the warning. Use a deployment that has the required adapters and scopes. The CLI's Smart Crop V2 folder workflow creates the session, uploads declared masters, finalizes it, and prepares the import with one stable root idempotency key: ```bash theme={null} batchrelay events images prepare --event evt_example \ --folder ./masters \ --manifest ./Smart-Crop-Masters-Preview.json \ --mapping-csv ./mapping.csv \ --idempotency-key smart-crop-event-20260829 ``` `--mapping-csv` is optional. The folder must contain the declared JPEG masters. The CLI rejects an incomplete or altered manifest before any request: it requires schema version `batchrelay.smart-crops/v1`, coordinate space `oriented-source-pixels-top-left`, a producer name/version, 1–500 declared JPEGs, and matching local bytes, SHA-256, dimensions, and safe filenames. It passes the frozen Smart Crop manifest through unchanged; it does not recalculate crop rectangles. For an already-created session or a non-folder caller, the raw primitive is still available: ```bash theme={null} batchrelay events images prepare --event evt_example --file image-import.json \ --idempotency-key image-import-20260829 batchrelay events images review imp_example --event evt_example --file review.json batchrelay events images commit imp_example --event evt_example \ --file commit.json --idempotency-key image-commit-20260829 ``` The asset and import lifecycle uses authoritative optimistic-concurrency revisions. The raw request bodies are: ```json theme={null} // finalize.json { "expected_revision": 4 } ``` ```json theme={null} // image-import.json for a staged session { "asset_session_id": "ass_example", "expected_session_revision": 5, "manifest": { "kind": "staged", "entries": [{ "client_local_id": "master-001", "asset_id": "asset_example" }] } } ``` ```json theme={null} // review.json { "expected_revision": 6, "resolution_overrides": [{ "policy_version": "resolution-v1", "reason": "customer-supplied-only-source", "effective_ppi": 120, "output": "print-8x10" }] } // commit.json { "expected_revision": 7 } ``` Review returns PPI diagnostics with source pixels, output inches, effective PPI, grade, and human message. Below-minimum work requires an explicit audit override; it is not silently upscaled. Re-read the returned revision after every lifecycle step and use that value for the next review, commit, or cancel. The lower-level commands remain available for explicitly managed sessions: `batchrelay assets sessions create|upload|get|finalize|cancel` and `batchrelay events images get|cancel`. A session upload is one declared local JPEG; do not substitute a public HTTPS URL until ingestion is deployed. The CLI source currently has the folder/manifest path above, but its local build must stay in lockstep with the generated public API client before it can be released. The configured deployment is still the product gate: source ingestion from public HTTPS URLs and durable event-image commit fail closed without their corresponding server-side adapters. ## Recovery Retry uploads with the same session and idempotency key. Fix a manifest or CSV before retrying prepare. Review unresolved bindings rather than committing them. A stale commit returns a conflict, so prepare and review again with the current revisions. Cancel abandoned sessions and imports instead of reusing an expired upload grant. # Complete public examples Source: https://docs.batchrelay.com/events/examples Canonical direct CloudEvents payloads for public Events V1 topics. Each example is one complete CloudEvents request body with fictional identifiers. Monetary components use integer USD minor units. Capability-gated payload examples are available in the authenticated Developer Dashboard. ## `order.fulfillment_updated.v1` ```json theme={null} { "specversion": "1.0", "id": "evt_demo_order_fulfillment_updated_v1_01JABC123", "source": "https://api.batchrelay.com/event-sources/studios/stu_demo_01JABC123", "type": "order.fulfillment_updated.v1", "subject": "orders/order_id_demo_01JABC123", "time": "2026-08-16T18:42:31.123Z", "datacontenttype": "application/json", "dataschema": "https://api.batchrelay.com/schemas/events/order.fulfillment_updated/v1", "tenanttype": "studio", "tenantid": "stu_demo_01JABC123", "environment": "sandbox", "resourceversion": 1, "origin": "storefront", "correlationid": "cor_demo_order_01JABC123", "actorkind": "system", "data": { "order_id": "order_id_demo_01JABC123", "status": "fulfillment_updated", "digital_status": "pending", "lab_status": "not_required", "studio_status": "not_required", "changes": [ { "field": "digital_status", "previous": "not_required", "current": "pending" } ] } } ``` ## `order.created.v1` ```json theme={null} { "specversion": "1.0", "id": "evt_demo_order_created_v1_01JABC123", "source": "https://api.batchrelay.com/event-sources/studios/stu_demo_01JABC123", "type": "order.created.v1", "subject": "orders/ord_demo_01JABC123", "time": "2026-08-16T18:42:31.123Z", "datacontenttype": "application/json", "dataschema": "https://api.batchrelay.com/schemas/events/order.created/v1", "tenanttype": "studio", "tenantid": "stu_demo_01JABC123", "environment": "sandbox", "resourceversion": 1, "origin": "storefront", "correlationid": "cor_demo_order_01JABC123", "actorkind": "system", "data": { "order_id": "ord_demo_01JABC123", "status": "created", "currency": "USD", "subtotal_minor_units": 5000, "discount_minor_units": 500, "shipping_minor_units": 499, "tax_minor_units": 350, "total_minor_units": 5349, "lines": [ { "line_id": "lin_demo_01JABC123", "package_id": "pkg_demo_01JABC123", "display_name": "Varsity Keepsake Package", "quantity": 1, "unit_price_minor_units": 5000 } ] } } ``` ## `order.paid.v1` ```json theme={null} { "specversion": "1.0", "id": "evt_demo_order_paid_v1_01JABC123", "source": "https://api.batchrelay.com/event-sources/studios/stu_demo_01JABC123", "type": "order.paid.v1", "subject": "orders/ord_demo_01JABC123", "time": "2026-08-16T18:42:31.123Z", "datacontenttype": "application/json", "dataschema": "https://api.batchrelay.com/schemas/events/order.paid/v1", "tenanttype": "studio", "tenantid": "stu_demo_01JABC123", "environment": "sandbox", "resourceversion": 2, "origin": "storefront", "correlationid": "cor_demo_order_01JABC123", "actorkind": "system", "data": { "order_id": "ord_demo_01JABC123", "status": "paid", "currency": "USD", "subtotal_minor_units": 5000, "discount_minor_units": 500, "shipping_minor_units": 499, "tax_minor_units": 350, "total_minor_units": 5349, "lines": [ { "line_id": "lin_demo_01JABC123", "package_id": "pkg_demo_01JABC123", "display_name": "Varsity Keepsake Package", "quantity": 1, "unit_price_minor_units": 5000 } ] } } ``` ## `order.payment_failed.v1` ```json theme={null} { "specversion": "1.0", "id": "evt_demo_order_payment_failed_v1_01JABC123", "source": "https://api.batchrelay.com/event-sources/studios/stu_demo_01JABC123", "type": "order.payment_failed.v1", "subject": "orders/ord_demo_01JABC123", "time": "2026-08-16T18:42:31.123Z", "datacontenttype": "application/json", "dataschema": "https://api.batchrelay.com/schemas/events/order.payment_failed/v1", "tenanttype": "studio", "tenantid": "stu_demo_01JABC123", "environment": "sandbox", "resourceversion": 2, "origin": "storefront", "correlationid": "cor_demo_order_01JABC123", "actorkind": "system", "data": { "order_id": "ord_demo_01JABC123", "status": "payment_failed", "reason_code": "payment_declined" } } ``` ## `order.canceled.v1` ```json theme={null} { "specversion": "1.0", "id": "evt_demo_order_canceled_v1_01JABC123", "source": "https://api.batchrelay.com/event-sources/studios/stu_demo_01JABC123", "type": "order.canceled.v1", "subject": "orders/ord_demo_01JABC123", "time": "2026-08-16T18:42:31.123Z", "datacontenttype": "application/json", "dataschema": "https://api.batchrelay.com/schemas/events/order.canceled/v1", "tenanttype": "studio", "tenantid": "stu_demo_01JABC123", "environment": "sandbox", "resourceversion": 3, "origin": "storefront", "correlationid": "cor_demo_order_01JABC123", "actorkind": "system", "data": { "order_id": "ord_demo_01JABC123", "status": "canceled" } } ``` ## `order.fulfillment_queued.v1` ```json theme={null} { "specversion": "1.0", "id": "evt_demo_order_fulfillment_queued_v1_01JABC123", "source": "https://api.batchrelay.com/event-sources/studios/stu_demo_01JABC123", "type": "order.fulfillment_queued.v1", "subject": "orders/ord_demo_01JABC123", "time": "2026-08-16T18:42:31.123Z", "datacontenttype": "application/json", "dataschema": "https://api.batchrelay.com/schemas/events/order.fulfillment_queued/v1", "tenanttype": "studio", "tenantid": "stu_demo_01JABC123", "environment": "sandbox", "resourceversion": 3, "origin": "storefront", "correlationid": "cor_demo_order_01JABC123", "actorkind": "system", "data": { "order_id": "ord_demo_01JABC123", "status": "fulfillment_queued" } } ``` ## `order.fulfillment_submitted.v1` ```json theme={null} { "specversion": "1.0", "id": "evt_demo_order_fulfillment_submitted_v1_01JABC123", "source": "https://api.batchrelay.com/event-sources/studios/stu_demo_01JABC123", "type": "order.fulfillment_submitted.v1", "subject": "orders/ord_demo_01JABC123", "time": "2026-08-16T18:42:31.123Z", "datacontenttype": "application/json", "dataschema": "https://api.batchrelay.com/schemas/events/order.fulfillment_submitted/v1", "tenanttype": "studio", "tenantid": "stu_demo_01JABC123", "environment": "sandbox", "resourceversion": 4, "origin": "storefront", "correlationid": "cor_demo_order_01JABC123", "actorkind": "system", "data": { "order_id": "ord_demo_01JABC123", "status": "fulfillment_submitted" } } ``` ## `order.fulfillment_accepted.v1` ```json theme={null} { "specversion": "1.0", "id": "evt_demo_order_fulfillment_accepted_v1_01JABC123", "source": "https://api.batchrelay.com/event-sources/studios/stu_demo_01JABC123", "type": "order.fulfillment_accepted.v1", "subject": "orders/ord_demo_01JABC123", "time": "2026-08-16T18:42:31.123Z", "datacontenttype": "application/json", "dataschema": "https://api.batchrelay.com/schemas/events/order.fulfillment_accepted/v1", "tenanttype": "studio", "tenantid": "stu_demo_01JABC123", "environment": "sandbox", "resourceversion": 5, "origin": "storefront", "correlationid": "cor_demo_order_01JABC123", "actorkind": "system", "data": { "order_id": "ord_demo_01JABC123", "status": "fulfillment_accepted" } } ``` ## `order.fulfillment_rejected.v1` ```json theme={null} { "specversion": "1.0", "id": "evt_demo_order_fulfillment_rejected_v1_01JABC123", "source": "https://api.batchrelay.com/event-sources/studios/stu_demo_01JABC123", "type": "order.fulfillment_rejected.v1", "subject": "orders/ord_demo_01JABC123", "time": "2026-08-16T18:42:31.123Z", "datacontenttype": "application/json", "dataschema": "https://api.batchrelay.com/schemas/events/order.fulfillment_rejected/v1", "tenanttype": "studio", "tenantid": "stu_demo_01JABC123", "environment": "sandbox", "resourceversion": 5, "origin": "storefront", "correlationid": "cor_demo_order_01JABC123", "actorkind": "system", "data": { "order_id": "ord_demo_01JABC123", "status": "fulfillment_rejected", "reason_code": "provider_validation_failed" } } ``` ## `order.shipped.v1` ```json theme={null} { "specversion": "1.0", "id": "evt_demo_order_shipped_v1_01JABC123", "source": "https://api.batchrelay.com/event-sources/studios/stu_demo_01JABC123", "type": "order.shipped.v1", "subject": "orders/ord_demo_01JABC123", "time": "2026-08-16T18:42:31.123Z", "datacontenttype": "application/json", "dataschema": "https://api.batchrelay.com/schemas/events/order.shipped/v1", "tenanttype": "studio", "tenantid": "stu_demo_01JABC123", "environment": "sandbox", "resourceversion": 6, "origin": "storefront", "correlationid": "cor_demo_order_01JABC123", "actorkind": "system", "data": { "order_id": "ord_demo_01JABC123", "status": "shipped", "carrier_code": "ups", "carrier_name": "UPS", "service_level": "Ground", "tracking_number": "1ZDEMO123", "tracking_url": "https://www.ups.com/track?tracknum=1ZDEMO123" } } ``` ## `order.fulfilled.v1` ```json theme={null} { "specversion": "1.0", "id": "evt_demo_order_fulfilled_v1_01JABC123", "source": "https://api.batchrelay.com/event-sources/studios/stu_demo_01JABC123", "type": "order.fulfilled.v1", "subject": "orders/ord_demo_01JABC123", "time": "2026-08-16T18:42:31.123Z", "datacontenttype": "application/json", "dataschema": "https://api.batchrelay.com/schemas/events/order.fulfilled/v1", "tenanttype": "studio", "tenantid": "stu_demo_01JABC123", "environment": "sandbox", "resourceversion": 7, "origin": "storefront", "correlationid": "cor_demo_order_01JABC123", "actorkind": "system", "data": { "order_id": "ord_demo_01JABC123", "status": "fulfilled" } } ``` ## `order.fulfillment_failed.v1` ```json theme={null} { "specversion": "1.0", "id": "evt_demo_order_fulfillment_failed_v1_01JABC123", "source": "https://api.batchrelay.com/event-sources/studios/stu_demo_01JABC123", "type": "order.fulfillment_failed.v1", "subject": "orders/ord_demo_01JABC123", "time": "2026-08-16T18:42:31.123Z", "datacontenttype": "application/json", "dataschema": "https://api.batchrelay.com/schemas/events/order.fulfillment_failed/v1", "tenanttype": "studio", "tenantid": "stu_demo_01JABC123", "environment": "sandbox", "resourceversion": 5, "origin": "storefront", "correlationid": "cor_demo_order_01JABC123", "actorkind": "system", "data": { "order_id": "ord_demo_01JABC123", "status": "fulfillment_failed", "reason_code": "dispatch_retry_exhausted" } } ``` ## `catalog_item.changed.v1` ```json theme={null} { "specversion": "1.0", "id": "evt_demo_catalog_item_changed_v1_01JABC123", "source": "https://api.batchrelay.com/event-sources/studios/stu_demo_01JABC123", "type": "catalog_item.changed.v1", "subject": "catalog-items/cat_demo_01JABC123", "time": "2026-08-16T18:42:31.123Z", "datacontenttype": "application/json", "dataschema": "https://api.batchrelay.com/schemas/events/catalog_item.changed/v1", "tenanttype": "studio", "tenantid": "stu_demo_01JABC123", "environment": "sandbox", "resourceversion": 4, "origin": "storefront", "correlationid": "cor_demo_catalog_batch_01JABC123", "actorkind": "system", "data": { "batch_id": "bat_demo_01JABC123", "catalog_item_id": "cat_demo_01JABC123", "action": "published", "state": { "status": "published", "availability": "active", "display_name": "Varsity Basketball 8×10 Print", "currency": "USD", "price_minor_units": 2500, "fulfillment_type": "print", "tax_category": "physical_print", "is_listed_on_storefront": true, "is_available_standalone": true, "is_available_in_packages": true, "is_available_as_add_on": false }, "changes": [ { "field": "status", "previous": "draft", "current": "published" } ] } } ``` ## `package.changed.v1` ```json theme={null} { "specversion": "1.0", "id": "evt_demo_package_changed_v1_01JABC123", "source": "https://api.batchrelay.com/event-sources/studios/stu_demo_01JABC123", "type": "package.changed.v1", "subject": "packages/pkg_demo_01JABC123", "time": "2026-08-16T18:42:31.123Z", "datacontenttype": "application/json", "dataschema": "https://api.batchrelay.com/schemas/events/package.changed/v1", "tenanttype": "studio", "tenantid": "stu_demo_01JABC123", "environment": "sandbox", "resourceversion": 3, "origin": "storefront", "correlationid": "cor_demo_catalog_batch_01JABC123", "actorkind": "system", "data": { "batch_id": "bat_demo_01JABC123", "package_id": "pkg_demo_01JABC123", "action": "updated", "state": { "status": "published", "availability": "active", "display_name": "Varsity Keepsake Package", "currency": "USD", "price_minor_units": 5000, "included_item_count": 3 }, "changes": [ { "field": "included_item_count", "previous": 2, "current": 3 } ] } } ``` ## `catalog_batch.completed.v1` ```json theme={null} { "specversion": "1.0", "id": "evt_demo_catalog_batch_completed_v1_01JABC123", "source": "https://api.batchrelay.com/event-sources/studios/stu_demo_01JABC123", "type": "catalog_batch.completed.v1", "subject": "catalog-batches/bat_demo_01JABC123", "time": "2026-08-16T18:42:31.123Z", "datacontenttype": "application/json", "dataschema": "https://api.batchrelay.com/schemas/events/catalog_batch.completed/v1", "tenanttype": "studio", "tenantid": "stu_demo_01JABC123", "environment": "sandbox", "resourceversion": 1, "origin": "storefront", "correlationid": "cor_demo_catalog_batch_01JABC123", "actorkind": "system", "data": { "batch_id": "bat_demo_01JABC123", "operation": "bulk_edit", "counts": { "created": 0, "updated": 1, "published": 1, "archived": 0, "restored": 0, "deleted": 0 }, "changed_resources": [ { "id": "cat_demo_01JABC123", "resource_type": "catalog_item", "resource_version": 4, "action": "published" }, { "id": "pkg_demo_01JABC123", "resource_type": "package", "resource_version": 3, "action": "updated" } ] } } ``` ## `storefront.changed.v1` ```json theme={null} { "specversion": "1.0", "id": "evt_demo_storefront_changed_v1_01JABC123", "source": "https://api.batchrelay.com/event-sources/studios/stu_demo_01JABC123", "type": "storefront.changed.v1", "subject": "storefronts/stf_demo_01JABC123", "time": "2026-08-16T18:42:31.123Z", "datacontenttype": "application/json", "dataschema": "https://api.batchrelay.com/schemas/events/storefront.changed/v1", "tenanttype": "studio", "tenantid": "stu_demo_01JABC123", "environment": "sandbox", "resourceversion": 2, "origin": "storefront", "correlationid": "cor_demo_order_01JABC123", "actorkind": "system", "data": { "storefront_id": "stf_demo_01JABC123", "action": "published", "state": { "status": "published", "availability": "available", "audience": "public", "checkout_mode": "public_live" }, "changes": [ { "field": "status", "previous": "draft", "current": "published" } ] } } ``` ## `destination.test.v1` ```json theme={null} { "specversion": "1.0", "id": "evt_demo_destination_test_v1_01JABC123", "source": "https://api.batchrelay.com/event-sources/studios/stu_demo_01JABC123", "type": "destination.test.v1", "subject": "destinations/tst_demo_01JABC123", "time": "2026-08-16T18:42:31.123Z", "datacontenttype": "application/json", "dataschema": "https://api.batchrelay.com/schemas/events/destination.test/v1", "tenanttype": "studio", "tenantid": "stu_demo_01JABC123", "environment": "sandbox", "resourceversion": 1, "origin": "storefront", "correlationid": "cor_demo_order_01JABC123", "actorkind": "system", "data": { "test_id": "tst_demo_01JABC123", "message": "Batch Relay event destination verification." } } ``` # Events V1 overview Source: https://docs.batchrelay.com/events/overview Receive Batch Relay lifecycle facts as signed CloudEvents webhooks. Batch Relay Events V1 is a push-only outbound webhook system. Each delivery is one [CloudEvents 1.0](https://cloudevents.io/) structured JSON document in one HTTP `POST`. There is no Batch Relay wrapper around the CloudEvent. Configure destinations and select available topics in the [Developer Dashboard](https://app.batchrelay.com/developers). The dashboard also shows delivery history and any topic references available to your account. ## Contract authority The live AsyncAPI document is the canonical public event contract: ```text theme={null} https://api.batchrelay.com/asyncapi.json ``` This documentation site renders deterministic reference material from the public Events V1 contract. Its checked-in snapshot is available at [`/specs/events-v1.asyncapi.json`](/specs/events-v1.asyncapi.json), but an integration should retrieve or pin the live canonical document for release validation. ## Direct CloudEvent payload Every request has `Content-Type: application/cloudevents+json` and a JSON body like this: ```json theme={null} { "specversion": "1.0", "id": "evt_order_demo_01JQ8Y5Q8K6H9W2M4R7T1V3X5Z", "source": "https://api.batchrelay.com/event-sources/studios/stu_demo_01JQ8Y3A2B4C6D8E0F1G2H3J4", "type": "order.created.v1", "subject": "orders/ord_demo_01JQ8Y4K5M6N7P8Q9R0S1T2U3", "time": "2026-08-16T18:42:31.123Z", "datacontenttype": "application/json", "dataschema": "https://api.batchrelay.com/schemas/events/order.created/v1", "tenanttype": "studio", "tenantid": "stu_demo_01JQ8Y3A2B4C6D8E0F1G2H3J4", "environment": "sandbox", "origin": "storefront", "resourceversion": 1, "correlationid": "cor_demo_order_01JQ8Y2Z3A4B5C6D7E8F9G0H1", "actorkind": "system", "data": { "order_id": "ord_demo_01JQ8Y4K5M6N7P8Q9R0S1T2U3", "status": "created", "currency": "USD", "subtotal_minor_units": 5000, "discount_minor_units": 0, "shipping_minor_units": 499, "tax_minor_units": 350, "total_minor_units": 5849, "lines": [ { "line_id": "lin_demo_01JQ8Y6R7S8T9U0V1W2X3Y4Z5", "package_id": "pkg_demo_01JQ908M0N1P2Q3R4S5T6U7V8", "display_name": "Varsity Portrait Package", "quantity": 1, "unit_price_minor_units": 5000 } ] } } ``` The envelope answers what happened, where, and when. `data` carries the topic-specific business fact. `origin` identifies how the fact entered Batch Relay (`storefront`, `developer_api`, or `system`); it is not a transport channel. When an event defines monetary summary fields, all five components are present: `subtotal_minor_units`, `discount_minor_units`, `shipping_minor_units`, `tax_minor_units`, and `total_minor_units`. Values are non-negative integers in `USD`; an inapplicable component is `0`, not omitted. ## Delivery semantics * Delivery is asynchronous and at least once. A receiver can see the same CloudEvent more than once. * A `2xx` response acknowledges the delivery. Any other response, timeout, or network failure is eligible for retry. * Retry timing and delivery history are available in the Developer Dashboard; do not rely on an assumed retry schedule. * Events may arrive out of order. Use `time`, `resourceversion`, and your own durable state rules rather than arrival order. * One HTTP request contains one CloudEvent. Batch delivery is not part of V1. See [Receiving webhooks](/events/receiving-webhooks) for signature verification and [Versioning](/events/versioning) for compatibility rules. ## Public event catalog This public reference intentionally lists only public topics. Topics that need additional account capabilities are documented only in the authenticated Developer Dashboard, and operator-only topics do not appear in customer-facing documentation. See the [topic reference](/events/topic-reference) and [complete examples](/events/examples). ## Forms, event media, and import attempts Form definitions describe the questions a Studio collects. `form.created.v1`, `form.updated.v1`, and `form_revision.published.v1` describe authoring and publication. Form response topics describe a committed submission or edit to answers. Their actor and submission method identify whether a guardian, staff member, or API performed the operation. They do not identify the purchaser or include answer values. There are no form archive, delete, or restore topics. `event.updated.v1` reports safe event metadata changes. `photo_assignment.updated.v1` reports changes to portrait or team-photo assignment using opaque resource references. They contain no child names, contact details, image URLs, or form answers. Image import completion means the intended media assignment was committed. An upload alone is not completion. A failed attempt records its stage, such as upload or commit, and its `retryable` flag. A retryable failure can be followed by a successful committed completion. Treat each event as a lifecycle fact, not a final judgment on the whole import session. These topics require the matching account capability and destination subscription. Their schemas and examples are available in the authenticated Developer Dashboard. ## Fulfillment progress and completion `order.fulfillment_updated.v1` reports changes to the digital, lab, and Studio fulfillment components. Consumers can track a mixed order without treating the first successful component as completion of the entire order. `order.fulfilled.v1` means every required component finished successfully. Digital completion requires successful delivery to the customer. Preparing a file or sending a debug preview does not qualify. Lab completion requires the recorded shipment milestone. Studio completion requires the recorded handoff or shipment milestone. Shipment and handoff are not proof of arrival at the customer's address. A digital-only order completes after successful digital delivery; a mixed order also waits for its required physical components. ## Purchaser context Core storefront order events may carry an opaque `buyer_ref`. The purchaser is separate from `actorkind`, which can be `system` for payment confirmation. A guest reference is scoped to that transaction. An account reference is scoped to the Studio and does not expose a guardian or authentication identifier. Names and email addresses are retrieved through a separately authorized API request. They are never added to the universal event payload. See [Purchaser context](/events/purchaser-context) for explicit Studio opt-in, API key permissions, and guest handling. # Event privacy Source: https://docs.batchrelay.com/events/privacy Understand what shared event payloads expose and how authorized purchaser context differs. Shared event payloads contain typed lifecycle facts and opaque resource references. They exclude person names, contact details, child records, raw form answers, authentication identifiers, image URLs, and arbitrary provider or request payloads. Resource display names in supported catalog and order summaries describe the purchased resource, not the child or purchaser. Form response events report submission and change metadata. A change can name a field without publishing its authored answer. Event and photo assignment updates use opaque references. `actorkind` describes the actor category and does not identify the transaction purchaser. A `buyer_ref` permits correlation within the intended Studio or guest transaction scope. It exposes no global guardian ID or Clerk ID. Names and email are available only through the separately permissioned [purchaser context endpoint](/events/purchaser-context). The universal event ledger stays unchanged when an integration opts in. The shipping topic has a narrow exception for known carrier, service level, tracking number, and tracking URL facts. Other events do not acquire shipping fields. Recipient and address details remain excluded. A missing event capability prevents delivery of that topic. It does not turn the frozen shared event into a different payload. Guardian connection topics require their own explicit capability and privacy opt-in; that grant does not authorize purchaser details. # Purchaser context Source: https://docs.batchrelay.com/events/purchaser-context Retrieve a storefront transaction purchaser with an explicit Studio integration grant. Use a retained storefront order or completed-checkout event to retrieve its transaction purchaser. The response contains only the purchaser's name and email, an opaque reference, and availability information. It does not contain children, form answers, phone numbers, delivery recipients, or addresses. ## Enable access The Studio owner enables purchaser detail access in the Events settings of the Developer Dashboard. Access is off by default. The integration's API key must also have the explicit `events.orders.buyer.read` scope. An ordinary events or print-order read scope does not grant this access. The key must currently own the event's Studio or have an active Studio grant with the same scope. The Studio integration binding must remain active and explicitly permit buyer context. Every read rechecks these conditions. Revoking the key, Studio grant, or purchaser opt-in stops subsequent reads. Anonymous credentials cannot retrieve purchaser context. ## Retrieve the purchaser ```http theme={null} GET /v1/event-records/{event_id}/buyer Authorization: Bearer br_test_your_test_key ``` Replace `{event_id}` with the CloudEvent `id`. The API resolves the Studio and order from that retained event. The credential selects the environment. A caller cannot select a different Studio or environment through this request. Example response: ```json theme={null} { "order_id": "ord_example", "buyer_ref": "buyer_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "kind": "guest", "availability": "available", "name": "Example Purchaser", "email": "purchaser@example.test" } ``` | Field | Meaning | | - | - | | `order_id` | The referenced storefront order. | | `buyer_ref` | Opaque Studio-scoped account reference or transaction-scoped guest reference. | | `kind` | `account` or `guest`; neither implies a parent or delivery recipient. | | `availability` | `available`, `missing`, or `redacted`. | | `name`, `email` | Nullable transaction purchaser details. | Missing guest contact stays `null`. The API does not substitute the guardian account or shipping recipient. Removed purchaser details remain redacted. Responses use `Cache-Control: no-store`. This endpoint resolves retained Studio storefront order events. It does not assume that an API-account customer snapshot identifies a purchaser. An expired or inaccessible event, unavailable order, mismatched tenant or payment lane, or historical order with ambiguous payment mode has no available context. An absent key returns `401`; missing scope or revoked integration access returns `403`; unavailable event context returns `404`. ## Immutable events and current context The lookup returns current authorized order context. It does not change the CloudEvent, its ID, or its historical payload. Retried and explicitly replayed events retain the original bytes. A later context lookup may return missing or redacted details even when an older lookup had contact information. # Receiving webhooks Source: https://docs.batchrelay.com/events/receiving-webhooks Verify Standard Webhooks signatures, acknowledge delivery, and deduplicate CloudEvents. Your endpoint must accept an HTTPS `POST` whose raw body is one CloudEvents 1.0 structured JSON document. Return a `2xx` only after the event is durably safe to acknowledge. ## Verify before parsing Batch Relay uses the [Standard Webhooks](https://www.standardwebhooks.com/) headers: ```text theme={null} webhook-id: msg_... webhook-timestamp: 1723833751 webhook-signature: v1,... ``` These three required headers are also declared on the AsyncAPI HTTP operation through the reusable `standardWebhookHeaders` component. Verify the signature over the exact raw request bytes before JSON parsing or normalization. Do not reconstruct JSON, stringify a parsed object, or substitute the CloudEvent `id` for the Standard Webhooks delivery ID. ```ts theme={null} import { Webhook } from "standardwebhooks"; export async function POST(request: Request) { const rawBody = await request.text(); const verifier = new Webhook(process.env.BATCH_RELAY_WEBHOOK_SECRET!); let event: Record; try { event = verifier.verify(rawBody, { "webhook-id": request.headers.get("webhook-id") ?? "", "webhook-timestamp": request.headers.get("webhook-timestamp") ?? "", "webhook-signature": request.headers.get("webhook-signature") ?? "" }) as Record; } catch { return new Response("invalid signature", { status: 400 }); } // Validate event.specversion and event.type before handling the payload. // Persist the CloudEvent id transactionally before returning success. return new Response(null, { status: 204 }); } ``` Use the current Standard Webhooks library for your language. Store the webhook secret outside source control and rotate it in the Developer Dashboard when needed. ## Dedupe and ordering Deduplicate by the CloudEvent envelope `id`, not by `webhook-id`. `webhook-id` identifies a delivery attempt; `id` identifies the immutable business event. Keep a durable record of successfully processed CloudEvent IDs. If an event has already been processed, safely return a `2xx` without repeating its side effect. For stateful resources, compare `resourceversion` with the latest version your integration has applied. Messages can be delayed, retried, or delivered out of order. A lower resource version must not overwrite newer local state. ## Retry-safe processing 1. Read the exact raw body. 2. Verify Standard Webhooks headers. 3. Validate the CloudEvents envelope and topic schema. 4. Start a database transaction. 5. Record the CloudEvent ID and apply the side effect exactly once. 6. Commit, then return a `2xx`. If any step cannot complete durably, return a non-`2xx` response so delivery can be retried. Do not return success merely because background work was queued without a durable handoff. ## Capability and destination boundaries Only configured destinations receive topics available to their Batch Relay account. Public topic definitions can be read here; account-specific topic availability and destination configuration stay in the authenticated Developer Dashboard. An unavailable capability results in no delivery, not a redacted payload with a different shape. # Public topic reference Source: https://docs.batchrelay.com/events/topic-reference Public Events V1 topic names, resource subjects, and payload intent. Every topic is a direct CloudEvents message. All examples use fictional, production-shaped opaque identifiers and `USD` integer minor units. See [complete examples](/events/examples) for the exact payload shapes. ## Orders | Topic | Subject | When it is emitted | | - | - | - | | `order.created.v1` | `orders/{order_id}` | A durable Batch Relay order is created. | | `order.paid.v1` | `orders/{order_id}` | Payment is durably confirmed. | | `order.payment_failed.v1` | `orders/{order_id}` | A payment attempt reaches a terminal failure state. | | `order.canceled.v1` | `orders/{order_id}` | A durable post-order cancellation is recorded. | | `order.fulfillment_queued.v1` | `orders/{order_id}` | Fulfillment work is queued. | | `order.fulfillment_submitted.v1` | `orders/{order_id}` | Fulfillment is submitted to the selected provider. | | `order.fulfillment_accepted.v1` | `orders/{order_id}` | The provider accepts the fulfillment request. | | `order.fulfillment_rejected.v1` | `orders/{order_id}` | The provider rejects the fulfillment request. | | `order.shipped.v1` | `orders/{order_id}` | A physical shipment is recorded. | | `order.fulfillment_updated.v1` | `orders/{order_id}` | A required digital, lab, or Studio component changes progress. | | `order.fulfilled.v1` | `orders/{order_id}` | Every required digital, lab, and Studio component finishes successfully. | | `order.fulfillment_failed.v1` | `orders/{order_id}` | Retries are exhausted and the fulfillment needs attention. | Order topics are available to authorized studio/API accounts with `events.orders.read`. The public reference does not imply a destination is entitled to receive every topic. ## Catalog and packages | Topic | Subject | When it is emitted | | - | - | - | | `catalog_item.changed.v1` | `catalog-items/{catalog_item_id}` | A catalog item is created, changed, published, archived, restored, or deleted. | | `package.changed.v1` | `packages/{package_id}` | A package summary changes lifecycle or availability. | | `catalog_batch.completed.v1` | `catalog-batches/{batch_id}` | A bulk catalog operation completes; individual changed resources emit their own events as well. | | `storefront.changed.v1` | `storefronts/{storefront_id}` | A storefront's public projection changes. | `catalog_item.changed.v1`, `package.changed.v1`, and `storefront.changed.v1` include both an `action` (what changed) and `state` (the resource after the change). `action` is one of `created`, `updated`, `published`, `archived`, `restored`, or `deleted`. `status` and `availability` are distinct fields. Package messages are intentionally summary-only in V1: they include the package identity, display name, pricing, and included-item count, not a nested component catalog export. Individual catalog-item and package events may include `batch_id`. When they are part of a bulk operation, they use the same `batch_id` and envelope `correlationid` as the accompanying `catalog_batch.completed.v1` summary. ## Destination tests | Topic | Subject | When it is emitted | | - | - | - | | `destination.test.v1` | `destinations/{destination_id}` | A configured destination sends a requested connectivity test. | ## Common envelope extensions | Field | Meaning | | - | - | | `environment` | `sandbox` or `production`. | | `origin` | `storefront`, `developer_api`, or `system`. | | `tenantid` | Opaque account or studio tenant identifier. | | `tenanttype` | `studio` or `api_account`. | | `resourceversion` | Monotonic version of the affected resource projection. | | `correlationid` | Required opaque ID shared by related events. | | `actorkind` | `system`, `staff`, `api`, `provider`, or `guardian`. | `order.created.v1` and `order.paid.v1` include a self-contained line summary and all five `USD` monetary components. Zero-valued discount, shipping, or tax fields remain present. `order.payment_failed.v1` does not define monetary components; it reports a stable failure reason instead. Unknown object properties and unknown descriptive enum values must be tolerated by consumers. New optional fields can be added within V1; removed fields, changed types, changed meanings, and new required fields require a new topic major version. ## Capability-gated lifecycle topics Form definition, form response, event, photo assignment, and image import lifecycle topics require the matching capability and subscription. See the [overview](/events/overview#forms-event-media-and-import-attempts) for their meaning and the authenticated Developer Dashboard for their exact schemas. Form authoring and submitted answers have separate resource subjects. No form archive, delete, or restore topics are defined. The fulfillment milestone describes recorded shipment or handoff, not physical arrival. Digital-only completion requires successful customer delivery. See [fulfillment progress](/events/overview#fulfillment-progress-and-completion). # Versioning and compatibility Source: https://docs.batchrelay.com/events/versioning How Events V1 evolves without breaking existing webhook consumers. The final segment of every event type is its major version: ```text theme={null} order.created.v1 ``` Events V1 evolves additively. Consumers must ignore object properties they do not recognize and safely handle unfamiliar descriptive enum values. Producers validate every event against its schema before publishing it. ## Compatible V1 changes * Adding an optional field. * Adding an optional object property. * Adding a new descriptive enum value when consumers can safely ignore it. * Adding a new public event topic. * Adding examples, clarifications, or non-semantic schema annotations. ## Breaking changes These require a new event major version rather than a silent V1 change: * Removing a field. * Making an optional field required. * Changing a field's type or meaning. * Narrowing accepted values in a way that invalidates existing consumers. * Renaming an event topic or changing its resource subject semantics. ## Resource versions and replays `resourceversion` belongs to the event envelope because it represents the resource projection after the fact. It is not a delivery sequence number. Consumers should persist the greatest applied version per resource and reject older state updates. Always deduplicate first by CloudEvent `id`. An operator or the Developer Dashboard may replay a delivery. Replays preserve the immutable CloudEvent ID and payload; delivery-attempt metadata can differ. Your handler must therefore treat every successful `id` as idempotent. ## Schema and documentation locations * Live public AsyncAPI: `https://api.batchrelay.com/asyncapi.json` * Per-event schema: the CloudEvent `dataschema` URL * Public documentation snapshot: [`/specs/events-v1.asyncapi.json`](/specs/events-v1.asyncapi.json) The live API owns the contract. Documentation pages and the checked-in snapshot are release artifacts and must be updated from the same public AsyncAPI source. ## Historical contracts Additive topics and optional fields do not rewrite retained historical events. Legacy records preserve their original IDs and payload bytes. Consumers should handle the schema identified by each event and deduplicate retries and explicit replays by event ID. Acceptance by the publisher or Outpost is not proof that a customer destination acknowledged delivery. Purchaser lookup is a separate authorized response. A later privacy change can redact current contact details without changing an earlier event. See [Event privacy](/events/privacy). # Idempotency Source: https://docs.batchrelay.com/idempotency Avoid duplicate print-order creation with idempotency keys. Send an `Idempotency-Key` header with every write request, including checkout link creation and sandbox-promotion plan, apply, and rollback requests: ```http theme={null} Idempotency-Key: order_2026_0001 ``` Batch Relay stores the first result for that operation and credential scope. Order replays return the original order record. Checkout-link replays return the same lifecycle record, but never repeat a Live Mode bearer `share_url`. Checkout-link creation fingerprints the request: the same key with different recipient, sellable, quantity, expiry, customization, asset, or digital configuration input returns `409 checkout_link_conflict` rather than changing the existing link. ## Recommended keys Use a stable value from your system: * Order ID * Workflow run ID * External job ID * n8n execution ID plus item ID Do not reuse the same idempotency key for different payloads. For a sandbox promotion, preserve the supplied key if the network result is ambiguous. A plan, apply, or rollback key belongs to that exact operation and payload. Do not reuse it across the three actions or replace it while retrying. # Introduction Source: https://docs.batchrelay.com/introduction A provider-neutral fulfillment API for professional photography. Batch Relay is an all-in-one photography commerce platform. Its provider-neutral fulfillment API lets developers extend the platform through custom applications and automation tools. The API connects custom photography workflows to supported professional print labs. Your application sends one canonical, prepared-media order; Batch Relay validates it, shows the available provider offers, and freezes the selected offer, shipping, tax, and fee policy in a quote before payment and submission. You do not integrate directly with lab-specific product identifiers, XML payloads, or ordering software. Provider-native mappings remain inside Batch Relay adapters. ## How it works 1. Start with an isolated keyless Test Mode session, a scoped Test API key, or a Live API key. 2. Send a canonical order with prepared assets, or render a published template into ordinary prepared artwork first. 3. Inspect provider offers and create an immutable quote. 4. Submit the matching order with an idempotency key. 5. Track the resulting Batch Relay order while the enabled provider fulfills it. Each standard quote and order uses one provider. A studio default is a preference, never permission to switch labs. If that provider cannot fulfill every line, Batch Relay fails the quote and the caller must explicitly request another provider and re-quote. Split fulfillment is not currently available through the public API. It will be available only when the API advertises it and the caller explicitly accepts separate provider submissions and more than one shipping charge. ## What Batch Relay does not do Batch Relay does not make a template mandatory. If you already have flattened artwork for a standard print, submit the ordinary prepared-media order. Templates are an optional preparation path that produces normal print artwork; they do not create a separate fulfillment product. The managed-ingestion route accepts either an external URL or an existing `asset_id`. URL input is copied into Batch Relay's private temporary fulfillment storage; `asset_id` input reuses already-managed bytes without copying them. Template image slots use stable `asset_id` references, not arbitrary URLs. Print-order assets use the same source union: provide exactly one external HTTPS `url` or authorized `asset_id`. URL bytes are copied and frozen with the quote; `asset_id` bytes are reused in place. See [Managed assets](/managed-assets) for ownership and retention behavior. ## Provider availability and cost Catalog products are provider-neutral. Provider offers identify the exact provider, configuration, currency, and per-unit provider cost available for a canonical product. An offer is not a submit-ready total. Create a quote to freeze all selected offers, shipping, tax, the `api-access-fee-v1` policy, and the total due for 15 minutes. A quote response also includes `provider_offer_lines`, the immutable public offer evidence for each order line. Do not infer that a provider is available for fulfillment from its name, catalog entry, or historical integration. The public offer and quote responses are the authority for the current environment. ## Use it from your workflow The API is designed for custom applications and automation tools. n8n, Zapier, and Make guidance is published as each integration becomes supported; the canonical API contract remains the same underneath. ## Base URL ```text theme={null} https://api.batchrelay.com ``` A Test API key selects Test Mode and the sandbox provider lane. A Live API key selects Live Mode and the production provider lane. The durable API-key record is authoritative, not the key prefix. Start with the [Quickstart](/quickstart) to validate a prepared order and inspect provider offers and create a Test Mode quote safely. # Keyless Test Mode Source: https://docs.batchrelay.com/keyless-test-mode Start a persistent sandbox workflow without an account or copied API key. Keyless Test Mode lets a person, script, or agent begin with no Batch Relay account and no copied API key. The first request creates an isolated, short-lived sandbox session. Later requests send that session as a bearer credential. > [!NOTE] > > Keyless means no signup or manually provisioned key. It does not mean that > stateful requests share an unauthenticated account. Each session owns only > its own quotes, assets, orders, idempotency records, and usage. ## Use the CLI The Batch Relay CLI creates and stores an anonymous session when a stateful command needs one: ```bash theme={null} batchrelay orders quote \ --input order.json \ --idempotency-key quote-20260829-001 \ --pretty ``` No login command is required. Check or reset the locally stored session with: ```bash theme={null} batchrelay auth status --pretty batchrelay auth reset-anonymous ``` An explicit `BATCHRELAY_API_KEY` or configured API-key profile always takes precedence. If an explicit key is rejected, the CLI reports that failure; it does not silently fall back to an anonymous session. ## Use the HTTP API Create a session through the public API host: ```bash theme={null} curl -sS -X POST https://api.batchrelay.com/v1/anonymous-sessions \ -o anonymous-session.json ``` The response contains a bearer token that is returned only once: ```json theme={null} { "session_token": "br_anon_example", "environment": "sandbox", "expires_at": "2026-09-05T12:00:00Z", "scopes": [ "print_orders:read", "print_orders:write", "usage:read" ] } ``` Store the token as a secret and send it like an API key: ```bash theme={null} TOKEN="$(jq -r '.session_token' anonymous-session.json)" curl -sS https://api.batchrelay.com/v1/catalog/products/print-5x7/offers \ -H "Authorization: Bearer ${TOKEN}" \ -o provider-offers.json ``` Do not put the token in a URL, request body, source file, or log. ## Capability boundary An anonymous session uses the normal public Test Mode lane. It can validate orders, inspect provider offers, create quotes, ingest supported assets, submit sandbox orders, retrieve its own orders, and read its own usage. Provider selection follows the same sandbox availability and quote rules as a `br_test_` key. It cannot enter Live Mode, charge through Stripe, access a studio or event, manage an account, or read another session's records. Changing an `environment` or provider field in a request cannot widen those permissions. Template rendering is not keyless yet. The current render endpoint requires a studio-owned API account and published-template entitlement; adding a safe anonymous entitlement model is separate work. ## Expiry and limits Sessions expire after seven days by default. Create a new session after expiry; records owned by an expired anonymous session are not transferred to the new one. Anonymous use has operation-specific limits. A limited request returns `429 anonymous_session_rate_limited` and a `Retry-After` header. Wait for that interval or move durable development and CI work to a scoped Test API key. > [!WARNING] > > Test Mode does not charge and cannot use a production provider lane. A > sandbox submission is still a real stateful API operation. Give retries a > stable `Idempotency-Key`, and do not assume a timed-out write failed. # Managed assets Source: https://docs.batchrelay.com/managed-assets Copy external images into private temporary storage or reuse an existing managed asset. `POST /v1/assets/ingest` creates or resolves one opaque managed asset for render and managed attachment workflows. It requires `print_orders:write` and an `Idempotency-Key` containing 1–200 characters. The returned `asset_id` can be used directly in a public print-order asset or a template image slot. A print-order asset also accepts an external HTTPS `url`; Batch Relay copies that source during quote creation and freezes the resulting managed asset with the quote. ## Choose exactly one source The request must contain exactly one of `url` or `asset_id`. Use `url` to copy an externally routable HTTPS image into Batch Relay's private fulfillment storage: ```bash theme={null} curl -X POST https://api.batchrelay.com/v1/assets/ingest \ -H 'Authorization: Bearer br_test_example' \ -H 'Idempotency-Key: asset-weekend-001' \ -H 'Content-Type: application/json' \ -d '{ "url": "https://assets.example.com/source/player.jpg", "original_filename": "player.jpg" }' ``` Batch Relay downloads the complete file with network-safety checks, validates the image, calculates its SHA-256 digest and dimensions, and writes an immutable content-addressed object to private fulfillment R2. The original URL is neither retained as the fulfillment URL nor exposed to the provider. The public limits are 16 MiB, 100 million pixels, and JPEG, PNG, or TIFF input. Use `asset_id` to resolve a ready, authorized managed asset without copying its bytes: ```json theme={null} { "asset_id": "bra_0123456789abcdef0123456789abcdef" } ``` For a studio-owned API account, this reuse path can also resolve a finalized same-studio platform image. Platform images remain in the studio-private bucket; they are referenced in place and are not copied into fulfillment storage. Cross-account and cross-studio IDs fail closed. Supplying both sources or neither source returns `invalid_asset_source` (`422`). Reusing an idempotency key with different request content returns `idempotency_conflict` (`409`). A deployment without its managed registry or private R2 configuration returns a managed-asset unavailable error (`503`). When the source host cannot be fetched, the pending managed-assets diagnostic rollout returns `source_fetch_failed` (`502`). The response tells you whether the source returned a non-2xx status, timed out, or could not be reached. It does not expose the upstream response body. The current deployed API still returns its broader ingestion failure until that rollout ships. ## Response The successful `201` response returns the stable `asset_id` plus immutable metadata. `reused` is `true` when Batch Relay resolved an existing `asset_id` or the content-addressed object already existed. ```json theme={null} { "asset_id": "bra_0123456789abcdef0123456789abcdef", "storage_scope": "fulfillment", "byte_size": 842311, "content_type": "image/jpeg", "format": "jpeg", "pixel_width": 2000, "pixel_height": 2500, "sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef", "original_filename": "player.jpg", "reused": false } ``` Use this ID in an image slot for `POST /v1/templates/{template_id}/renders` or as the source of a public print-order asset. Each print-order asset contains its semantic `role` and exactly one of `url` or `asset_id`. Test and Live requests use the same public host. The authenticated API-key record selects the lane. ## Retention and reprints Managed external assets are temporary: * An unattached asset is scheduled for cleanup 28 days after its managed record is created. * Once attached to an order, retention extends to the later of 28 days after order placement or 14 days after verified shipment. * An open reprint hold removes the cleanup deadline. Closing the hold applies its explicit future extension and recalculates the latest deadline across all attachments. Cleanup operates in bounded batches through short-lived claimed jobs. Before deletion, Batch Relay rechecks the deadline and retention state; an open reprint hold cancels authorization. Deletion is restricted to exact managed object-key shapes under `fulfillment/api-ingested/sha256/` and `fulfillment/rendered///.`; it cannot delete a studio object or enumerate a prefix. Do not treat `asset_id` as permanent archival storage. After authorized cleanup, re-ingest your retained source before a new render or attachment. # n8n Source: https://docs.batchrelay.com/n8n n8n node for Batch Relay API automations. The planned n8n node wraps the public Batch Relay API. It sends canonical Batch Relay product references and prepared assets to the API; it never talks to WHCC or any print provider directly. ## Credential * Batch Relay API Key * Base URL, usually `https://api.batchrelay.com` ## Operations * Create Print Order * Get Print Order * Get Usage Summary ## Field mapping Create Print Order will collect: * One or more line items with canonical product ID/revision, quantity, and required prepared assets * Ship-to name and address * External order ID * Idempotency key * Billing required toggle The node generates an idempotency key when one is not supplied. Production submission is not available yet; use `sandbox` until Batch Relay enables production billing and submit safeguards. ## Provider cost discovery Read approved `provider_offers` on the product or call `GET /v1/catalog/products/{product_id}/offers`. Product metadata supplies the immutable ID, revision, options and `units_per_quantity`, never a fallback cost. Match the offer's exact product revision, configuration and provider. Missing numeric costs remain unknown. An available approved zero is valid. The amount is per ordered quantity. A 12-card pack ordered twice produces 24 cards at two pack costs. Do not multiply the cost by 12 again. Keep retail prices separate, preserve credential lanes and explicit routing, and use the returned quote for shipping, tax, fees, final availability and total. # Products Source: https://docs.batchrelay.com/products Browse every canonical Batch Relay product and copy a verified prepared-media contract. Batch Relay publishes provider-neutral canonical products. The catalog response contains `families` for browsing and `products` for ordering. Every product has a stable ID, immutable fulfillment revision, explicit physical output, quantity meaning, options, and prepared-media contract. Fetch the catalog instead of hardcoding a provider SKU, image shape, or product alias: ```http theme={null} GET /v1/catalog/products GET /v1/catalog/products/{product_id} ``` Submit that revision with prepared media for your chosen product. Batch Relay does not crop or silently alter order artwork. The public API can copy an external source into managed fulfillment storage, and the optional template renderer can create composed artwork before fulfillment. ## Start with the catalog The catalog is the live authority for availability, lifecycle status, revisions, and option values. A family groups related immutable variants. Orders and quotes still use a concrete product ID and revision. If a page and the catalog disagree, use the catalog response. | Category | Products | | - | - | | [Prints](#prints) | 4 × 5, 4 × 6, 5 × 5, 5 × 7, 3.5 × 5, 8 × 10, 12 × 18, 16 × 20, wallet sheets | | [Keepsakes](#keepsakes) | Magnets, buttons, keychains, bag tags, contemporary plaques | | [Trader products](#trader-products) | Trader cards and trader-card magnets | | [Designed output](#designed-output) | Memory Mates and magazine covers rendered into ordinary print artwork | | [Digital delivery](#digital-delivery) | Digital Download catalog record, not a print-order API fulfillment route | ## Prepared assets Every order item has an `assets` array. Each asset has a semantic `role` and exactly one source: an external HTTPS `url` or an authorized `asset_id`. Creating a quote copies URL sources into private managed fulfillment storage; an `asset_id` reuses already-managed bytes without another copy. Immutable dimensions, size, format, and SHA-256 metadata are resolved from the stored bytes rather than trusted from caller hints. Examples of roles include `artwork`, `background`, `individual`, `team`, `logo`, `front`, and `back`. The catalog is authoritative for which roles are required, each role's aspect ratio, and `rotation_policy`. A role appears exactly once. A URL only needs to remain available through successful quote creation; submission and fulfillment use the quote-owned managed snapshot. The product examples below focus on the product-specific portion of an item. An external URL source can be supplied as: ```json theme={null} { "role": "artwork", "url": "https://cdn.example.com/orders/ord_123/artwork.jpg", "printed_file_name": "ord_123-artwork.jpg" } ``` For an existing managed asset, replace `url` with `asset_id`. URL-backed quote requests require an `Idempotency-Key`; retries reuse the same immutable copy. Provider offers are discovery-only. They do not ingest assets or create a submit-ready total. ## Orientation and provider placement Every asset role defaults to `rotation_policy: "fixed"`: prepare the exact orientation and ratio listed on its product page. Batch Relay rejects a wrong canonical role or ratio; it never edits the image to make it fit. Only a role published with `rotation_policy: "allowed"` accepts the reciprocal ratio. Standard prints, active Memory Mates, the 4 × 5 Magnet, and revision `3` Contemporary Plaques allow rotation. When a template is used, its renderer produces a final ordinary print artifact in the selected output geometry before the fulfillment step. For the current WHCC adapter, native `AutoRotate` is enabled only for an explicitly allowed role. It is disabled for fixed roles. The adapter preflights placement against the verified provider node and rejects a fit that would require more than a 1.25% center crop. This is provider-side placement reconciliation, not an image transformation. ## Prints | Product | Output per quantity | Prepared asset | | - | - | - | | [Print variants](/products/prints) | 1 print | `artwork`; exact ratio comes from the selected size variant | | [Wallet sheet](/products/wallet-set-4) | 4 wallets | `artwork` `5:7` | ## Keepsakes | Product | Output per quantity | Prepared asset roles | | - | - | - | | [4 × 5 Magnet](/products/magnet-4x5) | 1 magnet | `artwork` `4:5` | | [3-inch Photo Button](/products/photo-button-3) | 1 button | `artwork` `1:1` | | [Acrylic Keychains](/products/acrylic-keychains) | 1 keychain | Small `4:5`; large `7:5`; both require `front` and `back` | | [Metal Keychain](/products/metal-keychain) | 1 keychain | `front`, `back` `15:11` | | [Bag Tags](/products/bag-tags) | 1 bag tag | Small and large use separate two-sided contracts | | [Contemporary Plaques](/products/contemporary-plaques) | 1 plaque | 5 × 7 uses `5:7` or `7:5`; 8 × 10 uses `4:5` or `5:4` | ## Trader products | Product | Output per quantity | Prepared asset roles | | - | - | - | | [Trader Cards](/products/trader-cards-12) | 12 cards | `front` and `back`, both `11:15` | | [Trader Card Magnets](/products/trader-card-magnets-2) | 2 magnets | `front` `21:16`, `back` `7:5` | ## Designed output `template_requirement` controls whether an order may use prepared artwork directly: * `optional` means the product can use prepared artwork directly or a succeeded Batch Relay render. Standard photographic prints, current Contemporary Plaques, Photo Button, and 4 × 5 Magnet use this policy. Trader Cards accept prepared front/back artwork through the API; storefront offers require a published template producing both sides. * `required` means the product must use the `asset_id` from a succeeded Batch Relay render and the matching `template_render_id`. A raw URL or unrelated managed asset is rejected. * `unsupported` means the product has no supported template workflow. The designed products below all use `template_requirement: "required"`. Their rendered `artwork` remains attached to the Memory Mate or magazine-cover order record, then fulfills through its pinned standard-print target. See [Template renders](/template-renders) for the render workflow. | Product | Output per quantity | Prepared asset | | - | - | - | | [5 × 7 Memory Mate](/products/memory-mates) | 1 print | `artwork` `5:7` or `7:5` | | [8 × 10 Memory Mate](/products/memory-mates) | 1 print | `artwork` `4:5` or `5:4` | | [Magazine Cover, 8 × 10](/products/magazine-cover-8x10) | 1 print | `artwork` `4:5` | ## Digital delivery [Digital Download](/products/digital-download) is a live catalog record, but the public print-order API does not create or deliver digital entitlements. Do not put it in a print-order request. ## Pricing and availability are explicit Catalog products identify the canonical product and its fulfillment contract. Provider offers identify what a given provider can supply and its exact cost per ordered quantity: ```http theme={null} GET /v1/catalog/products/{product_id}/offers ``` Match the exact product revision, configuration and provider. Offers may also appear in `provider_offers` on a product response. Product identity and physical output never supply a price. Offers do not expose provider-native SKUs or adapter mappings. Discovery prices cannot be submitted as an order charge. Create a quote to freeze the selected offers, shipping, tax, the `api-access-fee-v1` policy, and total for 15 minutes. The quote's `provider_offer_lines` records the exact provider offer, unit cost, quantity, and line subtotal for each requested order line. Catalog support means Batch Relay recognizes and validates the canonical contract. Offer availability and hosted quote availability are separate decisions. Use the offer and quote response for the environment in which you will order; do not infer fulfillment readiness from a product page. An offer with `availability: "unknown"` and no `unit_cost_cents` has no verified provider price. Do not display it as free or infer a purchasable quote from catalog visibility. Studio retail prices are configured separately from provider costs. An approved numeric zero is valid. Test `unit_cost_cents` for presence and a nonnegative integer, not truthiness. Missing amounts remain unknown. Multiply the approved cost by ordered quantity, never by `units_per_quantity`. For example, quantity 2 of a product with `units_per_quantity: 12` produces 24 cards and consumes two packs at the returned cost per pack. Public offers describe the deployment's pricing environment; they do not replace protected account-specific staff pricing or authorize switching credential lanes. # Acrylic keychains Source: https://docs.batchrelay.com/products/acrylic-keychains Choose a small or large two-sided acrylic keychain. Acrylic keychains are one family with two immutable size variants. | Product ID | Physical output | Required front and back ratio | | - | - | - | | `acrylic-keychain-small` | 1.5 × 1.875 inches | `4:5` | | `acrylic-keychain-large` | 3 × 2.125 inches | `7:5` | Both `front` and `back` are required once and have fixed orientation. Prepare the two sides independently. Do not combine them into an `artwork` asset. ```json theme={null} { "product": { "id": "acrylic-keychain-small", "revision": 1 }, "quantity": 1, "assets": [ { "role": "front", "url": "https://cdn.example.com/keychain-front.jpg", "pixel_width": 1600, "pixel_height": 2000 }, { "role": "back", "url": "https://cdn.example.com/keychain-back.jpg", "pixel_width": 1600, "pixel_height": 2000 } ] } ``` # Bag tags Source: https://docs.batchrelay.com/products/bag-tags Choose a small or large two-sided bag tag. Bag tags are one family with two immutable variants. The sizes use different physical dimensions, artwork geometry, and provider mappings. | Product ID | Physical output | Front ratio | Back ratio | | - | - | - | - | | `bag-tag-small` | 2.82 × 4.18 inches | `209:141` | `141:209` | | `bag-tag-large` | 3.125 × 5.625 inches | `5:9` | `5:9` | Both `front` and `back` are required once and have fixed orientation. Neither variant has a paper option. The large bag tag's provider-side mapping, shipping, and cost path still await confirmation. Catalog presence does not mean hosted fulfillment is available. Inspect provider offers before quoting it. # Contemporary plaques Source: https://docs.batchrelay.com/products/contemporary-plaques Choose a 5 × 7 or 8 × 10 contemporary plaque. Contemporary plaques are one family with two immutable physical variants. They are not ordinary prints, even when a plaque shares a print's nominal size. | Product ID | Physical output | Required artwork ratio | | - | - | - | | `contemporary-plaque-5x7` | 5 × 7 inches | `5:7` portrait or `7:5` landscape | | `contemporary-plaque-8x10` | 8 × 10 inches | `4:5` portrait or `5:4` landscape | Each variant requires one `artwork` asset and has no paper option. Revision `3` uses `rotation_policy: "allowed"` and `template_requirement: "optional"`. Use a prepared photo directly, or submit a complete template composition with any border or typography that must appear in the physical output. The Template Engine offers separate portrait and landscape canvases for each size. An empty optional design uses the selected photo; an authored design with missing inputs must be completed before fulfillment. Use catalog revision `3` for new offers and templates. Revision `2` retains its portrait-only contract for existing references. Revision `1` remains readable for historical orders but is unavailable for new orders. Existing paid-order snapshots and published template revisions retain their original geometry. WHCC offers for these plaques currently allow Economy shipping. Read the exact offer's availability and cost before quoting: an unknown provider cost is not a zero price or a purchasable offer. # Digital Download Source: https://docs.batchrelay.com/products/digital-download A catalog record for one digital-download entitlement. `digital-download` revision `1` represents one digital-download entitlement. It has no print media, paper option, or physical output. > [!WARNING] > > The Batch Relay public print-order API does not create or deliver digital > entitlements. Do not include this product in a print-order quote or > submission request. Use the catalog record for product discovery. Use the authenticated Batch Relay application for digital-delivery workflows. # Magazine Cover, 8 × 10 Source: https://docs.batchrelay.com/products/magazine-cover-8x10 Order a rendered magazine cover as one finished 8 × 10 print. `magazine-cover-8x10` revision `1` produces one portrait 8 × 10 print per quantity. It routes to the canonical `print-8x10` fulfillment target. `template_requirement` is `required`. The order's `artwork` must use the `asset_id` from a succeeded Batch Relay render and include that render's matching `template_render_id`. A raw URL or unrelated managed asset is not accepted for this product. | Required asset | Exact ratio | Paper choices | | - | - | - | | `artwork` | `4:5` | `lustre`, `pearl`, `deep-matte` | The magazine-cover identity remains on the order record while fulfillment uses its pinned standard-print target. The role has fixed orientation. # 4 × 5 Magnet Source: https://docs.batchrelay.com/products/magnet-4x5 Order one prepared 4 × 5 photo magnet per quantity. `magnet-4x5` revision `2` produces one 4 × 5 photo magnet per quantity and supports optional template artwork. Use a prepared photo directly or a complete rendered design. Historical revision `1` references retain their original contract. | Required asset | Accepted ratio | Example prepared pixels | | - | - | - | | `artwork` | `4:5` or `5:4` | 1600 × 2000 | ```json theme={null} { "product": { "id": "magnet-4x5", "revision": 2 }, "quantity": 1, "assets": [{ "role": "artwork", "url": "https://cdn.example.com/orders/magnet.jpg", "pixel_width": 1600, "pixel_height": 2000 }] } ``` This product has no paper option and no separate front/back asset roles. Its standalone artwork role has `rotation_policy: "allowed"`, so it accepts either listed orientation; a provider placement adjustment never substitutes for that validation. # Memory Mates Source: https://docs.batchrelay.com/products/memory-mates Choose a physical size and order a portrait or landscape template render as one finished print. Memory Mates are one public product family with two immutable size variants. The rendered artwork determines orientation. Callers do not select portrait or landscape as a product or option. | Product ID | Physical output | Accepted artwork | Fulfillment target | | - | - | - | - | | `memory-mate-5x7` | 5 × 7 inches | `5:7` or `7:5` | `print-5x7` revision `1` | | `memory-mate-8x10` | 8 × 10 inches | `4:5` or `5:4` | `print-8x10` revision `1` | Both variants use revision `1`, support `lustre`, `pearl`, and `deep-matte`, and have `template_requirement: "required"`. The `artwork` must be the managed artifact from a succeeded Batch Relay template render. Supply its `asset_id` and matching `template_render_id`. A raw URL or unrelated managed asset is rejected. ```json theme={null} { "product": { "id": "memory-mate-5x7", "revision": 1 }, "quantity": 1, "options": [{ "option_id": "paper", "value": "lustre" }], "assets": [{ "role": "artwork", "asset_id": "bra_rendered_memory_mate", "template_render_id": "render_memory_mate" }] } ``` A 1500 × 2100 artifact is portrait. A 2100 × 1500 artifact is landscape. Both are valid for `memory-mate-5x7`. Batch Relay validates the ratio and preserves the exact rendered geometry on the order. The Memory Mate product ID remains on the order and audit record. Provider routing receives the pinned standard-print fulfillment target and the finished artwork. It never receives a provider-specific Memory Mate SKU. The older orientation-specific and multi-asset Memory Mate IDs remain internal historical records. They are not listed by the public catalog and cannot be used for new quotes or orders. # Metal Keychain Source: https://docs.batchrelay.com/products/metal-keychain Order one two-sided metal keychain from separate prepared front and back assets. `metal-keychain` revision `1` produces one 2.375 × 1.75 inch keychain per quantity. | Required role | Exact ratio | Example prepared pixels | | - | - | - | | `front` | `15:11` | 3000 × 2200 | | `back` | `15:11` | 3000 × 2200 | ```json theme={null} { "product": { "id": "metal-keychain", "revision": 1 }, "quantity": 1, "assets": [ { "role": "front", "url": "https://cdn.example.com/orders/metal-front.jpg", "pixel_width": 3000, "pixel_height": 2200 }, { "role": "back", "url": "https://cdn.example.com/orders/metal-back.jpg", "pixel_width": 3000, "pixel_height": 2200 } ] } ``` The `15:11` geometry is specific to this product. Do not substitute an acrylic keychain image even when its physical dimensions appear similar. # 3-inch Photo Button Source: https://docs.batchrelay.com/products/photo-button-3 Order one 3-inch button from a prepared square artwork asset. `photo-button-3` revision `2` produces one 3-inch button per quantity and supports optional template artwork. | Required asset | Exact ratio | Required prepared pixels | | - | - | - | | `artwork` | `1:1` | 990 × 990 at 300 DPI | ```json theme={null} { "product": { "id": "photo-button-3", "revision": 2 }, "quantity": 5, "assets": [{ "role": "artwork", "url": "https://cdn.example.com/orders/button-art.jpg", "pixel_width": 990, "pixel_height": 990, "dpi": 300, "format": "jpeg" }] } ``` The prepared square covers 3.3 × 3.3 inches. The finished circle is 3 inches in diameter, centered in that square. Keep faces, names, and other important content inside the centered 2.5-inch important-content circle; extend the background to the square's edges. This product has no paper option. API clients supply the exact prepared JPEG, including an embedded RGB color profile, or use compatible template-render output. A larger square photograph does not satisfy the exact prepared-file contract. Automatic photo preparation in supported storefront checkout flows is separate from public API prepared asset validation. Historical revision `1` references remain unchanged. # Prints Source: https://docs.batchrelay.com/products/prints Choose an immutable print size and submit prepared portrait or landscape artwork. Prints are one public product family. Each physical size remains an immutable variant because its dimensions, provider mapping, and revision can change independently. | Product ID | Physical output | Accepted artwork | | - | - | - | | `print-4x5` | 4 × 5 inches | `4:5` or `5:4` | | `print-4x6` | 4 × 6 inches | `2:3` or `3:2` | | `print-5x5` | 5 × 5 inches | `1:1` | | `print-5x7` | 5 × 7 inches | `5:7` or `7:5` | | `print-3.5x5` | 3.5 × 5 inches | `7:10` or `10:7` | | `print-8x10` | 8 × 10 inches | `4:5` or `5:4` | | `print-12x18` | 12 × 18 inches | `2:3` or `3:2` | | `print-16x20` | 16 × 20 inches | `4:5` or `5:4` | All print variants use revision `1`. Their `artwork` role allows rotation, so the prepared dimensions determine portrait or landscape orientation. Batch Relay validates the ratio and does not crop the image to make it fit. ```json theme={null} { "product": { "id": "print-5x7", "revision": 1 }, "quantity": 1, "options": [{ "option_id": "paper", "value": "lustre" }], "assets": [{ "role": "artwork", "url": "https://cdn.example.com/orders/team-5x7.jpg", "pixel_width": 2000, "pixel_height": 2800 }] } ``` Paper choices are `lustre`, `pearl`, and `deep-matte`. Read `GET /v1/catalog/products/{product_id}/offers` and select the offer for the exact product revision, paper configuration and provider. An available offer with `unit_cost_cents: 0` is a valid approved zero cost. An unknown or unavailable offer has no approved numeric cost and must not be shown as free. The cost applies to one ordered quantity. Read `units_per_quantity` to determine the physical output. A quote determines final availability and the full order charge, including shipping, tax and fees. Keep studio retail prices separate. # Trader Card Magnets (set of 2) Source: https://docs.batchrelay.com/products/trader-card-magnets-2 Order prepared two-magnet sets with separate front and back assets. `trader-card-magnets-2` revision `1` produces two 2.5 × 3.5 inch magnets per quantity. | Required role | Exact ratio | Example prepared pixels | | - | - | - | | `front` | `21:16` | 2100 × 1600 | | `back` | `7:5` | 1400 × 1000 | ```json theme={null} { "product": { "id": "trader-card-magnets-2", "revision": 1 }, "quantity": 1, "options": [{ "option_id": "paper", "value": "lustre" }], "assets": [ { "role": "front", "url": "https://cdn.example.com/orders/magnet-card-front.jpg", "pixel_width": 2100, "pixel_height": 1600 }, { "role": "back", "url": "https://cdn.example.com/orders/magnet-card-back.jpg", "pixel_width": 1400, "pixel_height": 1000 } ] } ``` Quantity counts sets of two, not individual magnets. The front and back have different ratios and must not be swapped. # Trader Cards (set of 12) Source: https://docs.batchrelay.com/products/trader-cards-12 Order double-sided 12-card sets with complete front and back artwork. `trader-cards-12` revision `2` produces twelve double-sided 2.5 × 3.5 inch cards per quantity. Quantity `2` means two sets and twenty-four physical cards. Supply two complete portrait designs. Each prepared image covers 2.75 × 3.75 inches, including bleed. The finished card is smaller than the uploaded artwork. Keep backgrounds extended to the artwork edges and important content within the template's important-content guide. | Required role | Exact ratio | Default 300 PPI | Supported 600 PPI | | - | - | - | - | | `front` | `11:15` | 825 × 1125 pixels | 1650 × 2250 pixels | | `back` | `11:15` | 825 × 1125 pixels | 1650 × 2250 pixels | Both sides must use the same output resolution. A resolution change requires new rendered artifacts and a new proof review. Rendering at 600 PPI does not recover detail missing from a source photograph or guarantee a sharper physical print. ```json theme={null} { "product": { "id": "trader-cards-12", "revision": 2 }, "quantity": 2, "assets": [ { "role": "front", "url": "https://cdn.example.com/orders/card-front.jpg", "pixel_width": 825, "pixel_height": 1125, "dpi": 300, "format": "jpeg" }, { "role": "back", "url": "https://cdn.example.com/orders/card-back.jpg", "pixel_width": 825, "pixel_height": 1125, "dpi": 300, "format": "jpeg" } ] } ``` Each role is required exactly once. Player photographs are inputs to a template; they are not a separate provider artwork role. Studio storefront offers require an assigned published template that produces both sides. API clients can supply already-prepared front and back JPEGs or use compatible template-render output. Preserve the aspect ratio and submit high-quality JPEGs with an embedded RGB color profile. Revision `1` used a different three-asset layout and is unavailable for new orders. Rebind drafts and offers to revision `2`, review both sides, and publish a new template revision. Historical orders and previously published template revisions retain their original contracts. # Wallets (set of 4) Source: https://docs.batchrelay.com/products/wallet-set-4 Order prepared wallet sheets; each quantity produces four 2.5 × 3.5 wallets. `wallet-set-4` revision `1` is one independently fulfillable prepared 5 × 7 sheet. One quantity produces four 2.5 × 3.5 wallets; quantity `3` produces three sheets and twelve wallets. | Required asset | Exact ratio | Example prepared pixels | | - | - | - | | `artwork` | `5:7` | 2000 × 2800 | ```json theme={null} { "product": { "id": "wallet-set-4", "revision": 1 }, "quantity": 3, "assets": [{ "role": "artwork", "url": "https://cdn.example.com/orders/wallet-sheet.jpg", "pixel_width": 2000, "pixel_height": 2800 }] } ``` Do not create duplicate eight- or twelve-wallet product IDs. Quantity carries the number of prepared sheets. Different wallet artwork belongs on separate lines. # Provider offers and quotes Source: https://docs.batchrelay.com/provider-routing Discover canonical provider offers and create one-provider quotes. Provider discovery is deliberately separate from a chargeable quote. Read the offers for one canonical product first: ```http theme={null} GET /v1/catalog/products/{product_id}/offers ``` An offer is provider-neutral. It includes the canonical product and option configuration, `provider_id`, availability, and portable fulfillment constraints. It never exposes a lab SKU, UID, recipe, account, or raw provider payload. ## Availability and exact costs An `available` WHCC offer carries a verified exact USD `unit_cost_cents` and a `pricing_revision`. That is discovery data, not a locked price or shipping quote. The response also includes `fulfillment_constraints`: a fulfillment group and, where applicable, eligible shipping services and requirements. `unknown` and `unavailable` are intentionally unpriced. Richmond Pro Lab (`rpl`) is currently an `unknown` canonical offer: it has no `currency`, `unit_cost_cents`, or `pricing_revision`. Do not manufacture a zero price or use an unknown offer as a fallback. An unavailable or unknown offer is not chargeable. Runtime readiness can omit a verified WHCC offer when that provider lane is not configured. Treat the returned list as current discovery state, not a guarantee that a later checkout will submit. ## Create a quote Use `POST /v1/print-orders/quote` with an `order` and `routing` object. Quotes are server-calculated, expire after 15 minutes, and freeze the selected provider's public offer evidence. ```json theme={null} { "routing": { "mode": "single_provider", "provider_id": "whcc" }, "order": { "...": "see the API reference" } } ``` The public quote response includes `provider`, `provider_offer_lines`, `expires_at`, and `price`. Every quoted offer line is available and has the selected provider, configuration, exact unit cost, quantity, line subtotal, and pricing revision. Those subtotals reconcile to `price.merchandise_cents`. `price` contains server-calculated merchandise, shipping, tax, and Batch Relay API access-fee fields. No provider-offer warning or multi-provider fulfillment-group field is exposed by this HTTP quote contract. Do not depend on domain-model-only warnings in an API client. ## Routing remains one provider `studio_default` and `single_provider` require one provider to fulfill every line; neither silently substitutes another lab. If the selected provider cannot fulfill the order, the API returns `422 preferred_provider_incomplete` with the unsupported lines and any whole-order alternatives. `best_available` is represented so clients can handle the intent, but it currently returns `422 split_fulfillment_unavailable`. Split-provider HTTP submission is not enabled. It remains blocked until durable order storage can represent fulfillment groups, their independent shipping charges, submission states, and recovery safely. ## Preserve offer identity and units Match `product.id`, `product.revision`, `configuration` and `provider_id` exactly. Preserve `pricing_revision` as approved pricebook evidence. An approved zero is a valid amount; missing numeric data must stay unknown. `unit_cost_cents` applies to one ordered quantity. Use the product's `units_per_quantity` for physical output. Quantity 2 of a 12-card pack produces 24 cards and consumes two pack costs. Do not apply the amount per individual card. Quote observations cannot approve a new rate. Public offers use the deployment's environment and do not authorize a different credential lane or replace protected account-specific costs. # Quickstart Source: https://docs.batchrelay.com/quickstart Quote and submit one sandbox print order safely. ## 1. Start in Test Mode Create an isolated anonymous session with no signup or copied API key: ```bash theme={null} TOKEN="$(curl -fsS -X POST https://api.batchrelay.com/v1/anonymous-sessions | jq -r '.session_token')" ``` 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](/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](/products#designed-output) 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: ```http theme={null} GET /v1/catalog/products/print-5x7/offers ``` 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: ```json theme={null} { "routing": { "mode": "studio_default" }, "order": { "...": "the canonical order request" } } ``` 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. # Promote sandbox studio setup Source: https://docs.batchrelay.com/sandbox-promotions Review and apply a bounded sandbox-to-Live studio configuration promotion. A sandbox promotion copies selected studio configuration from Test Mode into Live Mode. It is a reviewable configuration change, not a general migration. The promotion plan records the source state, the target state, and the exact changes the server can safely apply. Use a Live `br_...` API key. Test keys, anonymous sessions, and OAuth sessions cannot create, inspect, apply, or roll back a promotion. The key needs a grant for the named studio plus `sandbox_promotions:read` to plan or review and `sandbox_promotions:apply` to apply or roll back. > [!WARNING] > > A promotion changes Live studio configuration. Review the plan and resolve > every block or conflict before applying it. The CLI requires an explicit > studio-name confirmation in its terminal workflow. Noninteractive apply and > rollback also require `--yes`. ## What can move Choose one or more of these configuration areas when creating a plan: | Include | What the plan evaluates | | - | - | | `forms` | Reusable form definitions and event form configuration that the promotion supports. | | `catalog` | Studio catalog products, variants, and packages. | | `storefront` | The published storefront assortment. | The response lists each action as `create`, `update`, `archive`, `no_op`, or `block`. It also includes the resource changes, catalog price before/after where it applies, new Live ID mappings, the current media-preparation state, warnings, and conflicts. Values are limited to user-visible fields. The API does not return storage IDs, temporary upload credentials, or asset URLs. ## Create and review a plan Create a plan with a stable idempotency key: ```bash theme={null} batchrelay sandbox promotions plan \ --studio stu_example \ --include forms,catalog,storefront \ --idempotency-key sandbox-to-live-20260830-001 \ --pretty ``` The CLI writes the complete plan JSON to stdout. It writes warnings and diagnostics to stderr, with keys, idempotency values, signed URLs, and storage identifiers removed. Save the promotion ID, plan version, and plan SHA-256 from the reviewed response. Do not construct either checksum yourself. The `plan_sha256` is the commitment for the complete promoted public configuration, not only the compact review summary. The summary names each resource and its `changed_fields`, while omitting verbose values that do not need to be shown at review time. Each resource also includes `before_sha256` and `after_sha256` commitments for its privacy-safe before and after payloads. Together they cover every promoted field without exposing private snapshots, provider payloads, URLs, object keys, storage IDs, or raw form data. Apply requires the exact reviewed plan version and checksum, so the server can reject a changed plan instead of applying a different configuration. Read the plan again before acting: ```bash theme={null} batchrelay sandbox promotions get spr_example --studio stu_example --pretty ``` `preparing` means internal trusted media staging is unsettled. Creating the plan may begin copying already-stored sandbox media, but `preparing` makes no readiness guarantee. Wait until the plan is ready, or resolve the reported preparation issue. ## Apply a reviewed plan Apply only the plan version and SHA-256 you reviewed: ```bash theme={null} batchrelay sandbox promotions apply spr_example \ --studio stu_example \ --expected-plan-version 4 \ --plan-sha256 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef \ --idempotency-key sandbox-to-live-20260830-apply \ --yes \ --pretty ``` The server rejects a stale plan with `409 sandbox_promotion_conflict`. Fetch the current promotion, read the conflict, and create a new plan when the source or Live configuration changed. Do not retry an ambiguous apply with a different idempotency key. ## Roll back an applied promotion Rollback uses the applied version and checksum returned after a successful apply. It rolls back only the recorded promotion changes. It does not undo configuration changes made later outside that promotion. ```bash theme={null} batchrelay sandbox promotions rollback spr_example \ --studio stu_example \ --expected-applied-version 2 \ --applied-sha256 abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789 \ --idempotency-key sandbox-to-live-20260830-rollback \ --yes \ --pretty ``` ## Identity and media behavior Live records receive Live IDs. The plan's identity mapping tells you which sandbox record maps to which new Live record. Treat those mappings as the only safe way to update downstream configuration after promotion. Media can require preparation before apply. The promotion status reports that state: `preparing` means it is unsettled, while `ready` means the server can review and apply the plan. A blocked or failed plan requires correction in the sandbox configuration and a new plan. The API can work with already-stored sandbox media internally, but it never accepts or returns bytes, temporary upload sessions, storage IDs, object keys, signed URLs, or reusable storage capabilities. ## What stays out of a promotion Promotions intentionally exclude checkout links, event records, temporary upload sessions, API idempotency records, and anonymous sessions. Test checkout links remain non-payable. Recreate approved checkout links in Live Mode after the storefront and catalog changes are live. ## Terminal workflow Run `batchrelay tui` from a human terminal and choose **Promote sandbox setup**. The review screen shows the selected studio name and ID, creates, updates, archives, blocks, price changes, new ID mappings, media preparation, warnings, and conflicts. Before apply, type the displayed studio name exactly. The TUI calls the same Cobra commands shown above. `--json`, `--no-tui`, CI, agent mode, and non-TTY sessions stay scriptable and never open the TUI. ## Errors and recovery | Code | Meaning | Recovery | | - | - | - | | `invalid_promotion_request` | Includes, version, checksum, or request body is invalid. | Correct the request without changing the intended idempotency key. | | `idempotency_key_required` | A write did not include a stable key. | Supply one before retrying. | | `sandbox_promotion_forbidden` | The key is not a Live key or lacks the studio grant or scope. | Use the intended Live profile and grant. | | `sandbox_promotion_not_found` | The promotion is not visible to this studio credential. | Check the studio ID and promotion ID. | | `sandbox_promotion_conflict` | The reviewed version no longer matches, or a lifecycle transition is unsafe. | Fetch the promotion, resolve the change, then create a new plan if needed. | | `invalid_sandbox_promotion` | The current configuration cannot be promoted. | Resolve the reported block in Test Mode, then plan again. | | `sandbox_promotion_unavailable` | The service cannot prepare or apply the promotion now. | Retry the same write with the same idempotency key. | | `sandbox_promotion_failed` | A dependent promotion step failed. | Inspect the safe response details and preserve the request ID for support. | See [Idempotency](/idempotency), [Authentication](/authentication), [Sandbox Testing](/sandbox-testing), and [Errors](/errors) for the shared request rules. # Sandbox Testing Source: https://docs.batchrelay.com/sandbox-testing Test Batch Relay without production provider work. Send requests to `https://api.batchrelay.com`. An anonymous `br_anon_` session or account-owned `br_test_` key selects the public Test Mode lane; a request field cannot select Test Mode or Live Mode. Anonymous sessions follow the same public sandbox provider-selection and quote rules as account-owned Test API keys. They add isolation, expiration, and operation-specific quotas; they do not use a reduced fake API. Provider offers and quotes are safe ways to test canonical validation, provider availability, quote freezing, and idempotency. Test Mode records are isolated sandbox shadows: they do not charge, submit to a live provider, or promote themselves into a Live Mode order. Automated tests use mock transports only. > [!WARNING] > > A successful sandbox response proves only the Test Mode operation. It is not > payment or provider-submission proof. Do not treat a provider's presence in catalog or offer discovery data as proof that it can fulfill an order. The quote and order responses are the authority for availability in the current environment. ## Studio-scoped sandbox management Anonymous sessions intentionally cannot access studio, event, catalog, or checkout-link management. Use an account-owned `br_test_` key with the exact scope required by the operation and an authorized studio grant. Checkout links also require the corresponding `print_orders:read` or `print_orders:write` scope. A Test Mode checkout link returns a non-payable management record, not a guest bearer URL. Its creation response has `preview_status: "non_payable"` and no URL; use the authenticated checkout-link GET endpoint to inspect its lifecycle record. There is no implicit promotion path. Recreate an approved operation with a Live Mode credential when you are ready to do Live Mode work; do not reuse a sandbox record, quote, token, or idempotency expectation as a production artifact. Studio configuration is the narrow exception: a Live key with the required studio grant can create a reviewed [sandbox promotion](/sandbox-promotions) for forms, catalog, and storefront configuration. It does not promote checkout links, events, temporary upload sessions, API idempotency records, or anonymous sessions. Test checkout links remain non-payable and must be recreated in Live Mode after promotion. # Shipping services Source: https://docs.batchrelay.com/shipping-services Read the V1 automation shipping choices before creating a quote. `GET /v1/catalog/shipping-services` returns the published V1 shipping choices for automation forms. It is public and cacheable for five minutes. > [!WARNING] > > This page targets the pending Shipping Catalog API rollout. The public API > currently returns `404` for this route. Do not enable an integration until it > returns `200`. The response is discovery data, not a quote. Copy the selected `service` into the order, then quote the full order. The quote decides whether that service is available for the destination and freezes the final amount. ```json theme={null} { "shipping_catalog_revision": "shipping-catalog-v1", "shipping_services": [ { "service": "economy_untracked", "label": "Economy untracked", "tracking": "untracked", "delivery_estimate": "2-8 business days after production", "base_amount_cents": 595, "base_amount_label": "$5.95 base", "currency": "USD", "eligibility": ["Eligible loose photo prints only", "Maximum 10 physical prints"] } ] } ``` ## Published choices | Service | Base schedule | Notes | | - | - | - | | `economy_untracked` | \$5.95 | Loose 4 × 5, 4 × 6, 5 × 5, 5 × 7, or 8 × 10 prints only. Maximum 10 prints. Lower-48 street address only. | | `economy` | \$7.95 | Tracked. U.S. street, PO Box, APO, and FPO destinations. Not available for Alaska or Hawaii. | | `expedited` | \$11.50 | Tracked. U.S. street address only. Alaska and Hawaii surcharges may apply. | `standard_one_day` and `priority_one_day` remain valid order values, but the catalog does not publish them yet. Do not present them as generally available automation choices. ## Refresh on every run Store the returned `shipping_catalog_revision` with a saved workflow setting. Reload the catalog when the workflow runs. If the saved service or revision is gone, ask the user to choose again rather than guessing a replacement. # Studio management Source: https://docs.batchrelay.com/studio-management Read studio events, manage versioned event forms, and replace a studio storefront assortment. The studio management API reads event metadata, manages event form schemas, and manages a studio's public storefront assortment. It does not expose athletes, guardians, roster rows, orders, or CRM records. Every studio-owned request includes the studio's stable public ID: ```http theme={null} GET /v1/studios/stu_example/events ``` The path selects the requested studio. Authorization still comes from the API key. Batch Relay verifies that a studio-owned key belongs to that studio or that an individual key has an active grant for it. ## Select a studio List the studios available to the current credential: ```bash theme={null} curl 'https://api.batchrelay.com/v1/studios?limit=50' \ -H "Authorization: Bearer $BATCHRELAY_API_KEY" ``` A single-studio integration receives one item. Multi-studio integrations should retain the selected `stu_...` ID and use it in every studio request. List responses use this envelope: ```json theme={null} { "items": [{ "id": "stu_example", "name": "Example Studio" }], "next_cursor": null, "is_done": true } ``` Pass `next_cursor` back as `cursor` to read the next page. The `limit` must be between 1 and 100. The CLI selects the only accessible studio automatically. If the credential can access more than one studio, pass `--studio` or save a default on the profile: ```bash theme={null} batchrelay studios list --pretty batchrelay --profile agency profiles set-studio stu_example batchrelay --profile agency events list --pretty batchrelay --profile agency --studio stu_other events list --pretty ``` The saved studio ID is a local preference, not authorization. The API still checks the selected studio against the credential on every request. ## Read events ```bash theme={null} curl https://api.batchrelay.com/v1/studios/stu_example/events \ -H "Authorization: Bearer $BATCHRELAY_API_KEY" ``` An event response contains operational metadata and its active form revision ID. It never includes submitted form answers or participant records. ## Inspect reusable definitions Reusable definitions are read-only in V1. They can seed a new event revision, but changing a definition does not alter revisions already attached to events. ```bash theme={null} curl https://api.batchrelay.com/v1/studios/stu_example/form-definitions \ -H "Authorization: Bearer $BATCHRELAY_API_KEY" ``` ## Create a draft revision Create a draft from a reusable definition, explicit fields, or both. Supply an idempotency key so retrying an interrupted request cannot create a second draft. ```bash theme={null} curl -X POST \ https://api.batchrelay.com/v1/studios/stu_example/events/evt_example/form-revisions \ -H "Authorization: Bearer $BATCHRELAY_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: form-draft-20260829-001" \ -d '{ "form_definition_id": "frm_example", "fields": [ { "key": "jersey_number", "label": "Jersey number", "input_type": "number", "required": false, "semantic_key": "athlete.jersey_number", "sort_order": 2 } ] }' ``` Batch Relay resolves semantic keys against the platform vocabulary and rejects an incompatible input type. The matching CLI command reads the request body from a file or stdin: ```bash theme={null} batchrelay forms revisions create \ --event evt_example \ --input form-revision.json \ --idempotency-key form-draft-20260829-001 \ --pretty ``` ## Update a draft Only drafts can be changed. Pass the `edit_version` returned by the prior read or write. A stale version returns `409 form_revision_conflict` instead of overwriting another edit. ```bash theme={null} curl -X PATCH \ https://api.batchrelay.com/v1/studios/stu_example/events/evt_example/form-revisions/frv_example \ -H "Authorization: Bearer $BATCHRELAY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "expected_edit_version": 2, "fields": [ { "key": "jersey_number", "label": "Jersey number", "input_type": "number", "required": true, "semantic_key": "athlete.jersey_number", "sort_order": 2 } ] }' ``` ```bash theme={null} batchrelay forms revisions update frv_example \ --event evt_example \ --input form-revision-update.json \ --expected-edit-version 2 \ --pretty ``` ## Publish a revision Publishing makes the draft immutable, supersedes the prior active revision, and updates the event's active revision pointer in one transaction. Publication fails if the draft was based on an active revision that has since changed. ```bash theme={null} curl -X POST \ https://api.batchrelay.com/v1/studios/stu_example/events/evt_example/form-revisions/frv_example/publish \ -H "Authorization: Bearer $BATCHRELAY_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: form-publish-20260829-001" \ -d '{"expected_edit_version": 3}' ``` ```bash theme={null} batchrelay forms revisions publish frv_example \ --event evt_example \ --expected-edit-version 3 \ --idempotency-key form-publish-20260829-001 \ --pretty ``` Test keys cannot create, update, or publish revisions because forms are live studio configuration. Anonymous sessions cannot access these routes. ## Storefront management Each studio has one public storefront and one published assortment. Read it with: ```bash theme={null} curl https://api.batchrelay.com/v1/studios/stu_example/storefront \ -H "Authorization: Bearer $BATCHRELAY_API_KEY" ``` The response contains its current `revision` and the complete `sellables` array. A sellable is a `catalog_item` or `package` with its public ID. Replace the complete assortment with `PATCH`. This is an atomic, immediately published change, not a draft. Supply the revision you read, the entire next array, and an `Idempotency-Key`: ```bash theme={null} curl -X PATCH \ https://api.batchrelay.com/v1/studios/stu_example/storefront \ -H "Authorization: Bearer $BATCHRELAY_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: storefront-20260829-001" \ -d '{ "expected_published_revision": 4, "sellables": [ { "type": "catalog_item", "id": "scp_example" }, { "type": "package", "id": "spk_example" } ] }' ``` This requires `storefronts:write` and a Live API key. A stale `expected_published_revision` returns a conflict instead of overwriting a more recent published assortment. There is no separate storefront draft or publish endpoint yet. ## Product and package edits Studio product and package updates use their direct resource paths. Do not add `/draft` to either path: ```http theme={null} PATCH /v1/studios/{studio_id}/products/{product_id} PATCH /v1/studios/{studio_id}/packages/{package_id} ``` Both updates require the current `expected_edit_version`. When a published resource is changed, the server creates or updates its server-owned draft revision. Use the generated API reference for the complete request schemas. ## Semantic fields Semantic fields use platform-owned keys such as `athlete.jersey_number`. Query the vocabulary before generating a form. This catalog read is unauthenticated and is not scoped to a studio: ```bash theme={null} curl https://api.batchrelay.com/v1/catalog/semantic-fields ``` The response includes each field's compatible input types, status, and aliases. Clients should persist the stable semantic key, not a label or internal ID. All management list endpoints use the same cursor envelope. Treat cursors as opaque values and stop when `is_done` is true. # Studio discounts and offers Source: https://docs.batchrelay.com/studio-offers Create, revise, activate, inspect, and revoke studio-scoped discount offers. Studio offers are owned by one studio and one API environment. The API accepts discount terms and selectors; Batch Relay checks eligibility, calculates discounts, provisions any payment-provider objects, and records redemptions. All offer amounts use USD cents. Code offers can be entered by customers in hosted Stripe Checkout when code entry is enabled for that environment. Publishing a code through this API does not enable the checkout field. Automatic offers are selected by the checkout service. Creating an offer saves a draft; activate or schedule the returned revision before expecting it to be used. ## Access and scopes Use an account-owned API key, the exact studio ID in each path, and an active grant for that studio. Anonymous sessions cannot manage offers. Test and Live keys select separate offer environments; a Test Mode offer does not become a Live offer. Use a Test Mode key to exercise offer writes in the isolated Test environment before making a Live change. | Operation | Required scope | | - | - | | List or read offers | `offers:read` | | Create, revise, activate, schedule, pause, resume, or revoke | `offers:write` | | Read redemption history | `offers:read` | | Preview offer margin | `margins:read` | Studio roles also apply: owners and admins can manage offers, while other authorized studio staff can read them. `offers:write` does not imply `offers:read`; give a key both scopes only when its workflow needs both. Checkout-link creation, preparation, and recovery also require `offers:apply`, alongside the checkout-link and print-order scopes. See [Checkout Links](/checkout-links). ## Routes All routes are under `/v1/studios/{studio_id}` and require the exact studio grant. | Method and path | Scope | Purpose | | - | - | - | | `GET /offers` | `offers:read` | List offers. | | `POST /offers` | `offers:write` | Create a draft offer. | | `GET /offers/{offer_id}` | `offers:read` | Read one offer. | | `PATCH /offers/{offer_id}` | `offers:write` | Append a candidate terms revision. | | `POST /offers/{offer_id}/activate` | `offers:write` | Activate a specific revision. | | `POST /offers/{offer_id}/schedule` | `offers:write` | Schedule a specific revision. | | `POST /offers/{offer_id}/pause` | `offers:write` | Pause an offer. | | `POST /offers/{offer_id}/resume` | `offers:write` | Resume a paused offer. | | `POST /offers/{offer_id}/revoke` | `offers:write` | Permanently revoke an offer. | | `GET /offers/{offer_id}/redemptions` | `offers:read` | Read redemption history. | | `POST /offers/{offer_id}/margin-preview` | `margins:read` | Preview current estimated margin. | ## Create a code The create request accepts a complete set of terms. It does not accept Stripe IDs, a calculated price, or a client-supplied discount amount for an order. Code values must be uppercase, contain no whitespace, and be at most 80 characters. Percentage discounts use whole percentages from 1 through 100; fixed discounts use a positive amount in cents. Currency must be USD. For a fixed amount, set `kind` to `fixed` and send `amount_off_cents` instead of `percent_off`. ```http theme={null} POST /v1/studios/stu_example/offers Authorization: Bearer br_test_your_test_key Idempotency-Key: fall-2026-offer-create Content-Type: application/json ``` ```json theme={null} { "name": "Fall weekend", "code": "FALL2026", "kind": "percent", "percent_off": 15, "currency": "USD", "application": "code", "scope": { "kind": "storewide" }, "limits": { "max_redemptions": 50, "once_per_person": true }, "minimum_subtotal_cents": 2500 } ``` `application` is `code` for a customer-entered code or `automatic` for a server-selected offer. Automatic offers must omit `code`. Scope can be `storewide`, `event`, `guardian`, `product`, or `package`; event and guardian scopes take their matching ID, while product and package scopes take a `sellable_ids` array. `limits.max_redemptions` is optional and must be positive when supplied. `starts_at`, `ends_at`, and `minimum_subtotal_cents` are optional. The `201` response contains the offer and its first immutable revision: ```json theme={null} { "id": "off_example", "name": "Fall weekend", "code": "FALL2026", "kind": "percent", "percent_off": 15, "currency": "USD", "application": "code", "scope": { "kind": "storewide" }, "limits": { "max_redemptions": 50, "once_per_person": true }, "minimum_subtotal_cents": 2500, "status": "draft", "revision": 1, "revision_id": "revision_example", "provisioning_status": "succeeded", "usage": { "reserved": 0, "redeemed": 0, "max_uses": 50, "remaining": 50 }, "created_at": "2026-10-20T08:00:00Z", "updated_at": "2026-10-20T08:00:00Z" } ``` The example response is illustrative; provisioning status and timestamps come from the service. Store the returned `id`, `revision`, and `revision_id` for subsequent operations. ## Revise terms, then activate that revision Terms are immutable after creation. `PATCH` appends a candidate revision and does not activate it. Send the full replacement terms under `terms`, the revision number you read as `expected_revision`, and a new idempotency key for this mutation. ```http theme={null} PATCH /v1/studios/stu_example/offers/off_example Authorization: Bearer br_test_your_test_key Idempotency-Key: fall-2026-offer-revision-2 Content-Type: application/json ``` ```json theme={null} { "expected_revision": 1, "terms": { "name": "Fall weekend", "code": "FALL2026", "kind": "percent", "percent_off": 20, "currency": "USD", "application": "code", "scope": { "kind": "storewide" }, "limits": { "max_redemptions": 50, "once_per_person": true }, "minimum_subtotal_cents": 2500 } } ``` The response contains the new candidate revision, for example `revision: 2` and `revision_id: "revision_example_2"`. Activate it explicitly: ```http theme={null} POST /v1/studios/stu_example/offers/off_example/activate Authorization: Bearer br_test_your_test_key Idempotency-Key: fall-2026-offer-activate-2 Content-Type: application/json ``` ```json theme={null} { "expected_revision": 2, "revision_id": "revision_example_2" } ``` Activation selects the named immutable revision for new checkouts. Existing checkouts and paid orders retain their frozen revision and amounts. A stale `expected_revision` returns `409 offer_conflict`; read the current offer and repeat the intended change with the current revision and a new idempotency key. ## Schedule, pause, resume, or revoke Scheduling also selects a revision. `starts_at` must be in the future, and `ends_at`, when supplied, must be later than `starts_at`. ```http theme={null} POST /v1/studios/stu_example/offers/off_example/schedule Authorization: Bearer br_test_your_test_key Idempotency-Key: fall-2026-offer-schedule Content-Type: application/json ``` ```json theme={null} { "expected_revision": 2, "revision_id": "revision_example_2", "starts_at": "2030-01-01T00:00:00Z", "ends_at": "2030-01-08T00:00:00Z" } ``` Pause, resume, and revoke use the same lifecycle route pattern and require `expected_revision` plus an idempotency key. A short `reason` may be included. To remove an offer from future use, revoke it. This action cannot be reversed: ```http theme={null} POST /v1/studios/stu_example/offers/off_example/revoke Authorization: Bearer br_test_your_test_key Idempotency-Key: fall-2026-offer-revoke Content-Type: application/json ``` ```json theme={null} { "expected_revision": 2, "reason": "Promotion is no longer offered" } ``` ```http theme={null} POST /v1/studios/stu_example/offers/off_example/pause Authorization: Bearer br_test_your_test_key Idempotency-Key: fall-2026-offer-pause Content-Type: application/json ``` ```json theme={null} { "expected_revision": 2, "reason": "End of promotion window" } ``` Revocation is the permanent lifecycle action for an offer. It retains the offer, its revisions, redemptions, and audit history. There is no hard-delete route. Pause is reversible; revoke is the terminal state. ## List offers and continue a page `GET /v1/studios/{studio_id}/offers` returns all offers visible to the studio; the API does not take a status filter. Filter returned items by `status` when you need a view such as active codes. For active codes, keep items where `status` is `active` and `application` is `code`. The default page size is 50. Set `limit` from 1 through 100 and pass `next_cursor` back as the opaque `cursor` query parameter until `is_done` is `true`. ```http theme={null} GET /v1/studios/stu_example/offers?limit=100 Authorization: Bearer br_test_your_test_key ``` ```json theme={null} { "items": [ { "id": "off_example", "name": "Fall weekend", "code": "FALL2026", "kind": "percent", "percent_off": 20, "currency": "USD", "application": "code", "scope": { "kind": "storewide" }, "limits": { "max_redemptions": 50, "once_per_person": true }, "minimum_subtotal_cents": 2500, "status": "active", "revision": 2, "revision_id": "revision_example_2", "provisioning_status": "succeeded", "usage": { "reserved": 0, "redeemed": 3, "max_uses": 50, "remaining": 47 }, "created_at": "2026-10-20T08:00:00Z", "updated_at": "2026-10-20T08:00:00Z" } ], "next_cursor": "opaque-cursor", "is_done": false } ``` Request the next page as `GET /v1/studios/stu_example/offers?limit=100&cursor=opaque-cursor`, URL encoding the cursor value in an HTTP client. `next_cursor` is `null` when the page is complete. ## Read redemption history ```http theme={null} GET /v1/studios/stu_example/offers/off_example/redemptions?limit=50 Authorization: Bearer br_test_your_test_key ``` Redemption pages use the same `items`, `next_cursor`, and `is_done` envelope. Each item includes the offer revision, order ID when available, discount cents, currency, status, and creation time. Status is `succeeded`, `partially_refunded`, or `refunded`. Follow every cursor to read the complete history; a single page is not a complete usage report. ```json theme={null} { "items": [ { "id": "redemption_example", "offer_id": "off_example", "revision": 2, "order_id": "order_example", "discount_cents": 500, "currency": "USD", "status": "succeeded", "created_at": "2026-10-20T08:15:00Z" } ], "next_cursor": null, "is_done": true } ``` ## Preview margin Margin preview uses the separate `margins:read` scope and the server's current catalog and provider-cost evidence. It is an estimate, not an order quote. Unknown or stale costs remain marked in `cost_status`. ```http theme={null} POST /v1/studios/stu_example/offers/off_example/margin-preview Authorization: Bearer br_test_your_test_key Content-Type: application/json ``` ```json theme={null} { "sellable": { "type": "item", "id": "catalog_item_example", "quantity": 1 } } ``` The response identifies the revision used for the estimate, line totals, and cost status. When cost is unknown, promotion or contribution fields may be omitted: ```json theme={null} { "offer_id": "off_example", "revision": 2, "currency": "USD", "lines": [ { "sellable_id": "catalog_item_example", "quantity": 1, "normal_selling_cents": 2000, "cost_status": "unknown" } ], "normal_subtotal_cents": 2000, "cost_status": "unknown", "generated_at": "2026-10-20T08:15:00Z" } ``` ## Idempotency and errors Every create, revision, and lifecycle write requires an `Idempotency-Key` with at most 200 characters. Keep the same key and exact request body when retrying an uncertain result. Use a new key for a distinct intended mutation. Reusing a key with different input or sending a stale revision returns `409 offer_conflict`. | Status | Error | Meaning | | - | - | - | | `400` | `idempotency_key_required` | A create, revision, or lifecycle write is missing its idempotency key. | | `401` | `invalid_api_key` | The bearer key is missing, invalid, or inactive. | | `403` | `offers_forbidden` | The key lacks the required scope or studio authorization. | | `404` | `offer_not_found` | The offer is not available to the authorized studio. | | `409` | `offer_conflict` | The expected revision is stale, the lifecycle transition is invalid, or the idempotency key was reused with different input. | | `422` | `invalid_offer` | Terms, lifecycle fields, or selectors are invalid. | | `422` | `invalid_management_page` | The cursor or page limit is invalid. | | `503` | `offers_unavailable` | Offer management is unavailable on this deployment. | See [Authentication](/authentication), [Idempotency](/idempotency), and [Errors](/errors). # Template renders Source: https://docs.batchrelay.com/template-renders Render published template inputs into print-ready assets for products that require them. Templates are a preparation layer, not a fulfillment catalog. Standard print products with `template_requirement: "optional"` accept finished artwork directly. Memory Mates and magazine covers have `template_requirement: "required"`, so their artwork must come from a succeeded Batch Relay render. A render output follows the normal fulfillment path; it is not a legacy composite product. ## Availability Send Test and Live requests to `https://api.batchrelay.com`. The stored API-key record selects the lane. A render requires a published template owned by the API account's studio; an unknown or unpublished template fails without dispatching work. ## Create a render `POST /v1/templates/{template_id}/renders` requires a studio-owned API account, `print_orders:write`, and an `Idempotency-Key`. Inputs are keyed by immutable slot IDs. Every input contains exactly one of `asset_id` or `value`; the API never infers input order from a template label. Omit `revision_id` to use the latest published revision. The response always returns the exact immutable `template.revision_id` chosen for this job. Save it to repeat the same edition later; pass it explicitly when you must pin a render. ```json theme={null} { "output_id": "print-8x10-portrait", "inputs": { "image_1": { "asset_id": "bra_primary" }, "image_2": { "asset_id": "bra_buddy" }, "text_1": { "value": "Jane Smith" } } } ``` An `asset_id` is a managed private asset reference. Create or resolve one with `POST /v1/assets/ingest`, then reuse that ID instead of re-supplying its original URL for each render. URL ingestion copies bytes into private temporary fulfillment storage; ingesting an existing `asset_id` reuses its bytes without a copy. Raw R2 keys and private delivery lease URLs are never render inputs. Each returned render artifact is a managed `asset_id`. Once the render reaches `succeeded`, a standard print may place that ID in the matching print-order asset role. A double-sided output must attach both the `front` and `back` artifacts. For a Memory Mate or magazine-cover order, place the succeeded artifact's `asset_id` in the `artwork` role and include the matching render's `render_id` as `template_render_id`. A raw URL or an unrelated managed asset does not meet that product's required template contract. ## Poll the render and use all surfaces Read `GET /v1/renders/{render_id}` with `print_orders:read`. `artifacts` is always an array: a normal print commonly returns one `artwork` member, while a double-sided product can return `front` and `back` atomically. Treat `surface_id` as the output identity and `fulfillment_role` as the placement contract. ```json theme={null} { "render_id": "rnd_123", "status": "succeeded", "template": { "id": "tpl_123", "revision_id": "tpr_456", "document_hash": "sha256:..." }, "output_id": "trader-card-double-sided", "artifacts": [ { "surface_id": "front", "fulfillment_role": "front", "asset_id": "bra_front", "pixel_width": 825, "pixel_height": 1125, "sha256": "sha256:..." }, { "surface_id": "back", "fulfillment_role": "back", "asset_id": "bra_back", "pixel_width": 825, "pixel_height": 1125, "sha256": "sha256:..." } ] } ``` ## Retention and reprints Managed fulfillment assets are temporary operational copies, not a permanent customer archive. See [Managed assets](/managed-assets#retention-and-reprints) for the 28-day unattached window, order/shipment retention calculation, reprint holds, and bounded cleanup behavior. # Webhooks Source: https://docs.batchrelay.com/webhooks Batch Relay Events V1 is delivered as signed CloudEvents webhooks. Batch Relay Events V1 sends one signed [CloudEvents 1.0](https://cloudevents.io/) structured JSON event per HTTP `POST`. It is a push-only integration: configure a destination in the Developer Dashboard and acknowledge each delivery with a `2xx` response. Start with the [Events overview](/events/overview). It explains the delivery contract, signatures, retries, deduplication, and the public topic reference. The authoritative machine-readable event contract is served at: ```text theme={null} https://api.batchrelay.com/asyncapi.json ``` The documentation site also includes a public snapshot at [`/specs/events-v1.asyncapi.json`](/specs/events-v1.asyncapi.json). That snapshot helps readers browse this version of the public contract; it is not the source of truth for a running integration. # Zapier Source: https://docs.batchrelay.com/zapier Create catalog-backed Batch Relay print orders from Zapier. The Zapier integration for Batch Relay creates print orders directly through the Batch Relay API. ## Connect Zapier Create a connection with a Batch Relay API key. * `br_test_...` keys create Sandbox test orders. * Live `br_...` keys create Production orders. Both key types use `https://api.batchrelay.com`. Zapier derives the order environment from the key, and the API verifies it against the stored key record. There is no separate Environment selector in Zapier. ## Create Print Order Use **Create Print Order** when an earlier Zap step provides print data. It accepts a `Prints` line-item group with aligned values for: * Print SKU * Quantity * Image URL One action run creates one Batch Relay order. Map line-item arrays when several prints should ship together. Do not loop over individual prints that belong in the same shipment. Each loop run would create a separate quote, shipping charge, and order. Print SKU values are catalog values such as `print-5x7|paper=lustre`. The integration looks up the current product revision and options before it quotes the order. ## Create Manual Print Order Use **Create Manual Print Order** for staff-entered or one-off orders. Choose the number of distinct print rows, from 1 through 20, then fill in a Print SKU, Quantity, and Image URL for each row. All print rows share one customer, delivery address, return address, shipping service, and provider choice. Quantity means copies of that one row. Add another row when the image or SKU differs. ## What happens when a Zap runs The action builds the order, requests a Batch Relay quote, then submits that quote as one order. Zapier does not expose separate quote and submit steps. Batch Relay is the source of truth for catalog revisions, eligible products, shipping, tax, platform fee, total price, provider routing, billing, and fulfillment status. Use a stable **External Order ID** from the triggering system. Batch Relay uses it as the idempotency key, so an unchanged Zap retry returns the same quote and order instead of creating a duplicate. Use a new External Order ID for a reprint or intentional replacement. ## Images, catalog, and shipping Provide a public or signed HTTPS Image URL. Batch Relay copies the image during quoting and freezes the bytes used for fulfillment. The URL only needs to remain available while the action runs. The integration loads products from the live Batch Relay catalog and shipping services from the live shipping catalog. The quote still decides whether a product and service are valid for the destination and returns the exact price. Current shipping services are: * `economy_untracked` * `economy` * `expedited` * `standard_one_day` * `priority_one_day` ## Provider routing Leave **Provider** blank to let Batch Relay route the entire order. If you select a provider, it applies to the whole order, never a single print row. The API returns any availability or compatibility issue directly. Zapier does not hold provider credentials or send provider-native payloads. ## Triggers There is currently no support for Zapier's triggers. More to come here in the future. (reach out with what you would expect to see, we're listening!) ## Before you turn on a live Zap Test the whole flow with a `br_test_...` key first. Confirm the recipient and return addresses, shipping service, image URLs, and External Order ID. Replace it with a live `br_...` key only when you are ready for a live order. ## Provider cost discovery Read approved `provider_offers` on the product or call `GET /v1/catalog/products/{product_id}/offers`. Product metadata supplies the immutable ID, revision, options and `units_per_quantity`, never a fallback cost. Match the offer's exact product revision, configuration and provider. Missing numeric costs remain unknown. An available approved zero is valid. The amount is per ordered quantity. A 12-card pack ordered twice produces 24 cards at two pack costs. Do not multiply the cost by 12 again. Keep retail prices separate, preserve credential lanes and explicit routing, and use the returned quote for shipping, tax, fees, final availability and total.