Register a contract version
Registers one version of a fact contract: the JSON Schema its facts must satisfy and the references they carry. Call it from your deploy pipeline, before the producer rolls out: the registration must succeed before facts are accepted.
Rules
- Idempotent: the same identity and content hash is a replay.
- Published versions are immutable; a new minor or patch version must stay compatible.
- The namespace starts with a reserved prefix, so every registration needs
catalog:reserved. - The first registration binds the namespace to the calling producer service, recorded for audit. In multi-tenant mode the owner is the producer’s service credential for the tenant.
- Every declared reference type must be registered first. A reference declares only
type,cardinality,requiredandcorrelation; scope and sensitivity come from the reference type and appear in the response.exactis refused on acorrelation: nonetype. x-sensitivity(masked,hashedorencrypted) only on atype: stringproperty reached throughproperties;x-mask: documentonly besidemaskedorencrypted.
Responses
201registered andACTIVE;200identical replay.403SF-0005the namespace is bound to another producer service;SF-0014,SF-0027,SF-0028.409SF-0002same version, different content (errors[]lists differences and the bump);SF-0003incompatible minor or patch.422SF-0004,SF-0018,SF-0021,SF-0023,SF-0025,SF-0092.503SF-0094retry later.
Authorizations
JWT issued by the identity provider. A producer calls with a service credential issued for the tenant it sends facts for; a reader calls with a user token or a service credential. The tenant is always taken from the token, never from the request path, query or body.
Path Parameters
Producer service that owns the fact type.
"checkout-api"
Namespace of the fact type.
"acme.checkout"
Fact type name.
"checkout.order_placed"
Semantic version of the contract (major.minor.patch).
"1.0.0"
Body
Content hash computed by the producer (the prefix sha256: plus 64 lowercase hex characters), verified by the server against the content sent.
"sha256:0000000000000000000000000000000000000000000000000000000000000000"
References facts of this type carry; scope and sensitivity come from each reference type and cannot be declared here.
Self-contained JSON Schema 2020-12 document that every fact payload of this type must satisfy.
Owning team or squad, audited, never an identity: 1 to 128 UTF-8 bytes (accented letters take two or more), no surrounding whitespace or control characters.
"checkout-squad"
How a new version is checked against the earlier versions of its major; optional, defaults to TRANSITIVE. Allowed values: TRANSITIVE.
Response
Identical content is already registered under this identity: a replay that changes nothing. The body is the stored contract version.
When this version was registered. RFC 3339, UTC.
Content hash verified at registration (the prefix sha256: plus 64 hex characters); the authoritative integrity value of this version.
Namespace of the fact type, bound to the producer that registered in it first.
"acme.checkout"
Producer service that owns the fact type.
"checkout-api"
References facts of this type carry, each with the scope and sensitivity its reference type had at registration.
Payload schema as stored: member order, whitespace and number spelling may differ from what was sent, so check integrity with hash, never by rehashing this.
Semantic version of this contract (major.minor.patch).
"1.0.0"
Lifecycle status: a DEPRECATED version refuses new facts and never returns to ACTIVE. Allowed values: ACTIVE, DEPRECATED.
ACTIVE, DEPRECATED Owning team or squad, as registered; informational and audited, never an identity.
"checkout-squad"
Fact type name, chosen by the producer.
"checkout.order_placed"
How a new version is checked against the earlier versions of its major. Allowed values: TRANSITIVE.
TRANSITIVE 
