Register a reference type
Registers a reference type: a kind of business identifier facts carry, such as an order number, with its scope keys, correlation and sensitivity. Every contract declaring the type inherits its scope and sensitivity, and may declare exact correlation only on an exact type, so register it from your deploy pipeline before any contract uses it.
Rules
- Idempotent: equal content answers
200as a replay, whoever sends it. - A registered type is immutable, with one exception:
mask: documentcan be added once to a type that has no mask, every other member equal. Omittingmaskon a type that has one is a replay showing the stored mask; a mask can never be removed. maskaccepts onlydocument, and never with sensitivitynoneorhashed.- The first dotted segment of the name must be one of the deployment’s reserved prefixes, and the token needs
catalog:reserved. ownerIdentityis the authenticated caller, recorded for audit.
Responses
201registered;200replay, or the mask added.403SF-0014missingcontracts:read,contracts:writeorcatalog:reserved.409SF-0022different content:errors[]lists every differing member, and nothing changes.422SF-0023name outside every reserved prefix;SF-0092invalid member.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
Reference type name: a dotted name whose first segment is a reserved prefix.
"acme.order_id"
Body
Whether references of this type link facts into flows; a contract may declare exact only on an exact type. Allowed values: exact, none.
What the reference identifies: 1 to 512 UTF-8 bytes, no control characters.
"Order number assigned by the checkout service, unique within a store"
Scope keys that complete the reference identity, such as storeId; a set, stored sorted, duplicates refused.
Display format, only with sensitivity masked or encrypted; set once, never removed (omitting it later is a replay). Allowed values: document.
Whether listFlowsByReference may list facts by this type; defaults to false.
Protection of values at rest and on reads, inherited by every contract that declares the type; defaults to none. Allowed values: none, masked, hashed, encrypted.
Response
The reference type is already registered with this content: a replay, whoever sends it, or the one-way addition of mask: document to a type that had no mask. The body is the stored type.
Whether references of this type link facts into flows. Allowed values: exact, none.
exact, none When the type was registered. RFC 3339, UTC.
What the reference identifies, as registered.
Verified identity that registered the type, in the form owner/sub; recorded for audit only.
"acme/platform-deployer"
Scope keys that complete the reference identity, sorted.
Whether listFlowsByReference can list facts by this type.
Protection of values at rest and on reads; see Sensitivity and protected values. Allowed values: none, masked, hashed, encrypted.
none, masked, hashed, encrypted Reference type name.
"acme.order_id"
Display format of the type; omitted when it has none. Allowed values: document.
document 
