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

# Quickstart

> Create a team key, verify the caller, enrich one Shopify domain, and read your usage.

## Get a team key

As a team owner, open **Settings → API keys** in Shoplist and select **Create key**. Grant `stores:read` and `usage:read`. Copy the key when Shoplist shows it and set the `SHOPLIST_API_KEY` environment variable from your secret store. See [authentication](/docs/authentication.md) for key management.

Run each JavaScript example in its own Node.js `.mjs` file. For Python, use Python 3 and install `requests` with `python3 -m pip install requests`.

## Check the caller

```bash curl theme={null}
curl -sS -i \
  -H "Authorization: Bearer ${SHOPLIST_API_KEY}" \
  https://api.shoplist.co/v1/me
```

```javascript JavaScript theme={null}
const response = await fetch('https://api.shoplist.co/v1/me', {
    headers: { Authorization: `Bearer ${process.env.SHOPLIST_API_KEY}` },
});
console.log(response.status, await response.text());
if (!response.ok) process.exitCode = 1;
```

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

import requests

response = requests.get(
    "https://api.shoplist.co/v1/me",
    headers={"Authorization": f"Bearer {os.environ['SHOPLIST_API_KEY']}"},
    timeout=30,
)
print(response.status_code, response.text)
response.raise_for_status()
```

Check that `data.team` is your team and `data.scopes` contains both scopes. The example shows the response shape.

```json GET /v1/me 200 theme={null}
{
    "data": {
        "object": "principal",
        "kind": "team_key",
        "team": {
            "id": "team_example",
            "name": "Example team"
        },
        "scopes": ["stores:read", "usage:read"]
    }
}
```

## Enrich one domain

Replace `shop.example` with the domain of the Shopify store you want to enrich. The request requires `stores:read`.

```bash curl theme={null}
curl -sS -i \
  -H "Authorization: Bearer ${SHOPLIST_API_KEY}" \
  --json '{"domains":["shop.example"]}' \
  https://api.shoplist.co/v1/stores/enrich
```

```javascript JavaScript theme={null}
const response = await fetch('https://api.shoplist.co/v1/stores/enrich', {
    method: 'POST',
    headers: {
        Authorization: `Bearer ${process.env.SHOPLIST_API_KEY}`,
        'Content-Type': 'application/json',
    },
    body: JSON.stringify({ domains: ['shop.example'] }),
});
console.log(response.status, await response.text());
if (!response.ok) process.exitCode = 1;
```

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

import requests

response = requests.post(
    "https://api.shoplist.co/v1/stores/enrich",
    headers={"Authorization": f"Bearer {os.environ['SHOPLIST_API_KEY']}"},
    json={"domains": ["shop.example"]},
    timeout=30,
)
print(response.status_code, response.text)
response.raise_for_status()
```

The API returns one item in `data`. An outcome of `found` includes the [store record](/docs/stores.md). An outcome of `not_found` has a null `store` and uses none of the team's allowance.

## Read your usage

The request requires `usage:read`.

```bash curl theme={null}
curl -sS -i \
  -H "Authorization: Bearer ${SHOPLIST_API_KEY}" \
  https://api.shoplist.co/v1/usage
```

```javascript JavaScript theme={null}
const response = await fetch('https://api.shoplist.co/v1/usage', {
    headers: { Authorization: `Bearer ${process.env.SHOPLIST_API_KEY}` },
});
console.log(response.status, await response.text());
if (!response.ok) process.exitCode = 1;
```

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

import requests

response = requests.get(
    "https://api.shoplist.co/v1/usage",
    headers={"Authorization": f"Bearer {os.environ['SHOPLIST_API_KEY']}"},
    timeout=30,
)
print(response.status_code, response.text)
response.raise_for_status()
```

Read `data.unique_stores` for the team's limit, used, and remaining stores. `data.period` gives the billing period. See [usage and billing](/docs/usage.md) for how store reads count, or use the [enrichment recipe](/docs/recipes/enrich-domains.md) to process a list of domains with retries.


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