Documentation

POST /api/outcome

Declare what happened with a claimed product.

RequestPOST /api/outcome
AuthenticationSession cookie required
Handlerbackend/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

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 \
  -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

200The outcome was recorded.

FieldTypeDescription
statusstring`recorded`.
product_idstringThe product the outcome is attached to.
soldboolean | nullAs reported.
spend_usdnumber | nullAs reported.
revenue_usdnumber | nullAs reported.
recorded_atstringWhen the row was written.
provenancestring`declared` — founder-reported, not independently verified.

Errors

StatusReasonWhen
400invalid_outcomeThe reported values are not usable.
409nothing_to_recordThere is no claim to attach an outcome to.

Related

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