{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/moov/json-schema/moov-institutions-search-response-schema.json",
  "title": "InstitutionsSearchResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/moov-institutions-api-openapi.yml#/components/schemas/InstitutionsSearchResponse",
  "type": "object",
  "required": [
    "ach",
    "rtp",
    "wire",
    "fednow"
  ],
  "properties": {
    "ach": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/ACHInstitution"
      }
    },
    "rtp": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/RTPInstitution"
      }
    },
    "wire": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/WireInstitution"
      }
    },
    "fednow": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/FedNowInstitution"
      }
    }
  },
  "$defs": {
    "ACHInstitution": {
      "type": "object",
      "required": [
        "name",
        "routingNumber"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the financial institution."
        },
        "routingNumber": {
          "type": "string",
          "maxLength": 9
        },
        "address": {
          "$ref": "#/$defs/Address"
        },
        "contact": {
          "$ref": "#/$defs/Contact"
        }
      }
    },
    "Address": {
      "type": "object",
      "required": [
        "addressLine1",
        "city",
        "stateOrProvince",
        "postalCode",
        "country"
      ],
      "properties": {
        "addressLine1": {
          "type": "string",
          "maxLength": 60,
          "pattern": "[a-zA-Z0-9,.\\/?:'\"|~!@#$%^&*()+_= -]+"
        },
        "addressLine2": {
          "type": "string",
          "maxLength": 32,
          "pattern": "[a-zA-Z0-9,.\\/?:'\"|~!@#$%^&*()+_= -]+"
        },
        "city": {
          "type": "string",
          "maxLength": 32,
          "pattern": "[a-zA-Z0-9,.\\/?:'\"|~!@#$%^&*()+_= -]+"
        },
        "stateOrProvince": {
          "type": "string",
          "maxLength": 2
        },
        "postalCode": {
          "type": "string",
          "maxLength": 5
        },
        "country": {
          "type": "string",
          "maxLength": 2
        }
      }
    },
    "Contact": {
      "type": "object",
      "properties": {
        "phone": {
          "$ref": "#/$defs/PhoneNumber"
        }
      }
    },
    "FedNowInstitution": {
      "type": "object",
      "required": [
        "name",
        "routingNumber",
        "services"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the financial institution."
        },
        "routingNumber": {
          "type": "string",
          "maxLength": 9
        },
        "services": {
          "$ref": "#/$defs/FedNowServices"
        }
      }
    },
    "FedNowServices": {
      "type": "object",
      "required": [
        "receivePayments",
        "sendPayments",
        "requestForPayment"
      ],
      "properties": {
        "receivePayments": {
          "type": "boolean",
          "description": "Indicates if the institution can receive instant payments."
        },
        "sendPayments": {
          "type": "boolean",
          "description": "Indicates if the institution can send instant payments."
        },
        "requestForPayment": {
          "type": "boolean",
          "description": "Indicates if the institution can process request for payment messages."
        }
      }
    },
    "PhoneNumber": {
      "type": "object",
      "properties": {
        "number": {
          "type": "string",
          "maxLength": 10
        },
        "countryCode": {
          "type": "string",
          "maxLength": 1
        }
      }
    },
    "RTPInstitution": {
      "type": "object",
      "required": [
        "name",
        "routingNumber",
        "services"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the financial institution."
        },
        "routingNumber": {
          "type": "string",
          "maxLength": 9
        },
        "services": {
          "$ref": "#/$defs/RTPServices"
        }
      }
    },
    "RTPServices": {
      "type": "object",
      "required": [
        "receivePayments",
        "receiveRequestForPayment"
      ],
      "properties": {
        "receivePayments": {
          "type": "boolean",
          "description": "Can the institution receive payments"
        },
        "receiveRequestForPayment": {
          "type": "boolean",
          "description": "Can the institution receive request for payment messages"
        }
      }
    },
    "WireInstitution": {
      "type": "object",
      "required": [
        "name",
        "routingNumber",
        "services"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the financial institution."
        },
        "routingNumber": {
          "type": "string",
          "maxLength": 9
        },
        "address": {
          "$ref": "#/$defs/Address"
        },
        "services": {
          "$ref": "#/$defs/WireServices"
        }
      }
    },
    "WireServices": {
      "type": "object",
      "required": [
        "fundsTransferStatus",
        "fundsSettlementOnlyStatus",
        "bookEntrySecuritiesTransferStatus"
      ],
      "properties": {
        "fundsTransferStatus": {
          "type": "boolean",
          "description": "The institution's capability to process standard Fedwire funds transfers."
        },
        "fundsSettlementOnlyStatus": {
          "type": "boolean",
          "description": "The institution's capability for settlement-only transfers."
        },
        "bookEntrySecuritiesTransferStatus": {
          "type": "boolean",
          "description": "The institution's capability to handle transfers of securities."
        }
      }
    }
  }
}