{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rateapi-dev/json-schema/rateapi-dev-access-catalog-response-schema.json",
  "title": "AccessCatalogResponse",
  "description": "One-snapshot, multi-product personal access catalog with explicit semantic layers and bounded details.",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rateapi-dev-openapi.json#/components/schemas/AccessCatalogResponse",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "catalog_version",
    "products",
    "questions",
    "snapshot",
    "completeness",
    "semantics",
    "disclosure"
  ],
  "properties": {
    "catalog_version": {
      "type": "string",
      "enum": [
        "access_catalog_v1"
      ],
      "description": "Stable response-contract version."
    },
    "products": {
      "type": "array",
      "description": "One result in request order for every explicit product selector.",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "request",
          "ranking_basis",
          "ranking",
          "counts",
          "reachable_now",
          "reachable_after_action",
          "unresolved",
          "no_published_price",
          "questions",
          "completeness"
        ],
        "properties": {
          "request": {
            "$ref": "#/paths/~1v1~1reachable-offers/post/requestBody/content/application~1json/schema/properties/product"
          },
          "ranking_basis": {
            "type": "string",
            "description": "Published-price ordering used within this selector."
          },
          "ranking": {
            "type": "object",
            "description": "Explicit declaration of the decision layers this ranking does not perform.",
            "required": [
              "personalized_underwriting",
              "approval_evaluated"
            ],
            "properties": {
              "personalized_underwriting": {
                "type": "boolean",
                "const": false,
                "description": "Always false; catalog ranking is not underwriting."
              },
              "approval_evaluated": {
                "type": "boolean",
                "const": false,
                "description": "Always false; RateAPI does not make approval decisions."
              }
            }
          },
          "counts": {
            "$ref": "#/$defs/counts"
          },
          "reachable_now": {
            "type": "array",
            "description": "Rows with proven present membership access, satisfied published constraints, and evidenced pricing.",
            "items": {
              "$ref": "#/$defs/AccessCatalogRow"
            }
          },
          "reachable_after_action": {
            "type": "array",
            "description": "Rows requiring a source-proven membership action before access.",
            "items": {
              "$ref": "#/$defs/AccessCatalogRow"
            }
          },
          "unresolved": {
            "type": "array",
            "description": "Rows that cannot be promoted because membership proof or product suitability remains unresolved.",
            "items": {
              "$ref": "#/$defs/AccessCatalogRow"
            }
          },
          "no_published_price": {
            "type": "array",
            "description": "Graph-positive institutions with no matching fresh, rankable, evidenced published price; absence is not unavailability.",
            "items": {
              "$ref": "#/$defs/AccessCatalogRow"
            }
          },
          "questions": {
            "type": "array",
            "description": "Product-aware missing-fact questions that may clarify reachability.",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "completeness": {
            "type": "object",
            "description": "Exact counts and bounded-detail disclosure for this selector.",
            "required": [
              "active_fleet_evaluated",
              "counts_exact",
              "detail_limit",
              "details_returned",
              "details_truncated"
            ],
            "properties": {
              "active_fleet_evaluated": {
                "type": "boolean",
                "const": true,
                "description": "True only when eligibility evaluated the complete active fleet."
              },
              "counts_exact": {
                "type": "boolean",
                "const": true,
                "description": "Whether bucket counts were computed before detail caps."
              },
              "detail_limit": {
                "type": "integer",
                "description": "Detail-row allowance remaining for this selector after global caps."
              },
              "details_returned": {
                "type": "integer",
                "description": "Detail rows actually returned for this selector."
              },
              "details_truncated": {
                "type": "boolean",
                "description": "Whether exact bucket counts exceed returned detail rows."
              }
            }
          }
        }
      }
    },
    "questions": {
      "type": "object",
      "additionalProperties": true,
      "description": "Membership questions shared across all selectors."
    },
    "snapshot": {
      "type": "object",
      "additionalProperties": true,
      "description": "Eligibility generation boundary, returned-price observation range, and response generation time."
    },
    "completeness": {
      "type": "object",
      "additionalProperties": false,
      "description": "Request-wide fleet, selector, cap, truncation, and execution-strategy disclosure.",
      "required": [
        "active_fleet_evaluated",
        "candidate_set_truncated",
        "selector_count",
        "selectors_explicit",
        "evaluation_strategy",
        "rate_query_count",
        "proof_strategy",
        "limit_per_product",
        "total_detail_limit",
        "details_truncated"
      ],
      "properties": {
        "active_fleet_evaluated": {
          "type": "boolean",
          "const": true,
          "description": "True only when the complete active eligibility fleet was evaluated."
        },
        "candidate_set_truncated": {
          "type": "boolean",
          "const": false,
          "description": "Always false; rate intersection uses every graph-positive candidate."
        },
        "selector_count": {
          "type": "integer",
          "minimum": 1,
          "maximum": 19,
          "description": "Number of explicit product selectors evaluated."
        },
        "selectors_explicit": {
          "type": "boolean",
          "const": true,
          "description": "Always true; RateAPI does not silently expand product families."
        },
        "evaluation_strategy": {
          "type": "string",
          "enum": [
            "one_eligibility_discovery_then_one_batched_rate_query"
          ],
          "description": "One exhaustive eligibility evaluation followed by one semantics-preserving batched rate statement."
        },
        "rate_query_count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1,
          "description": "Rate-corpus statements executed; zero when the eligibility result contains no rate candidates."
        },
        "proof_strategy": {
          "type": "string",
          "enum": [
            "one_shared_current_publication_query"
          ],
          "description": "Eligibility proof is hydrated once against current publication lineage and shared across selectors."
        },
        "limit_per_product": {
          "type": "integer",
          "minimum": 1,
          "maximum": 10,
          "description": "Maximum detail rows allocated to any selector before the request-wide cap."
        },
        "total_detail_limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "description": "Request-wide returned-detail cap; exact counts are computed before this cap."
        },
        "details_truncated": {
          "type": "boolean",
          "description": "Whether any exact selector count exceeds its returned detail rows."
        }
      }
    },
    "semantics": {
      "type": "string",
      "enum": [
        "positive_evidence_only"
      ],
      "description": "Interpretation contract: missing or unknown evidence never proves a negative."
    },
    "disclosure": {
      "type": "string",
      "description": "Required consumer-facing distinction between access, pricing, underwriting, and approval."
    }
  },
  "$defs": {
    "AccessCatalogRow": {
      "type": "object",
      "description": "One institution/product result with independent membership, availability, suitability, price, underwriting, and approval layers.",
      "additionalProperties": true,
      "required": [
        "credit_union_id",
        "institution",
        "membership",
        "product_availability",
        "underwriting",
        "approval"
      ],
      "properties": {
        "credit_union_id": {
          "type": "string",
          "description": "Stable credit-union identifier."
        },
        "institution": {
          "type": "object",
          "additionalProperties": true,
          "description": "Institution name, state, and published URL where available."
        },
        "membership": {
          "type": "object",
          "additionalProperties": true,
          "description": "Positive-evidence-only membership verdict and active-publication proof."
        },
        "product_availability": {
          "type": "object",
          "additionalProperties": true,
          "description": "Whether matching fresh evidenced published pricing was found; unknown never means unavailable."
        },
        "product_suitability": {
          "type": "object",
          "additionalProperties": true,
          "description": "Evaluation of only the explicit published constraints and supplied scenario facts."
        },
        "published_price": {
          "type": "object",
          "additionalProperties": true,
          "description": "Fresh, rankable published price with explicitly published APY for deposits and published APR or clearly labeled nominal rate for lending, plus source evidence and per-row as_of. APR and nominal rate are never treated as interchangeable."
        },
        "underwriting": {
          "type": "object",
          "description": "Explicit statement that creditworthiness and underwriting were not evaluated.",
          "required": [
            "status",
            "reason"
          ],
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "not_evaluated"
              ],
              "description": "Catalog underwriting status; always not_evaluated."
            },
            "reason": {
              "type": "string",
              "description": "Why no underwriting conclusion may be drawn."
            }
          }
        },
        "approval": {
          "type": "object",
          "description": "Explicit statement that RateAPI did not evaluate or grant approval.",
          "required": [
            "status",
            "reason"
          ],
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "not_evaluated_by_rateapi"
              ],
              "description": "Approval status; always not_evaluated_by_rateapi."
            },
            "reason": {
              "type": "string",
              "description": "Why only the institution can approve and confirm final terms."
            }
          }
        }
      }
    }
  }
}