Documentation

POST /api/pass

Claim the held product, or pass on it and be shown the next one.

RequestPOST /api/pass
AuthenticationSession cookie required
Handlerbackend/server.py

What it does

The largest handler in the engine and the one that writes the claim. It records the pass, mints the next hold itself — which is why the find meter had to move into `hold_for`, since a guard on one caller is a guard on one of seven — and, when an email is supplied, creates the claim that everything downstream is scoped to. A referrer's address may be attached at claim time. The response reports whether the claim is exclusive, since a small set of catalog identifiers are deliberately shared.

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.
emailbodystringOptionalThe address the claim is credited to. Required to claim; omit to pass.
product_idbodystringOptionalThe product being claimed or passed. Must be one this session was shown.
referrer_emailbodystringOptionalThe address of the founder whose coded link brought this session in. Attribution only; a link alone never becomes a funded person.

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' \
  -d '{"email":"<string>","product_id":"<string>","referrer_email":"<string>"}' \
  "https://flowfinds.ai/api/pass"
const res = await fetch("https://flowfinds.ai/api/pass", {
  method: "POST",
  credentials: "include",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "email": "<string>",
    "product_id": "<string>",
    "referrer_email": "<string>"
  }),
});
const data = await res.json();
import requests

s = requests.Session()
r = s.post("https://flowfinds.ai/api/pass", json={
    "email": "<string>",
    "product_id": "<string>",
    "referrer_email": "<string>"
  })
data = r.json()

Recorded example

curl -s -b cookies.txt -c cookies.txt \
  -X POST -H 'Content-Type: application/json' \
  -d '{"email":"[email protected]","product_id":"…"}' \
  "$FLOWFINDS_ORIGIN/api/pass"

Responses

200The claim was recorded.

FieldTypeDescription
claimedstringThe claimed product identifier.
emailstringThe address the claim was credited to, read back from the stored row.
exclusivebooleanFalse only for the deliberately shared catalog identifiers.
servablenumberProducts still servable after the claim.

200The product was passed. The next hold is minted and the next card served in the same response.

Errors

StatusReasonWhen
400expected JSON {email, product_id}The body is missing or malformed.
400not a candidate you were shownThe product was never served to this session.
404not foundNo such product identifier, or no claim record to act on.
404unknown product_idThe identifier is not in the catalog.
409already claimedThe product has been claimed, by this session or another.
409you passed on this oneThis session already passed on the product.
409not your findThe product is held by a different session.

Related

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