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

# Quickstart

> Create an API key and read your first orders.

**1. Create an API key**

Sign in to BrandGate as a company admin and open **Settings → Developers → API keys**. Click **Create API key**, give it a name such as `ERP sync`, and tick the access it needs, for example **Read orders** and **Set stock levels**.

The key is shown once. It starts with `bg_live_`. Store it in your secret manager, never in source code.

**2. Make your first request**

```bash curl theme={null}
curl https://api.brandgate.dev/v1/orders?limit=5 \
  -H "Authorization: Bearer $BRANDGATE_API_KEY"
```

```javascript Node.js theme={null}
const response = await fetch("https://api.brandgate.dev/v1/orders?limit=5", {
  headers: { Authorization: `Bearer ${process.env.BRANDGATE_API_KEY}` },
});
const page = await response.json();
console.log(page.data.map((order) => order.number));
```

```python Python theme={null}
import os, requests

page = requests.get(
    "https://api.brandgate.dev/v1/orders",
    params={"limit": 5},
    headers={"Authorization": f"Bearer {os.environ['BRANDGATE_API_KEY']}"},
    timeout=30,
).json()
print([order["number"] for order in page["data"]])
```

**3. Read the response**

```json theme={null}
{
  "object": "list",
  "data": [
    {
      "id": "6f1c0a52-3c1e-4f43-9a55-2a1f0e7d9b10",
      "object": "order",
      "number": "ORD-1042",
      "status": "processing",
      "order_date": "2026-10-20",
      "currency": "SEK",
      "total": "12500.00",
      "vat": "2500.00",
      "total_excl_vat": "10000.00",
      "customer": { "id": "1d7e…", "name": "Reseller AB" },
      "lines": [
        { "sku": "TSHIRT-M", "name": "T-shirt M", "quantity": 20, "unit_price": "500.00", "vat_rate": "25.00", "line_total": "10000.00" }
      ],
      "external_reference": null,
      "updated_at": "2026-10-20T08:15:00.000Z"
    }
  ],
  "has_more": true,
  "next_cursor": "eyJ1Ijoi…"
}
```

Money is always a decimal **string** (`"12500.00"`), never a float, so no rounding is lost on the way to your ledger.

**4. Get told about changes**

Create a [webhook endpoint](/webhooks) for `order.created` and `order.updated`, then fetch the order when an event arrives. Follow the [ERP sync guide](/guides/erp-sync) for the full loop.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.