Documentation

POST /api/analyze

Run the analyser over any product description, claimed or not.

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

What it does

Analyse a product that is not in the catalog and not held. The analyser returns a verdict with its basis; it does not create a claim, a hold or a catalog entry.

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.
namebodystringRequiredThe product's name.
descriptionbodystringRequiredWhat the product is. An empty or unusable description is refused by name.
idbodystringOptionalAn identifier to attach to the result, when analysing something the caller already tracks.

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

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

Recorded example

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

Responses

200The analyser produced a verdict, or refused with a named reason such as `nothing_to_analyze` or `invalid_description`.

Errors

StatusReasonWhen
400The body is not JSON.

Related

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