> ## 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()
```

A successful response includes `X-Request-Id` (see [errors](/docs/errors.md)) and `RateLimit-Limit`, `RateLimit-Remaining`, and `RateLimit-Reset` (see [rate limits](/docs/rate-limits.md)).

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": "91ca382d-ba89-49b8-8bd7-925f71435ede",
            "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()
```

```json POST /v1/stores/enrich 200 (abridged store) theme={null}
{
    "data": [
        {
            "input": "shop.example",
            "normalized": "shop.example",
            "outcome": "found",
            "store": {
                "id": "32e4d994-807a-4d54-912b-4762d452bd12",
                "domain": "shop.example",
                "name": "Example Shop",
                "status": "open",
                "url": "https://shop.example"
            }
        }
    ]
}
```

See [Stores](/docs/stores.md) for the full list of store fields.

The API returns one item in `data` for each input. The `outcome` field is `found` when the response includes a store record, or `not_found` when `store` is null and the request uses none of the team's allowance for that input.

`curl --json` requires curl 7.82 or newer. On older versions, use `-H 'Content-Type: application/json' -d '{"domains":["shop.example"]}'` in its place.

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