Documentation

POST /api/supplier-connection

Connect or disconnect a supplier.

RequestPOST /api/supplier-connection
AuthenticationSession cookie required
Handlerbackend/server.py

What it does

Records the supplier this account sources through, or removes the record.

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.
kindbodystringRequiredThe supplier kind.
namebodystringRequiredThe supplier's name as the founder knows it.

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

s = requests.Session()
r = s.post("https://flowfinds.ai/api/supplier-connection", json={
    "kind": "<string>",
    "name": "<string>"
  })
data = r.json()

Recorded example

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

Responses

200Connected.

FieldTypeDescription
statusstring`connected`.
kindstringAs stored.
namestringAs stored.
defaultbooleanFalse.

200Disconnected.

FieldTypeDescription
statusstring`not_connected`.

Errors

StatusReasonWhen
400`kind` or `name` is missing or unusable.

Related

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