Short answer: to set, toggle, and retrieve feature flags using a Node.js REST API, treat each change as a versioned state transition with an audit record, then observe the checkout decision rather than every flag read. In a B2B SaaS checkout workflow, signal quality wins when the event says which flag version changed payment behavior. A log line for every evaluator call mostly records plumbing.
The flow is small. Checkout asks a local evaluator for a decision. The evaluator uses a versioned snapshot from a REST control plane. A mutation creates a new version and audit event. The checkout boundary emits one structured decision event with the flag key, resolved value, version, and outcome. Correlate that event with a trace, but do not put payment credentials or a full order in it.
How should I set, toggle, and retrieve feature flags using a REST API?
A flag needs more than a boolean: key, enabled state, targeting rule or segment reference, version, updated timestamp, and expiry policy.…