Edit a business definition
Edits the label, meaning, owner or choice domain of a declared input and appends one revision. Only a verified human principal may edit a definition.
A CHOICE DOMAIN is business metadata about what a fact can mean. It never edits a rule’s allowed values. A native list rule’s allowed/forbidden values are chosen explicitly and stored in the rule, and are the only values the evaluator reads; adding, relabelling or removing a choice changes no rule, no active_rules_hash and no receipt, and a rule value that is not in the domain stays legal and is shown as unlisted rather than removed.
expected_revision is required and is a compare-and-set: a disagreement is refused 409 STALE_DEFINITION_REVISION with both numbers and nothing is written. A type or unit change is refused 422 DEFINITION_TYPE_CHANGE_UNSUPPORTED — that is a redeclaration, not a revision. A choice domain repeating a code is refused 422 DUPLICATE_CHOICE_CODE, and one carrying a malformed entry 422 INVALID_CHOICE_SHAPE naming the offending index — two different faults, two different codes. A label change never renames the canonical key, and the key cannot be renamed by any request.
Authorizations
MeshQu API key passed as a bearer token: Authorization: Bearer mqu_…. Mint one in the console (Settings → API keys).
Tenant UUID for multi-tenant isolation. Required on authenticated routes. A missing or non-UUID value returns 400 MISSING_TENANT_ID or INVALID_TENANT_ID before API-key authentication.
Path Parameters
The canonical key, e.g. vendor.
Body
Current declaration_revision expected by the caller. Required. A mismatched revision returns 409 STALE_DEFINITION_REVISION with expected_revision and current_revision; reload the current definition before retrying.
x >= 1The display label. Changing it NEVER renames the canonical key — the key is what rules and payloads use and it is never renamed at all.
1 - 200What the fact means, in the business's words. null clears it.
2000Who in the business owns this fact's meaning. RECORDS a name; grants no authority. null clears it.
200The choice domain — business metadata that NEVER edits a rule's allowed values. Replaces the domain wholesale; null removes it. Adding a choice changes no rule, no active_rules_hash and no receipt, and a rule value that is not in the domain stays legal and is shown as unlisted rather than removed. Codes must be distinct (case-insensitively) or the request is refused 422 DUPLICATE_CHOICE_CODE; a malformed entry is refused 422 INVALID_CHOICE_SHAPE naming its index.
200Not editable. A type change returns 422 DEFINITION_TYPE_CHANGE_UNSUPPORTED; declare a new definition under a new key.
NOT EDITABLE, for the same reason as value_type. Refused 422 DEFINITION_TYPE_CHANGE_UNSUPPORTED.
Response
Default Response
The canonical key, UNCHANGED by this write — it is never renamed.
number The revision AFTER this write. Send it back as expected_revision on the next edit.
False when submitted values match the current definition; the revision does not change.
The business's list of possible values for this definition — business metadata that NEVER edits a rule's allowed values. Not a permitted subset: the subset a particular list rule allows or forbids lives in the rule. At most 200 entries.
200Which ordinary revision this write was. ABSENT when nothing changed. When several fields move at once it is meaning if the description changed, otherwise the first changed field in the fixed order label, owner, choices — a label on the revision, never a statement of what the revision contains, which is always the full snapshot.
declare