Documentation
POST /api/intent/order
Override the section the storefront leads with.
| Request | POST /api/intent/order |
|---|---|
| Authentication | Session cookie required |
| Handler | backend/server.py |
What it does
The founder names the section to lead with. Both sides are recorded and returned: the override is stamped `provenance: "founder_override"` and `engine_dissent` carries what the engine would have led with and the dated row behind it, so the screen can say 'you asked for X; we would have led with Y, because …' rather than quietly discarding one of the two facts.
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. |
section | body | string | Required | The section to lead with. Refused as `no_section` when absent, `unknown_section` when it is not a section of the store. |
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 '{"section":"<string>"}' \
"https://flowfinds.ai/api/intent/order"const res = await fetch("https://flowfinds.ai/api/intent/order", {
method: "POST",
credentials: "include",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"section": "<string>"
}),
});
const data = await res.json();import requests
s = requests.Session()
r = s.post("https://flowfinds.ai/api/intent/order", json={
"section": "<string>"
})
data = r.json()Recorded example
curl -s -b cookies.txt -c cookies.txt \
-X POST -H 'Content-Type: application/json' \
-d '{"section":"…"}' \
"$FLOWFINDS_ORIGIN/api/intent/order"Responses
200 — The order was applied.
| Field | Type | Description |
|---|---|---|
status | string | `ordered`, or `order_failed` when the applied lead does not match the request. |
product_id | string | The product. |
lead | string | The section now leading. |
provenance | string | `founder_override`. |
engine_dissent | object | `would_have_led` and the dated row behind it. |
Errors
| Status | Reason | When |
|---|---|---|
400 | no_section | No section was named. |
400 | unknown_section | The named section is not part of the store. |
409 | build_in_progress | A build is already running. |
500 | order_build_raised | The regeneration raised. |
Related
GET /api/store— The state of the session's storefront.POST /api/store— Start generating the storefront for the session's product.POST /api/store/publish— Verify and publish the storefront, regenerating it if verification demands.POST /api/intent— Ask the engine what it would change on a surface, and why.POST /api/intent/apply— Apply a proposed intent, regenerating the store.POST /api/intent/revert— Undo the last applied intent.POST /api/ai/edit— Edit the storefront in natural language.GET /api/editor/— Read editor state and store metrics.
Back to the API reference index, or read the cookbook for recipes that compose this endpoint with others.