canopy-verification API Reference

Overview

Service that brokers income verification requests to external federal and state data sources. The SAVE and SSA SOLQ handlers (src/api/save.rs, src/api/ssa.rs) issue no database write — the response is returned to the caller and nothing is stored here — while the IEVS match handler persists each populated adapter record as an ievs_hits row with the serialised record in its payload JSONB (persist_hit, src/api/ievs.rs; ADR-004 Amendment 7). The service also carries a small worker-portal-facing domain surface: the verifications work-item table (feeds the dashboard "Pending verifications" panel through the caseload-scoped GET /v1/verifications/scoped, #519, #2336), its verification_responses (household responses, 20260601000000_create_verification_responses.sql) and the ievs_hits table written best-effort on each IEVS match (feeds the "IEVS alerts" panel, #522).

Base URL

container port 8005 (host: CANOPY_PORT_CANOPY_VERIFICATION_8005 in .ports.env). The worker-portal routes are mounted under /v1; the adapter routes are mounted at the root with their literal /internal/v1/…​ paths (crates/canopy-contracts-verification/src/paths.rs)

Authentication

Bearer token: a canopy-identity token for this receiver (its aud is urn:canopy:service:canopy-verification), authenticated by the service’s identity receiver (ADR-049 Amendment 14), on the /v1 routes and the adapter routes alike (Amendment 16): no bearer is 401 token_missing, a token it refuses 401 token_rejected, an X-Canopy-Actor header 400 actor_header_retired, and no trustworthy key set in time 503 keys_unavailable.

Access

canopy-applications, canopy-eligibility, canopy-portal and canopy-snap hold a system edge to canopy-verification; canopy-web, canopy-applications and canopy-eligibility carry workers' delegations; canopy-cli holds no edge. The /v1 writes take system callers and the writer bar, the reads system callers, caseworker+ and canopy-web’s readers, the portal its scoped list and response; the caseload-scoped feed admits only canopy-web’s caseworker+ delegations; the two batch surfaces admit canopy-applications alone, and each adapter route only its callers. A refusal is 403 with its ReceiverDenial code (ADR-049 Amendment 14); each route’s constant is in the authorization inventory.

Swagger UI

/swagger-ui on the same host port (documents the ten /v1/verifications…​ paths; the adapter routes carry no utoipa decorators)

Database

canopy_verification (verifications, verification_responses, ievs_hits; also used for health check)

Admission specifics

Legend: system is any system caller but the portal; system: canopy-x only those clients' system tokens; portal (scope) the portal’s system token holding that scope; a bar alone, a user’s delegation through any client holding one of its roles; … via canopy-x, a delegation only when that client presents it. Writer is CASEWORKER_WRITER_ROLES (no quality_control), caseworker+ CASEWORKER_OR_ABOVE_ROLES, case reader CASE_READER_ROLES, worker reader WORKER_READER_ROLES (all in crates/canopy-auth/src/roles.rs).

  • The portal’s two routes bind it to its session by the signed ownership claim (403 ownership_claim_missing or ownership_mismatch): GET /v1/verifications must filter on the claim’s application_id (require_owned_application; no filter compares as empty and is refused); POST /v1/verifications/{id}/respond, after its empty-response 422, answers a verification whose application the claim does not bind, or which has none, with the same 404 as an absent one, before the scope-mismatch 403 and the unscoped 422, then checks the response’s person_id (require_owned_person).

  • Attribution: cancelled_by and completed_by are principal.actor() (#1008): a user’s canopy subject (human), or the system caller’s client id (service).

Internal Endpoints

The three adapter routers (api::ievs, api::save, api::ssa) are mounted at the root only under the noop-adapters cargo feature — the default (services/canopy-verification/Cargo.toml); a build without it serves the ten /v1 routes only. They are canopy_api::ApiServer::router's public routes (main.rs, build_router over internal_routes; #2510): outside /v1's receiver layer, idempotency layer and per-IP limiter, but inside the outer layers, so they carry the security and API-Version headers and a body over the service’s body_limit answers 413. They carry the same receiver as their own layer (api::internal::behind), and each router a route layer admitting only its callers before the handler runs (api::internal::admitting, src/api/internal.rs).

POST /internal/v1/ievs/match

Access

system: canopy-snap (IEVS_CALLERS, src/api/internal.rs); another system caller is 403 service_not_allowlisted, a user system_caller_required

Query IEVS data sources for a single person. Each requested source carries its typed adapter class (#1497: state_wage / state_ui / ssa_sdx / ssa_bendex), computed at the sender from jurisdiction config (ADR-003) — the endpoint dispatches on class, never on the identifier literal, and a class outside that vocabulary is rejected 422 at deserialization (never a silent skip). Stored ievs_hits rows are labelled with the requested source identifier verbatim.

Request:

{
  "application_id": "uuid",
  "person_id": "uuid",
  "household_id": "uuid",
  "match_request": {
    "ssn": "123456789",
    "first_name": "…",
    "last_name": "…",
    "date_of_birth": "1990-01-15",
    "quarters": 4
  },
  "sources": [
    { "source": "georgia_dol_swr", "class": "state_wage" },
    { "source": "georgia_dol_ui", "class": "state_ui" },
    { "source": "ssa_sdx", "class": "ssa_sdx" },
    { "source": "ssa_bendex", "class": "ssa_bendex" }
  ]
}

Headers: Authorization: Bearer <canopy-identity token>

Response (200):

{
  "person_id": "uuid",
  "match_status": "completed",
  "wage_records": [
    {
      "employer": "Acme Corp",
      "quarterly_wages": 7500.00,
      "quarter": "2026-Q1"
    }
  ],
  "ui_record": { "weekly_benefit_amount": 0 },
  "sdx_record": { "monthly_ssi_amount": 0 },
  "bendex_record": { "monthly_benefit_amount": 0 }
}

Data sources queried (via IevsAdapter trait):

  1. Georgia DOL State Wage Records (SWR)

  2. Georgia DOL Unemployment Insurance (UI)

  3. SSA SDX (Supplemental Security Income)

  4. SSA BENDEX (Social Security benefits)

In UAT, NoopIevsAdapter returns deterministic test data keyed on the SSN suffix. The scripted adapter instead returns fixture-driven per-person responses for the demo personas — see Adapter selection (configuration).

NOTE

Per ADR-025, the handler validates household_id against canopy-persons before dispatching to the IEVS adapter. A non-existent household returns 422; an upstream/transport error reaching canopy-persons returns 502 (the internal endpoint surfaces raw HTTP status codes, not structured ApiError bodies).

POST /internal/v1/save/verify

Query DHS SAVE for immigration status verification.

Access

system: canopy-eligibility, canopy-snap (SAVE_CALLERS, src/api/internal.rs)

Request:

{
  "alien_registration_number": "A123456789",
  "person_id": "uuid"
}

Response (200):

{
  "person_id": "uuid",
  "verification_status": "lawful_permanent_resident",
  "step": "initial",
  "category_code": "C05"
}

In UAT, NoopSaveAdapter returns deterministic test data keyed on the alien-registration-number suffix; the scripted adapter returns fixture-driven per-person responses (see Adapter selection (configuration)).

POST /internal/v1/save/additional-verification

Submit a second-step SAVE verification for a multi-step case (institution case-number returned by the initial /save/verify step).

Access

system: canopy-eligibility, canopy-snap (SAVE_CALLERS, src/api/internal.rs)

Request:

{
  "application_id": "uuid",
  "person_id": "uuid",
  "case_number": "SAVE-CASE-0001"
}

Headers: Authorization: Bearer <canopy-identity token>

Response (200): same SaveVerifyHttpResponse shape as /save/verify (application_id, person_id, verification_response).

In UAT, NoopSaveAdapter returns deterministic test data keyed on the alien-registration-number suffix; the scripted adapter returns fixture-driven per-person responses (see Adapter selection (configuration)).

POST /internal/v1/ssa/solq

Query SSA SOLQ/BINDEX for a single person. Powers the ABD FBR SSA-linked Medicaid COAs (Pickle PAMMS 2120 / DAC PAMMS 2122 / Disabled Widow PAMMS 2124 / Widow 60-64 PAMMS 2126 / Former SSI Disabled Child PAMMS 2128) and feeds disability-onset data for waiver/institutional COAs (Phase E).

Per ADR-004, SOLQ is Medicaid-scoped under the Computer Matching Agreement — distinct from the IEVS SDX/BENDEX path on /internal/v1/ievs/match, whose matches are SNAP’s requests under Social Security Act §1137 and usable only for SNAP’s valid administrative needs (42 USC §1320b-7(a)(5)(A)). The two surfaces are separate authorizations and cannot share storage.

Access

system: canopy-eligibility; writer via canopy-eligibility (SOLQ_CALLERS = delegated::VERIFICATION_POST_INTERNAL_SSA_SOLQ): canopy-eligibility’s orchestrator calls it on the request’s outbound, its system token for a system caller’s determine or the worker’s delegation onward for a worker’s (services/canopy-eligibility/src/orchestrator.rs)

Request:

{
  "application_id": "uuid",
  "person_id": "uuid",
  "query": {
    "ssn": "123-45-6789",
    "first_name": "Jane",
    "last_name": "Smith",
    "date_of_birth": "1955-06-15"
  }
}

Headers: Authorization: Bearer <canopy-identity token>

Response (200):

{
  "application_id": "uuid",
  "person_id": "uuid",
  "record": {
    "ssi_active": false,
    "monthly_ssi_amount": null,
    "lost_ssi_due_to_cola_flag": true,
    "benefit_category": "OASDI",
    "monthly_benefit_amount": "1250.00",
    "disability_onset_date": null,
    "lost_ssi_as_disabled_child_flag": false
  }
}

record is null when SSA has no record for the applicant.

In UAT, NoopSolqAdapter returns deterministic test data keyed on the last two digits of the SSN field:

Suffix Fixture persona

00-19

No SSA record

20-29

Active SSI recipient

30-39

Pickle (lost SSI due to COLA)

40-49

DAC — Disabled Adult Child

50-59

Disabled Widow 50-64

60-69

Widow 60-64 non-disabled

70-79

Former SSI disabled child (Zebley / age-18)

80-99

OASDI only, no SSI loss

The real SSA SOLQ/BINDEX transport was deliverable (b) of the archived medicaid-ssa-orchestrator-wiring plan; it is superseded by ADR-045 and tracked in #1544, with live SSA connectivity CMA-gated under #1559. NoopSolqAdapter (services/canopy-verification/src/noop_solq.rs) remains the shipped adapter.

Worker-Portal Endpoints

The /v1/verifications…​ surface feeding the worker dashboard. These ride the /v1 mount that canopy_api adds — distinct from the internal adapter routes above.

GET /v1/verifications

List verification work items. Feeds the intake "Run determination" gate (which asks for limit=1 scoped to one application_id), the case-detail Verifications section and the portal’s own pending items. The dashboard’s "Pending verifications" panel reads GET /v1/verifications/scoped instead (#2336).

Access

system; portal (portal:verifications:read); caseworker+; worker reader via canopy-web (delegated::VERIFICATION_GET_VERIFICATIONS); the portal must also own the application_id it filters on (Admission specifics)

Query parameters: status — since #1645 the WIDENED worker/service filter: pending (default) / in_progress / completed / cancelled / all; an unknown token is a 422, never a silently-empty list. The PORTAL (citizen-class) surface is BYTE-FROZEN: pending-only (any other value returns the historical empty list), same clamp, same fields — regression-pinned. Also application_id (UUID, optional scope), document_id (UUID, optional — returns the pending verification(s) a given document was attached to via verification_responses; the worker portal queries this on document Accept to resolve the verification that document satisfied), limit (1–50, default 10).

Response (200): array of Verification.

[
  {
    "id": "uuid",
    "application_id": "uuid",
    "household_id": "uuid",
    "person_id": "uuid",
    "verification_type": "income",
    "status": "pending",
    "requested_at": "2026-05-28T14:00:00Z",
    "due_date": "2026-06-11",
    "completed_at": null,
    "completed_by": null,
    "notes": null
  }
]

completed_by and cancelled_by are null until the act, then an Actor (#1008): {"actor_type": "human", "subject": "<canopy subject>"} or {"actor_type": "service", "service": "<client id>"}.

GET /v1/verifications/scoped

A worker’s pending verifications (#2336): the pending items of the households the named worker holds an active assignment for (canopy-applications' household assignments, #607), newest first (requested_at DESC, id DESC). Feeds the worker-dashboard "Pending verifications" panel (#519). The shape is canopy-eligibility’s scoped cross-program alerts feed (#596).

Access

caseworker+ via canopy-web, no system arm (delegated::VERIFICATION_GET_VERIFICATIONS_SCOPED): a system caller is 403 service_class_on_user_only, another service’s delegation actor_not_allowed. A caller without supervisor or admin may name only its own subject (403 otherwise); a supervisor or admin names any worker.

Query parameters: subject (required) — the worker’s OIDC subject, URL-encoded by the caller and compared byte for byte (#1008); limit (1–50, default 10). A missing, empty, over-255-byte, non-ASCII or control-bearing subject, a repeated subject, or any other key (the retired list filter worker_id among them) is a 400 from the query extractor, before any lookup.

Scoping. The handler reads the worker’s assignment set from canopy-applications GET /v1/assignments/household-ids?subject= on the worker’s onward delegation, paging to exhaustion under one 3-second deadline (the panel’s budget is 5 seconds). The set is the authorization point: an unassignment committed after the read does not retract the in-flight answer. No assignment answers [] without a query. The household predicate applies before the limit (one unnest … CROSS JOIN LATERAL query riding idx_verifications_household_pending), so a small caseload is never starved by newer items elsewhere in the jurisdiction. The lookup fails closed: a transport, token, non-2xx, malformed-body or deadline failure is 502 applications_unreachable, an assignment set over 5,000 households 502 assignment_set_too_large (refused, never truncated), each with the fixed detail canopy-applications assignment lookup failed. No path answers the unscoped list.

Response (200): array of Verification, the shape GET /v1/verifications returns.

POST /v1/verifications/requests

NOTE

#1644 withdrew the legacy per-item POST /v1/verifications — every producer (the applications postponement saga, the worker BFF’s request-verification action) now writes THIS batch surface, so every new row carries its program/purpose/window context and its deadline anchors on the written request the household actually receives. Pre-existing program-NULL legacy rows remain until they drain; the legacy-scoped open natural key drops in follow-up #1676.

The #1643 written-request batch: ONE written request = one checklist letter = N items. 7 CFR 273.2(f) — the household’s response clock runs from a WRITTEN request, with a 10-day floor and an agency assistance duty.

Access

system; writer (inline Admission::system().and_user_roles(CASEWORKER_WRITER_ROLES), src/api/requests.rs; quality_control is 403 required_role_missing); callers are the applications postponement saga and canopy-web’s manual path (request_verification)

Request:

{
  "application_id": "uuid",
  "household_id": "uuid",
  "program": "snap",
  "episode_kind": "intake",
  "episode_id": "uuid",
  "notice_mode": {"mode": "checklist"},
  "items": [
    {"verification_type": "income", "person_id": null},
    {"verification_type": "medical_expenses", "person_id": null}
  ]
}

Semantics:

  • Purpose is policy, not caller input. Each item’s purpose (eligibility_critical vs deduction_only, PAMMS 3105:599/:601) is derived server-side from the jurisdiction’s [snap.verification] deduction_only_types list; an item carrying purpose on the wire is rejected at deserialization (deny_unknown_fields). On convergence with an existing open row, purpose escalates monotonically (deduction_only → eligibility_critical, never back).

  • The due-date / notice-mode truth table.

    notice_mode caller due_date Outcome

    checklist (default)

    absent

    provisional due = legal-today + the pinned verification_response_days; due_date_anchor = 'requested' (display-only — the enforceable date re-anchors on dispatch, see Events); letter staged

    checklist

    present

    422 — the deadline formula is policy; the letter must print the true date

    covered_by_other_notice{notice_ref}

    present

    the covering notice’s stated date verbatim; due_date_anchor = 'caller'; NO letter staged

    covered_by_other_notice

    absent

    422 — covered mode must state the deadline the covering notice carries

  • The recertification cap refuses; it never shortens (#1733). Before it resolves a deadline the endpoint reads GET /v1/applications/{application_id} and takes the requested program’s recert_verification_due_cap — present only on a RECERTIFICATION (the application’s standard processing deadline minus the jurisdiction’s [snap.certification] recert_verification_due_margin_days, PAMMS 3105:599 read with PAMMS 3710 Chart 3710.1 row 3), absent on an initial application. In checklist mode a computed due date LATER than that cap is a 422 recert_verification_window_unenforceable with zero rows written, when the batch would create at least one item — not a silently-shortened window, because the household’s statutory 10-day minimum (7 CFR 273.2(f)) is not the agency’s to trade away against its own processing calendar; the caseworker must extend the certification or act on the shorter facts deliberately. A window landing ON the cap is accepted. The cap binds only the items a batch CREATES (#2658): it is decided inside the write transaction, after the items meet the v2 open natural key, so a batch whose items all converge on existing open rows writes no new deadline and answers created = false (no letter) on whatever day it arrives, while one new item past the cap refuses the whole batch and the transaction rolls back. Covered mode is unbounded by the cap — the covering notice already states a date the agency committed to in writing.

  • Idempotent on the v2 open natural key (application, household, program, verification_type, person): a replayed batch converges on the existing open rows (created: false, same ids) and stages NO second letter.

  • Episode adoption on convergence (#1698). A covered-mode, episode-bound batch (covered_by_other_notice + episode_kind/episode_id) that converges on an open row is judged on that row’s CURRENT due_date_anchor and due_date:

    Row anchor Batch due_date vs row Outcome

    requested or dispatched

    later

    the row ADOPTS the episode: episode_kind/episode_id, notice_ref, due_date and due_date_anchor = 'caller' are rewritten (7 CFR 273.2(f); PAMMS 3110:141); response_days, policy_version and checklist_event_id stay as evidence of the checklist letter; an existing request_dispatched_at is kept and a row adopted while still requested receives the stamp when the letter dispatches (#1788) — the deadline is not rewritten

    requested or dispatched

    same or earlier

    unchanged

    caller (already a letter’s date)

    any

    unchanged — a replay of the adopting batch is a fixpoint

    legacy NULL

    any

    unchanged

    The item comes back created: false with the row’s post-adoption due_date / due_date_anchor, which is how the postpone saga tells an adopted row from the residue it still WARNs about. Checklist-mode convergence never adopts (purpose escalation only).

  • Fail-closed recipient resolution. In checklist mode the recipient is resolved from canopy-persons BEFORE the transaction, from the compact membership roster (POST /v1/households:batchGet on the request’s legal day: relationships only, so no SSN is decrypted and no ssn.accessed is staged, #2670), by the ONE fleet rule — an explicit head_of_household / head claim, else the portal’s self applicant frame, else the FIRST member (household-favorable: a roster that claims no head still gets its letter), stated once in the canopy-persons head-of-household rule (#1136, #1699). Persons unreachable → 502; an absent or MEMBER-LESS household → 422; zero rows written either way. (The notices recipient gate silently drops events without household_id + person_id — a letterless row would carry a deadline the household was never told.)

  • One event per batch. When at least one row is created in checklist mode, exactly one verification.requested outbox event is staged in the same transaction; its envelope id is stamped as the created rows' checklist_event_id. The letter covers the CREATED rows only — converged rows already carry their own written deadline.

  • episode_kind/episode_id are both-or-neither provenance (422 otherwise; kind vocabulary intake / agency_pend / reopen / expedited_postponement / mid_certification). ADR-025 referential validation applies to BOTH upstream ids: application_id is proved to exist in canopy-applications (404 there → 422 here; transport/5xx → 502) BEFORE the deadline is resolved, then household_id against canopy-persons (422 on an unresolvable or member-less household). Zero rows are written on either refusal.

Response (201):

{
  "items": [
    {"id": "uuid", "verification_type": "income", "person_id": null,
     "created": true, "status": "pending", "purpose": "eligibility_critical",
     "due_date": "2026-03-13", "due_date_anchor": "requested"},
    {"id": "uuid", "verification_type": "medical_expenses", "person_id": null,
     "created": true, "status": "pending", "purpose": "deduction_only",
     "due_date": "2026-03-13", "due_date_anchor": "requested"}
  ],
  "checklist_event_id": "uuid"
}

checklist_event_id is null in covered mode or when every item converged on an existing open row.

POST /v1/verifications/{id}/cancel

Cancel one OPEN verification item (#1645). The transition table IS the spec: pending/in_progress → 200 cancelled; already-cancelled → 200 idempotent no-op (the row as-is — the original reason survives a replay); completed → 409 with the CURRENT row as the body (cancelling done work would erase evidence — false-completion protection; resolve is never misused as an undo); absent → 404. The CAS statement makes a racing resolve win cleanly.

Access

system; writer (inline, src/api/context.rs; quality_control is 403 required_role_missing)

cancelled_by is CLAIM-DERIVED — the caller’s Actor (#1008): the worker’s canopy subject for a delegation, the calling client for a system token (the applications sagas record canopy-applications) — and the body carries ONLY the closed-vocabulary reason (superseded_by_reopen | postponement_reverted | application_voided | requested_in_error | superseded_by_postponement — the fifth token is the #1662 postpone saga’s supersede of a pre-existing open row of a postponed type); an off-vocabulary token is rejected by the closed serde enum, and a body actor claim is rejected at deny_unknown_fields.

POST /v1/verifications/cancel-open

The scoped compensation primitive (#1645): cancel every OPEN item for one application_id + program — optionally narrowed to one episode (episode_kind + episode_id travel together; a half-specified pair is a 422) — in one statement. Returns {"cancelled": [ids]}; a second identical call returns an empty list (the idempotence a saga step asserts). Never cross-program by construction. The canopy-applications reopen saga and the postponement saga’s reversion consume it.

Access

system: canopy-applications; writer via canopy-applications (delegated::VERIFICATION_POST_VERIFICATIONS_CANCEL_OPEN): another system caller is 403 service_not_allowlisted, a delegation through any other client (canopy-web’s included) actor_not_allowed

Every row it flips records cancelled_by: {"actor_type": "service", "service": "canopy-applications"} for canopy-applications' system token, or the worker it delegates for (#1008).

POST /v1/verifications/batch-context

The day-30 drain’s N+1 killer (#1645): {"application_ids": [≤100], "program"} → one entry per REQUESTED application (an application with no rows appears with an EMPTY items array — never-requested is distinguishable from all-provided), items across ALL statuses in the MINIMAL projection: id, program, verification_type, purpose, status, episode pair, person_id, requested_at, due_date, due_date_anchor, request_dispatched_at, completed_at. The projection struct has no notes, no worker_id, no completed_by — the drain can never read worker free text (privacy-pinned). Enforceability contract (#788): only anchor IN ('dispatched','caller') due dates are enforceable; requested is display-only — the day-30 deny arm must require request_dispatched_at IS NOT NULL. Rides idx_verifications_application_program (EXPLAIN-pinned). >100 ids is a 422.

Access

system: canopy-applications; worker reader via canopy-applications (delegated::VERIFICATION_POST_VERIFICATIONS_BATCH_CONTEXT): another system caller is 403 service_not_allowlisted, a delegation through any other client actor_not_allowed

POST /v1/verifications/{id}/resolve

Worker marks an open verification item complete. The completion instant (completed_at) is the service’s DECISION clock (#1684 — the injected DecisionClock handle the request date also reads), never the database’s wall clock: it is the cure date a 60-day reopen derives (7 CFR 273.2(h)(2)) and the evidence the day-30 classifier reads, so it must agree with the service’s own legal_today and move with a steered journey clock. The transition table IS the spec (#1675): pending/in_progress → 200 completed; already completed → 200 the row UNCHANGED (an idempotent retry never rewrites the first completion’s instant or actor); cancelled → 409 with the CURRENT row as the body (completing retired work would leave a row that reads as both retired and done — the cancel endpoint’s contract shape, mirrored); a row that re-opens under the resolve twice (the acceptance-revoked path racing it) → 409 with the row as it stands (retry); absent → 404. completed_by is CLAIM-DERIVED (#1675, the cancel surfaces' posture): the caller’s Actor (#1008) — the worker’s canopy subject for a delegation, the calling client for a system token — the body carries only notes, and a body asserting completed_by is a 422 (deny_unknown_fields), never silently honoured. cancelled_at on the cancel surfaces, requested_at on the written request and responded_at on a household response read the same handle — the verification rows' instants agree with each other and with the service’s legal_today under any steering.

Access

system; writer (inline, src/api/verifications.rs; quality_control is read-only and gets 403 required_role_missing)

Request:

{
  "notes": "Pay stubs received + filed under household docs"
}

Response (200): the resolved Verification row; (409): the current row — cancelled, or still open if the resolve was contended.

POST /v1/verifications/{id}/respond

An applicant (via the canopy-portal /verifications inbox) or a worker attaches previously-uploaded documents and/or a free-text note to a pending verification. Writes one verification_responses row per attached document plus an optional text-only row.

application_id + person_id are supplied by the caller — the canopy-portal proxy derives them from the trusted session, never from raw client input — and since #1442 the ORIGIN independently binds the CITIZEN session first: the stored verification’s application must match the signed ownership claim (a foreign id gets the same uniform 404 as an absent one — never a coded response that confirms it exists) and the response’s subject person must be the session’s own. For the session’s OWN verification the legacy arms keep their meaning: a supplied application_id that mismatches the stored scope is 403, an unscoped verification is 422, and an empty response (no documents and no text) is 422. document_id is a cross-service reference to canopy_applications.application_documents.id; it is stored, not validated here (the worker re-fetches through the application-scoped content endpoint, which 404s a stale/foreign id).

Access

system; portal (portal:verifications:respond); writer (inline, src/api/verifications.rs; quality_control is 403 required_role_missing); the portal also needs its ownership claim (Admission specifics)

Request:

{
  "application_id": "uuid",
  "person_id": "uuid",
  "document_ids": ["uuid", "uuid"],
  "response_text": "Attached my ID and a pay stub.",
  "responded_by_source": "applicant_portal"
}

Response (201): the VerificationResponse rows just written (document rows first, then the text row).

GET /v1/verifications/{id}/responses

Read back the responses submitted against a verification, newest first. Feeds the worker case-detail Verifications section.

Access

system; caseworker+; case reader via canopy-web (delegated::VERIFICATION_GET_VERIFICATIONS_ID_RESPONSES)

Response (200): an array of VerificationResponse rows (id, verification_id, document_id, application_id, person_id, response_text, responded_at, responded_by_source).

GET /v1/verifications/ievs/discrepancies

List recent IEVS hits with status = 'unreviewed' (the subset that warrants worker review), newest first. Feeds the worker-dashboard "IEVS alerts" panel (#522). The producer write path is the internal POST /internal/v1/ievs/match handler, which persists one ievs_hits row per populated adapter record (best-effort).

Access

system; caseworker+; case reader via canopy-web (delegated::VERIFICATION_GET_VERIFICATIONS_IEVS_DISCREPANCIES)

Query parameters: limit (1–50, default 10; ListIevsDiscrepanciesQuery).

Response (200): array of IevsHit.

[
  {
    "id": "uuid",
    "application_id": "uuid",
    "household_id": "uuid",
    "person_id": "uuid",
    "member_name": "Jane Smith",
    "source": "georgia_dol_swr",
    "hit_type": "wage_record",
    "hit_at": "2026-05-28T14:00:00Z",
    "status": "unreviewed",
    "reviewed_at": null,
    "reviewed_by": null,
    "notes": null
  }
]

Events

Published:

  • verification.unresolved (#1416) — one per reverted resolution (audit trail).

  • verification.requested v1 (#1643) — staged in the requests-endpoint transaction; ADR-004 tokens / ids / dates only. Fields: application_id, household_id, person_id (the fail-closed-resolved head of household), program, items[{verification_type, person_id?, purpose}], response_days and policy_version (pinned), requested_date. canopy-notices routes it to the verification-checklist letter in BOTH ruleset manifests; the envelope id doubles as the rows' checklist_event_id correlation key.

Consumed:

  • application_document.acceptance_revoked (#1416) — reverts resolutions standing on revoked acceptances.

  • notice.dispatched (#1643; filtered to notice_type = 'verification-checklist') — for rows still on the provisional requested anchor it stamps request_dispatched_at and re-anchors due_date to the letter’s legal dispatched_date + the ROW’s pinned response_days (never a fresh param read, so a later policy change cannot move a deadline the household was already told). Rows completed before dispatch keep their dates and gain only the stamp; so do rows a covered-mode episode adopted while still requested (due_date_anchor = 'caller', #1788). Replay is a no-op via the anchor guard and, for adopted rows, the request_dispatched_at IS NULL guard. Only dispatched / caller-anchored due dates are enforceable by consumers — requested is display-only.

Error Codes

Code Meaning

400

actor_header_retired (an X-Canopy-Actor header, on either surface)

401

No bearer (token_missing) or a token the receiver refuses (token_rejected), on either surface

403

The admission’s ReceiverDenial: required_role_missing (a user outside the route’s bar, quality_control on the writes), service_not_allowlisted (a system caller off an adapter route’s or a batch surface’s list), actor_not_allowed (a delegation through a client the batch surfaces or SOLQ do not list), system_caller_required (a user on IEVS or SAVE), portal_on_non_portal_route / portal_scope_missing (the portal off, or without the scope of, its two routes), ownership_claim_missing / ownership_mismatch (the portal’s claim); uncoded, POST /v1/verifications/{id}/respond with an application_id that does not match the verification’s scope

404

POST /v1/verifications/{id}/{cancel,resolve,respond} and GET /v1/verifications/{id}/responses — verification id not found (a citizen-class probe of a foreign id is the same uniform 404)

409

POST /v1/verifications/{id}/cancel on a completed row; POST /v1/verifications/{id}/resolve on a cancelled row or a contended re-open — the body is the CURRENT row

422

Unresolvable application_id (#1733) or household_id on POST /v1/verifications/requests, or unresolvable household_id on POST /internal/v1/ievs/match (ADR-025 cross-service referential check); a checklist window past the recertification cap on POST /v1/verifications/requests for a batch that would create an item (coded recert_verification_window_unenforceable, #1733, #2658); or POST /v1/verifications/{id}/respond with an empty response / a verification not scoped to an application

500

Upstream data source unavailable (internal IEVS / SAVE / SSA SOLQ adapter error)

502

POST /internal/v1/ievs/match — upstream/transport error reaching canopy-persons during ADR-025 household validation; POST /v1/verifications/requests — upstream/transport error reaching canopy-applications for the recertification due cap (#1733) or canopy-persons for recipient resolution

503

keys_unavailable — the receiver has no trustworthy key set in time, on either surface

Adapter selection (configuration)

The IEVS and SAVE adapters are selected at boot per ADR-012 config:

Env var Values Effect

CANOPY_VERIFICATION__IEVS_ADAPTER

noop (default) | scripted

noop = SSN-suffix-keyed deterministic test data (NoopIevsAdapter). scripted = fixture-driven per-person responses (ScriptedIevsAdapter).

CANOPY_VERIFICATION__SAVE_ADAPTER

noop (default) | scripted

As above for SAVE (NoopSaveAdapter / ScriptedSaveAdapter).

CANOPY_VERIFICATIONIEVS_SCRIPTS_PATH
CANOPY_VERIFICATION
SAVE_SCRIPTS_PATH

path

TOML fixture loaded at boot when the matching adapter is scripted. Defaults devstack/fixtures/{ievs,save}-scripts.toml.

The scripted adapters key their fixture lookup on person_id (the one identifier available to both the IEVS and SAVE handlers — SaveVerifyHttpRequest carries no household_id; ADR-013 deviation from the plan’s household_id sketch). Fixtures key on the fixed-UUID applicant-portal personas; the RNG-driven dashboard archetypes get at-rest ievs_hits stamped by the seed and never reach the adapter. Unknown person_ids yield an empty IEVS match; SAVE errors loudly for an unscripted person (it has no benign empty status). Selection is dynamic-dispatch-free — the trait uses RPITIT, so an IevsAdapterKind / SaveAdapterKind enum dispatches per arm. Every deployment, the standing devstack included, defaults to noop (config/canopy-verification/default.yaml); scripted is an opt-in for a demo. The real Georgia-DOL / DHS-SAVE adapters are not built.

Notes

  • The IEVS route is called by canopy-snap during verification::run_verification(), under its system token

  • IEVS match results are stored in canopy-snap.ievs_match_results and, per populated adapter record, in this service’s ievs_hits — member_name, source, hit_type and the serialised record in payload JSONB, written best-effort by persist_hit (#522); GET /v1/verifications/ievs/discrepancies and the worker "IEVS alerts" panel read the non-payload columns only, and no purge exists (ADR-004 Amendment 7)

  • The verifications work-item table is owned here; the applications postponement saga and the canopy-web BFF’s request-verification action are the producers, and the canopy-web BFF is the reader (#519)

  • The bus publisher refuses a payload carrying a restricted PII / FTI / IEVS / clinical key at any depth — nested objects and arrays included (RESTRICTED_FIELDS in crates/canopy-mq/src/publisher.rs; the IEVS members are wage_records, quarterly_wages, weekly_benefit_amount, benefit_amount_history, ui_record, sdx_record, bendex_record, monthly_ssi_amount, monthly_benefit_amount)

  • SSA SOLQ records are fetched by canopy-eligibility pre-dispatch for Medicaid requests (#384); per ADR-004 the records themselves are forwarded to canopy-medicaid and stored only in its database — never persisted here

Edit this page · default