Documentation

POST /api/select

Move this session's hold onto a named product from the field.

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

What it does

Takes a product the feed showed and makes it the session's held product. The hold is resolved through the same single function every other endpoint uses; the exclusivity defect that reopened twice came from two code paths resolving a hold independently, and this endpoint does not add a third.

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.
product_idbodystringRequiredCatalog identifier of the product to hold. Must be a product this session was shown.

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

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

Recorded example

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

Responses

200The hold moved.

FieldTypeDescription
statusstring`selected`.
heldstring | nullThe product now held by this session.
product_idstringThe product that was selected.
held_minutesnumberThe hold window, in minutes.

Errors

StatusReasonWhen
400The body is not JSON, or `product_id` is missing.
404No catalog product carries that identifier.
409The product is held or claimed by another founder, or is not servable.

Related

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