Hanzo
OpenapiLabel

Resolve the label in force for named events, as of each event's own horizon

Answers, for each named event, which assertion was in force AS OF that event's own horizon — and what disagreed with it.

POST /v1/label/resolve

Addresshttps://api.hanzo.ai/v1/label/resolve
MethodPOST
OperationriskResolveLabels
AuthAuthorization: Bearer $HANZO_API_KEY

Answers, for each named event, which assertion was in force AS OF that event's own horizon — and what disagreed with it.

This is the join surface: the dataset materialiser calls it to attach ground truth to training rows, and the evaluator calls it to score a past decision against what was knowable when the decision had to be made. One mechanism for both, so a model can never be trained under one leakage rule and scored under another.

Three answers are distinct and all three are honest: a resolved label, an event that has not matured, and a matured event nobody has judged. The last is never reported as unproductive.

Request

6 fields, body application/json (required).

FieldInTypeRequiredDescription
horizonbodyintegerHorizon is how many days an event must age before it may be resolved at all, and it is the whole of the no-leakage rule.
nowbodystringNow moves the observation instant BACKWARDS, RFC 3339.
subjectsbodyriskLabelEvent[]Subjects are the exact events being judged.
subjects[].atbodystringAt is the event's own instant, RFC 3339. It is part of the event's IDENTITY and not a filter: it is matched exactly, to the second, against the at the…
subjects[].kindbodystringKind is the judged entity's type, from the closed set: account, agent, merchant, payout, person, session or transaction.
subjects[].subjectbodystringSubject is the entity id in the tenant's own namespace, at most 512 bytes.

Response

StatusBodyMeaning
200riskResolveOutok

200 body — 30 fields.

FieldInTypeAlwaysDescription
horizonbodyintegerHorizon is the maturity horizon this answer was computed under, IN DAYS — the caller's, or 120 when it stated none.
labelsbodyriskResolved[]Labels is one entry per named event that BOTH matured and had at least one assertion knowable by its own as-of, in the order the events were named.
labels[].asOfbodystringAsOf is the instant this answer was true at: the event time plus the horizon.
labels[].atbodystringAt is the event's instant, RFC 3339, echoed.
labels[].bybodystringBy is the identity that filed the WINNING assertion, <home org>/<user>, stamped server-side from the validated principal at the write and never taken from a…
labels[].confidencebodynumberConfidence is the winning assertion's own confidence in [0,1], zero when its filer stated none.
labels[].conflictsbodyriskLabelRecord[]Conflicts is every other visible assertion, strongest first, whole.
labels[].conflicts[].atbodystringAt is when the judged EVENT happened, RFC 3339 in UTC, truncated to the second.
labels[].conflicts[].bybodystringBy is the identity that asserted, stamped server-side at the write.
labels[].conflicts[].confidencebodynumberConfidence is the filer's own confidence in [0,1] — 1 for a processor chargeback, less for an analyst's hunch.
labels[].conflicts[].dispositionbodystringDisposition is what was concluded, from the closed set: productive — the event led somewhere, escalated, reported or charged back; unproductive — judged…
labels[].conflicts[].evidencebodystringEvidence is the pointer to the record this conclusion came from: a dispute id, a case id, a decision id.
labels[].conflicts[].holdbodybooleanHold is true while a litigation hold is on this record: retention will not dispose of it, at any age.
labels[].conflicts[].idbodystringID is the assertion's content digest — SHA-256 over every semantic field, rendered hex — computed server-side and never supplied.
labels[].conflicts[].kindbodystringKind is what the subject IS, from the closed set: account, agent, merchant, payout, person, session or transaction.
labels[].conflicts[].knowablebodystringKnowable is when THIS PLANE could first have answered with the assertion: the later of Seen and the server clock at the write, derived server-side.
labels[].conflicts[].seenbodystringSeen is when the FILER said the assertion became knowable.
labels[].conflicts[].sourcebodystringSource is WHO asserted, from the closed set: chargeoff, dispute, case, refund, review or sample.
labels[].conflicts[].subjectbodystringSubject is the entity that was judged, named in the TENANT'S OWN namespace and at most 512 bytes.
labels[].conflicts[].wrotebodystringWrote is the server clock at the write.
labels[].contestedbodybooleanContested is true when a visible assertion claimed a DIFFERENT disposition.
labels[].dispositionbodystringDisposition is the claim IN FORCE at AsOf: productive, unproductive, or the empty string for an explicit unjudged.
labels[].evidencebodystringEvidence is the winning assertion's pointer to the record behind it — the dispute, case or decision id it was filed with, opaque and verbatim.
labels[].idbodystringID is the winning assertion's content digest, so this answer traces to the exact record it came from — and that record can be placed under litigation hold by…
labels[].kindbodystringKind is the judged entity's type, echoed from the event that was named.
labels[].sourcebodystringSource is who filed the winning assertion, and it is the PRIMARY term of the rule that picked it.
labels[].subjectbodystringSubject is the entity id, echoed from the event that was named — the tenant's own key, returned verbatim.
nowbodystringNow and Horizon echo the observation this answer was computed under.
unlabelledbodyintegerUnlabelled is how many matured events had no assertion knowable by their own as-of.
unmaturedbodyintegerUnmatured is how many named events had not aged past the horizon.

Failure carries the platform error shape — see Errors.

Examples

hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.


Label API · All Hanzo APIs · Interactive reference

How is this guide?

On this page