SDK & API
The demo evaluate endpoint reads the seeded Acme catalog. Console edits stay in the browser; the public API always evaluates the published seed so it works on the server.
const res = await fetch("/api/evaluate", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
flag: "new-checkout",
environment: "production",
userId: "user-42",
}),
});
const { enabled, reason } = await res.json();
if (enabled) renderNewCheckout();Run an evaluation to see the JSON response.