Documentation

GET /api/reasons

Every refusal reason the engine can cite.

RequestGET /api/reasons
AuthenticationNo authentication
Handlerbackend/server.py

What it does

The whole `REASONS` table, keyed by reason code, with the sentence the engine uses for each. A client can enumerate the closed set instead of hardcoding strings, and a new reason appears here the moment it exists in the engine.

Authentication

No authentication. The response does not depend on a session.

Parameters

This endpoint takes no parameters.

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

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

Recorded example

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

Responses

200Always.

FieldTypeDescription
reasonsobjectReason code to explanation. Includes `all_held`, `catalog_exhausted`, `claim_limit_reached`, `held_by_another_founder`, `not_yet_researched`, `no_product`, `not_servable`, `passed_by_you`, `passed_out` and roughly seventy more.
countnumberHow many reasons the table holds.

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.
  • GET /api/analysis The analysis of the product this session holds.
  • 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.

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