{
 "openapi": "3.1.0",
 "info": {
  "title": "PlugCat API",
  "version": "1.0.0",
  "description": "Read-only, free, no key needed. Says whether US banks, credit unions and brokerages are likely to connect to finance apps, based on Plaid’s public coverage list and the data providers each app documents. Results are inferences, not guarantees. Data is updated monthly; responses may be cached for an hour. Please keep to a few requests per second.",
  "contact": {
   "url": "https://plugcat.com/about/"
  }
 },
 "servers": [
  {
   "url": "https://plugcat.com/api/v1"
  }
 ],
 "externalDocs": {
  "url": "https://plugcat.com/developers/"
 },
 "paths": {
  "/search": {
   "get": {
    "operationId": "searchInstitutions",
    "summary": "Search institutions by name",
    "description": "Name prefix matches first, then other name matches, then matches on city or state; largest institutions first within each group.",
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "minLength": 2
      },
      "description": "Name or brand, optionally with a city, e.g. \"chase\" or \"first national omaha\"."
     },
     {
      "name": "kind",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "bank",
        "credit-union",
        "brokerage"
       ]
      }
     },
     {
      "name": "state",
      "in": "query",
      "schema": {
       "type": "string",
       "pattern": "^[A-Za-z]{2}$"
      },
      "description": "Two-letter state code."
     },
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 25,
       "default": 10
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Matches",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "required": [
          "query",
          "results"
         ],
         "properties": {
          "query": {
           "type": "string"
          },
          "results": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/SearchResult"
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/{kind}/{slug}": {
   "get": {
    "operationId": "getInstitution",
    "summary": "One institution, app by app",
    "description": "The path matches the page URL: /bank/jpmorgan-chase-bank/ is /api/v1/bank/jpmorgan-chase-bank.",
    "parameters": [
     {
      "name": "kind",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "bank",
        "credit-union",
        "brokerage"
       ]
      }
     },
     {
      "name": "slug",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[a-z0-9-]+$"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "The institution",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Institution"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/apps": {
   "get": {
    "operationId": "listApps",
    "summary": "The finance apps PlugCat tracks",
    "responses": {
     "200": {
      "description": "Apps",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "apps": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/App"
           }
          }
         }
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "Error": {
    "type": "object",
    "required": [
     "error"
    ],
    "properties": {
     "error": {
      "type": "string"
     }
    }
   },
   "SearchResult": {
    "type": "object",
    "required": [
     "name",
     "kind",
     "status",
     "url"
    ],
    "properties": {
     "name": {
      "type": "string"
     },
     "also_known_as": {
      "type": "string",
      "description": "Brand or Plaid name, if different."
     },
     "kind": {
      "type": "string",
      "enum": [
       "bank",
       "credit-union",
       "brokerage"
      ]
     },
     "city": {
      "type": "string"
     },
     "state": {
      "type": "string"
     },
     "status": {
      "type": "string",
      "enum": [
       "likely",
       "possible",
       "unknown",
       "not-supported"
      ]
     },
     "label": {
      "type": "string"
     },
     "url": {
      "type": "string",
      "format": "uri"
     },
     "api_url": {
      "type": "string",
      "format": "uri"
     },
     "markdown_url": {
      "type": "string",
      "format": "uri"
     }
    }
   },
   "AppResult": {
    "type": "object",
    "required": [
     "slug",
     "name",
     "status",
     "why"
    ],
    "properties": {
     "slug": {
      "type": "string",
      "enum": [
       "rocket-money",
       "lunch-money",
       "monarch",
       "copilot",
       "ynab",
       "simplifi",
       "tiller",
       "pocketguard",
       "empower",
       "wave",
       "xero",
       "quickbooks"
      ]
     },
     "name": {
      "type": "string"
     },
     "category": {
      "type": "string",
      "enum": [
       "budgeting",
       "accounting"
      ]
     },
     "status": {
      "type": "string",
      "enum": [
       "likely",
       "possible",
       "unknown",
       "not-supported"
      ]
     },
     "label": {
      "type": "string"
     },
     "why": {
      "type": "string"
     },
     "url": {
      "type": "string",
      "format": "uri"
     }
    }
   },
   "Institution": {
    "type": "object",
    "required": [
     "name",
     "kind",
     "summary",
     "plaid",
     "apps",
     "url"
    ],
    "properties": {
     "name": {
      "type": "string"
     },
     "legal_name": {
      "type": "string"
     },
     "kind": {
      "type": "string",
      "enum": [
       "bank",
       "credit-union",
       "brokerage"
      ]
     },
     "city": {
      "type": "string"
     },
     "state": {
      "type": "string"
     },
     "id": {
      "type": "object",
      "properties": {
       "type": {
        "type": "string",
        "enum": [
         "fdic_cert",
         "ncua_charter",
         "sec_cik"
        ]
       },
       "value": {
        "type": "string"
       }
      }
     },
     "total_assets": {
      "type": "number",
      "description": "USD (banks and credit unions)."
     },
     "website": {
      "type": "string"
     },
     "url": {
      "type": "string",
      "format": "uri"
     },
     "markdown_url": {
      "type": "string",
      "format": "uri"
     },
     "api_url": {
      "type": "string",
      "format": "uri"
     },
     "summary": {
      "type": "string"
     },
     "plaid": {
      "type": "object",
      "properties": {
       "status": {
        "type": "string",
        "enum": [
         "likely",
         "possible",
         "unknown",
         "not-supported"
        ]
       },
       "label": {
        "type": "string"
       },
       "why": {
        "type": "string"
       },
       "names": {
        "type": "array",
        "items": {
         "type": "string"
        },
        "description": "Search for these names in the app."
       }
      }
     },
     "apps": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/AppResult"
      }
     },
     "faq": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "question": {
         "type": "string"
        },
        "answer": {
         "type": "string"
        }
       }
      }
     },
     "note": {
      "type": "string"
     },
     "namesakes": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "name": {
         "type": "string"
        },
        "city": {
         "type": "string"
        },
        "state": {
         "type": "string"
        },
        "url": {
         "type": "string"
        }
       }
      }
     },
     "sources": {
      "type": "object",
      "properties": {
       "plaid_list": {
        "type": "string"
       },
       "institution_list": {
        "type": "string"
       }
      }
     }
    }
   },
   "App": {
    "type": "object",
    "properties": {
     "slug": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "category": {
      "type": "string"
     },
     "providers": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "uses_plaid": {
      "type": "string",
      "enum": [
       "only",
       "one",
       "none"
      ]
     },
     "links_investment_accounts": {
      "enum": [
       "holdings",
       "balances",
       false
      ]
     },
     "price": {
      "type": "string"
     },
     "website": {
      "type": "string"
     },
     "affiliate_link": {
      "type": "boolean",
      "description": "`website` is an affiliate link."
     },
     "note": {
      "type": "string"
     },
     "sources": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "label": {
         "type": "string"
        },
        "url": {
         "type": "string"
        }
       }
      }
     },
     "url": {
      "type": "string"
     }
    }
   }
  }
 }
}