Skip to main content
Turn a recommendation into an executable order governed by a maker-checker state machine, then write it back to the source ERP. Separation of duties is enforced server-side: the approver must be a different organization admin than the proposer. Every transition is audited.

With an API key

Every call here takes an API key. A key acts for the person who created it: that person is recorded as the proposer or approver, so a key cannot approve an order its creator proposed, and it can do no more than its creator can today. A key whose creator has left the organization stops working here. Proposing, changing a proposed order’s quantity and cancelling need the execute scope. Approving, rejecting, executing and verifying need the approve scope, which only an organization admin can put on a key. Reading the execution rules (get_policies) needs read. List proposed recommendations:

Actions

POST /v1/orders/actions takes an action in its body:

Lifecycle

Examples

Propose (maker):
Change the quantity before approval:
Approve then execute (a different admin):
Send an Idempotency-Key header to retry any of these safely; see Conventions.

Explanations

POST /v1/explanations returns the evidence behind a recommendation: the driving signal, the demand figures, cost and benefit, a confidence with its reason, and data lineage. The answer also carries a plain-English narrative. With use_ai set to true the narrative is written by AI from the same evidence; otherwise it comes from a template, and narrative_source says which you got. Takes an API key with the read scope.
Response: 200 OK.