{"contract":"ap-view/1","what_it_is":"The read receipt shaped for an AP or ERP pre-payment step: per list source, answered + rows under the exact name/key, or did_not_answer; similar printed names shown, never counted; canonical SHA-256 over the view.","endpoints":{"check":"POST /api/ap/check (X-Api-Key) — body as POST /api/batch/receipt: name, uei, npi, ein, ccn, lei, cage, partner_reference, forms, since","view":"GET /api/ap/view/{receipt_id} (X-Api-Key)","verify":"POST /api/ap/verify {view, sha256} — public replay","batch":"POST /api/batch (X-Api-Key, CSV) with webhook_url — the batch webhook carries receipt ids; call /view per id"},"view_fields":{"sources[].state":"answered | did_not_answer | not_read","sources[].exact_rows":"integer when answered; null otherwise","sources[].similar_shown":"count of printed names containing these words — shown, not counted","exact_rows_total":"sum of exact_rows over the list sources that answered — a fact for a workflow branch, not a clearance","all_list_sources_answered":"true only when every list source answered; false means at least one is silent and exact_rows_total is incomplete by that source","list_sources_did_not_answer":"the silent list sources by id","sam_registration":"status, expiry, purpose and Responsibility/Qualification record count as SAM printed them, or null when SAM did not answer — FAR 4.1102 is the payer's or CO's check, not ours","decision":"always null","decision_belongs_to":"payer","sha256":"canonical SHA-256 of the view; replay at /api/ap/verify"},"http_behaviour":{"201":"view returned; one receipt registered","401":"missing or inactive X-Api-Key","429 + Retry-After":"either the key's monthly row limit, or 'at capacity' — 40 receipts are built at once and none finished within 10 s; retry after the header, the receipt is never thinned to make room","did_not_answer":"a source that rate-limited or timed out prints did_not_answer with exact_rows null — never 'no record'; for pre-payment runs over ~40 names use POST /api/batch, which paces reads and retries unanswered rows the next day","measured_2026-10-11":"100 simultaneous checks: 60 served (p50 28 s, p95 35 s), 40 answered 429 at capacity, 0 degraded views; a 100-row batch had every row built, every source answered, in 9 min"},"hash_rule":"SHA-256 of canonical JSON (keys sorted, non-JSON values via str(), UTF-8) of the view without its sha256 field. The underlying receipt has its own sha256 under the same rule and an Ed25519 certification at /api/receipts/{id}/certification/html.","example_payer_rules":[{"name":"monthly-exact","rule":"pay only if a receipt dated this month shows sam.state == 'answered' and sam.exact_rows == 0 and leie.state == 'answered' and leie.exact_rows == 0","who_decides":"payer"},{"name":"two-field-branch","rule":"release automatically only when all_list_sources_answered == true and exact_rows_total == 0; anything else routes to a person. The two fields are facts about the read, not a clearance","who_decides":"payer"},{"name":"silence-escalates","rule":"if any list source state == 'did_not_answer' → route to a person; do not treat as zero","who_decides":"payer"},{"name":"similar-names-reviewed","rule":"if similar_shown > 0 → a person opens the official_url rows before release; the receipt records that they were shown","who_decides":"payer"}],"not_done":["No score or match confidence: a similar printed name is shown, never counted or weighed.","No APPROVED / HOLD / CLEAR field: the payer's AP rule decides; this record is what the rule reads.","No 'no exclusions found' sentence: each source prints answered (n rows under this exact name/key) or did_not_answer — a silent source is never a zero.","No identity claim: rows under the exact printed name or supplied key are rows under that name or key, nothing more.","No payment, bank or filing record: this is a read receipt, not a payment receipt."],"list_sources":["sam","leie","ofac","state","csl","dod_1260h","uflpa","fda_debar","oig_cia","irs_revocation","epls_archive","dea_actions"],"keys_accepted":["uei","npi","ein","cik","ccn","lei","cage","eori","uscc"],"trade_keys":{"eori":"EU customs identifier — validated at the European Commission EORI service (Valid / Not valid, name on file where consented)","uscc":"China Unified Social Credit Code — read at GLEIF as the LEI registration-authority id; the Chinese register (gsxt.gov.cn) is not read (CAPTCHA), printed as not_read","vlei":"deferred — a credential format, not a lookup key; accepted when a buyer presents one"},"html":"https://alphacovenantholdings.com/api/ap/contract.html","partner_spec":"https://alphacovenantholdings.com/api/batch/spec"}