Three reads tell an agent where a store stands: how far setup has come, how many AI credits are left, and what the merchant can connect. Each needs the `settings:read` scope, or the same permission for a team member connected over OAuth. AI credits also accept the `ai:write` scope.

## Get the setup checklist

```
GET /api/v1/onboarding
```

How far store setup has progressed, step by step. Read it again after a setup change to see what remains.

```bash
curl -H "Authorization: Bearer sk_your_api_key" \
  https://your-store.yns.store/api/v1/onboarding
```

### Response (200)

```json
{
  "steps": [
    { "id": "products", "label": "Products created (steps 7–9)", "done": true },
    { "id": "shipping_methods", "label": "Shipping methods set up (step 14)", "done": false },
    { "id": "custom_domain", "label": "Own domain (step 20)", "done": false, "optional": true }
  ],
  "nextStep": "shipping_methods",
  "complete": false,
  "productCount": 12,
  "productsWithDescription": 9,
  "categoryCount": 3,
  "shippingMethodCount": 0,
  "legalPagesPresent": ["terms"],
  "legalPagesMissing": ["privacyPolicy", "returns"],
  "hasLivePayments": false,
  "hasStripeConnected": true,
  "hasManualPayments": false,
  "hasPublishedStore": true
}
```

`steps` come in setup order, each `{ id, label, done, optional? }`:

| `id` | Step |
|------|------|
| `products` | Products created |
| `brand_voice` | Brand voice picked |
| `product_descriptions` | Every product has a description |
| `categories` | Categories set up |
| `shipping_methods` | Shipping methods set up |
| `business_address` | Business address set |
| `payments` | Stripe connected, or bank transfer or cash on delivery on |
| `legal_pages` | Legal pages in place |
| `billing_plan` | Billing plan active |
| `live_payments` | Live payments on |
| `publish` | Storefront published |
| `custom_domain` | Own domain. Optional |

| Field | Description |
|-------|-------------|
| `nextStep` | The `id` of the first required step not done. `null` once `complete` |
| `productCount`, `productsWithDescription`, `categoryCount`, `shippingMethodCount`, `legalPagesPresent`, `legalPagesMissing` | The counts behind the steps |
| `hasLivePayments` | The store charges customers for real |
| `hasStripeConnected` | A Stripe account is linked, possibly still in test mode |
| `hasManualPayments` | Bank transfer or cash on delivery is on |
| `hasPublishedStore` | The storefront is publicly visible, whatever the payment mode |

The response also has `storeName`, `currency` and one `has…` boolean per step, such as `hasStoreAddress` and `hasCustomDomain`. Answers `404` when the store is not found.

---

## Get AI credits

```
GET /api/v1/ai/credits
```

The store's AI credits in US dollars, rounded to cents, the same amount the admin shows as **Credits left**. Credits pay for AI work: Elliot's replies and edits, generated images and videos, and shopper-facing AI.

```json
{
  "currency": "USD",
  "left": 7.42,
  "freeTrial": 2.42,
  "monthly": null,
  "purchased": 5,
  "gifted": 0,
  "boughtCredits": true
}
```

| Field | Description |
|-------|-------------|
| `left` | What remains to spend. Never an amount owed |
| `freeTrial`, `monthly`, `purchased`, `gifted` | `left`, split by where it came from. `monthly` is the plan's credits, `null` without a plan |
| `boughtCredits` | Whether the merchant ever paid for credits |

Every new store starts with $10 of free credits. Nothing tops up by itself. At zero, AI work pauses while the store keeps selling. Credits are separate from the billing plan, which the setup checklist reports.

| Status | Description |
|--------|-------------|
| `409` | The store belongs to no organization |

---

## List add-on connect links

```
GET /api/v1/addons/connect-links
```

Every add-on, integration and MCP server the merchant can connect on the **Add-ons** page, and how each one connects. That covers shipping, payments, email marketing, invoicing, marketplaces, tracking pixels and MCP servers such as Notion or Ahrefs.

Hand the merchant `url`. Never collect API keys, passwords or tokens yourself.

### Response (200)

`{ data, meta: { count } }`. Each item:

| Field | Description |
|-------|-------------|
| `key` | The add-on's name, or `mcp:<slug>` for an MCP server |
| `name`, `description`, `category` | As the Add-ons page shows them |
| `connected` | Whether the store has it connected |
| `page` | Its admin path |
| `url` | The absolute link to that page. The merchant opens it to connect |
| `connect` | How it connects, by `kind`, listed below |

| `connect.kind` | Meaning |
|----------------|---------|
| `oauth` | The provider's sign-in, at `href` |
| `apiKey` | The merchant types the key on the page. `fields` lists them. Never ask for a `secret` field in chat |
| `mcp` | An MCP server preset, `presetSlug` |
| `page` | Setup needs choices only its page asks |
| `unavailable` | Listed, not built yet |

Shipping add-ons with credentials can also be connected directly through their `PUT /api/v1/addons/{name}` endpoints on the [Addons](/docs/api-reference/addons) page.

## Related

- [Payments](/docs/api-reference/payments) – live readiness, the Stripe connect link and the live switch
- [Settings](/docs/api-reference/settings) – the business address and other store settings
- [Elliot Runs](/docs/api-reference/elliot) – runs spend AI credits