> ## 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.

# Sparqle API

> Create deliveries, fetch shipping labels, and track orders in real time.

The Sparqle API lets you plug Sparqle delivery into your own systems. Create an
order, print the label we generate, and receive status updates over webhooks as
the parcel moves from your warehouse to your customer's door.

## What you can do

<CardGroup cols={2}>
  <Card title="Create orders" icon="box" href="/api-reference/introduction">
    Submit a delivery and receive a Sparqle `orderId`, barcode, and tracking URL.
  </Card>

  <Card title="Validate before you commit" icon="circle-check" href="/concepts/order-lifecycle">
    Use **Check order** to validate an address and serviceability before creating.
  </Card>

  <Card title="Print labels" icon="tag" href="/concepts/labels">
    Fetch a base64-encoded PDF label for a single order or a whole bundle.
  </Card>

  <Card title="Track in real time" icon="signal-stream" href="/webhooks">
    Subscribe to status webhooks across the full order lifecycle.
  </Card>
</CardGroup>

## How it works

<Steps>
  <Step title="Authenticate">
    Every request is authenticated with an API key sent in the `api-key` header.
    See [Authentication](/authentication).
  </Step>

  <Step title="Create an order">
    `POST /orders` with the recipient address and your `locationId`. Sparqle
    returns an `orderId`, a `barcode`, and a `trackingUrl`.
  </Step>

  <Step title="Print the label">
    Fetch the label with `GET /orders/label/{orderId}` and print the PDF.
  </Step>

  <Step title="Track the delivery">
    Receive [webhooks](/webhooks) as the order moves through its
    [lifecycle](/concepts/order-lifecycle), or poll the order endpoint.
  </Step>
</Steps>

## Before you start

You'll need an **API key** and at least one **`locationId`** (the pickup
location orders are dispatched from). Both are provided by your Sparqle contact —
reach out to [support@sparqle.com](mailto:support@sparqle.com) if you don't have
them yet.

<Card title="Jump to the quickstart" icon="rocket" href="/quickstart">
  Create your first order in a few minutes.
</Card>
