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

# Quickstart

> Your first call to the Storefront API in under a minute.

All you need is the store's **publishable key** (`cx_pk_live_<slug>_...`), provided
by the store manager. It identifies the store from any client (mobile app, script,
or a frontend that doesn't run on the store's domain).

## 1. Read the catalog

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.vellaro.io/api/v1/products?page=1&page_size=5" \
    -H "X-Vellaro-Key: cx_pk_live_demo_XXXXXXXXXXXXXXXX"
  ```

  ```javascript JavaScript theme={null}
  const res = await fetch(
    "https://api.vellaro.io/api/v1/products?page=1&page_size=5",
    { headers: { "X-Vellaro-Key": "cx_pk_live_demo_XXXXXXXXXXXXXXXX" } }
  );
  const { data, meta } = await res.json();
  console.log(data, meta); // data = products, meta = pagination
  ```

  ```python Python theme={null}
  import httpx
  r = httpx.get(
      "https://api.vellaro.io/api/v1/products",
      params={"page": 1, "page_size": 5},
      headers={"X-Vellaro-Key": "cx_pk_live_demo_XXXXXXXXXXXXXXXX"},
  )
  print(r.json()["data"])
  ```
</CodeGroup>

<Note>
  If your client runs **on the store's domain** (e.g. `https://mystore.com`), calls
  are same-origin to `https://mystore.com/api/v1` and the key isn't needed:
  the infrastructure recognizes the store from the domain.
</Note>

## 2. The response envelope

Every response uses the same wrapper:

```json theme={null}
{
  "data": [ /* payload */ ],
  "meta": { "page": 1, "page_size": 5, "total": 42, "total_pages": 9 },
  "error": null,
  "error_code": null
}
```

* `data` — the content (`null` on error).
* `meta` — present on paginated lists.
* `error_code` — a stable machine-readable code (e.g. `auth.invalid_credentials`): **switch on
  this** to show localized messages, not on `error` (which is for debugging only).

## 3. What to explore next

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/en/authentication">
    Publishable key, customer login, staff tokens.
  </Card>

  <Card title="Concepts" icon="book" href="/en/concepts">
    Store, envelope, errors, pagination, i18n, images.
  </Card>

  <Card title="Cart & checkout" icon="cart-shopping" href="/en/guides/build-storefront">
    From cart to paid order.
  </Card>

  <Card title="API Reference" icon="code" href="/en/api-reference">
    Complete reference, always in sync with production.
  </Card>
</CardGroup>
