Documentation
POST /api/outcome
Declare what happened with a claimed product.
| Request | POST /api/outcome |
|---|---|
| Authentication | Session cookie required |
| Handler | backend/server.py |
What it does
The founder reports whether the product sold, what was spent and what came in. This is the denominator of the public track record, and the response carries `provenance: "declared"` so a reader can never mistake a report for an observation.
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 \
-X POST -H 'Content-Type: application/json' \
"https://flowfinds.ai/api/outcome"const res = await fetch("https://flowfinds.ai/api/outcome", {
method: "POST",
credentials: "include",
});
const data = await res.json();import requests
s = requests.Session()
r = s.post("https://flowfinds.ai/api/outcome")
data = r.json()Recorded example
curl -s -b cookies.txt -c cookies.txt \
-X POST -H 'Content-Type: application/json' \
-d '{"sold":true,"spend_usd":120,"revenue_usd":410}' \
"$FLOWFINDS_ORIGIN/api/outcome"Responses
200 — The outcome was recorded.
| Field | Type | Description |
|---|---|---|
status | string | `recorded`. |
product_id | string | The product the outcome is attached to. |
sold | boolean | null | As reported. |
spend_usd | number | null | As reported. |
revenue_usd | number | null | As reported. |
recorded_at | string | When the row was written. |
provenance | string | `declared` — founder-reported, not independently verified. |
Errors
| Status | Reason | When |
|---|---|---|
400 | invalid_outcome | The reported values are not usable. |
409 | nothing_to_record | There is no claim to attach an outcome to. |
Related
GET /api/offer— The researched offer for the session's product, or the refusal that says why there is none.GET /api/dashboard— The verdict, the facts behind it, and where each figure came from.GET /api/launch— The launch facts, each with whether it is true today.POST /api/product— Publish a product of the founder's own into the store engine.POST /api/product-launch— Drive the launch state machine for a product.POST /api/presence— Record which screen the operator is on.
Back to the API reference index, or read the cookbook for recipes that compose this endpoint with others.