{"openapi":"3.1.0","info":{"title":"MonLeoLookup","description":"REST API và web quản lý task dò số tài khoản của MonLeoLookup. Các endpoint lookup công khai yêu cầu API key.","version":"1.0.0"},"servers":[{"url":"https://monleolookup.xyz","description":"Configured public endpoint"}],"paths":{"/health/live":{"get":{"tags":["Health"],"summary":"Live","operationId":"live_health_live_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/ready":{"get":{"tags":["Health"],"summary":"Ready","operationId":"ready_health_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/banks":{"get":{"tags":["Banks"],"summary":"List Banks","operationId":"list_banks_api_v1_banks_get","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"institution_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(bank|wallet)$"},{"type":"null"}],"title":"Institution Type"}},{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Active Only"}},{"name":"supported_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Supported Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankListEnvelope"}}},"headers":{"X-RateLimit-Limit":{"description":"Giới hạn units trong cửa sổ một phút.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Số units còn lại trong cửa sổ một phút.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp khi cửa sổ một phút được đặt lại.","schema":{"type":"integer"}},"X-Quota-Limit":{"description":"Quota units trọn đời; vắng mặt nếu không giới hạn.","schema":{"type":"integer"}},"X-Quota-Remaining":{"description":"Quota units trọn đời còn lại.","schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Forbidden"},"429":{"headers":{"X-RateLimit-Limit":{"description":"Giới hạn units trong cửa sổ một phút.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Số units còn lại trong cửa sổ một phút.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp khi cửa sổ một phút được đặt lại.","schema":{"type":"integer"}},"X-Quota-Limit":{"description":"Quota units trọn đời; vắng mặt nếu không giới hạn.","schema":{"type":"integer"}},"X-Quota-Remaining":{"description":"Quota units trọn đời còn lại.","schema":{"type":"integer"}},"Retry-After":{"description":"Số giây tối thiểu trước khi thử lại.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lookups":{"post":{"tags":["Account lookup"],"summary":"Lookup Account","operationId":"lookup_account_api_v1_lookups_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LookupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","headers":{"X-RateLimit-Limit":{"description":"Giới hạn units trong cửa sổ một phút.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Số units còn lại trong cửa sổ một phút.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp khi cửa sổ một phút được đặt lại.","schema":{"type":"integer"}},"X-Quota-Limit":{"description":"Quota units trọn đời; vắng mặt nếu không giới hạn.","schema":{"type":"integer"}},"X-Quota-Remaining":{"description":"Quota units trọn đời còn lại.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LookupEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Giới hạn units trong cửa sổ một phút.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Số units còn lại trong cửa sổ một phút.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp khi cửa sổ một phút được đặt lại.","schema":{"type":"integer"}},"X-Quota-Limit":{"description":"Quota units trọn đời; vắng mặt nếu không giới hạn.","schema":{"type":"integer"}},"X-Quota-Remaining":{"description":"Quota units trọn đời còn lại.","schema":{"type":"integer"}},"Retry-After":{"description":"Số giây tối thiểu trước khi thử lại.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"Bad Gateway","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v1/lookups/usage":{"get":{"tags":["Account lookup"],"summary":"Usage","operationId":"usage_api_v1_lookups_usage_get","responses":{"200":{"description":"Successful Response","headers":{"X-RateLimit-Limit":{"description":"Giới hạn units trong cửa sổ một phút.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Số units còn lại trong cửa sổ một phút.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp khi cửa sổ một phút được đặt lại.","schema":{"type":"integer"}},"X-Quota-Limit":{"description":"Quota units trọn đời; vắng mặt nếu không giới hạn.","schema":{"type":"integer"}},"X-Quota-Remaining":{"description":"Quota units trọn đời còn lại.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageSummaryEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Giới hạn units trong cửa sổ một phút.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Số units còn lại trong cửa sổ một phút.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp khi cửa sổ một phút được đặt lại.","schema":{"type":"integer"}},"X-Quota-Limit":{"description":"Quota units trọn đời; vắng mặt nếu không giới hạn.","schema":{"type":"integer"}},"X-Quota-Remaining":{"description":"Quota units trọn đời còn lại.","schema":{"type":"integer"}},"Retry-After":{"description":"Số giây tối thiểu trước khi thử lại.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"ApiKeyAuth":[]}]}}},"components":{"schemas":{"BankListEnvelope":{"properties":{"data":{"items":{"$ref":"#/components/schemas/BankPublic"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/ResponseMeta"}},"type":"object","required":["data","meta"],"title":"BankListEnvelope"},"BankPublic":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"short_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Name"},"bank_code":{"type":"string","title":"Bank Code"},"sml_code":{"type":"string","title":"Sml Code"},"swift_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Swift Code"},"institution_type":{"type":"string","title":"Institution Type"},"lookup_supported":{"type":"boolean","title":"Lookup Supported"},"active":{"type":"boolean","title":"Active"},"synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Synced At"}},"type":"object","required":["id","name","bank_code","sml_code","institution_type","lookup_supported","active"],"title":"BankPublic"},"ErrorBody":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"details":{"anyOf":[{},{"type":"null"}],"title":"Details"}},"type":"object","required":["code","message"],"title":"ErrorBody"},"ErrorEnvelope":{"properties":{"error":{"$ref":"#/components/schemas/ErrorBody"},"meta":{"additionalProperties":true,"type":"object","title":"Meta"}},"type":"object","required":["error","meta"],"title":"ErrorEnvelope"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LookupEnvelope":{"properties":{"data":{"$ref":"#/components/schemas/LookupResponseData"},"meta":{"$ref":"#/components/schemas/ResponseMeta"}},"type":"object","required":["data","meta"],"title":"LookupEnvelope"},"LookupItem":{"properties":{"account_number":{"type":"string","title":"Account Number"},"queried_account_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Queried Account Number"},"bank_code":{"type":"string","title":"Bank Code"},"bank_name":{"type":"string","title":"Bank Name"},"status":{"type":"string","title":"Status"},"beneficiary_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Beneficiary Name"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["account_number","bank_code","bank_name","status"],"title":"LookupItem"},"LookupRequest":{"properties":{"account_number":{"type":"string","maxLength":32,"minLength":4,"title":"Account Number"},"bank_code":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Bank Code"},"bank_codes":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Bank Codes"}},"type":"object","required":["account_number"],"title":"LookupRequest"},"LookupResponseData":{"properties":{"status":{"type":"string","enum":["success","not_found","partial"],"title":"Status"},"account_number":{"type":"string","title":"Account Number"},"results":{"items":{"$ref":"#/components/schemas/LookupItem"},"type":"array","title":"Results"}},"type":"object","required":["status","account_number","results"],"title":"LookupResponseData"},"ResponseMeta":{"properties":{"request_id":{"type":"string","title":"Request Id"}},"additionalProperties":true,"type":"object","required":["request_id"],"title":"ResponseMeta"},"UsageSummaryData":{"properties":{"api_key_id":{"type":"integer","title":"Api Key Id"},"prefix":{"type":"string","title":"Prefix"},"usage_count":{"type":"integer","title":"Usage Count"},"quota_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quota Limit"},"quota_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quota Remaining"},"rate_limit_per_minute":{"type":"integer","title":"Rate Limit Per Minute"},"requests_today":{"type":"integer","title":"Requests Today"},"units_today":{"type":"integer","title":"Units Today"},"successful_units_today":{"type":"integer","title":"Successful Units Today"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"}},"type":"object","required":["api_key_id","prefix","usage_count","quota_limit","quota_remaining","rate_limit_per_minute","requests_today","units_today","successful_units_today","last_used_at"],"title":"UsageSummaryData"},"UsageSummaryEnvelope":{"properties":{"data":{"$ref":"#/components/schemas/UsageSummaryData"},"meta":{"$ref":"#/components/schemas/ResponseMeta"}},"type":"object","required":["data","meta"],"title":"UsageSummaryEnvelope"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","description":"API key được cấp trong trang quản trị. Có thể gửi tương đương qua Authorization: Bearer mlk_...","in":"header","name":"X-API-Key"}}}}