{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://alphacovenantholdings.com/api/spec/receipt/v1/schema.json","title":"Alpha Covenant Receipt Format","version":"1.0","description":"A dated, source-linked, reproducible record of what official sources printed for one name and its official keys. It carries facts and provenance; it carries no score, risk label, clearance or inferred relationship.","type":"object","required":["name","checked_at","method","checks","did_not_answer","sha256"],"additionalProperties":true,"properties":{"name":{"type":"string","minLength":2,"description":"the name exactly as the requester supplied it"},"uei":{"type":["string","null"],"pattern":"^[A-Z0-9]{12}$"},"npi":{"type":["string","null"],"pattern":"^[0-9]{10}$"},"ein":{"type":["string","null"],"pattern":"^[0-9]{2}-[0-9]{7}$"},"cik":{"type":["string","null"],"pattern":"^[0-9]{1,10}$"},"ccn":{"type":["string","null"],"pattern":"^[0-9A-Z]{6,10}$"},"checked_at":{"type":"string","format":"date-time","description":"UTC read time of the receipt"},"method":{"type":"string","description":"versioned method string; must state exact-key / exact-printed-name matching and that nothing is inferred"},"what_this_is":{"type":"string"},"duty":{"type":"string"},"reference":{"type":["string","null"],"description":"requester-supplied award/PIID/invoice reference bound into the hash, printed and never interpreted"},"checks":{"type":"array","minItems":1,"items":{"type":"object","required":["id","source","state"],"properties":{"id":{"type":"string","description":"stable check identifier (leie, sam, ofac, state_medicaid, usaspending, fac, ocr, echo, csl, fda, irs, sec)"},"source":{"type":"string","description":"the official file or API read, named as its publisher names it"},"state":{"type":"string","enum":["ok","did_not_answer"],"description":"ok = the source answered; did_not_answer = the source was not read and nothing stands in for it"},"summary":{"type":["string","null"],"description":"one sentence of source facts; never a verdict"},"count":{"type":["integer","null"],"description":"rows the source printed for the exact key or exact printed name; null when not read"},"file":{"type":["object","null"],"description":"file metadata when a file was read: a key ending in sha256 with the 64-hex digest (at any depth), rows, fetched_at, source url"},"entries":{"type":"array","description":"the source's rows as printed, at most ten"},"official_lookup":{"type":["string","null"],"format":"uri","description":"where a reader repeats the check at the publisher"},"matched_by":{"type":["string","null"],"description":"'exact key' names the key (UEI, NPI, EIN, CIK, CCN) or 'exact printed name'"}}}},"did_not_answer":{"type":"array","items":{"type":"string"},"description":"ids of every check or block that was not read; a receipt with an empty list read everything it names"},"crosswalk":{"type":"object","required":["edges","count","method"],"properties":{"count":{"type":"integer"},"edges":{"type":"array","items":{"type":"object","required":["from","to","printed_together_on","row"],"properties":{"from":{"type":"object","required":["key","value"]},"to":{"type":"object","required":["key","value"]},"printed_together_on":{"type":"string","description":"the single official row that prints both values"},"row":{"type":"string"},"official_url":{"type":["string","null"]}}}}},"description":"identifier edges; each edge must come from one official row that prints both values; no name-based or inferred linkage"},"source_integrity":{"type":["object","null"]},"identity":{"type":["object","null"]},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 of canonical JSON (sorted keys, str() for non-JSON values, UTF-8) of the receipt without this field"}}}