{
  "openapi": "3.1.0",
  "info": {
    "title": "PayOps Kit API",
    "version": "1.0.0",
    "summary": "Keyless payment-ops checks for people and AI agents.",
    "description": "Routing numbers, IBAN, BIC, banking-day calendars, ACH settlement and return deadlines, payment codes, finance identifiers and check amounts — the same code the PayOps Kit pages run. No key, no account: rate-limited to about 120 requests a minute per visitor, bodies up to 64 KB, batches up to 500 values. Inputs are processed for the one response and never stored or logged. Invalid values are answered with 200 and valid: false; 4xx means the request itself must change.\n\nInformational only: a valid format or check digit doesn't prove an account, BIC or identifier is live, and ACH timing is not a substitute for the Nacha Operating Rules, your ACH Operator's schedule or your ODFI agreement. Routing-number bank names come from public FFIEC/FDIC data and banks' own published lists, not the Federal Reserve's E-Payments Routing Directory: confirm with the receiving bank before sending funds.\n\nThe same tools are an MCP server (Streamable HTTP, stateless): https://payopskit.com/mcp.",
    "contact": {
      "name": "PayOps Kit",
      "email": "davidkaylor95+payops@gmail.com",
      "url": "https://payopskit.com/api"
    }
  },
  "servers": [
    {
      "url": "https://payopskit.com"
    }
  ],
  "externalDocs": {
    "description": "API and MCP docs",
    "url": "https://payopskit.com/api"
  },
  "tags": [
    {
      "name": "Meta",
      "description": "About the API."
    },
    {
      "name": "Routing numbers",
      "description": "US ABA routing transit numbers: check digit, Federal Reserve district and the bank behind it."
    },
    {
      "name": "IBAN",
      "description": "IBAN validation, check digits and the SWIFT IBAN Registry."
    },
    {
      "name": "BIC",
      "description": "BIC / SWIFT codes (ISO 9362)."
    },
    {
      "name": "Business days",
      "description": "Banking calendars: US Federal Reserve, TARGET2, England & Wales."
    },
    {
      "name": "ACH",
      "description": "US ACH settlement, return, NOC and reversal timing (informational)."
    },
    {
      "name": "Codes",
      "description": "ACH return, NOC and SEC codes; ISO 20022 status reasons; ISO 4217 currencies."
    },
    {
      "name": "Identifiers",
      "description": "LEI, ISIN, CUSIP, SEDOL and Luhn check digits."
    },
    {
      "name": "Check amount",
      "description": "Amounts in words for checks."
    }
  ],
  "paths": {
    "/api/v1": {
      "get": {
        "operationId": "getIndex",
        "tags": [
          "Meta"
        ],
        "summary": "API index",
        "description": "Name, version, the docs, OpenAPI and MCP URLs, and every endpoint.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "API index",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiIndex"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/api/v1/routing-number/{value}": {
      "get": {
        "operationId": "validateRoutingNumber",
        "tags": [
          "Routing numbers"
        ],
        "summary": "Validate a routing number",
        "description": "ABA 3-7-1 check digit (8 digits compute it), Federal Reserve routing symbol and district, and the bank (bank, bankLookup) from public FFIEC/FDIC data and banks' own published lists, not the Fed E-Payments Routing Directory: confirm with the receiving bank before sending funds.\n\nMCP tool: `validate_routing_number`.",
        "parameters": [
          {
            "name": "value",
            "in": "path",
            "required": true,
            "description": "8 or 9 digits; spaces and hyphens are ignored.",
            "schema": {
              "type": "string",
              "maxLength": 512
            },
            "example": "021000021"
          }
        ],
        "responses": {
          "200": {
            "description": "Validate a routing number",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/api/v1/routing-number": {
      "post": {
        "operationId": "validateRoutingNumbers",
        "tags": [
          "Routing numbers"
        ],
        "summary": "Validate routing numbers (batch)",
        "description": "Up to 500 values per request; results in input order, each with its bank. Banks are looked up for at most 40 different routing symbols (first four digits) per request; numbers past that get bank: null with bankLookup.reason \"limit_reached\".\n\nMCP tool: `validate_routing_number`.",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRequest"
              },
              "example": {
                "values": [
                  "021000021",
                  "011000015",
                  "02100002"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Validate routing numbers (batch)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingResultBatch"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/api/v1/iban/check-digits": {
      "get": {
        "operationId": "computeIbanCheckDigits",
        "tags": [
          "IBAN"
        ],
        "summary": "Compute IBAN check digits",
        "description": "The two check digits for a country and BBAN, and the complete IBAN.\n\nMCP tool: `compute_iban_check_digits`.",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "description": "ISO 3166 country code, e.g. DE.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$",
              "maxLength": 512
            },
            "example": "DE"
          },
          {
            "name": "bban",
            "in": "query",
            "required": true,
            "description": "The BBAN (domestic account identifier).",
            "schema": {
              "type": "string",
              "maxLength": 512
            },
            "example": "370400440532013000"
          }
        ],
        "responses": {
          "200": {
            "description": "Compute IBAN check digits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IbanCheckDigitsResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/api/v1/iban/countries": {
      "get": {
        "operationId": "listIbanCountries",
        "tags": [
          "IBAN"
        ],
        "summary": "IBAN country table",
        "description": "The SWIFT IBAN Registry countries: length, BBAN structure, SEPA membership, bank/branch positions, example.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "IBAN country table",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IbanCountryList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/api/v1/iban/{value}": {
      "get": {
        "operationId": "validateIban",
        "tags": [
          "IBAN"
        ],
        "summary": "Validate an IBAN",
        "description": "Country, length, BBAN structure and mod-97 check digits; electronic and print formats; bank and branch codes.\n\nMCP tool: `validate_iban`.",
        "parameters": [
          {
            "name": "value",
            "in": "path",
            "required": true,
            "description": "The IBAN; URL-encode spaces (%20) or leave them out.",
            "schema": {
              "type": "string",
              "maxLength": 512
            },
            "example": "DE89370400440532013000"
          }
        ],
        "responses": {
          "200": {
            "description": "Validate an IBAN",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IbanResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/api/v1/iban": {
      "post": {
        "operationId": "validateIbans",
        "tags": [
          "IBAN"
        ],
        "summary": "Validate IBANs (batch)",
        "description": "Up to 500 values per request; results in input order.\n\nMCP tool: `validate_iban`.",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRequest"
              },
              "example": {
                "values": [
                  "DE89370400440532013000",
                  "GB29 NWBK 6016 1331 9268 19"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Validate IBANs (batch)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IbanResultBatch"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/api/v1/bic/{value}": {
      "get": {
        "operationId": "parseBic",
        "tags": [
          "BIC"
        ],
        "summary": "Parse a BIC",
        "description": "Institution, country, location and branch codes; test, passive and head-office flags; BIC8 and BIC11.\n\nMCP tool: `parse_bic`.",
        "parameters": [
          {
            "name": "value",
            "in": "path",
            "required": true,
            "description": "BIC8 or BIC11.",
            "schema": {
              "type": "string",
              "maxLength": 512
            },
            "example": "DEUTDEFF500"
          }
        ],
        "responses": {
          "200": {
            "description": "Parse a BIC",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BicResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/api/v1/bic": {
      "post": {
        "operationId": "parseBics",
        "tags": [
          "BIC"
        ],
        "summary": "Parse BICs (batch)",
        "description": "Up to 500 values per request; results in input order.\n\nMCP tool: `parse_bic`.",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRequest"
              },
              "example": {
                "values": [
                  "DEUTDEFF",
                  "NWBKGB2L",
                  "CHASUS33XXX"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Parse BICs (batch)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BicResultBatch"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/api/v1/business-days": {
      "get": {
        "operationId": "businessDayMath",
        "tags": [
          "Business days"
        ],
        "summary": "Business-day arithmetic",
        "description": "is-business-day, next, previous, add, subtract or count on the us-fed, target2 or uk-ew calendar. count = business days in (date, end_date].\n\nMCP tool: `business_day_math`.",
        "parameters": [
          {
            "name": "calendar",
            "in": "query",
            "required": true,
            "description": "us-fed, target2 or uk-ew.",
            "schema": {
              "type": "string",
              "enum": [
                "us-fed",
                "target2",
                "uk-ew"
              ],
              "maxLength": 512
            },
            "example": "us-fed"
          },
          {
            "name": "op",
            "in": "query",
            "required": true,
            "description": "Operation (operation is accepted too).",
            "schema": {
              "type": "string",
              "enum": [
                "is-business-day",
                "next",
                "previous",
                "add",
                "subtract",
                "count"
              ],
              "maxLength": 512
            },
            "example": "add"
          },
          {
            "name": "date",
            "in": "query",
            "required": true,
            "description": "YYYY-MM-DD.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "maxLength": 512
            },
            "example": "2026-07-02"
          },
          {
            "name": "n",
            "in": "query",
            "required": false,
            "description": "Business days to move (add, subtract): 0–2000.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2000
            },
            "example": "1"
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "description": "Other end for count, YYYY-MM-DD.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Business-day arithmetic",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BusinessDayResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/api/v1/holidays": {
      "get": {
        "operationId": "listHolidays",
        "tags": [
          "Business days"
        ],
        "summary": "Bank holidays for a year",
        "description": "Closing weekdays with observed and substitute days; format=ics answers an iCalendar file instead of JSON.\n\nMCP tool: `list_bank_holidays`.",
        "parameters": [
          {
            "name": "calendar",
            "in": "query",
            "required": true,
            "description": "us-fed, target2 or uk-ew.",
            "schema": {
              "type": "string",
              "enum": [
                "us-fed",
                "target2",
                "uk-ew"
              ],
              "maxLength": 512
            },
            "example": "us-fed"
          },
          {
            "name": "year",
            "in": "query",
            "required": true,
            "description": "Four-digit year.",
            "schema": {
              "type": "integer",
              "minimum": 1990,
              "maximum": 2099
            },
            "example": "2026"
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or ics.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ics"
              ],
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Bank holidays for a year",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HolidayList"
                }
              },
              "text/calendar": {
                "schema": {
                  "type": "string",
                  "description": "RFC 5545 iCalendar (format=ics)."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/api/v1/calendars": {
      "get": {
        "operationId": "listCalendars",
        "tags": [
          "Business days"
        ],
        "summary": "Supported calendars",
        "description": "Each calendar with its rules, caveats and year range.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Supported calendars",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalendarList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/api/v1/ach/settlement": {
      "get": {
        "operationId": "achSettlement",
        "tags": [
          "ACH"
        ],
        "summary": "ACH settlement date",
        "description": "Same Day ACH window or next-day settlement on FedACH for a submission time (Eastern Time) and effective date, under the Same Day ACH rules in force on the submission date. Informational only.\n\nMCP tool: `ach_settlement_date`.",
        "parameters": [
          {
            "name": "submitted_at",
            "in": "query",
            "required": false,
            "description": "YYYY-MM-DDTHH:MM Eastern Time wall clock; omitted = now.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}[T ]\\d{2}:\\d{2}(:\\d{2})?$",
              "maxLength": 512
            },
            "example": "2026-10-29T10:15"
          },
          {
            "name": "effective_date",
            "in": "query",
            "required": false,
            "description": "YYYY-MM-DD; default the submission date.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "maxLength": 512
            },
            "example": "2026-10-29"
          },
          {
            "name": "amount",
            "in": "query",
            "required": false,
            "description": "USD amount for the Same Day limit: $1,000,000 per payment ($10,000,000 for entries submitted on or after September 17, 2027).",
            "schema": {
              "type": "string",
              "maxLength": 512
            },
            "example": "2500.00"
          },
          {
            "name": "sec_code",
            "in": "query",
            "required": false,
            "description": "SEC code; IAT is not Same Day eligible.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z]{3}$",
              "maxLength": 512
            },
            "example": "PPD"
          }
        ],
        "responses": {
          "200": {
            "description": "ACH settlement date",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/api/v1/ach/return-deadline": {
      "get": {
        "operationId": "achReturnDeadline",
        "tags": [
          "ACH"
        ],
        "summary": "ACH return, NOC and reversal deadlines",
        "description": "The deadline for a return or NOC code, plus the standard, extended, NOC and reversal windows. For dishonored (R61, R62, R67–R70) and contested (R71–R77) codes pass the return's or dishonored return's settlement date; the four windows count from an original entry's, so windowsApply is then false. Informational only.\n\nMCP tool: `ach_return_deadline`.",
        "parameters": [
          {
            "name": "settlement_date",
            "in": "query",
            "required": true,
            "description": "Settlement date of the original entry; for dishonored codes (R61, R62, R67–R70) the return entry's; for contested codes (R71–R77) the dishonored return's. YYYY-MM-DD.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "maxLength": 512
            },
            "example": "2026-10-29"
          },
          {
            "name": "code",
            "in": "query",
            "required": false,
            "description": "Return reason code (R01–R85) or NOC code (C01–C14, C61–C69).",
            "schema": {
              "type": "string",
              "maxLength": 512
            },
            "example": "R10"
          }
        ],
        "responses": {
          "200": {
            "description": "ACH return, NOC and reversal deadlines",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AchDeadlinesResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/api/v1/codes": {
      "get": {
        "operationId": "searchCodes",
        "tags": [
          "Codes"
        ],
        "summary": "Search payment codes",
        "description": "Ranked search over ACH return, NOC and SEC codes, ISO 20022 status reasons and ISO 4217 currencies.\n\nMCP tool: `lookup_payment_code`.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Search words (at most 200 characters); omit to list the set.",
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "example": "insufficient"
          },
          {
            "name": "set",
            "in": "query",
            "required": false,
            "description": "Code set to search.",
            "schema": {
              "type": "string",
              "enum": [
                "ach-return",
                "ach-noc",
                "ach-sec",
                "iso20022-status",
                "iso4217"
              ],
              "maxLength": 512
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1–100, default 20; without q, the whole set is listed unless limit is given.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Search payment codes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeSearchResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/api/v1/codes/{code}": {
      "get": {
        "operationId": "lookupCode",
        "tags": [
          "Codes"
        ],
        "summary": "Look up a payment code",
        "description": "Exact, case-insensitive match in every set (or one); 404 when no set has the code.\n\nMCP tool: `lookup_payment_code`.",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "description": "R01, C02, PPD, AM04, USD, 840, …",
            "schema": {
              "type": "string"
            },
            "example": "R01"
          },
          {
            "name": "set",
            "in": "query",
            "required": false,
            "description": "Restrict to one code set.",
            "schema": {
              "type": "string",
              "enum": [
                "ach-return",
                "ach-noc",
                "ach-sec",
                "iso20022-status",
                "iso4217"
              ],
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Look up a payment code",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeLookupResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/api/v1/identifier/{value}": {
      "get": {
        "operationId": "validateIdentifier",
        "tags": [
          "Identifiers"
        ],
        "summary": "Validate a finance identifier",
        "description": "LEI, ISIN, CUSIP, SEDOL or Luhn check digit, auto-detected by shape unless type is given. Card numbers are masked.\n\nMCP tool: `validate_identifier`.",
        "parameters": [
          {
            "name": "value",
            "in": "path",
            "required": true,
            "description": "The identifier.",
            "schema": {
              "type": "string",
              "maxLength": 512
            },
            "example": "US0378331005"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "auto (default), lei, isin, cusip, sedol or luhn.",
            "schema": {
              "type": "string",
              "enum": [
                "auto",
                "lei",
                "isin",
                "cusip",
                "sedol",
                "luhn"
              ],
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Validate a finance identifier",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdentifierResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/api/v1/identifier": {
      "post": {
        "operationId": "validateIdentifiers",
        "tags": [
          "Identifiers"
        ],
        "summary": "Validate identifiers (batch)",
        "description": "Up to 500 values per request; an optional type applies to all of them.\n\nMCP tool: `validate_identifier`.",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IdentifierBatchRequest"
              },
              "example": {
                "values": [
                  "529900T8BM49AURSDO55",
                  "US0378331005",
                  "037833100",
                  "0263494"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Validate identifiers (batch)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdentifierResultBatch"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/api/v1/check-amount": {
      "get": {
        "operationId": "amountToWords",
        "tags": [
          "Check amount"
        ],
        "summary": "Amount in words",
        "description": "The legal line of a check for a USD amount; with words, a cross-check against the figure.\n\nMCP tool: `amount_to_words`.",
        "parameters": [
          {
            "name": "amount",
            "in": "query",
            "required": true,
            "description": "USD amount, up to 2 decimals.",
            "schema": {
              "type": "string",
              "maxLength": 512
            },
            "example": "1234.56"
          },
          {
            "name": "words",
            "in": "query",
            "required": false,
            "description": "Words to cross-check.",
            "schema": {
              "type": "string",
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Amount in words",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AmountWordsResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Issue": {
        "type": "object",
        "description": "One finding about an input: a stable snake_case code and a sentence.",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "Error": {
        "type": "object",
        "description": "Every 4xx/5xx response under /api/v1.",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "param": {
                "type": "string",
                "description": "The parameter at fault."
              }
            }
          }
        }
      },
      "ApiIndex": {
        "type": "object",
        "required": [
          "name",
          "version",
          "description",
          "docs",
          "openapi",
          "llms",
          "mcp",
          "endpoints"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "docs": {
            "type": "string"
          },
          "openapi": {
            "type": "string"
          },
          "llms": {
            "type": "string"
          },
          "mcp": {
            "type": "string"
          },
          "endpoints": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "method",
                "path",
                "summary"
              ],
              "properties": {
                "method": {
                  "type": "string"
                },
                "path": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "BatchRequest": {
        "type": "object",
        "required": [
          "values"
        ],
        "properties": {
          "values": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "maxItems": 500
          }
        },
        "additionalProperties": false
      },
      "IdentifierBatchRequest": {
        "type": "object",
        "required": [
          "values"
        ],
        "properties": {
          "values": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "maxItems": 500
          },
          "type": {
            "type": "string",
            "enum": [
              "auto",
              "lei",
              "isin",
              "cusip",
              "sedol",
              "luhn"
            ]
          }
        },
        "additionalProperties": false
      },
      "FedDistrict": {
        "type": "object",
        "required": [
          "number",
          "bank",
          "city"
        ],
        "properties": {
          "number": {
            "type": "integer"
          },
          "bank": {
            "type": "string"
          },
          "city": {
            "type": "string"
          }
        }
      },
      "BankUse": {
        "type": "object",
        "description": "What a bank's own website says the routing number is for.",
        "required": [
          "use",
          "states",
          "note",
          "sourceUrl"
        ],
        "properties": {
          "use": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "wire",
              "ach",
              "checks",
              "all",
              null
            ],
            "description": "null when the page does not say."
          },
          "states": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "States the bank lists the number for; empty when it lists none."
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "sourceUrl": {
            "type": "string",
            "description": "The bank's own page that lists the number."
          }
        }
      },
      "Bank": {
        "type": "object",
        "description": "The institution behind a routing number, from public FFIEC/FDIC data or the bank's own website — not the Federal Reserve's E-Payments Routing Directory.",
        "required": [
          "routingNumber",
          "name",
          "city",
          "state",
          "status",
          "closedDate",
          "successor",
          "formerly",
          "formerPrimaryThrough",
          "brand",
          "uses",
          "source"
        ],
        "properties": {
          "routingNumber": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "Who holds the number today as far as public data shows: the reporting bank's legal name (FFIEC/FDIC), the name the bank's own page gives, or the active successor of the closed bank it belonged to (that bank is then formerly)."
          },
          "city": {
            "type": [
              "string",
              "null"
            ],
            "description": "Headquarters, when known."
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "closed"
            ],
            "description": "Of the institution named, not a promise that the number accepts payments. closed only when no active successor is on record."
          },
          "closedDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "successor": {
            "type": [
              "string",
              "null"
            ],
            "description": "A closed bank's successor when that isn't an active institution on record (otherwise it is the bank named)."
          },
          "formerly": {
            "type": [
              "object",
              "null"
            ],
            "required": [
              "name",
              "closedDate"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "closedDate": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date"
              }
            },
            "description": "The since-closed bank this was the primary routing number of: the bank named took it over, or lists it on its own site."
          },
          "formerPrimaryThrough": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "Set when the Call Reports no longer list it as a primary routing number: the last period that did (of the formerly bank when that is set)."
          },
          "brand": {
            "type": [
              "string",
              "null"
            ]
          },
          "uses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BankUse"
            }
          },
          "source": {
            "type": "object",
            "required": [
              "id",
              "name",
              "url",
              "asOf"
            ],
            "properties": {
              "id": {
                "type": "string",
                "enum": [
                  "ffiec-cdr",
                  "ncua",
                  "bank-published"
                ]
              },
              "name": {
                "type": "string"
              },
              "url": {
                "type": "string"
              },
              "asOf": {
                "type": "string",
                "format": "date",
                "description": "When the source was retrieved."
              }
            }
          }
        }
      },
      "BankLookup": {
        "type": "object",
        "description": "How the bank lookup went. Always confirm with the receiving bank or the Fed directory before sending funds.",
        "required": [
          "found",
          "reason",
          "message",
          "directoryUrl"
        ],
        "properties": {
          "found": {
            "type": "boolean"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "not_checked",
              "not_listed",
              "unavailable",
              "limit_reached",
              null
            ],
            "description": "null when found; not_checked: not a valid routing number; not_listed: valid but not in the data; unavailable: the data could not be loaded; limit_reached: past 40 routing symbols in one request."
          },
          "message": {
            "type": "string",
            "description": "The caveat when found; otherwise why not, and where to look."
          },
          "directoryUrl": {
            "type": "string",
            "description": "The Federal Reserve's E-Payments Routing Directory search, the authoritative lookup."
          }
        }
      },
      "RoutingResult": {
        "type": "object",
        "required": [
          "input",
          "mode",
          "routingNumber",
          "valid",
          "checkDigit",
          "checksum",
          "prefix",
          "errors",
          "notes",
          "bank",
          "bankLookup"
        ],
        "properties": {
          "input": {
            "type": "string"
          },
          "mode": {
            "type": "string",
            "enum": [
              "validate",
              "compute"
            ]
          },
          "routingNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "valid": {
            "type": "boolean"
          },
          "checkDigit": {
            "type": "object",
            "required": [
              "given",
              "expected",
              "matches"
            ],
            "properties": {
              "given": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "expected": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "matches": {
                "type": "boolean"
              }
            }
          },
          "checksum": {
            "type": [
              "object",
              "null"
            ],
            "required": [
              "weights",
              "products",
              "sum",
              "remainder"
            ],
            "properties": {
              "weights": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "products": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "sum": {
                "type": "integer"
              },
              "remainder": {
                "type": "integer"
              }
            }
          },
          "prefix": {
            "type": [
              "object",
              "null"
            ],
            "required": [
              "digits",
              "kind",
              "description",
              "district"
            ],
            "properties": {
              "digits": {
                "type": "string"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "us-government",
                  "federal-reserve",
                  "thrift",
                  "electronic",
                  "travelers-checks",
                  "unassigned"
                ]
              },
              "description": {
                "type": "string"
              },
              "district": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/FedDistrict"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Issue"
            }
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "bank": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Bank"
              },
              {
                "type": "null"
              }
            ]
          },
          "bankLookup": {
            "$ref": "#/components/schemas/BankLookup"
          }
        }
      },
      "IbanPart": {
        "type": "object",
        "required": [
          "label",
          "value",
          "start",
          "end",
          "kind"
        ],
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "start": {
            "type": "integer"
          },
          "end": {
            "type": "integer"
          },
          "kind": {
            "type": "string",
            "enum": [
              "country",
              "check",
              "bank",
              "branch",
              "account"
            ]
          }
        }
      },
      "IbanResult": {
        "type": "object",
        "required": [
          "input",
          "iban",
          "print",
          "valid",
          "country",
          "checkDigits",
          "expectedCheckDigits",
          "length",
          "bban",
          "bbanFormat",
          "bankCode",
          "branchCode",
          "parts",
          "checks",
          "errors",
          "notes"
        ],
        "properties": {
          "input": {
            "type": "string"
          },
          "iban": {
            "type": "string"
          },
          "print": {
            "type": "string"
          },
          "valid": {
            "type": "boolean"
          },
          "country": {
            "type": [
              "object",
              "null"
            ],
            "required": [
              "code",
              "name",
              "sepa",
              "sepaNote"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "sepa": {
                "type": "boolean"
              },
              "sepaNote": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "checkDigits": {
            "type": [
              "string",
              "null"
            ]
          },
          "expectedCheckDigits": {
            "type": [
              "string",
              "null"
            ]
          },
          "length": {
            "type": "object",
            "required": [
              "actual",
              "expected"
            ],
            "properties": {
              "actual": {
                "type": "integer"
              },
              "expected": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            }
          },
          "bban": {
            "type": [
              "string",
              "null"
            ]
          },
          "bbanFormat": {
            "type": [
              "string",
              "null"
            ]
          },
          "bankCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "branchCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "parts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IbanPart"
            }
          },
          "checks": {
            "type": "object",
            "required": [
              "characters",
              "country",
              "length",
              "bbanFormat",
              "checksum"
            ],
            "properties": {
              "characters": {
                "type": "boolean"
              },
              "country": {
                "type": "boolean"
              },
              "length": {
                "type": "boolean"
              },
              "bbanFormat": {
                "type": "boolean"
              },
              "checksum": {
                "type": "boolean"
              }
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Issue"
            }
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "IbanCheckDigitsResult": {
        "type": "object",
        "required": [
          "country",
          "bban",
          "checkDigits",
          "iban",
          "print",
          "valid",
          "errors"
        ],
        "properties": {
          "country": {
            "type": "string"
          },
          "bban": {
            "type": "string"
          },
          "checkDigits": {
            "type": [
              "string",
              "null"
            ]
          },
          "iban": {
            "type": [
              "string",
              "null"
            ]
          },
          "print": {
            "type": [
              "string",
              "null"
            ]
          },
          "valid": {
            "type": "boolean"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Issue"
            }
          }
        }
      },
      "IbanCountry": {
        "type": "object",
        "required": [
          "code",
          "name",
          "length",
          "bbanFormat",
          "sepa",
          "sepaNote",
          "bank",
          "branch",
          "example"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "length": {
            "type": "integer"
          },
          "bbanFormat": {
            "type": "string",
            "description": "SWIFT notation: n digits, a upper-case letters, c alphanumerics, ! fixed length."
          },
          "sepa": {
            "type": "boolean"
          },
          "sepaNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "bank": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer"
            },
            "minItems": 2,
            "maxItems": 2,
            "description": "Bank code offsets within the BBAN, 0-based, end exclusive."
          },
          "branch": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer"
            },
            "minItems": 2,
            "maxItems": 2
          },
          "example": {
            "type": "string"
          }
        }
      },
      "IbanCountryList": {
        "type": "object",
        "required": [
          "count",
          "countries"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "countries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IbanCountry"
            }
          }
        }
      },
      "BicPart": {
        "type": "object",
        "required": [
          "label",
          "value",
          "start",
          "end",
          "kind"
        ],
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "start": {
            "type": "integer"
          },
          "end": {
            "type": "integer"
          },
          "kind": {
            "type": "string",
            "enum": [
              "institution",
              "country",
              "location",
              "branch"
            ]
          }
        }
      },
      "BicResult": {
        "type": "object",
        "required": [
          "input",
          "bic",
          "valid",
          "format",
          "institutionCode",
          "countryCode",
          "countryName",
          "locationCode",
          "branchCode",
          "bic8",
          "bic11",
          "headOffice",
          "testBic",
          "passiveParticipant",
          "reverseBilling",
          "parts",
          "errors",
          "warnings",
          "notes"
        ],
        "properties": {
          "input": {
            "type": "string"
          },
          "bic": {
            "type": "string"
          },
          "valid": {
            "type": "boolean"
          },
          "format": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "BIC8",
              "BIC11",
              null
            ]
          },
          "institutionCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "countryCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "countryName": {
            "type": [
              "string",
              "null"
            ]
          },
          "locationCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "branchCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "bic8": {
            "type": [
              "string",
              "null"
            ]
          },
          "bic11": {
            "type": [
              "string",
              "null"
            ]
          },
          "headOffice": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "testBic": {
            "type": "boolean"
          },
          "passiveParticipant": {
            "type": "boolean"
          },
          "reverseBilling": {
            "type": "boolean"
          },
          "parts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BicPart"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Issue"
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Issue"
            }
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "DayInfo": {
        "type": "object",
        "required": [
          "date",
          "weekday",
          "businessDay",
          "reason",
          "holiday"
        ],
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "weekday": {
            "type": "string"
          },
          "businessDay": {
            "type": "boolean"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "weekend",
              "holiday",
              null
            ]
          },
          "holiday": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Holiday": {
        "type": "object",
        "required": [
          "date",
          "name",
          "observed",
          "actualDate",
          "note"
        ],
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "name": {
            "type": "string"
          },
          "observed": {
            "type": "boolean"
          },
          "actualDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "NotObservedHoliday": {
        "type": "object",
        "required": [
          "date",
          "name",
          "reason"
        ],
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "name": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "BusinessDayResult": {
        "type": "object",
        "required": [
          "calendar",
          "calendarName",
          "operation",
          "date",
          "n",
          "endDate",
          "day",
          "resultDate",
          "resultDay",
          "count",
          "explanation",
          "holidaysInRange",
          "holidaysInRangeTotal",
          "caveats"
        ],
        "properties": {
          "calendar": {
            "type": "string",
            "enum": [
              "us-fed",
              "target2",
              "uk-ew"
            ]
          },
          "calendarName": {
            "type": "string"
          },
          "operation": {
            "type": "string",
            "enum": [
              "is-business-day",
              "next",
              "previous",
              "add",
              "subtract",
              "count"
            ]
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "n": {
            "type": [
              "integer",
              "null"
            ]
          },
          "endDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "day": {
            "$ref": "#/components/schemas/DayInfo"
          },
          "resultDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "resultDay": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DayInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "count": {
            "type": [
              "integer",
              "null"
            ]
          },
          "explanation": {
            "type": "string"
          },
          "holidaysInRange": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Holiday"
            },
            "description": "Holidays observed in the range: the first 100."
          },
          "holidaysInRangeTotal": {
            "type": "integer",
            "description": "Every holiday observed in the range."
          },
          "caveats": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "HolidayList": {
        "type": "object",
        "required": [
          "calendar",
          "calendarName",
          "year",
          "holidays",
          "notObserved",
          "caveats"
        ],
        "properties": {
          "calendar": {
            "type": "string",
            "enum": [
              "us-fed",
              "target2",
              "uk-ew"
            ]
          },
          "calendarName": {
            "type": "string"
          },
          "year": {
            "type": "integer"
          },
          "holidays": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Holiday"
            }
          },
          "notObserved": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotObservedHoliday"
            }
          },
          "caveats": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CalendarInfo": {
        "type": "object",
        "required": [
          "id",
          "name",
          "shortName",
          "description",
          "minYear",
          "maxYear",
          "rules",
          "caveats"
        ],
        "properties": {
          "id": {
            "type": "string",
            "enum": [
              "us-fed",
              "target2",
              "uk-ew"
            ]
          },
          "name": {
            "type": "string"
          },
          "shortName": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "minYear": {
            "type": "integer"
          },
          "maxYear": {
            "type": "integer"
          },
          "rules": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "caveats": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CalendarList": {
        "type": "object",
        "required": [
          "count",
          "calendars"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "calendars": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CalendarInfo"
            }
          }
        }
      },
      "SameDayWindow": {
        "type": "object",
        "required": [
          "number",
          "submissionDeadline",
          "settlement"
        ],
        "properties": {
          "number": {
            "type": "integer"
          },
          "submissionDeadline": {
            "type": "string"
          },
          "settlement": {
            "type": "string"
          }
        }
      },
      "WindowState": {
        "type": "object",
        "required": [
          "number",
          "submissionDeadline",
          "submissionDeadlineLabel",
          "settlement",
          "settlementLabel",
          "status"
        ],
        "properties": {
          "number": {
            "type": "integer"
          },
          "submissionDeadline": {
            "type": "string"
          },
          "submissionDeadlineLabel": {
            "type": "string"
          },
          "settlement": {
            "type": "string"
          },
          "settlementLabel": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "missed",
              "used",
              "available",
              "not-applicable"
            ]
          }
        }
      },
      "SettlementResult": {
        "type": "object",
        "required": [
          "submittedAt",
          "timeZone",
          "submissionDate",
          "submissionTime",
          "submissionIsBankingDay",
          "effectiveDate",
          "effectiveDateIsBankingDay",
          "settlementDate",
          "settlementTime",
          "settlementTimeLabel",
          "type",
          "sameDayWindow",
          "sameDayEligible",
          "sameDayIneligibleReasons",
          "sameDayLimit",
          "windows",
          "explanation",
          "caveats",
          "notice"
        ],
        "properties": {
          "submittedAt": {
            "type": "string"
          },
          "timeZone": {
            "type": "string"
          },
          "submissionDate": {
            "type": "string",
            "format": "date"
          },
          "submissionTime": {
            "type": "string"
          },
          "submissionIsBankingDay": {
            "type": "boolean"
          },
          "effectiveDate": {
            "type": "string",
            "format": "date"
          },
          "effectiveDateIsBankingDay": {
            "type": "boolean"
          },
          "settlementDate": {
            "type": "string",
            "format": "date"
          },
          "settlementTime": {
            "type": "string",
            "description": "HH:MM Eastern Time."
          },
          "settlementTimeLabel": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "same-day",
              "next-day",
              "future-dated"
            ]
          },
          "sameDayWindow": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SameDayWindow"
              },
              {
                "type": "null"
              }
            ]
          },
          "sameDayEligible": {
            "type": "boolean"
          },
          "sameDayIneligibleReasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sameDayLimit": {
            "type": [
              "string",
              "null"
            ],
            "description": "Per-payment limit in USD in force on the submission date (\"1000000.00\"); null before Same Day ACH began (September 23, 2016)."
          },
          "windows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WindowState"
            },
            "description": "The Same Day windows in force on the submission date (none before Same Day ACH)."
          },
          "explanation": {
            "type": "string"
          },
          "caveats": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notice": {
            "type": "string"
          }
        }
      },
      "AchDeadline": {
        "type": "object",
        "required": [
          "label",
          "kind",
          "days",
          "from",
          "date",
          "dateLabel",
          "description",
          "reference",
          "caveat"
        ],
        "properties": {
          "label": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "banking-days",
              "calendar-days",
              "agreement",
              "operator",
              "not-defined"
            ]
          },
          "days": {
            "type": [
              "integer",
              "null"
            ]
          },
          "from": {
            "type": "string"
          },
          "date": {
            "type": [
              "string",
              "null"
            ]
          },
          "dateLabel": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "caveat": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "AchDeadlinesResult": {
        "type": "object",
        "required": [
          "settlementDate",
          "code",
          "deadline",
          "windows",
          "windowsApply",
          "warnings",
          "notice"
        ],
        "properties": {
          "settlementDate": {
            "type": "string",
            "format": "date"
          },
          "code": {
            "type": [
              "object",
              "null"
            ],
            "required": [
              "code",
              "title",
              "set"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "set": {
                "type": "string",
                "enum": [
                  "ach-return",
                  "ach-noc"
                ]
              }
            }
          },
          "deadline": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AchDeadline"
              },
              {
                "type": "null"
              }
            ]
          },
          "windows": {
            "type": "object",
            "required": [
              "standardReturn",
              "extendedReturn",
              "notificationOfChange",
              "reversal"
            ],
            "properties": {
              "standardReturn": {
                "$ref": "#/components/schemas/AchDeadline"
              },
              "extendedReturn": {
                "$ref": "#/components/schemas/AchDeadline"
              },
              "notificationOfChange": {
                "$ref": "#/components/schemas/AchDeadline"
              },
              "reversal": {
                "$ref": "#/components/schemas/AchDeadline"
              }
            }
          },
          "windowsApply": {
            "type": "boolean",
            "description": "False for a dishonored or contested return code, whose settlement_date is a return's: the four windows count from an original entry's settlement date."
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notice": {
            "type": "string"
          }
        }
      },
      "PaymentCode": {
        "type": "object",
        "required": [
          "set",
          "code",
          "name",
          "description",
          "details"
        ],
        "properties": {
          "set": {
            "type": "string",
            "enum": [
              "ach-return",
              "ach-noc",
              "ach-sec",
              "iso20022-status",
              "iso4217"
            ]
          },
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "details": {
            "type": "object",
            "additionalProperties": {
              "type": [
                "string",
                "number",
                "boolean",
                "null"
              ]
            },
            "description": "Set-specific fields (timeframe, minor units, …)."
          }
        }
      },
      "CodeSearchResult": {
        "type": "object",
        "required": [
          "query",
          "set",
          "total",
          "results"
        ],
        "properties": {
          "query": {
            "type": "string"
          },
          "set": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "ach-return",
              "ach-noc",
              "ach-sec",
              "iso20022-status",
              "iso4217",
              null
            ]
          },
          "total": {
            "type": "integer"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentCode"
            }
          }
        }
      },
      "CodeLookupResult": {
        "type": "object",
        "required": [
          "code",
          "set",
          "found",
          "matches"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "set": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "ach-return",
              "ach-noc",
              "ach-sec",
              "iso20022-status",
              "iso4217",
              null
            ]
          },
          "found": {
            "type": "boolean"
          },
          "matches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentCode"
            }
          }
        }
      },
      "IdentifierPart": {
        "type": "object",
        "required": [
          "label",
          "value",
          "start",
          "end",
          "kind"
        ],
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "start": {
            "type": "integer"
          },
          "end": {
            "type": "integer"
          },
          "kind": {
            "type": "string",
            "enum": [
              "prefix",
              "body",
              "check"
            ]
          }
        }
      },
      "IdentifierResult": {
        "type": "object",
        "required": [
          "input",
          "value",
          "type",
          "detected",
          "candidates",
          "valid",
          "checkDigit",
          "parts",
          "details",
          "errors",
          "warnings",
          "notes"
        ],
        "properties": {
          "input": {
            "type": "string",
            "description": "As given; masked when it is (or may be) a card number."
          },
          "value": {
            "type": "string"
          },
          "type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "lei",
              "isin",
              "cusip",
              "sedol",
              "luhn",
              null
            ]
          },
          "detected": {
            "type": "boolean"
          },
          "candidates": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "lei",
                "isin",
                "cusip",
                "sedol",
                "luhn"
              ]
            }
          },
          "valid": {
            "type": "boolean"
          },
          "checkDigit": {
            "type": "object",
            "required": [
              "given",
              "expected"
            ],
            "properties": {
              "given": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "expected": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "parts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IdentifierPart"
            }
          },
          "details": {
            "type": "object",
            "additionalProperties": {
              "type": [
                "string",
                "number",
                "boolean",
                "null"
              ]
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Issue"
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Issue"
            }
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AmountWordsResult": {
        "type": "object",
        "required": [
          "input",
          "valid",
          "amount",
          "numeric",
          "words",
          "dollarsInWords",
          "cents",
          "crossCheck",
          "errors"
        ],
        "properties": {
          "input": {
            "type": "string"
          },
          "valid": {
            "type": "boolean"
          },
          "amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "numeric": {
            "type": [
              "string",
              "null"
            ]
          },
          "words": {
            "type": [
              "string",
              "null"
            ]
          },
          "dollarsInWords": {
            "type": [
              "string",
              "null"
            ]
          },
          "cents": {
            "type": [
              "string",
              "null"
            ]
          },
          "crossCheck": {
            "type": [
              "object",
              "null"
            ],
            "required": [
              "words",
              "parsedAmount",
              "matches",
              "message"
            ],
            "properties": {
              "words": {
                "type": "string"
              },
              "parsedAmount": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "matches": {
                "type": "boolean"
              },
              "message": {
                "type": "string"
              }
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Issue"
            }
          }
        }
      },
      "RoutingResultBatch": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoutingResult"
            }
          }
        }
      },
      "IbanResultBatch": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IbanResult"
            }
          }
        }
      },
      "BicResultBatch": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BicResult"
            }
          }
        }
      },
      "IdentifierResultBatch": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IdentifierResult"
            }
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "A parameter is missing or unusable (missing_parameter, invalid_parameter, invalid_date, unknown_calendar, …).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "No such endpoint, or no such code.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "MethodNotAllowed": {
        "description": "Wrong HTTP method; the Allow header lists the right one.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "PayloadTooLarge": {
        "description": "Request body over 64 KB.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "More than 120 requests a minute from one visitor.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait.",
            "schema": {
              "type": "integer"
            }
          }
        }
      },
      "InternalError": {
        "description": "Unexpected failure; the request was not stored or logged.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  }
}