Skip to main content
POST
Validate a decision file

Body

application/json

A decision file to check. decision_id is optional and only checked against the id pattern.

structure
object
required

Everything that defines a decision: questions, attribute declarations, aggregations and the result. Names are unique across all three maps.

decision_id
string

A name you choose for this decision, such as refund-exception: a lowercase letter, then up to 127 of a-z 0-9 _ . -. Unique in your organization and shared by its test and production keys. The first registration or evaluation under a new one creates the decision.

Pattern: ^[a-z][a-z0-9_.-]{0,127}$
objective
object | null

What the decision optimizes for, as the decision file holds it. Its outcomes must be ones structure can produce. Never part of the structure hash.

Response

The file is valid

structure_hash
string
required
Pattern: ^sha256:[0-9a-f]{64}$
question_hashes
object
required

Each question, by name, mapped to its hash (its definition without its name). A question's hash is what feedback about it is stored against.

canonical
string
required

The exact text whose SHA-256 is structure_hash: the structure's canonical form in RFC 8785 (JCS) JSON.

warnings
object[]
required

Things that are valid but probably not meant. They never depend on an environment or a model.