{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "type": {
      "type": "array",
      "readOnly": true,
      "default": [
        "Document"
      ],
      "items": {
        "type": "string"
      },
      "allOf": [
        {
          "contains": {
            "const": "Document",
            "minContains": 1
          }
        }
      ]
    },
    "@context": {
      "type": "string",
      "description": "The JSON-ld context URI for this FDIC Dataset."
    },
    "institutions": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/Institution"
      },
      "description": "The set of institutions in this data set"
    }
  },
  "description": "A wrapper for the dataset that groups all institutions and their associated information. Represents a single export or delivery of FDIC facility data.",
  "$defs": {
    "Institution": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "array",
          "readOnly": true,
          "default": [
            "Institution"
          ],
          "items": {
            "type": "string"
          },
          "allOf": [
            {
              "contains": {
                "const": "Institution",
                "minContains": 1
              }
            }
          ]
        },
        "fdicCertNumber": {
          "example": 14761,
          "type": "integer",
          "description": "The institution's unique identifier assigned by the FDIC. Used to distinguish legal entities."
        },
        "name": {
          "example": "1NB Bank",
          "type": "string",
          "description": "The official legal or primary name of the financial institution."
        },
        "branches": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/Branch"
          },
          "description": "A collection of branch records representing physical or virtual office locations operated by this institution."
        }
      },
      "description": "A registered financial institution authorized to operate under a federal or state charter. May operate one or more branches or offices."
    },
    "Branch": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "array",
          "readOnly": true,
          "default": [
            "Branch"
          ],
          "items": {
            "type": "string"
          },
          "allOf": [
            {
              "contains": {
                "const": "Branch",
                "minContains": 1
              }
            }
          ]
        },
        "locationId": {
          "example": 2688,
          "type": "integer",
          "description": "A unique internal identifier for this branch or office facility."
        },
        "offname": {
          "example": "NOGALES BRANCH",
          "type": "string",
          "description": "The name or label assigned to this specific office."
        },
        "officeNumber": {
          "example": 100,
          "type": "integer",
          "description": "An optional branch number or code."
        },
        "mainOffice": {
          "type": "boolean",
          "description": "Indicates whether this location is the main headquarters of the institution."
        },
        "runDate": {
          "example": "2025-05-31",
          "type": "string",
          "format": "date",
          "description": "The date this record was last processed or extracted."
        },
        "establishedDate": {
          "example": "1878-01-01",
          "type": "string",
          "format": "date",
          "description": "The original date when this branch was established."
        },
        "acquisitionDate": {
          "example": "1970-01-01",
          "type": "string",
          "format": "date",
          "description": "If acquired, the date the institution took ownership of this facility."
        },
        "address": {
          "$ref": "#/$defs/PostalAddress",
          "description": "The structured physical mailing address of the branch."
        },
        "location": {
          "$ref": "#/$defs/GeoPoint",
          "description": "The geospatial coordinates of the branch in both WGS84 and projected coordinates."
        },
        "geoContext": {
          "$ref": "#/$defs/GeoContext",
          "description": "Contextual geographic classifications used for statistical and regulatory reporting."
        },
        "regulatory": {
          "$ref": "#/$defs/RegulatoryStatus",
          "description": "Regulatory status, classification, and service attributes relevant to this branch."
        }
      },
      "description": "A specific operational location or facility of a financial institution, such as a bank branch, ATM, or service center."
    },
    "PostalAddress": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "array",
          "readOnly": true,
          "default": [
            "PostalAddress"
          ],
          "items": {
            "type": "string"
          },
          "allOf": [
            {
              "contains": {
                "const": "PostalAddress",
                "minContains": 1
              }
            }
          ]
        },
        "street": {
          "example": "18001 Saint Rose Rd",
          "type": "string",
          "description": "The street address or PO Box of the facility."
        },
        "street2": {
          "example": "Ste 104",
          "type": "string",
          "description": "An optional second address line (e.g., suite or building info)."
        },
        "city": {
          "example": "Yuma",
          "type": "string",
          "description": "The city or locality in which the branch is located."
        },
        "state": {
          "example": "CA",
          "type": "string",
          "description": "The two-letter U.S. state or territory abbreviation."
        },
        "county": {
          "example": "Osage",
          "type": "string",
          "description": "The name of the county where the branch resides."
        },
        "zipCode": {
          "example": 85336,
          "type": "string",
          "description": "The ZIP code or postal code assigned to the facility."
        }
      },
      "description": "The branch’s mailing address, following standard postal conventions."
    },
    "GeoPoint": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "array",
          "readOnly": true,
          "default": [
            "GeoPoint"
          ],
          "items": {
            "type": "string"
          },
          "allOf": [
            {
              "contains": {
                "const": "GeoPoint",
                "minContains": 1
              }
            }
          ]
        },
        "latitude": {
          "example": 39.153889,
          "type": "number",
          "format": "float",
          "description": "Latitude in WGS84 decimal degrees."
        },
        "longitude": {
          "example": -114.624469,
          "type": "number",
          "format": "float",
          "description": "Longitude in WGS84 decimal degrees."
        }
      },
      "description": "The physical location of the branch in geographic coordinates."
    },
    "GeoContext": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "array",
          "readOnly": true,
          "default": [
            "GeoContext"
          ],
          "items": {
            "type": "string"
          },
          "allOf": [
            {
              "contains": {
                "const": "GeoContext",
                "minContains": 1
              }
            }
          ]
        },
        "cbsa": {
          "example": "St. Louis, MO-IL",
          "type": "string",
          "description": "Core-Based Statistical Area name."
        },
        "cbsaDiv": {
          "example": "Camden, NJ",
          "type": "string",
          "description": "Division of the CBSA, if applicable."
        },
        "cbsaDivFlag": {
          "type": "boolean",
          "description": "Indicates whether this record is part of a CBSA division."
        },
        "cbsaDivNo": {
          "example": 15804,
          "type": "string",
          "description": "Numeric identifier for the CBSA division."
        },
        "cbsaMetro": {
          "example": 36140,
          "type": "string",
          "description": "Indicates whether this is in a metropolitan area."
        },
        "cbsaMetroFlag": {
          "type": "boolean",
          "description": "Boolean indicator for metro classification."
        },
        "cbsaMetroName": {
          "example": "Ocean City, NJ",
          "type": "string",
          "description": "Name of the metropolitan area."
        },
        "cbsaMicroFlag": {
          "type": "boolean",
          "description": "Boolean indicator for micropolitan classification."
        },
        "cbsaNo": {
          "example": 46140,
          "type": "string",
          "description": "Unique CBSA identifier."
        },
        "csa": {
          "example": "Davenport-Moline, IA-IL",
          "type": "string",
          "description": "Combined Statistical Area name, if applicable."
        },
        "csaFlag": {
          "type": "boolean",
          "description": "Boolean indicating CSA inclusion."
        },
        "csaNo": {
          "example": 209,
          "type": "string",
          "description": "Numeric identifier for the CSA."
        }
      },
      "description": "Classifications used to describe the branch’s location within U.S. metropolitan and statistical areas."
    },
    "RegulatoryStatus": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "array",
          "readOnly": true,
          "default": [
            "RegulatoryStatus"
          ],
          "items": {
            "type": "string"
          },
          "allOf": [
            {
              "contains": {
                "const": "RegulatoryStatus",
                "minContains": 1
              }
            }
          ]
        },
        "charterClass": {
          "example": "SM",
          "type": "string",
          "description": "The charter class describing the legal form of the institution."
        },
        "mdiStatusCode": {
          "type": "integer",
          "description": "A coded value indicating Minority Depository Institution (MDI) status."
        },
        "mdiStatusDesc": {
          "type": "string",
          "description": "A description of the MDI status."
        },
        "serviceTypeCode": {
          "type": "integer",
          "description": "A short code for the type of service the facility provides."
        },
        "serviceTypeDesc": {
          "type": "string",
          "description": "A human-readable description of the service type."
        },
        "fdicInstitutionId": {
          "example": 360755,
          "type": "string",
          "description": "FDIC’s unique identifier for this institution."
        },
        "uninum": {
          "example": 80234,
          "type": "string",
          "description": "A unique identifier for this particular branch/facility."
        },
        "stateFips": {
          "example": 6053,
          "type": "string",
          "description": "FIPS code for the branch’s state and county."
        },
        "stateName": {
          "example": "California",
          "type": "string",
          "description": "Full name of the U.S. state where the branch operates."
        }
      },
      "description": "Captures regulatory classification, status, and supervisory details of the branch."
    }
  }
}
