Documentation

GET /api/store

The state of the session's storefront.

RequestGET /api/store
AuthenticationSession cookie required
Handlerbackend/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

ParameterInTypeRequiredDescription
ff_sessioncookiestringOptionalThe 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

200A store is ready.

FieldTypeDescription
statusstring`ready`.
product_idstringThe product.
browsable_pathstringThe path that resolved.
storefrontstringThe storefront path.

200A build is running.

FieldTypeDescription
statusstringThe job's stage.
explanationstringThe store copy for that stage.

200A build ran and failed.

FieldTypeDescription
statusstring`failed`.
failed_stagestringWhere it failed — `generation` by default.
reasonstring`generation_failed` or `verify_failed`.
explanationstringThe store copy for the reason.
diagnosticstring | nullThe generator's own diagnostic, when it produced one.

200Nothing has been attempted.

FieldTypeDescription
statusstring`not_started`.
explanationstringThe store copy.

200No product is resolved.

FieldTypeDescription
statusstring`not_claimed`.
reasonstring`not_claimed`.
explanationstringThe 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

Back to the API reference index, or read the cookbook for recipes that compose this endpoint with others.