Documentation
GET /api/store
The state of the session's storefront.
| Request | GET /api/store |
|---|---|
| Authentication | Session cookie required |
| Handler | backend/server.py |
What it does
`ready` is never asserted from the manifest alone: the store must exist on disk and its browsable path must resolve, or the status is whatever is actually true instead — a manifest is the generator grading itself. `not_started` and `failed` are kept apart, because a finished job with no manifest means a build happened and failed. `not_claimed` means no product resolved at all, on this surface as on every other. This GET records the `store_built` stage itself when it serves a ready store, because a store built by an earlier run is served ready here with no POST ever following it, and a count is only honest if every way of reaching a stage writes the same row.
Authentication
Session cookie required. Send the ff_session cookie. Without one the engine treats the caller as a new visitor with no holds and no claims, and returns a new cookie to use from then on.
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ff_session | cookie | string | Optional | The session identifier. Omit it on the first call and store the value the response sets; every later call must send the same one or the engine treats the caller as a new visitor with no holds and no claims. |
Request
The cookie jar carries the session between calls. Angle-bracketed values are the parameter types from the table above.
curl -s -b cookies.txt -c cookies.txt \
"https://flowfinds.ai/api/store"const res = await fetch("https://flowfinds.ai/api/store", {
method: "GET",
credentials: "include",
});
const data = await res.json();import requests
s = requests.Session()
r = s.get("https://flowfinds.ai/api/store")
data = r.json()Recorded example
curl -s -b cookies.txt -c cookies.txt \
"$FLOWFINDS_ORIGIN/api/store"Responses
200 — A store is ready.
| Field | Type | Description |
|---|---|---|
status | string | `ready`. |
product_id | string | The product. |
browsable_path | string | The path that resolved. |
storefront | string | The storefront path. |
200 — A build is running.
| Field | Type | Description |
|---|---|---|
status | string | The job's stage. |
explanation | string | The store copy for that stage. |
200 — A build ran and failed.
| Field | Type | Description |
|---|---|---|
status | string | `failed`. |
failed_stage | string | Where it failed — `generation` by default. |
reason | string | `generation_failed` or `verify_failed`. |
explanation | string | The store copy for the reason. |
diagnostic | string | null | The generator's own diagnostic, when it produced one. |
200 — Nothing has been attempted.
| Field | Type | Description |
|---|---|---|
status | string | `not_started`. |
explanation | string | The store copy. |
200 — No product is resolved.
| Field | Type | Description |
|---|---|---|
status | string | `not_claimed`. |
reason | string | `not_claimed`. |
explanation | string | The store copy. |
Errors
This endpoint has no failure path of its own. An uncaught exception anywhere in the engine is still returned as structured JSON by the shared guard.
Related
POST /api/store— Start generating the storefront for the session's product.POST /api/store/publish— Verify and publish the storefront, regenerating it if verification demands.POST /api/intent— Ask the engine what it would change on a surface, and why.POST /api/intent/apply— Apply a proposed intent, regenerating the store.POST /api/intent/order— Override the section the storefront leads with.POST /api/intent/revert— Undo the last applied intent.POST /api/ai/edit— Edit the storefront in natural language.GET /api/editor/— Read editor state and store metrics.
Back to the API reference index, or read the cookbook for recipes that compose this endpoint with others.