Search Documentation

Search for a documentation page...

Store Setup API

Read the store setup checklist, the store's AI credits, and the links a merchant opens to connect add-ons and integrations.

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.

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

Response (200)

{
"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? }:

idStep
productsProducts created
brand_voiceBrand voice picked
product_descriptionsEvery product has a description
categoriesCategories set up
shipping_methodsShipping methods set up
business_addressBusiness address set
paymentsStripe connected, or bank transfer or cash on delivery on
legal_pagesLegal pages in place
billing_planBilling plan active
live_paymentsLive payments on
publishStorefront published
custom_domainOwn domain. Optional
FieldDescription
nextStepThe id of the first required step not done. null once complete
productCount, productsWithDescription, categoryCount, shippingMethodCount, legalPagesPresent, legalPagesMissingThe counts behind the steps
hasLivePaymentsThe store charges customers for real
hasStripeConnectedA Stripe account is linked, possibly still in test mode
hasManualPaymentsBank transfer or cash on delivery is on
hasPublishedStoreThe 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.

{
"currency": "USD",
"left": 7.42,
"freeTrial": 2.42,
"monthly": null,
"purchased": 5,
"gifted": 0,
"boughtCredits": true
}
FieldDescription
leftWhat remains to spend. Never an amount owed
freeTrial, monthly, purchased, giftedleft, split by where it came from. monthly is the plan's credits, null without a plan
boughtCreditsWhether 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.

StatusDescription
409The store belongs to no organization

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:

FieldDescription
keyThe add-on's name, or mcp:<slug> for an MCP server
name, description, categoryAs the Add-ons page shows them
connectedWhether the store has it connected
pageIts admin path
urlThe absolute link to that page. The merchant opens it to connect
connectHow it connects, by kind, listed below
connect.kindMeaning
oauthThe provider's sign-in, at href
apiKeyThe merchant types the key on the page. fields lists them. Never ask for a secret field in chat
mcpAn MCP server preset, presetSlug
pageSetup needs choices only its page asks
unavailableListed, not built yet

Shipping add-ons with credentials can also be connected directly through their PUT /api/v1/addons/{name} endpoints on the Addons page.

  • Payments – live readiness, the Stripe connect link and the live switch
  • Settings – the business address and other store settings
  • Elliot Runs – runs spend AI credits