{"openapi":"3.1.0","info":{"title":"Ipotekata API (\u0418\u043f\u043e\u0442\u0435\u043a\u0430\u0442\u0430)","version":"1.2.0","summary":"Bulgarian mortgage rates by bank, annuity payment calculation and broker consultation requests.","description":"Public API of ipotekata.com, an independent mortgage broker for Bulgaria working with 15 partner banks. Read endpoints need no authentication. Rates are indicative; the bank's ESIS is the binding offer.\n\nRate limit: 60 requests per minute per IP across all endpoints, reported in RateLimit and RateLimit-Policy headers (draft-ietf-httpapi-ratelimit-headers); a 429 carries Retry-After. Errors are JSON: {code, message, data: {status, hint, docs}} (schema Error), on every 4xx and 5xx.\n\nVersioning: the major version is in the path (\/ipotekata\/v1). Breaking changes ship only under a new major version. A deprecated operation or version is announced at least 6 months ahead with the Deprecation (RFC 9745) and Sunset (RFC 8594) response headers and on https:\/\/ipotekata.com\/developers\/#versioning; every response links that policy with Link: rel=\"deprecation\".","contact":{"name":"\u0418\u043f\u043e\u0442\u0435\u043a\u0430\u0442\u0430","email":"info@ipotekata.com","url":"https:\/\/ipotekata.com\/developers\/"}},"externalDocs":{"description":"Developer documentation","url":"https:\/\/ipotekata.com\/developers\/"},"servers":[{"url":"https:\/\/ipotekata.com\/wp-json\/ipotekata\/v1","description":"Production"}],"security":[],"tags":[{"name":"banks","description":"Mortgage conditions per partner bank."},{"name":"calculators","description":"Deterministic mortgage maths."},{"name":"leads","description":"Consultation requests handled by a human broker."}],"paths":{"\/banks":{"get":{"operationId":"listBanks","tags":["banks"],"summary":"List partner banks with current mortgage conditions","description":"Returns every partner bank with its lowest advertised variable rate, 5-year fixed rate, APR (\u0413\u041f\u0420), minimum down payment, maximum amount and early-repayment fee. Null means the bank does not publish that value. Use this to compare Bulgarian mortgage offers.","parameters":[{"name":"sort","in":"query","required":false,"description":"Sort order: rate_variable (lowest variable rate first, default) or name.","schema":{"type":"string","enum":["rate_variable","name"],"default":"rate_variable"}},{"name":"limit","in":"query","required":false,"description":"Return at most this many banks (1 to 50).","schema":{"type":"integer","minimum":1,"maximum":50,"default":50}}],"responses":{"200":{"description":"Banks, sorted by variable rate ascending (nulls last) unless sort=name.","headers":{"RateLimit":{"$ref":"#\/components\/headers\/RateLimit"},"RateLimit-Policy":{"$ref":"#\/components\/headers\/RateLimitPolicy"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/BankList"}}}},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"400":{"$ref":"#\/components\/responses\/Error"},"500":{"$ref":"#\/components\/responses\/Error"},"default":{"$ref":"#\/components\/responses\/Error"}}}},"\/banks\/{slug}":{"get":{"operationId":"getBank","tags":["banks"],"summary":"Get one bank by slug","description":"Returns mortgage conditions for a single partner bank. Slugs come from listBanks, for example \"fibank\" or \"banka-dsk\".","parameters":[{"name":"slug","in":"path","required":true,"description":"Bank slug as returned by listBanks.","schema":{"type":"string","pattern":"^[a-z0-9-]+$"}}],"responses":{"200":{"description":"The bank.","headers":{"RateLimit":{"$ref":"#\/components\/headers\/RateLimit"},"RateLimit-Policy":{"$ref":"#\/components\/headers\/RateLimitPolicy"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Bank"}}}},"404":{"$ref":"#\/components\/responses\/Error"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"400":{"$ref":"#\/components\/responses\/Error"},"500":{"$ref":"#\/components\/responses\/Error"},"default":{"$ref":"#\/components\/responses\/Error"}}}},"\/payment":{"get":{"operationId":"calculateMonthlyPayment","tags":["calculators"],"summary":"Calculate the monthly annuity payment","description":"Computes the equal monthly instalment, total paid and total interest for a loan amount, nominal annual rate and term in years. Excludes fees and insurance.","parameters":[{"name":"principal","in":"query","required":true,"description":"Loan amount in EUR (1000 to 5000000).","schema":{"type":"number","minimum":1000,"maximum":5000000}},{"name":"annual_rate","in":"query","required":true,"description":"Nominal annual interest rate in percent, e.g. 2.6 (0 to 20).","schema":{"type":"number","minimum":0,"maximum":20}},{"name":"years","in":"query","required":true,"description":"Term in whole years (1 to 40).","schema":{"type":"integer","minimum":1,"maximum":40}}],"responses":{"200":{"description":"Payment breakdown.","headers":{"RateLimit":{"$ref":"#\/components\/headers\/RateLimit"},"RateLimit-Policy":{"$ref":"#\/components\/headers\/RateLimitPolicy"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PaymentResult"}}}},"400":{"$ref":"#\/components\/responses\/Error"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/Error"},"default":{"$ref":"#\/components\/responses\/Error"}}}},"\/lead":{"post":{"operationId":"submitConsultationRequest","tags":["leads"],"summary":"Request a free broker consultation","description":"Creates a consultation request that a human broker answers within one business day. Only call this after the user has explicitly asked to be contacted and agreed to the processing of their personal data; consent_marketing must reflect that agreement. Limited to 5 requests per IP per hour.","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/LeadRequest"}}}},"responses":{"201":{"description":"Request stored.","headers":{"RateLimit":{"$ref":"#\/components\/headers\/RateLimit"},"RateLimit-Policy":{"$ref":"#\/components\/headers\/RateLimitPolicy"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/LeadResponse"}}}},"400":{"$ref":"#\/components\/responses\/Error"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/Error"},"default":{"$ref":"#\/components\/responses\/Error"}}}}},"components":{"schemas":{"Bank":{"type":"object","required":["slug","name","url"],"properties":{"slug":{"type":"string","description":"Stable identifier."},"name":{"type":"string","description":"Bank name."},"short_name":{"type":"string"},"url":{"type":"string","format":"uri","description":"Editorial profile page (HTML)."},"markdown_url":{"type":"string","format":"uri","description":"Same profile as Markdown."},"rate_variable_pct":{"type":["number","null"],"description":"Lowest advertised variable rate, percent per year."},"rate_fixed_5y_pct":{"type":["number","null"],"description":"Fixed rate for the first 5 years, percent."},"apr_pct":{"type":["number","null"],"description":"Annual percentage rate (\u0413\u041f\u0420), percent."},"min_downpayment_pct":{"type":["number","null"],"description":"Minimum own contribution, percent of property value."},"max_amount_eur":{"type":["number","null"],"description":"Maximum loan amount in EUR."},"early_repayment_fee_pct":{"type":["number","null"],"description":"Early-repayment fee, percent of the repaid amount."},"specialty":{"type":"string","description":"What the bank is best known for (Bulgarian)."},"last_rate_update":{"type":["string","null"],"format":"date","description":"Date the rates were last checked."}}},"BankList":{"type":"object","required":["count","banks"],"properties":{"count":{"type":"integer"},"currency":{"type":"string","const":"EUR"},"source":{"type":"string","format":"uri"},"disclaimer":{"type":"string"},"banks":{"type":"array","items":{"$ref":"#\/components\/schemas\/Bank"}}}},"PaymentResult":{"type":"object","required":["monthly_payment","total_paid","total_interest"],"properties":{"principal":{"type":"number"},"annual_rate":{"type":"number"},"years":{"type":"integer"},"months":{"type":"integer"},"monthly_payment":{"type":"number","description":"Equal monthly instalment, EUR."},"total_paid":{"type":"number"},"total_interest":{"type":"number"},"currency":{"type":"string","const":"EUR"},"method":{"type":"string","const":"annuity"}}},"LeadRequest":{"type":"object","required":["contact_name","contact_email","consent_marketing"],"properties":{"contact_name":{"type":"string","maxLength":120},"contact_email":{"type":"string","format":"email"},"contact_phone":{"type":"string"},"consent_marketing":{"type":"boolean","description":"Must be true, and only when the user explicitly agreed."},"quiz_answers":{"type":"object","additionalProperties":true,"description":"Free-form answers (amount, property city, income type)."},"source_page":{"type":"string","format":"uri"},"utm_source":{"type":"string"},"utm_medium":{"type":"string"},"utm_campaign":{"type":"string"}}},"LeadResponse":{"type":"object","required":["ok","lead_id","message"],"properties":{"ok":{"type":"boolean"},"lead_id":{"type":"integer"},"message":{"type":"string"}}},"Error":{"type":"object","required":["code","message","data"],"properties":{"code":{"type":"string","description":"Machine-readable error code, e.g. rest_invalid_param, bank_not_found, rate_limited."},"message":{"type":"string"},"data":{"type":"object","required":["status","hint"],"properties":{"status":{"type":"integer"},"hint":{"type":"string","description":"How to resolve the error."},"docs":{"type":"string","format":"uri"},"params":{"type":"object","description":"Per-parameter validation messages."}}}}}},"headers":{"RateLimit":{"description":"Remaining quota and seconds to reset, e.g. \"default\";r=59;t=42","schema":{"type":"string"}},"RateLimitPolicy":{"description":"Quota policy, e.g. \"default\";q=60;w=60","schema":{"type":"string"}},"RetryAfter":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"responses":{"Error":{"description":"Structured error: machine-readable code, human-readable message, HTTP status and a resolution hint.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"TooManyRequests":{"description":"Rate limit exceeded.","headers":{"Retry-After":{"$ref":"#\/components\/headers\/RetryAfter"},"RateLimit":{"$ref":"#\/components\/headers\/RateLimit"},"RateLimit-Policy":{"$ref":"#\/components\/headers\/RateLimitPolicy"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}}