Documentation
POST /api/supplier-connection
Connect or disconnect a supplier.
| Request | POST /api/supplier-connection |
|---|---|
| Authentication | Session cookie required |
| Handler | backend/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
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ff_session | cookie | string | Optional | The 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. |
kind | body | string | Required | The supplier kind. |
name | body | string | Required | The 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
200 — Connected.
| Field | Type | Description |
|---|---|---|
status | string | `connected`. |
kind | string | As stored. |
name | string | As stored. |
default | boolean | False. |
200 — Disconnected.
| Field | Type | Description |
|---|---|---|
status | string | `not_connected`. |
Errors
| Status | Reason | When |
|---|---|---|
400 | — | `kind` or `name` is missing or unusable. |
Related
GET /api/suppliers— Sourcing options for a named product.GET /api/supplier-connection— Which supplier this account is connected to.POST /api/samples/checkout— Order a physical sample of a product.
Back to the API reference index, or read the cookbook for recipes that compose this endpoint with others.