{
  "openapi": "3.1.0",
  "info": {
    "title": "3bankoffers Knowledge Hub API",
    "version": "1.0.0",
    "description": "Read-only access to the 3bankoffers Knowledge Hub: sourced guides, partner provider facts with evidence status, and the same banking options assessment, document checklist and payment cost calculation used on the website. Nothing here submits an application or creates a lead; send users to the nextStep URL to continue. Only 3bankoffers partner providers are assessed (not the whole market), and 3bankoffers may be paid by partners. Do not send personal data.",
    "contact": {
      "name": "3bankoffers",
      "email": "info@3bankoffers.com",
      "url": "https://www.3bankoffers.com/knowledge-hub/developers"
    }
  },
  "servers": [
    {
      "url": "https://www.3bankoffers.com/knowledge-hub/api/v1"
    }
  ],
  "paths": {
    "/providers": {
      "get": {
        "operationId": "listProviders",
        "summary": "List published partner providers",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Providers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderList"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/providers/{id}": {
      "get": {
        "operationId": "getProvider",
        "summary": "Get one provider",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "lunar"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Provider",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Provider"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/knowledge/search": {
      "get": {
        "operationId": "searchKnowledge",
        "summary": "Search guides, glossary, providers and tools",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 25,
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Results",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResults"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/match": {
      "post": {
        "operationId": "assessBankingOptions",
        "summary": "Assess which partner providers may fit a company",
        "description": "Deterministic. A verified prohibition excludes a provider; missing or unverified information leads to manual_review, never to a match. The number of options can be zero.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssessmentInput"
              },
              "example": {
                "companyCountry": "DK",
                "legalForm": "limited-company",
                "ownerCountries": [
                  "DK"
                ],
                "activity": "software",
                "currencies": [
                  "DKK"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Assessment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssessmentResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request body too large (over 16 KB)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/checklist": {
      "post": {
        "operationId": "generateDocumentChecklist",
        "summary": "Onboarding document checklist for a company profile",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChecklistInput"
              },
              "example": {
                "companyCountry": "AE",
                "legalForm": "limited-company",
                "ownersAbroad": "yes",
                "corporateShareholders": "no",
                "newCompany": "yes",
                "activity": "trading"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Checklist",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request body too large (over 16 KB)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/payment-cost": {
      "post": {
        "operationId": "estimatePaymentCost",
        "summary": "Cost of one international payment from user-provided quotes",
        "description": "Uses only the numbers provided. Missing fees are reported as incomplete, never treated as zero.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentCostInput"
              },
              "example": {
                "amount": 10000,
                "sendCurrency": "EUR",
                "receiveCurrency": "USD",
                "midMarketRate": 1.1,
                "quotes": [
                  {
                    "label": "A",
                    "fixedFee": 10,
                    "percentFee": 0.5,
                    "fxMarginPercent": 1,
                    "receivingFee": 0
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Costs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request body too large (over 16 KB)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "Evidence": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "verified",
              "unverified",
              "stale",
              "conflicting"
            ]
          },
          "checkedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "note": {
            "type": "string"
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "publisher": {
                  "type": "string"
                },
                "url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "type": {
                  "type": "string",
                  "description": "\"owner-provided\" for information from 3bankoffers itself (counts as unverified)"
                }
              }
            }
          }
        }
      },
      "Rule": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "rule": {
            "type": "string",
            "enum": [
              "supported",
              "conditional",
              "restricted",
              "prohibited",
              "unknown"
            ]
          },
          "allowed": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "prohibited": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "detail": {
            "type": [
              "string",
              "null"
            ]
          },
          "evidence": {
            "$ref": "#/components/schemas/Evidence"
          }
        }
      },
      "Provider": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "bank",
              "emi"
            ]
          },
          "typeLabel": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "entities": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "country": {
                  "type": "string"
                },
                "registration": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "regulator": {
                  "type": "string"
                },
                "licence": {
                  "type": "string"
                },
                "evidence": {
                  "$ref": "#/components/schemas/Evidence"
                }
              }
            }
          },
          "fundsProtection": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "summary": {
                "type": "string"
              },
              "evidence": {
                "$ref": "#/components/schemas/Evidence"
              }
            }
          },
          "eligibility": {
            "type": "object",
            "properties": {
              "companyJurisdiction": {
                "$ref": "#/components/schemas/Rule"
              },
              "legalForms": {
                "$ref": "#/components/schemas/Rule"
              },
              "ownerResidence": {
                "$ref": "#/components/schemas/Rule"
              },
              "activities": {
                "$ref": "#/components/schemas/Rule"
              }
            }
          },
          "currencies": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "rule": {
                  "type": "string"
                },
                "detail": {
                  "type": "string"
                },
                "evidence": {
                  "$ref": "#/components/schemas/Evidence"
                }
              }
            }
          },
          "onboarding": {
            "type": [
              "object",
              "null"
            ]
          },
          "commercialRelationship": {
            "type": "string"
          },
          "nextStep": {
            "$ref": "#/components/schemas/NextStep"
          }
        }
      },
      "ProviderList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Provider"
            }
          },
          "page": {
            "type": "integer"
          },
          "pageSize": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          },
          "disclosure": {
            "type": "string"
          }
        }
      },
      "SearchResults": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string"
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "score": {
                  "type": "number"
                }
              }
            }
          }
        }
      },
      "NextStep": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "AssessmentInput": {
        "type": "object",
        "properties": {
          "companyCountry": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 code, or \"unknown\"",
            "examples": [
              "DK",
              "AE"
            ]
          },
          "legalForm": {
            "type": "string",
            "enum": [
              "limited-company",
              "sole-trader",
              "partnership",
              "association-foundation",
              "unknown"
            ]
          },
          "ownerCountries": {
            "type": "array",
            "minItems": 1,
            "maxItems": 10,
            "items": {
              "type": "string"
            },
            "description": "Where every owner and director lives (ISO codes), or [\"unknown\"]"
          },
          "activity": {
            "type": "string",
            "enum": [
              "consulting",
              "software",
              "ecommerce",
              "trading",
              "logistics",
              "marketing",
              "holding",
              "real-estate",
              "crypto",
              "gambling",
              "other",
              "unknown"
            ]
          },
          "currencies": {
            "type": "array",
            "maxItems": 10,
            "items": {
              "type": "string",
              "enum": [
                "EUR",
                "GBP",
                "USD",
                "DKK",
                "SEK",
                "NOK",
                "CHF",
                "AED",
                "SGD",
                "HKD",
                "CAD",
                "AUD",
                "NZD",
                "CNY",
                "CNH",
                "MXN",
                "BRL",
                "MYR",
                "PHP",
                "ZAR"
              ]
            }
          }
        }
      },
      "AssessmentResult": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "potentially_serviceable",
              "manual_review",
              "no_current_match"
            ]
          },
          "statusLabel": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "missingInformation": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "options": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "provider": {
                  "type": "object"
                },
                "outcome": {
                  "type": "string"
                },
                "score": {
                  "type": "number"
                },
                "criteria": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "criterion": {
                        "type": "string"
                      },
                      "outcome": {
                        "type": "string",
                        "enum": [
                          "supported",
                          "conditional",
                          "unknown",
                          "prohibited",
                          "missing_input"
                        ]
                      },
                      "evidence": {
                        "type": "string"
                      },
                      "reason": {
                        "type": "string"
                      },
                      "sources": {
                        "type": "array",
                        "items": {
                          "type": "object"
                        }
                      }
                    }
                  }
                },
                "remainingChecks": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "excluded": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "provider": {
                  "type": "object"
                },
                "reasons": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "assessedProviders": {
            "type": "integer"
          },
          "disclosure": {
            "type": "string"
          },
          "nextStep": {
            "$ref": "#/components/schemas/NextStep"
          },
          "disclaimer": {
            "type": "string"
          },
          "assessedOn": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "ChecklistInput": {
        "type": "object",
        "properties": {
          "companyCountry": {
            "type": "string"
          },
          "legalForm": {
            "type": "string",
            "enum": [
              "limited-company",
              "sole-trader",
              "partnership",
              "association-foundation",
              "unknown"
            ]
          },
          "ownersAbroad": {
            "type": "string",
            "enum": [
              "yes",
              "no",
              "unknown"
            ]
          },
          "corporateShareholders": {
            "type": "string",
            "enum": [
              "yes",
              "no",
              "unknown"
            ]
          },
          "newCompany": {
            "type": "string",
            "enum": [
              "yes",
              "no",
              "unknown"
            ]
          },
          "activity": {
            "type": "string",
            "enum": [
              "consulting",
              "software",
              "ecommerce",
              "trading",
              "logistics",
              "marketing",
              "holding",
              "real-estate",
              "crypto",
              "gambling",
              "other",
              "unknown"
            ]
          }
        }
      },
      "PaymentCostInput": {
        "type": "object",
        "required": [
          "amount",
          "sendCurrency",
          "receiveCurrency",
          "quotes"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "sendCurrency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "receiveCurrency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "midMarketRate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Units of receive currency per 1 send currency. Not needed when currencies are equal."
          },
          "rateTimestamp": {
            "type": [
              "string",
              "null"
            ]
          },
          "quotes": {
            "type": "array",
            "minItems": 1,
            "maxItems": 5,
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string"
                },
                "fixedFee": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "percentFee": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "fxMarginPercent": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "receivingFee": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              }
            }
          }
        }
      }
    }
  }
}