> ## Documentation Index
> Fetch the complete documentation index at: https://docs.batchrelay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Quote and submit one sandbox print order safely.

## 1. Create a staging API key

Create a key with `print_orders:write` and `print_orders:read` in the developer
dashboard. Staging keys use the `br_test_` prefix. Production keys use `br_` and
are rejected by staging hosts; the reverse is also true.

## 2. Preview provider compatibility

Use a provider-neutral prepared order. The image is already prepared in its
required orientation—Batch Relay does not crop, rotate, render, or upload it.

```bash theme={null}
curl -X POST https://batchrelay-api-staging.up.railway.app/v1/providers/compatibility \
  -H 'Authorization: Bearer br_test_example' \
  -H 'Content-Type: application/json' \
  -d '{
    "provider_id": "whcc",
    "order": {
      "schema_version": 1,
      "environment": "sandbox",
      "external_order_id": "weekend-test-001",
      "customer": { "email": "parent@example.com" },
      "ship_to": { "name": "Parent", "address_1": "123 Main St", "city": "Eagan", "state": "MN", "postal_code": "55121", "country": "US", "phone": "+16516468263" },
      "ship_from": { "name": "Studio", "address_1": "456 Studio Ave", "city": "Eagan", "state": "MN", "postal_code": "55121", "country": "US", "phone": "+16516468263" },
      "shipping_service": "economy",
      "items": [{
        "product": { "id": "print-5x7", "revision": 1 },
        "quantity": 1,
        "assets": [{ "role": "artwork", "url": "https://assets.example.com/5x7.jpg", "pixel_width": 1500, "pixel_height": 2100, "file_size_bytes": 240000, "format": "jpeg" }]
      }]
    }
  }'
```

Compatibility returns one provider and one result per line. Batch Relay never
splits an order or substitutes another lab.

## 3. Create a quote

Send the same wrapper to `POST /v1/print-orders/quote`. The response freezes
the provider, selection source, capability revision, recipe revision, price,
and expiry. Save its `id`.

## 4. Submit the frozen quote

`POST /v1/print-orders` requires `quote_id`, the matching `order`, and an
`Idempotency-Key`. It cannot change the provider selected at quote time.

See the canonical OpenAPI document for the complete request and response
schemas.
