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

# Routing & fallback

> Check deliverability before creating, and fall back to another carrier when needed.

If Sparqle is one of several carriers and you don't route every order to us,
check deliverability first and fall back elsewhere when we can't deliver.

## Preferred: check, then create

<Steps>
  <Step title="Check deliverability">
    `POST /orders/check/{locationId}` with the delivery address and any
    requirements (dimensions, weight, signature). We return whether we can
    deliver.
  </Step>

  <Step title="Deliverable → create">
    `POST /orders`, then fetch the [label](/concepts/labels).
  </Step>

  <Step title="Not deliverable → fall back">
    Route the order to your own fallback method or another carrier.
  </Step>
</Steps>

```mermaid theme={null}
flowchart TD
    A[New order] --> B[POST /orders/check]
    B --> C{Deliverable?}
    C -->|Yes| D[POST /orders] --> E[GET label]
    C -->|No| F[Fallback carrier]
```

## Alternative: create directly

You can skip the check and call `POST /orders` straight away. We validate
deliverability during creation and reject the order if we can't deliver. This
works, but you only learn the outcome after attempting to create — the two-step
flow is cleaner and preferred.
