{
  "openapi": "3.1.0",
  "info": {
    "title": "Payment File API",
    "version": "1.0.0",
    "license": {
      "name": "Proprietary",
      "url": "https://www.exceltopain001.com/terms"
    },
    "summary": "Generate and validate SEPA pain.001 and NACHA payment files over HTTP.",
    "description": "Server-side conversion of payment instructions into bank-ready files.\n\n* `POST /api/v1/sepa/generate` - JSON or spreadsheet upload to pain.001 XML (or NACHA when `bankType` is a NACHA type).\n* `POST /api/v1/nacha/generate` - JSON or spreadsheet upload to a NACHA/ACH file.\n* `POST /api/v1/convert` - spreadsheet upload plus a saved `profile_id` to XML or NACHA.\n* `POST /api/v1/validate` - check a pain.001 XML file against ISO 20022 and, optionally, one bank's rules.\n\n**Data handling:** payment data is processed in memory only. Requests and responses are not stored or logged. An `Idempotency-Key` header is accepted and ignored.\n\n**Sandbox:** the public key `TEST_KEY_123` runs the real validation and generation code with fixed demo company settings (profile `prof_sandbox`). It needs no account and is not rate limited. Sandbox JSON responses carry `\"sandbox\": true`; the NACHA text response carries the header `X-Sandbox: true`. Never submit a sandbox file to a bank."
  },
  "servers": [
    {
      "url": "https://www.exceltopain001.com",
      "description": "Production"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "Generate",
      "description": "Create payment files."
    },
    {
      "name": "Validate",
      "description": "Check existing files."
    }
  ],
  "paths": {
    "/api/v1/sepa/generate": {
      "post": {
        "tags": [
          "Generate"
        ],
        "operationId": "generateSepa",
        "summary": "Generate pain.001 XML (or NACHA) from transactions",
        "description": "Accepts a JSON body or a multipart upload (xlsx/xls/csv). Column names are auto-detected; send `columnMapping` (target field -> your column name) when they are not standard. If `bankType` is `NACHA_PPD` or `NACHA_CCD` a NACHA file is returned instead of XML. Rows that fail validation produce a `422` with a structured error list and no file.",
        "parameters": [
          {
            "name": "bank",
            "in": "query",
            "required": false,
            "description": "Overrides `bankType` for multipart uploads.",
            "schema": {
              "$ref": "#/components/schemas/BankType"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SepaGenerateRequest"
              },
              "example": {
                "bankType": "GENERIC",
                "companyName": "Acme GmbH",
                "transactions": [
                  {
                    "debtorIban": "DE89370400440532013000",
                    "creditorName": "Max Mustermann",
                    "creditorIban": "DE02120300000000202051",
                    "amount": 100.5,
                    "currency": "EUR",
                    "remittanceInfo": "Invoice 1"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SepaGenerateMultipart"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "File generated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerateSuccess"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/api/v1/nacha/generate": {
      "post": {
        "tags": [
          "Generate"
        ],
        "operationId": "generateNacha",
        "summary": "Generate a NACHA/ACH file",
        "description": "NACHA-only sibling of `/api/v1/sepa/generate`. The response body is the raw fixed-width NACHA file (`text/plain`), not JSON. Non-blocking warnings (for example receiver names shortened to 22 characters) are returned in the `X-Warnings` header as percent-encoded JSON, with the count in `X-Warnings-Count`. Company-level ODFI/routing constants come from the key owner's Company Settings; the sandbox key uses fixed demo values.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NachaGenerateRequest"
              },
              "example": {
                "bankType": "NACHA_PPD",
                "companyName": "Acme",
                "columnMapping": {
                  "receivingRoutingNumber": "rt",
                  "receivingAccountNumber": "acct",
                  "amount": "amt",
                  "creditorName": "name"
                },
                "transactions": [
                  {
                    "rt": "021000021",
                    "acct": "1234567890",
                    "amt": "1500.00",
                    "name": "JOHN DOE"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/NachaGenerateMultipart"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "NACHA file generated.",
            "headers": {
              "X-Warnings": {
                "description": "Percent-encoded JSON array of warning objects (omitted when none or too large).",
                "schema": {
                  "type": "string"
                }
              },
              "X-Warnings-Count": {
                "schema": {
                  "type": "integer"
                }
              },
              "X-Sandbox": {
                "description": "`true` when produced with the sandbox key.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "true"
                  ]
                }
              }
            },
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Fixed-width NACHA file, 94-character records."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/api/v1/convert": {
      "post": {
        "tags": [
          "Generate"
        ],
        "operationId": "convertWithProfile",
        "summary": "Convert a spreadsheet using a saved mapping profile",
        "description": "Upload a file (max 5 MB) and a `profile_id`; bank type, column mapping and company details come from the saved profile. Returns XML, or NACHA when the profile's bank type is a NACHA type. Sandbox callers must use `profile_id=prof_sandbox` (bank `GENERIC`, header auto-detection).",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ConvertRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "File generated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerateSuccess"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/api/v1/validate": {
      "post": {
        "tags": [
          "Validate"
        ],
        "operationId": "validateXml",
        "summary": "Validate a pain.001 XML file",
        "description": "Checks the file against the ISO 20022 schema (pain.001.001.03 and pain.001.001.09 are accepted).\n\n* **With `bank`:** the generic check plus that bank's rules only. `valid` is false when either fails and `details` lists every problem.\n* **Without `bank`:** `valid` is decided by the generic check alone. Every bank is listed in `compatibility` as `{bank, compatible, reason}`; this list never changes `valid`.\n\nBanks with `ruleCoverage: schema_only` have no bank-specific rules yet; a positive result for them means only schema and namespace were checked.\n\nFiles that are not XML are rejected with `422`. An unknown `bank` returns `400` with the list of supported banks.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "pain.001 XML file, max 5 MB."
                  },
                  "bank": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/BankCode"
                      }
                    ],
                    "description": "Optional target bank. Case-insensitive; `deutsche-bank` style slugs and the aliases DB, SCB and CITI are accepted."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Validation result. A file with problems is still a `200`; inspect `valid` and `details`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidateResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, missing file, or unknown `bank` (`code: unknown_bank`, with `supportedBanks`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "name": "bank",
            "in": "query",
            "required": false,
            "description": "Same as the multipart `bank` field. See `BankCode`.",
            "schema": {
              "$ref": "#/components/schemas/BankCode"
            }
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Your API key. Use `TEST_KEY_123` for the public sandbox."
      }
    },
    "schemas": {
      "BankType": {
        "type": "string",
        "description": "Target bank profile. Controls field rules, character limits and output format.",
        "enum": [
          "GENERIC",
          "DEUTSCHE_BANK",
          "DB",
          "ING",
          "BNP_PARIBAS",
          "CITI",
          "HSBC",
          "SPARKASSE",
          "BBVA",
          "SANTANDER",
          "SOCIETE_GENERALE",
          "INTESA_SANPAOLO",
          "UNICREDIT",
          "ERSTE_BANK",
          "RAIFFEISEN",
          "SCB",
          "NACHA_PPD",
          "NACHA_CCD"
        ]
      },
      "Transaction": {
        "type": "object",
        "description": "One payment. Extra keys are allowed when you pass a `columnMapping` or rely on header auto-detection.",
        "properties": {
          "debtorIban": {
            "type": "string",
            "examples": [
              "DE89370400440532013000"
            ]
          },
          "debtorBic": {
            "type": "string"
          },
          "creditorName": {
            "type": "string"
          },
          "creditorIban": {
            "type": "string",
            "examples": [
              "DE02120300000000202051"
            ]
          },
          "creditorBic": {
            "type": "string"
          },
          "creditorStreet": {
            "type": "string"
          },
          "creditorCity": {
            "type": "string"
          },
          "creditorPostalCode": {
            "type": "string"
          },
          "creditorCountry": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 code or a country name."
          },
          "amount": {
            "type": [
              "number",
              "string"
            ]
          },
          "currency": {
            "type": "string",
            "examples": [
              "EUR"
            ]
          },
          "remittanceInfo": {
            "type": "string"
          },
          "endToEndId": {
            "type": "string"
          },
          "dueDate": {
            "type": "string",
            "description": "Requested execution date, YYYY-MM-DD."
          }
        },
        "additionalProperties": true
      },
      "NachaTransaction": {
        "type": "object",
        "properties": {
          "receivingRoutingNumber": {
            "type": "string",
            "description": "9-digit ABA routing number."
          },
          "receivingAccountNumber": {
            "type": "string"
          },
          "amount": {
            "type": [
              "number",
              "string"
            ]
          },
          "creditorName": {
            "type": "string"
          },
          "individualId": {
            "type": "string"
          },
          "remittanceInfo": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "ColumnMapping": {
        "type": "object",
        "description": "Target field name -> source column/key name in your data.",
        "additionalProperties": {
          "type": "string"
        }
      },
      "NachaOptions": {
        "type": "object",
        "properties": {
          "nachaCompanyEntryDescription": {
            "type": "string",
            "description": "Defaults to PAYROLL (PPD) or VENDOR PMT (CCD)."
          },
          "nachaEffectiveEntryDate": {
            "type": "string",
            "description": "YYYY-MM-DD. Defaults to tomorrow."
          },
          "nachaTransactionType": {
            "type": "string",
            "enum": [
              "credit",
              "debit"
            ],
            "default": "credit"
          },
          "nachaAccountType": {
            "type": "string",
            "enum": [
              "checking",
              "savings"
            ],
            "default": "checking"
          }
        }
      },
      "SepaGenerateRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NachaOptions"
          },
          {
            "type": "object",
            "required": [
              "transactions"
            ],
            "properties": {
              "bankType": {
                "$ref": "#/components/schemas/BankType"
              },
              "companyName": {
                "type": "string",
                "description": "Initiating party / debtor name."
              },
              "companyId": {
                "type": "string"
              },
              "profile_id": {
                "type": "string",
                "description": "Saved profile (prof_...) supplying defaults. Sandbox: prof_sandbox."
              },
              "isSalary": {
                "type": "boolean",
                "default": false
              },
              "citiRegion": {
                "type": "string",
                "description": "Citibank only."
              },
              "columnMapping": {
                "$ref": "#/components/schemas/ColumnMapping"
              },
              "transactions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            }
          }
        ]
      },
      "SepaGenerateMultipart": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NachaOptions"
          },
          {
            "type": "object",
            "required": [
              "file"
            ],
            "properties": {
              "file": {
                "type": "string",
                "format": "binary",
                "description": "xlsx, xls or csv."
              },
              "bankType": {
                "$ref": "#/components/schemas/BankType"
              },
              "profile_id": {
                "type": "string"
              },
              "companyName": {
                "type": "string"
              },
              "companyId": {
                "type": "string"
              },
              "isSalary": {
                "type": "string",
                "enum": [
                  "true",
                  "false"
                ]
              },
              "citiRegion": {
                "type": "string"
              },
              "columnMapping": {
                "type": "string",
                "description": "JSON-encoded ColumnMapping object."
              }
            }
          }
        ]
      },
      "NachaGenerateRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NachaOptions"
          },
          {
            "type": "object",
            "required": [
              "transactions"
            ],
            "properties": {
              "bankType": {
                "type": "string",
                "enum": [
                  "NACHA_PPD",
                  "NACHA_CCD"
                ],
                "default": "NACHA_PPD"
              },
              "companyName": {
                "type": "string",
                "description": "Truncated to 16 characters."
              },
              "columnMapping": {
                "$ref": "#/components/schemas/ColumnMapping"
              },
              "transactions": {
                "type": "array",
                "minItems": 1,
                "items": {
                  "$ref": "#/components/schemas/NachaTransaction"
                }
              }
            }
          }
        ]
      },
      "NachaGenerateMultipart": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NachaOptions"
          },
          {
            "type": "object",
            "required": [
              "file"
            ],
            "properties": {
              "file": {
                "type": "string",
                "format": "binary"
              },
              "bankType": {
                "type": "string",
                "enum": [
                  "NACHA_PPD",
                  "NACHA_CCD"
                ]
              },
              "companyName": {
                "type": "string"
              },
              "columnMapping": {
                "type": "string",
                "description": "JSON-encoded ColumnMapping object."
              }
            }
          }
        ]
      },
      "ConvertRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NachaOptions"
          },
          {
            "type": "object",
            "required": [
              "file",
              "profile_id"
            ],
            "properties": {
              "file": {
                "type": "string",
                "format": "binary",
                "description": "xlsx, xls or csv, max 5 MB."
              },
              "profile_id": {
                "type": "string",
                "description": "Saved mapping profile, e.g. prof_8k2m9... Sandbox: prof_sandbox."
              },
              "bankType": {
                "$ref": "#/components/schemas/BankType"
              }
            }
          }
        ]
      },
      "Warning": {
        "type": "object",
        "description": "Non-blocking notice, for example a value transliterated to the SEPA character set. Fields beyond `type` and `message` vary by type.",
        "required": [
          "type",
          "message"
        ],
        "properties": {
          "type": {
            "type": "string",
            "examples": [
              "charset_transliterated",
              "country_normalized",
              "bank_profile_hint",
              "past_execution_date",
              "nacha_receiver_name_shortened"
            ]
          },
          "message": {
            "type": "string"
          },
          "row": {
            "type": [
              "integer",
              "null"
            ]
          },
          "field": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "GenerateSuccess": {
        "type": "object",
        "required": [
          "status",
          "data",
          "format"
        ],
        "properties": {
          "status": {
            "type": "string",
            "const": "success"
          },
          "format": {
            "type": "string",
            "enum": [
              "XML",
              "NACHA"
            ]
          },
          "data": {
            "type": "string",
            "description": "The generated file content."
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Warning"
            }
          },
          "sandbox": {
            "type": "boolean",
            "const": true,
            "description": "Present only for the sandbox key."
          }
        }
      },
      "ErrorDetail": {
        "type": "object",
        "required": [
          "row",
          "field",
          "code",
          "message"
        ],
        "properties": {
          "row": {
            "type": [
              "integer",
              "null"
            ],
            "description": "1-based source row."
          },
          "field": {
            "type": [
              "string",
              "null"
            ],
            "description": "Target field name, e.g. creditorIban."
          },
          "code": {
            "type": "string",
            "description": "Stable machine-readable code.",
            "examples": [
              "iban_checksum_invalid",
              "iban_format_invalid",
              "required",
              "invalid_date",
              "invalid_country",
              "not_xml",
              "namespace_mismatch",
              "schema_error",
              "missing_mandatory_field"
            ]
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ValidationError": {
        "type": "object",
        "required": [
          "status",
          "code",
          "errors",
          "details"
        ],
        "properties": {
          "status": {
            "type": "string",
            "const": "error"
          },
          "code": {
            "type": "string",
            "const": "validation_failed"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Human-readable lines, e.g. \"Row 2: creditorIban: Invalid IBAN format\"."
          },
          "details": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ErrorDetail"
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "error"
          },
          "code": {
            "type": "string",
            "examples": [
              "invalid_body",
              "unknown_bank",
              "internal_error"
            ]
          },
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "missingFields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "detectedColumns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "supportedBanks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BankCode"
            }
          }
        },
        "additionalProperties": true
      },
      "ValidateResult": {
        "type": "object",
        "required": [
          "valid",
          "bank",
          "generic",
          "details",
          "warnings"
        ],
        "properties": {
          "valid": {
            "type": "boolean",
            "description": "With `bank`: generic check and that bank both pass. Without `bank`: the generic check passes."
          },
          "bank": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BankCode"
              },
              {
                "type": "null"
              }
            ],
            "description": "The bank that was checked, or null."
          },
          "generic": {
            "type": "object",
            "properties": {
              "valid": {
                "type": "boolean"
              },
              "nsVersion": {
                "type": "string",
                "examples": [
                  "pain.001.001.03"
                ]
              },
              "schemaValidated": {
                "type": "boolean"
              }
            }
          },
          "details": {
            "type": "array",
            "description": "Blocking problems, same shape as the 422 `details`.",
            "items": {
              "$ref": "#/components/schemas/ErrorDetail"
            }
          },
          "warnings": {
            "type": "array",
            "description": "Non-blocking findings, same shape.",
            "items": {
              "$ref": "#/components/schemas/ErrorDetail"
            }
          },
          "compatibility": {
            "type": "array",
            "description": "Only without `bank`. One row per bank (generic profiles excluded). Never affects `valid`. `compatible: true` with `ruleCoverage: schema_only` means only schema and namespace were checked.",
            "items": {
              "type": "object",
              "required": [
                "bank",
                "compatible",
                "reason",
                "ruleCoverage"
              ],
              "properties": {
                "bank": {
                  "$ref": "#/components/schemas/BankCode"
                },
                "compatible": {
                  "type": "boolean"
                },
                "reason": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Why the file is not compatible; null when it is."
                },
                "ruleCoverage": {
                  "$ref": "#/components/schemas/RuleCoverage"
                }
              }
            }
          },
          "note": {
            "type": "string",
            "description": "Present when `ruleCoverage` is `schema_only`: \"Only schema and namespace checked; no bank-specific rules yet.\""
          },
          "sandbox": {
            "type": "boolean",
            "const": true
          },
          "ruleCoverage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RuleCoverage"
              }
            ],
            "description": "Only with `bank`: how much of that bank's rules apply."
          }
        }
      },
      "BankCode": {
        "type": "string",
        "description": "Bank rule set used by `/validate`. Banks with bank-specific rules (`bank_rules`): ABN_AMRO, BNP_PARIBAS, CITIBANK, COMMERZBANK, DEUTSCHE_BANK, ERSTE_BANK, ING, NORDEA, POSTBANK, SANTANDER, SEB, SI_ZBS, SPARKASSE, STANDARD_CHARTERED. Banks with schema and namespace checks only (`schema_only`): BBVA, DZ_BANK, GENERIC, GENERIC_SWIFT, HSBC, INTESA_SANPAOLO, RABOBANK, RAIFFEISEN, SOCIETE_GENERALE, UNICREDIT.",
        "enum": [
          "ABN_AMRO",
          "BBVA",
          "BNP_PARIBAS",
          "CITIBANK",
          "COMMERZBANK",
          "DEUTSCHE_BANK",
          "DZ_BANK",
          "ERSTE_BANK",
          "GENERIC",
          "GENERIC_SWIFT",
          "HSBC",
          "ING",
          "INTESA_SANPAOLO",
          "NORDEA",
          "POSTBANK",
          "RABOBANK",
          "RAIFFEISEN",
          "SANTANDER",
          "SEB",
          "SI_ZBS",
          "SOCIETE_GENERALE",
          "SPARKASSE",
          "STANDARD_CHARTERED",
          "UNICREDIT"
        ],
        "x-rule-coverage": {
          "bank_rules": [
            "ABN_AMRO",
            "BNP_PARIBAS",
            "CITIBANK",
            "COMMERZBANK",
            "DEUTSCHE_BANK",
            "ERSTE_BANK",
            "ING",
            "NORDEA",
            "POSTBANK",
            "SANTANDER",
            "SEB",
            "SI_ZBS",
            "SPARKASSE",
            "STANDARD_CHARTERED"
          ],
          "schema_only": [
            "BBVA",
            "DZ_BANK",
            "GENERIC",
            "GENERIC_SWIFT",
            "HSBC",
            "INTESA_SANPAOLO",
            "RABOBANK",
            "RAIFFEISEN",
            "SOCIETE_GENERALE",
            "UNICREDIT"
          ]
        }
      },
      "RuleCoverage": {
        "type": "string",
        "enum": [
          "bank_rules",
          "schema_only"
        ],
        "description": "`bank_rules`: the bank has bank-specific rules. `schema_only`: only schema and namespace are checked; no bank-specific rules yet."
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Malformed request: invalid JSON, missing file, missing mandatory column (see `missingFields` and `detectedColumns`), empty input, or a `bankType` the endpoint does not support.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Missing, invalid or revoked `x-api-key`.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string"
                }
              }
            },
            "example": {
              "error": "Unauthorized: Missing API Key"
            }
          }
        }
      },
      "Forbidden": {
        "description": "The key has no user account with the settings this request needs (for example NACHA Company Settings).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "`profile_id` unknown or not owned by the key.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "TooLarge": {
        "description": "Uploaded file exceeds 5 MB.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "ValidationFailed": {
        "description": "The data was understood but failed validation (for example an invalid IBAN), or the uploaded file is not XML. No file is produced.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "example": {
              "status": "error",
              "code": "validation_failed",
              "errors": [
                "Row 1: creditorIban: Invalid IBAN checksum (please check for typos)"
              ],
              "details": [
                {
                  "row": 1,
                  "field": "creditorIban",
                  "code": "iban_checksum_invalid",
                  "message": "Invalid IBAN checksum (please check for typos)"
                }
              ]
            }
          }
        }
      },
      "RateLimited": {
        "description": "Daily request limit for this key reached.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string"
                }
              }
            },
            "example": {
              "error": "Rate limit exceeded: max 500 requests/day"
            }
          }
        }
      },
      "InternalError": {
        "description": "Unexpected server error. The response never echoes request data.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "status": "error",
              "code": "internal_error",
              "message": "Internal Server Error"
            }
          }
        }
      }
    }
  }
}
