Documentation

GET /api/analysis

The analysis of the product this session holds.

RequestGET /api/analysis
AuthenticationSession cookie required
Handlerbackend/server.py

What it does

Reads the analyser output for the session's resolved product. Refuses by name when there is no product, and separately when the product exists but is not servable — the two are different facts and the engine keeps them apart.

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/analysis"
const res = await fetch("https://flowfinds.ai/api/analysis", {
  method: "GET",
  credentials: "include",
});
const data = await res.json();
import requests

s = requests.Session()
r = s.get("https://flowfinds.ai/api/analysis")
data = r.json()

Recorded example

curl -s -b cookies.txt -c cookies.txt \
  "$FLOWFINDS_ORIGIN/api/analysis"

Responses

200An analysis exists.

200No product is resolved, or the product is not servable.

FieldTypeDescription
statusstring`refused`.
reasonstring`no_product` or `not_servable`.
explanationstringThe sentence the screen shows.

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

  • GET /api/find Serve this session's product, minting a hold if it does not have one.
  • GET /api/feed Serve the whole field: this session's find first, then what it beat.
  • POST /api/select Move this session's hold onto a named product from the field.
  • POST /api/pass Claim the held product, or pass on it and be shown the next one.
  • POST /api/analyze Run the analyser over any product description, claimed or not.
  • POST /api/ask Ask a question against one or more catalog products.
  • POST /api/discover Run the discovery script and return its terminal output verbatim.
  • GET /api/discovery-research Read the state of the external discovery research job.

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