{"openapi":"3.1.0","info":{"title":"FINAPP Tenant Data API","version":"1.0.0","description":"Read tenant-scoped bank accounts and transactions collected through Plaid. Every API key is locked to one tenant and an explicit set of scopes."},"servers":[{"url":"https://api.finapp.ca/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"FINAPP API key"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"}}}}},"Pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"pages":{"type":"integer"}}}}},"paths":{"/me":{"get":{"summary":"Inspect the authenticated tenant and API key scopes","responses":{"200":{"description":"Identity details"}}}},"/accounts":{"get":{"summary":"List connected accounts exposed to this API","responses":{"200":{"description":"Accounts"},"401":{"description":"Invalid key"},"403":{"description":"Missing accounts:read scope"}}}},"/transactions":{"get":{"summary":"List transactions","parameters":[{"name":"start_date","in":"query","schema":{"type":"string","format":"date"}},{"name":"end_date","in":"query","schema":{"type":"string","format":"date"}},{"name":"account_id","in":"query","schema":{"type":"integer"}},{"name":"direction","in":"query","schema":{"type":"string","enum":["debit","credit"]}},{"name":"pending","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","maxLength":100}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":250,"default":50}}],"responses":{"200":{"description":"Paginated transactions"}}}},"/transactions/{id}":{"get":{"summary":"Get one transaction","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Transaction"},"404":{"description":"Not found"}}}},"/sync-runs":{"get":{"summary":"List recent synchronization runs","responses":{"200":{"description":"Sync runs"}}}},"/sync":{"post":{"summary":"Request an immediate incremental sync","responses":{"202":{"description":"Sync complete or already running"}}}}}}