Documentation
POST /api/todos
Add, complete or delete a task.
| Request | POST /api/todos |
|---|---|
| Authentication | Session cookie required |
| Handler | backend/server.py |
What it does
One endpoint, three actions, each answering with the row it wrote so the client never has to re-read the list.
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. |
action | body | string | Optional | `delete` to remove a task. Omit to add or update. |
label | body | string | Optional | The task text, when adding. Refused as `empty_note` when blank. |
id | body | integer | Optional | The task to update or delete. |
done | body | boolean | Optional | The completion state to set. |
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 '{"action":"<string>","label":"<string>","id":"<integer>","done":"<boolean>"}' \
"https://flowfinds.ai/api/todos"const res = await fetch("https://flowfinds.ai/api/todos", {
method: "POST",
credentials: "include",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"action": "<string>",
"label": "<string>",
"id": "<integer>",
"done": "<boolean>"
}),
});
const data = await res.json();import requests
s = requests.Session()
r = s.post("https://flowfinds.ai/api/todos", json={
"action": "<string>",
"label": "<string>",
"id": "<integer>",
"done": "<boolean>"
})
data = r.json()Recorded example
curl -s -b cookies.txt -c cookies.txt \
-X POST -H 'Content-Type: application/json' \
-d '{"label":"Check the supplier quote"}' \
"$FLOWFINDS_ORIGIN/api/todos"Responses
200 — A task was added.
| Field | Type | Description |
|---|---|---|
status | string | `saved`. |
id | integer | The new row id. |
label | string | As stored. |
done | boolean | False. |
200 — A task was updated.
| Field | Type | Description |
|---|---|---|
status | string | `saved`. |
id | integer | The row. |
done | boolean | The new state. |
200 — A task was deleted.
| Field | Type | Description |
|---|---|---|
status | string | `deleted`. |
id | integer | The row. |
Errors
| Status | Reason | When |
|---|---|---|
400 | empty_note | A task was added with no label. |
404 | — | No task carries that id on this account. |
409 | — | The update conflicts with the stored row. |
Related
GET /api/tracking— This founder's orders, and nobody else's.GET /api/revenue— Confirmed revenue, per store and per currency.GET /api/satisfaction— The satisfaction sample.GET /api/helpdesk— The support desk: tickets, replies and the agent's state.POST /api/helpdesk— Act on a support ticket.POST /api/support— Ask the support agent a question.GET /api/todos— The operator's task list.
Back to the API reference index, or read the cookbook for recipes that compose this endpoint with others.