{"openapi":"3.1.0","info":{"title":"Walletguide API","version":"0.1.0","description":"Wallet-scoped REST API. The source of truth for the generated client, the MCP tools and the CLI: each is derived from this document rather than maintained beside it."},"servers":[{"url":"http://api.walletguide.com"}],"components":{"schemas":{"SecurityDetail":{"type":"object","properties":{"isin":{"type":"string"},"name":{"type":"string"},"wkn":{"type":"string"},"objectID":{"type":"string"},"type":{"type":"string"},"historyStartDate":{"type":["string","null"]},"active":{"type":"boolean"},"lastUpdatedTime":{"type":["string","null"]},"splits":{"type":"object","additionalProperties":{"type":"number"}}},"required":["isin","name","wkn","objectID","type","historyStartDate","active","lastUpdatedTime","splits"]},"WalletSummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"baseCurrency":{"type":"string"},"active":{"type":"boolean"},"role":{"type":"string","enum":["owner","editor"]}},"required":["id","name","baseCurrency","active","role"]},"Wallet":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"baseCurrency":{"type":"string"},"active":{"type":"boolean"},"planSettings":{"type":["object","null"],"properties":{"levels":{"type":"array","items":{"type":"string"}},"showPercentageForPastMonths":{"type":"boolean"}},"required":["levels","showPercentageForPastMonths"]},"lastOverallUpdatedTime":{"type":["string","null"],"format":"date-time"}},"required":["id","name","baseCurrency","active","planSettings","lastOverallUpdatedTime"]},"WalletMember":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"userId":{"type":"string","format":"uuid"},"email":{"type":"string"},"name":{"type":["string","null"]},"photoURL":{"type":["string","null"]},"role":{"type":"string","enum":["owner","editor"]}},"required":["id","userId","email","name","photoURL","role"]},"WalletInvitation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"email":{"type":"string"},"role":{"type":"string","enum":["owner","editor"]},"expiresAt":{"type":"string","format":"date-time"},"sentAt":{"type":["string","null"],"format":"date-time"},"registeredUserId":{"type":["string","null"],"format":"uuid"}},"required":["id","firestoreId","email","role","expiresAt","sentAt","registeredUserId"]}},"parameters":{}},"paths":{"/wallets/{walletId}/tags/{id}":{"get":{"summary":"Get a tag","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The tag","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"patch":{"summary":"Update a tag","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1}}}}}},"responses":{"200":{"description":"The updated tag","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"delete":{"summary":"Delete a tag","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The deleted tag","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/tags":{"post":{"summary":"Create a tag","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1}},"required":["name"]}}}},"responses":{"201":{"description":"The created tag","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"get":{"summary":"List tags","description":"All tags of the wallet, each with server-computed usage counts (SE-2).","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"responses":{"200":{"description":"All tags of the wallet","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]},"nrTransactions":{"type":"integer","minimum":0}},"required":["id","walletId","firestoreId","name","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","nrTransactions"]}}}}}}}},"/wallets/{walletId}/categories/{id}":{"get":{"summary":"Get a category","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The category","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"type":{"type":"string","enum":["activeIncome","passiveIncome","gainsLosses","fixedExpenses","variableExpenses","neutral"]},"emoji":{"type":["string","null"]},"system":{"type":"boolean"},"systemKey":{"type":["string","null"]},"order":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"categoryGroupId":{"type":["string","null"],"format":"uuid"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","type","emoji","system","systemKey","order","categoryGroupId","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"patch":{"summary":"Update a category","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["activeIncome","passiveIncome","gainsLosses","fixedExpenses","variableExpenses","neutral"]},"emoji":{"type":["string","null"]},"order":{"type":"number"},"categoryGroupId":{"type":["string","null"],"format":"uuid","description":"Row uuid"}}}}}},"responses":{"200":{"description":"The updated category","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"type":{"type":"string","enum":["activeIncome","passiveIncome","gainsLosses","fixedExpenses","variableExpenses","neutral"]},"emoji":{"type":["string","null"]},"system":{"type":"boolean"},"systemKey":{"type":["string","null"]},"order":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"categoryGroupId":{"type":["string","null"],"format":"uuid"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","type","emoji","system","systemKey","order","categoryGroupId","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"delete":{"summary":"Delete a category","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The deleted category","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"type":{"type":"string","enum":["activeIncome","passiveIncome","gainsLosses","fixedExpenses","variableExpenses","neutral"]},"emoji":{"type":["string","null"]},"system":{"type":"boolean"},"systemKey":{"type":["string","null"]},"order":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"categoryGroupId":{"type":["string","null"],"format":"uuid"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","type","emoji","system","systemKey","order","categoryGroupId","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/categories":{"post":{"summary":"Create a category","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["activeIncome","passiveIncome","gainsLosses","fixedExpenses","variableExpenses","neutral"]},"emoji":{"type":["string","null"]},"order":{"type":"number"},"categoryGroupId":{"type":["string","null"],"format":"uuid","description":"Row uuid"}},"required":["name","type"]}}}},"responses":{"201":{"description":"The created category","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"type":{"type":"string","enum":["activeIncome","passiveIncome","gainsLosses","fixedExpenses","variableExpenses","neutral"]},"emoji":{"type":["string","null"]},"system":{"type":"boolean"},"systemKey":{"type":["string","null"]},"order":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"categoryGroupId":{"type":["string","null"],"format":"uuid"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","type","emoji","system","systemKey","order","categoryGroupId","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"get":{"summary":"List categories","description":"All categories of the wallet, each with server-computed usage counts (SE-2).","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"responses":{"200":{"description":"All categories of the wallet","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"type":{"type":"string","enum":["activeIncome","passiveIncome","gainsLosses","fixedExpenses","variableExpenses","neutral"]},"emoji":{"type":["string","null"]},"system":{"type":"boolean"},"systemKey":{"type":["string","null"]},"order":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"categoryGroupId":{"type":["string","null"],"format":"uuid"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]},"used":{"type":"integer","minimum":0},"usedInScenarios":{"type":"integer","minimum":0},"usedInAssets":{"type":"integer","minimum":0}},"required":["id","walletId","firestoreId","name","type","emoji","system","systemKey","order","categoryGroupId","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","used","usedInScenarios","usedInAssets"]}}}}}}}},"/wallets/{walletId}/categories/bulk":{"post":{"summary":"Create multiple categories","description":"Transactional bulk create; either all rows are created or none.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["activeIncome","passiveIncome","gainsLosses","fixedExpenses","variableExpenses","neutral"]},"emoji":{"type":["string","null"]},"order":{"type":"number"},"categoryGroupId":{"type":["string","null"],"format":"uuid","description":"Row uuid"}},"required":["name","type"]},"minItems":1,"maxItems":1000}},"required":["items"]}}}},"responses":{"201":{"description":"The created categories, in input order","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"type":{"type":"string","enum":["activeIncome","passiveIncome","gainsLosses","fixedExpenses","variableExpenses","neutral"]},"emoji":{"type":["string","null"]},"system":{"type":"boolean"},"systemKey":{"type":["string","null"]},"order":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"categoryGroupId":{"type":["string","null"],"format":"uuid"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","type","emoji","system","systemKey","order","categoryGroupId","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/categoryGroups":{"get":{"summary":"List categoryGroups","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"responses":{"200":{"description":"All categoryGroups of the wallet","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"emoji":{"type":["string","null"]},"parentCategoryGroupId":{"type":["string","null"],"format":"uuid"},"order":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","emoji","parentCategoryGroupId","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}}}}},"post":{"summary":"Create a category group","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"emoji":{"type":["string","null"]},"parentCategoryGroupId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"order":{"type":"number"}},"required":["name"]}}}},"responses":{"201":{"description":"The created category group","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"emoji":{"type":["string","null"]},"parentCategoryGroupId":{"type":["string","null"],"format":"uuid"},"order":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","emoji","parentCategoryGroupId","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/categoryGroups/{id}":{"get":{"summary":"Get a category group","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The category group","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"emoji":{"type":["string","null"]},"parentCategoryGroupId":{"type":["string","null"],"format":"uuid"},"order":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","emoji","parentCategoryGroupId","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"patch":{"summary":"Update a category group","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"emoji":{"type":["string","null"]},"parentCategoryGroupId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"order":{"type":"number"}}}}}},"responses":{"200":{"description":"The updated category group","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"emoji":{"type":["string","null"]},"parentCategoryGroupId":{"type":["string","null"],"format":"uuid"},"order":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","emoji","parentCategoryGroupId","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"delete":{"summary":"Delete a category group","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The deleted category group","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"emoji":{"type":["string","null"]},"parentCategoryGroupId":{"type":["string","null"],"format":"uuid"},"order":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","emoji","parentCategoryGroupId","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/categoryGroups/bulk":{"post":{"summary":"Create multiple categoryGroups","description":"Transactional bulk create; either all rows are created or none.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"emoji":{"type":["string","null"]},"parentCategoryGroupId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"order":{"type":"number"}},"required":["name"]},"minItems":1,"maxItems":1000}},"required":["items"]}}}},"responses":{"201":{"description":"The created categoryGroups, in input order","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"emoji":{"type":["string","null"]},"parentCategoryGroupId":{"type":["string","null"],"format":"uuid"},"order":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","emoji","parentCategoryGroupId","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/merchants/{id}":{"get":{"summary":"Get a merchant","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The merchant","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"defaultCategoryId":{"type":["string","null"],"format":"uuid"},"defaultUsingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"domains":{"type":"array","items":{"type":"string"}},"logo":{"type":"boolean"},"autoCreatedSource":{"type":["string","null"],"enum":["googleMaps","searchApiGoogleWebSearch","bingWebSearch",null]},"autoReviewTransactions":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","defaultCategoryId","defaultUsingDateRule","domains","logo","autoCreatedSource","autoReviewTransactions","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"patch":{"summary":"Update a merchant","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"defaultCategoryId":{"type":["string","null"],"description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"defaultUsingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"domains":{"type":"array","items":{"type":"string"}},"logo":{"type":"boolean"},"autoReviewTransactions":{"type":"boolean"}}}}}},"responses":{"200":{"description":"The updated merchant","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"defaultCategoryId":{"type":["string","null"],"format":"uuid"},"defaultUsingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"domains":{"type":"array","items":{"type":"string"}},"logo":{"type":"boolean"},"autoCreatedSource":{"type":["string","null"],"enum":["googleMaps","searchApiGoogleWebSearch","bingWebSearch",null]},"autoReviewTransactions":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","defaultCategoryId","defaultUsingDateRule","domains","logo","autoCreatedSource","autoReviewTransactions","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"delete":{"summary":"Delete a merchant","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The deleted merchant","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"defaultCategoryId":{"type":["string","null"],"format":"uuid"},"defaultUsingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"domains":{"type":"array","items":{"type":"string"}},"logo":{"type":"boolean"},"autoCreatedSource":{"type":["string","null"],"enum":["googleMaps","searchApiGoogleWebSearch","bingWebSearch",null]},"autoReviewTransactions":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","defaultCategoryId","defaultUsingDateRule","domains","logo","autoCreatedSource","autoReviewTransactions","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/merchants":{"post":{"summary":"Create a merchant","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"defaultCategoryId":{"type":["string","null"],"description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"defaultUsingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"domains":{"type":"array","items":{"type":"string"}},"logo":{"type":"boolean","default":false},"autoReviewTransactions":{"type":"boolean","default":false}},"required":["name"]}}}},"responses":{"201":{"description":"The created merchant","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"defaultCategoryId":{"type":["string","null"],"format":"uuid"},"defaultUsingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"domains":{"type":"array","items":{"type":"string"}},"logo":{"type":"boolean"},"autoCreatedSource":{"type":["string","null"],"enum":["googleMaps","searchApiGoogleWebSearch","bingWebSearch",null]},"autoReviewTransactions":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","defaultCategoryId","defaultUsingDateRule","domains","logo","autoCreatedSource","autoReviewTransactions","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"get":{"summary":"List merchants","description":"All merchants of the wallet, each with server-computed usage counts (SE-2).","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"responses":{"200":{"description":"All merchants of the wallet","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"defaultCategoryId":{"type":["string","null"],"format":"uuid"},"defaultUsingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"domains":{"type":"array","items":{"type":"string"}},"logo":{"type":"boolean"},"autoCreatedSource":{"type":["string","null"],"enum":["googleMaps","searchApiGoogleWebSearch","bingWebSearch",null]},"autoReviewTransactions":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]},"nrTransactions":{"type":"integer","minimum":0}},"required":["id","walletId","firestoreId","name","defaultCategoryId","defaultUsingDateRule","domains","logo","autoCreatedSource","autoReviewTransactions","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","nrTransactions"]}}}}}}}},"/wallets/{walletId}/assetGroups":{"get":{"summary":"List assetGroups","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"responses":{"200":{"description":"All assetGroups of the wallet","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"archived":{"type":"boolean"},"order":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","archived","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}}}}},"post":{"summary":"Create a asset group","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"archived":{"type":"boolean","default":false},"order":{"type":"number"}},"required":["name"]}}}},"responses":{"201":{"description":"The created asset group","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"archived":{"type":"boolean"},"order":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","archived","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/assetGroups/{id}":{"get":{"summary":"Get a asset group","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The asset group","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"archived":{"type":"boolean"},"order":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","archived","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"patch":{"summary":"Update a asset group","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"archived":{"type":"boolean"},"order":{"type":"number"}}}}}},"responses":{"200":{"description":"The updated asset group","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"archived":{"type":"boolean"},"order":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","archived","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"delete":{"summary":"Delete a asset group","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The deleted asset group","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"archived":{"type":"boolean"},"order":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","archived","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/assets":{"get":{"summary":"List assets","description":"All assets of the wallet, each with server-computed per-asset transaction aggregates (openTransactions, lastTransactionDate) — additive fields (SE-3).","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"responses":{"200":{"description":"All assets of the wallet","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"type":{"type":"string","enum":["manualBank","automatedBank","automatedBankTotalValue","manualCrypto","manualCash","manualCreditCard","automatedCreditCard","automatedCreditCardTotalValue","manualLoan","automatedLoan","automatedLoanTotalValue","manualRealEstate","manualRealEstateTotalValue","manualPhysicalAsset","manualPhysicalTotalValue","manualTransitAccount","manualOther","manualCompany","manualBankTotalValue","manualCreditCardTotalValue","manualLoanTotalValue","manualCompanyTotalValue","manualOtherTotalValue","manualCryptoTotalValue","automatedCryptoTotalValue","manualInvestmentPortfolio","manualInvestmentPortfolioTotalValue","manualSecurity","automatedInvestmentPortfolioTotalValue"]},"name":{"type":"string"},"access":{"type":"string","enum":["fixed","semiFixed","liquid"]},"assetGroupId":{"type":["string","null"],"format":"uuid"},"archived":{"type":"boolean"},"expectedAnnualReturn":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"order":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"defaultCurrency":{"type":["string","null"],"enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR",null]},"accountNumber":{"type":["string","null"]},"defaultCategoryId":{"type":["string","null"],"format":"uuid"},"valueChangeCategoryId":{"type":["string","null"],"format":"uuid"},"gainsLossesCategoryId":{"type":["string","null"],"format":"uuid"},"feesCategoryId":{"type":["string","null"],"format":"uuid"},"taxCategoryId":{"type":["string","null"],"format":"uuid"},"importSettings":{"type":["object","null"],"properties":{"csv":{}},"additionalProperties":{}},"bankConnection":{"type":["object","null"],"properties":{"type":{"type":"string","enum":["klarna","gocardless","finApi","plaid"],"description":"The type of bank connection provider."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":["object","null"],"properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account, if applicable. Null otherwise."},"plaidAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account, if applicable. Null otherwise."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]},"openTransactions":{"type":"integer","description":"Open transactions on this asset: uncategorized, or transfers without a counter link; non-pending, non-split-parent."},"lastTransactionDate":{"type":["string","null"],"description":"Newest non-pending, non-split-parent transaction date (YYYY-MM-DD), or null."}},"required":["id","walletId","firestoreId","type","name","access","assetGroupId","archived","expectedAnnualReturn","order","defaultCurrency","accountNumber","defaultCategoryId","valueChangeCategoryId","gainsLossesCategoryId","feesCategoryId","taxCategoryId","importSettings","bankConnection","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}}}}},"post":{"summary":"Create an asset","description":"The legal field combination depends on `type` (29 variants).","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["manualBank","automatedBank","automatedBankTotalValue","manualCrypto","manualCash","manualCreditCard","automatedCreditCard","automatedCreditCardTotalValue","manualLoan","automatedLoan","automatedLoanTotalValue","manualRealEstate","manualRealEstateTotalValue","manualPhysicalAsset","manualPhysicalTotalValue","manualTransitAccount","manualOther","manualCompany","manualBankTotalValue","manualCreditCardTotalValue","manualLoanTotalValue","manualCompanyTotalValue","manualOtherTotalValue","manualCryptoTotalValue","automatedCryptoTotalValue","manualInvestmentPortfolio","manualInvestmentPortfolioTotalValue","manualSecurity","automatedInvestmentPortfolioTotalValue"]},"name":{"type":"string","minLength":1},"access":{"type":"string","enum":["fixed","semiFixed","liquid"]},"assetGroupId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"archived":{"type":"boolean"},"expectedAnnualReturn":{"type":["number","null"]},"order":{"type":"number"},"defaultCurrency":{"type":["string","null"]},"accountNumber":{"type":["string","null"]},"defaultCategoryId":{"type":["string","null"],"description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"valueChangeCategoryId":{"type":["string","null"],"description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"gainsLossesCategoryId":{"type":["string","null"],"description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"feesCategoryId":{"type":["string","null"],"description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"taxCategoryId":{"type":["string","null"],"description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"importSettings":{"type":["object","null"],"additionalProperties":{}},"bankConnection":{"type":["object","null"],"additionalProperties":{}}},"required":["type","name","access"]}}}},"responses":{"201":{"description":"The created asset","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"type":{"type":"string","enum":["manualBank","automatedBank","automatedBankTotalValue","manualCrypto","manualCash","manualCreditCard","automatedCreditCard","automatedCreditCardTotalValue","manualLoan","automatedLoan","automatedLoanTotalValue","manualRealEstate","manualRealEstateTotalValue","manualPhysicalAsset","manualPhysicalTotalValue","manualTransitAccount","manualOther","manualCompany","manualBankTotalValue","manualCreditCardTotalValue","manualLoanTotalValue","manualCompanyTotalValue","manualOtherTotalValue","manualCryptoTotalValue","automatedCryptoTotalValue","manualInvestmentPortfolio","manualInvestmentPortfolioTotalValue","manualSecurity","automatedInvestmentPortfolioTotalValue"]},"name":{"type":"string"},"access":{"type":"string","enum":["fixed","semiFixed","liquid"]},"assetGroupId":{"type":["string","null"],"format":"uuid"},"archived":{"type":"boolean"},"expectedAnnualReturn":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"order":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"defaultCurrency":{"type":["string","null"],"enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR",null]},"accountNumber":{"type":["string","null"]},"defaultCategoryId":{"type":["string","null"],"format":"uuid"},"valueChangeCategoryId":{"type":["string","null"],"format":"uuid"},"gainsLossesCategoryId":{"type":["string","null"],"format":"uuid"},"feesCategoryId":{"type":["string","null"],"format":"uuid"},"taxCategoryId":{"type":["string","null"],"format":"uuid"},"importSettings":{"type":["object","null"],"properties":{"csv":{}},"additionalProperties":{}},"bankConnection":{"type":["object","null"],"properties":{"type":{"type":"string","enum":["klarna","gocardless","finApi","plaid"],"description":"The type of bank connection provider."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":["object","null"],"properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account, if applicable. Null otherwise."},"plaidAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account, if applicable. Null otherwise."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","type","name","access","assetGroupId","archived","expectedAnnualReturn","order","defaultCurrency","accountNumber","defaultCategoryId","valueChangeCategoryId","gainsLossesCategoryId","feesCategoryId","taxCategoryId","importSettings","bankConnection","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid variant","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/assets/{id}":{"get":{"summary":"Get an asset","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The asset","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"type":{"type":"string","enum":["manualBank","automatedBank","automatedBankTotalValue","manualCrypto","manualCash","manualCreditCard","automatedCreditCard","automatedCreditCardTotalValue","manualLoan","automatedLoan","automatedLoanTotalValue","manualRealEstate","manualRealEstateTotalValue","manualPhysicalAsset","manualPhysicalTotalValue","manualTransitAccount","manualOther","manualCompany","manualBankTotalValue","manualCreditCardTotalValue","manualLoanTotalValue","manualCompanyTotalValue","manualOtherTotalValue","manualCryptoTotalValue","automatedCryptoTotalValue","manualInvestmentPortfolio","manualInvestmentPortfolioTotalValue","manualSecurity","automatedInvestmentPortfolioTotalValue"]},"name":{"type":"string"},"access":{"type":"string","enum":["fixed","semiFixed","liquid"]},"assetGroupId":{"type":["string","null"],"format":"uuid"},"archived":{"type":"boolean"},"expectedAnnualReturn":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"order":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"defaultCurrency":{"type":["string","null"],"enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR",null]},"accountNumber":{"type":["string","null"]},"defaultCategoryId":{"type":["string","null"],"format":"uuid"},"valueChangeCategoryId":{"type":["string","null"],"format":"uuid"},"gainsLossesCategoryId":{"type":["string","null"],"format":"uuid"},"feesCategoryId":{"type":["string","null"],"format":"uuid"},"taxCategoryId":{"type":["string","null"],"format":"uuid"},"importSettings":{"type":["object","null"],"properties":{"csv":{}},"additionalProperties":{}},"bankConnection":{"type":["object","null"],"properties":{"type":{"type":"string","enum":["klarna","gocardless","finApi","plaid"],"description":"The type of bank connection provider."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":["object","null"],"properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account, if applicable. Null otherwise."},"plaidAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account, if applicable. Null otherwise."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","type","name","access","assetGroupId","archived","expectedAnnualReturn","order","defaultCurrency","accountNumber","defaultCategoryId","valueChangeCategoryId","gainsLossesCategoryId","feesCategoryId","taxCategoryId","importSettings","bankConnection","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"patch":{"summary":"Update an asset","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["manualBank","automatedBank","automatedBankTotalValue","manualCrypto","manualCash","manualCreditCard","automatedCreditCard","automatedCreditCardTotalValue","manualLoan","automatedLoan","automatedLoanTotalValue","manualRealEstate","manualRealEstateTotalValue","manualPhysicalAsset","manualPhysicalTotalValue","manualTransitAccount","manualOther","manualCompany","manualBankTotalValue","manualCreditCardTotalValue","manualLoanTotalValue","manualCompanyTotalValue","manualOtherTotalValue","manualCryptoTotalValue","automatedCryptoTotalValue","manualInvestmentPortfolio","manualInvestmentPortfolioTotalValue","manualSecurity","automatedInvestmentPortfolioTotalValue"]},"name":{"type":"string","minLength":1},"access":{"type":"string","enum":["fixed","semiFixed","liquid"]},"assetGroupId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"archived":{"type":"boolean"},"expectedAnnualReturn":{"type":["number","null"]},"order":{"type":"number"},"defaultCurrency":{"type":["string","null"]},"accountNumber":{"type":["string","null"]},"defaultCategoryId":{"type":["string","null"],"description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"valueChangeCategoryId":{"type":["string","null"],"description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"gainsLossesCategoryId":{"type":["string","null"],"description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"feesCategoryId":{"type":["string","null"],"description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"taxCategoryId":{"type":["string","null"],"description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"importSettings":{"type":["object","null"],"additionalProperties":{}},"bankConnection":{"type":["object","null"],"additionalProperties":{}}}}}}},"responses":{"200":{"description":"The updated asset","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"type":{"type":"string","enum":["manualBank","automatedBank","automatedBankTotalValue","manualCrypto","manualCash","manualCreditCard","automatedCreditCard","automatedCreditCardTotalValue","manualLoan","automatedLoan","automatedLoanTotalValue","manualRealEstate","manualRealEstateTotalValue","manualPhysicalAsset","manualPhysicalTotalValue","manualTransitAccount","manualOther","manualCompany","manualBankTotalValue","manualCreditCardTotalValue","manualLoanTotalValue","manualCompanyTotalValue","manualOtherTotalValue","manualCryptoTotalValue","automatedCryptoTotalValue","manualInvestmentPortfolio","manualInvestmentPortfolioTotalValue","manualSecurity","automatedInvestmentPortfolioTotalValue"]},"name":{"type":"string"},"access":{"type":"string","enum":["fixed","semiFixed","liquid"]},"assetGroupId":{"type":["string","null"],"format":"uuid"},"archived":{"type":"boolean"},"expectedAnnualReturn":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"order":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"defaultCurrency":{"type":["string","null"],"enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR",null]},"accountNumber":{"type":["string","null"]},"defaultCategoryId":{"type":["string","null"],"format":"uuid"},"valueChangeCategoryId":{"type":["string","null"],"format":"uuid"},"gainsLossesCategoryId":{"type":["string","null"],"format":"uuid"},"feesCategoryId":{"type":["string","null"],"format":"uuid"},"taxCategoryId":{"type":["string","null"],"format":"uuid"},"importSettings":{"type":["object","null"],"properties":{"csv":{}},"additionalProperties":{}},"bankConnection":{"type":["object","null"],"properties":{"type":{"type":"string","enum":["klarna","gocardless","finApi","plaid"],"description":"The type of bank connection provider."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":["object","null"],"properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account, if applicable. Null otherwise."},"plaidAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account, if applicable. Null otherwise."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","type","name","access","assetGroupId","archived","expectedAnnualReturn","order","defaultCurrency","accountNumber","defaultCategoryId","valueChangeCategoryId","gainsLossesCategoryId","feesCategoryId","taxCategoryId","importSettings","bankConnection","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid variant","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"delete":{"summary":"Delete an asset","description":"Deletes the asset and all its transactions (app-level cascade).","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The deleted asset","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"type":{"type":"string","enum":["manualBank","automatedBank","automatedBankTotalValue","manualCrypto","manualCash","manualCreditCard","automatedCreditCard","automatedCreditCardTotalValue","manualLoan","automatedLoan","automatedLoanTotalValue","manualRealEstate","manualRealEstateTotalValue","manualPhysicalAsset","manualPhysicalTotalValue","manualTransitAccount","manualOther","manualCompany","manualBankTotalValue","manualCreditCardTotalValue","manualLoanTotalValue","manualCompanyTotalValue","manualOtherTotalValue","manualCryptoTotalValue","automatedCryptoTotalValue","manualInvestmentPortfolio","manualInvestmentPortfolioTotalValue","manualSecurity","automatedInvestmentPortfolioTotalValue"]},"name":{"type":"string"},"access":{"type":"string","enum":["fixed","semiFixed","liquid"]},"assetGroupId":{"type":["string","null"],"format":"uuid"},"archived":{"type":"boolean"},"expectedAnnualReturn":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"order":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"defaultCurrency":{"type":["string","null"],"enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR",null]},"accountNumber":{"type":["string","null"]},"defaultCategoryId":{"type":["string","null"],"format":"uuid"},"valueChangeCategoryId":{"type":["string","null"],"format":"uuid"},"gainsLossesCategoryId":{"type":["string","null"],"format":"uuid"},"feesCategoryId":{"type":["string","null"],"format":"uuid"},"taxCategoryId":{"type":["string","null"],"format":"uuid"},"importSettings":{"type":["object","null"],"properties":{"csv":{}},"additionalProperties":{}},"bankConnection":{"type":["object","null"],"properties":{"type":{"type":"string","enum":["klarna","gocardless","finApi","plaid"],"description":"The type of bank connection provider."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":["object","null"],"properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account, if applicable. Null otherwise."},"plaidAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account, if applicable. Null otherwise."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","type","name","access","assetGroupId","archived","expectedAnnualReturn","order","defaultCurrency","accountNumber","defaultCategoryId","valueChangeCategoryId","gainsLossesCategoryId","feesCategoryId","taxCategoryId","importSettings","bankConnection","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/assets/{id}/importSettings":{"post":{"summary":"Merge one importer's settings into an asset (intent only)","description":"Nested-merges { importerType, settings } into the asset's importSettings map and persists it (legacy updateImportSettings). Returns the updated asset.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"importerType":{"type":"string","minLength":1},"settings":{"type":"object","additionalProperties":{}}},"required":["importerType","settings"]}}}},"responses":{"200":{"description":"The updated asset","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"type":{"type":"string","enum":["manualBank","automatedBank","automatedBankTotalValue","manualCrypto","manualCash","manualCreditCard","automatedCreditCard","automatedCreditCardTotalValue","manualLoan","automatedLoan","automatedLoanTotalValue","manualRealEstate","manualRealEstateTotalValue","manualPhysicalAsset","manualPhysicalTotalValue","manualTransitAccount","manualOther","manualCompany","manualBankTotalValue","manualCreditCardTotalValue","manualLoanTotalValue","manualCompanyTotalValue","manualOtherTotalValue","manualCryptoTotalValue","automatedCryptoTotalValue","manualInvestmentPortfolio","manualInvestmentPortfolioTotalValue","manualSecurity","automatedInvestmentPortfolioTotalValue"]},"name":{"type":"string"},"access":{"type":"string","enum":["fixed","semiFixed","liquid"]},"assetGroupId":{"type":["string","null"],"format":"uuid"},"archived":{"type":"boolean"},"expectedAnnualReturn":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"order":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"defaultCurrency":{"type":["string","null"],"enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR",null]},"accountNumber":{"type":["string","null"]},"defaultCategoryId":{"type":["string","null"],"format":"uuid"},"valueChangeCategoryId":{"type":["string","null"],"format":"uuid"},"gainsLossesCategoryId":{"type":["string","null"],"format":"uuid"},"feesCategoryId":{"type":["string","null"],"format":"uuid"},"taxCategoryId":{"type":["string","null"],"format":"uuid"},"importSettings":{"type":["object","null"],"properties":{"csv":{}},"additionalProperties":{}},"bankConnection":{"type":["object","null"],"properties":{"type":{"type":"string","enum":["klarna","gocardless","finApi","plaid"],"description":"The type of bank connection provider."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":["object","null"],"properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account, if applicable. Null otherwise."},"plaidAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account, if applicable. Null otherwise."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","type","name","access","assetGroupId","archived","expectedAnnualReturn","order","defaultCurrency","accountNumber","defaultCategoryId","valueChangeCategoryId","gainsLossesCategoryId","feesCategoryId","taxCategoryId","importSettings","bankConnection","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid variant / settings","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/assets/{id}/removeHistoryPreview":{"get":{"summary":"Preview removing an asset's history before a date","description":"The candidate dates, affected count (rows before `date`), and rollup balance the remove-history action would apply. `kind` follows the asset's options.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Cutoff date; defaults to today."},"required":false,"description":"Cutoff date; defaults to today.","name":"date","in":"query"}],"responses":{"200":{"description":"Remove-history preview","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["transactions","totalValueUpdates"]},"dates":{"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"The modal's orderedDates, ascending."},"affectedCount":{"type":"integer"},"rollup":{"type":["object","null"],"properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"],"description":"The initial balance the remove would set at `date`, asset default currency."}},"required":["kind","dates","affectedCount","rollup"]}}}},"400":{"description":"Asset has no default currency","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/assets/{id}/importPreview":{"get":{"summary":"Import balance preview for an asset","description":"The asset balance on/before a date plus the asset's non-child transactions (for import de-duplication). Mirrors the web getAssetBalanceByIdAndDate + getAssetTransactionsByIdExcludingChildTransactions selectors.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Balance cutoff date; defaults to today."},"required":false,"description":"Balance cutoff date; defaults to today.","name":"date","in":"query"}],"responses":{"200":{"description":"Import balance preview","content":{"application/json":{"schema":{"type":"object","properties":{"balance":{"type":"object","properties":{"value":{"type":"number"},"currency":{"type":["string","null"]}},"required":["value","currency"]},"transactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"amountValue":{"type":"string"},"amountCurrency":{"type":"string"}},"required":["id","date","amountValue","amountCurrency"]}}},"required":["balance","transactions"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/transactions":{"get":{"summary":"List transactions","description":"Ordered by date descending. Filter by date range, asset, or category.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Earliest date (inclusive)"},"required":false,"description":"Earliest date (inclusive)","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Latest date (inclusive)"},"required":false,"description":"Latest date (inclusive)","name":"to","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":false,"description":"Row uuid","name":"assetId","in":"query"},{"schema":{"type":"string","description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"required":false,"description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')","name":"categoryId","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":10000,"default":1000},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Transactions matching the filters","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"secondaryDate":{"type":["string","null"]},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":["string","null"],"format":"uuid"},"merchantId":{"type":["string","null"],"format":"uuid"},"merchantAutoAssigned":{"type":["boolean","null"]},"merchantCheckedGoogleMaps":{"type":["boolean","null"]},"merchantCheckedSearchApiGoogleWebSearch":{"type":["boolean","null"]},"excludeFromMerchantAutoAssignment":{"type":"boolean"},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"usingStartDate":{"type":["string","null"]},"usingEndDate":{"type":["string","null"]},"notes":{"type":["string","null"]},"parentTransactionId":{"type":["string","null"],"format":"uuid"},"parent":{"type":"boolean"},"source":{"type":["string","null"]},"assignedUserId":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"gocardlessTransactionId":{"type":["string","null"]},"gocardlessInternalTransactionId":{"type":["string","null"]},"finApiTransactionId":{"type":["string","null"]},"plaidTransactionId":{"type":["string","null"]},"klarnaTransactionId":{"type":["string","null"]},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"}},"pending":{"type":"boolean"},"reviewed":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","secondaryDate","fromTo","description","amountValue","amountCurrency","categoryId","merchantId","merchantAutoAssigned","merchantCheckedGoogleMaps","merchantCheckedSearchApiGoogleWebSearch","excludeFromMerchantAutoAssignment","usingDateRule","usingStartDate","usingEndDate","notes","parentTransactionId","parent","source","assignedUserId","transferCounterType","transferCounterId","gocardlessTransactionId","gocardlessInternalTransactionId","finApiTransactionId","plaidTransactionId","klarnaTransactionId","tagIds","pending","reviewed","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}}},"400":{"description":"Unresolvable filter reference","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"post":{"summary":"Create a transaction","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid","description":"Row uuid"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"secondaryDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"amountValue":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,4})?$","description":"Decimal amount as a string, up to 4 fraction digits"},"amountCurrency":{"type":"string"},"categoryId":{"type":["string","null"],"description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"merchantId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"merchantAutoAssigned":{"type":["boolean","null"]},"excludeFromMerchantAutoAssignment":{"type":"boolean","default":false},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"usingStartDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"usingEndDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"notes":{"type":["string","null"]},"parentTransactionId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"parent":{"type":"boolean","default":false},"source":{"type":["string","null"]},"assignedUserId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"tagIds":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"},"default":[]},"pending":{"type":"boolean","default":false},"reviewed":{"type":"boolean","default":false}},"required":["assetId","date","amountValue","amountCurrency"]}}}},"responses":{"201":{"description":"The created transaction","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"secondaryDate":{"type":["string","null"]},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":["string","null"],"format":"uuid"},"merchantId":{"type":["string","null"],"format":"uuid"},"merchantAutoAssigned":{"type":["boolean","null"]},"merchantCheckedGoogleMaps":{"type":["boolean","null"]},"merchantCheckedSearchApiGoogleWebSearch":{"type":["boolean","null"]},"excludeFromMerchantAutoAssignment":{"type":"boolean"},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"usingStartDate":{"type":["string","null"]},"usingEndDate":{"type":["string","null"]},"notes":{"type":["string","null"]},"parentTransactionId":{"type":["string","null"],"format":"uuid"},"parent":{"type":"boolean"},"source":{"type":["string","null"]},"assignedUserId":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"gocardlessTransactionId":{"type":["string","null"]},"gocardlessInternalTransactionId":{"type":["string","null"]},"finApiTransactionId":{"type":["string","null"]},"plaidTransactionId":{"type":["string","null"]},"klarnaTransactionId":{"type":["string","null"]},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"}},"pending":{"type":"boolean"},"reviewed":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","secondaryDate","fromTo","description","amountValue","amountCurrency","categoryId","merchantId","merchantAutoAssigned","merchantCheckedGoogleMaps","merchantCheckedSearchApiGoogleWebSearch","excludeFromMerchantAutoAssignment","usingDateRule","usingStartDate","usingEndDate","notes","parentTransactionId","parent","source","assignedUserId","transferCounterType","transferCounterId","gocardlessTransactionId","gocardlessInternalTransactionId","finApiTransactionId","plaidTransactionId","klarnaTransactionId","tagIds","pending","reviewed","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid transaction","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/transactions/recurring":{"get":{"summary":"Recurring transaction series by merchant","description":"Recurring series detected over each merchant's non-parent transactions (monthly / quarterly / yearly patterns), keyed by merchant id. Mirrors the web getRecurringTransactionSeriesByMerchantId selector.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"responses":{"200":{"description":"Recurring series grouped by merchant id","content":{"application/json":{"schema":{"type":"object","properties":{"seriesByMerchantId":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"merchantId":{"type":"string"},"amount":{"type":"object","properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"]},"frequency":{"type":"string","description":"monthly | quarterly | yearly."},"status":{"type":"string","enum":["active","inactive"]},"earliestTransaction":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"secondaryDate":{"type":["string","null"]},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":["string","null"],"format":"uuid"},"merchantId":{"type":["string","null"],"format":"uuid"},"merchantAutoAssigned":{"type":["boolean","null"]},"merchantCheckedGoogleMaps":{"type":["boolean","null"]},"merchantCheckedSearchApiGoogleWebSearch":{"type":["boolean","null"]},"excludeFromMerchantAutoAssignment":{"type":"boolean"},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"usingStartDate":{"type":["string","null"]},"usingEndDate":{"type":["string","null"]},"notes":{"type":["string","null"]},"parentTransactionId":{"type":["string","null"],"format":"uuid"},"parent":{"type":"boolean"},"source":{"type":["string","null"]},"assignedUserId":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"gocardlessTransactionId":{"type":["string","null"]},"gocardlessInternalTransactionId":{"type":["string","null"]},"finApiTransactionId":{"type":["string","null"]},"plaidTransactionId":{"type":["string","null"]},"klarnaTransactionId":{"type":["string","null"]},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"}},"pending":{"type":"boolean"},"reviewed":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]},"amount":{"type":"object","properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"],"description":"The composed amount ({value,currency}) the web RawTransactionWithId carries."}},"required":["id","walletId","firestoreId","assetId","date","secondaryDate","fromTo","description","amountValue","amountCurrency","categoryId","merchantId","merchantAutoAssigned","merchantCheckedGoogleMaps","merchantCheckedSearchApiGoogleWebSearch","excludeFromMerchantAutoAssignment","usingDateRule","usingStartDate","usingEndDate","notes","parentTransactionId","parent","source","assignedUserId","transferCounterType","transferCounterId","gocardlessTransactionId","gocardlessInternalTransactionId","finApiTransactionId","plaidTransactionId","klarnaTransactionId","tagIds","pending","reviewed","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]},"latestTransaction":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"secondaryDate":{"type":["string","null"]},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":["string","null"],"format":"uuid"},"merchantId":{"type":["string","null"],"format":"uuid"},"merchantAutoAssigned":{"type":["boolean","null"]},"merchantCheckedGoogleMaps":{"type":["boolean","null"]},"merchantCheckedSearchApiGoogleWebSearch":{"type":["boolean","null"]},"excludeFromMerchantAutoAssignment":{"type":"boolean"},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"usingStartDate":{"type":["string","null"]},"usingEndDate":{"type":["string","null"]},"notes":{"type":["string","null"]},"parentTransactionId":{"type":["string","null"],"format":"uuid"},"parent":{"type":"boolean"},"source":{"type":["string","null"]},"assignedUserId":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"gocardlessTransactionId":{"type":["string","null"]},"gocardlessInternalTransactionId":{"type":["string","null"]},"finApiTransactionId":{"type":["string","null"]},"plaidTransactionId":{"type":["string","null"]},"klarnaTransactionId":{"type":["string","null"]},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"}},"pending":{"type":"boolean"},"reviewed":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]},"amount":{"type":"object","properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"],"description":"The composed amount ({value,currency}) the web RawTransactionWithId carries."}},"required":["id","walletId","firestoreId","assetId","date","secondaryDate","fromTo","description","amountValue","amountCurrency","categoryId","merchantId","merchantAutoAssigned","merchantCheckedGoogleMaps","merchantCheckedSearchApiGoogleWebSearch","excludeFromMerchantAutoAssignment","usingDateRule","usingStartDate","usingEndDate","notes","parentTransactionId","parent","source","assignedUserId","transferCounterType","transferCounterId","gocardlessTransactionId","gocardlessInternalTransactionId","finApiTransactionId","plaidTransactionId","klarnaTransactionId","tagIds","pending","reviewed","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]},"transactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"secondaryDate":{"type":["string","null"]},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":["string","null"],"format":"uuid"},"merchantId":{"type":["string","null"],"format":"uuid"},"merchantAutoAssigned":{"type":["boolean","null"]},"merchantCheckedGoogleMaps":{"type":["boolean","null"]},"merchantCheckedSearchApiGoogleWebSearch":{"type":["boolean","null"]},"excludeFromMerchantAutoAssignment":{"type":"boolean"},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"usingStartDate":{"type":["string","null"]},"usingEndDate":{"type":["string","null"]},"notes":{"type":["string","null"]},"parentTransactionId":{"type":["string","null"],"format":"uuid"},"parent":{"type":"boolean"},"source":{"type":["string","null"]},"assignedUserId":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"gocardlessTransactionId":{"type":["string","null"]},"gocardlessInternalTransactionId":{"type":["string","null"]},"finApiTransactionId":{"type":["string","null"]},"plaidTransactionId":{"type":["string","null"]},"klarnaTransactionId":{"type":["string","null"]},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"}},"pending":{"type":"boolean"},"reviewed":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]},"amount":{"type":"object","properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"],"description":"The composed amount ({value,currency}) the web RawTransactionWithId carries."}},"required":["id","walletId","firestoreId","assetId","date","secondaryDate","fromTo","description","amountValue","amountCurrency","categoryId","merchantId","merchantAutoAssigned","merchantCheckedGoogleMaps","merchantCheckedSearchApiGoogleWebSearch","excludeFromMerchantAutoAssignment","usingDateRule","usingStartDate","usingEndDate","notes","parentTransactionId","parent","source","assignedUserId","transferCounterType","transferCounterId","gocardlessTransactionId","gocardlessInternalTransactionId","finApiTransactionId","plaidTransactionId","klarnaTransactionId","tagIds","pending","reviewed","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}},"required":["id","merchantId","amount","frequency","status","earliestTransaction","latestTransaction","transactions"]}}}},"required":["seriesByMerchantId"]}}}}}}},"/wallets/{walletId}/transactions/{id}":{"get":{"summary":"Get a transaction","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The transaction","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"secondaryDate":{"type":["string","null"]},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":["string","null"],"format":"uuid"},"merchantId":{"type":["string","null"],"format":"uuid"},"merchantAutoAssigned":{"type":["boolean","null"]},"merchantCheckedGoogleMaps":{"type":["boolean","null"]},"merchantCheckedSearchApiGoogleWebSearch":{"type":["boolean","null"]},"excludeFromMerchantAutoAssignment":{"type":"boolean"},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"usingStartDate":{"type":["string","null"]},"usingEndDate":{"type":["string","null"]},"notes":{"type":["string","null"]},"parentTransactionId":{"type":["string","null"],"format":"uuid"},"parent":{"type":"boolean"},"source":{"type":["string","null"]},"assignedUserId":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"gocardlessTransactionId":{"type":["string","null"]},"gocardlessInternalTransactionId":{"type":["string","null"]},"finApiTransactionId":{"type":["string","null"]},"plaidTransactionId":{"type":["string","null"]},"klarnaTransactionId":{"type":["string","null"]},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"}},"pending":{"type":"boolean"},"reviewed":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","secondaryDate","fromTo","description","amountValue","amountCurrency","categoryId","merchantId","merchantAutoAssigned","merchantCheckedGoogleMaps","merchantCheckedSearchApiGoogleWebSearch","excludeFromMerchantAutoAssignment","usingDateRule","usingStartDate","usingEndDate","notes","parentTransactionId","parent","source","assignedUserId","transferCounterType","transferCounterId","gocardlessTransactionId","gocardlessInternalTransactionId","finApiTransactionId","plaidTransactionId","klarnaTransactionId","tagIds","pending","reviewed","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"patch":{"summary":"Update a transaction","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid","description":"Row uuid"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"secondaryDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"amountValue":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,4})?$","description":"Decimal amount as a string, up to 4 fraction digits"},"amountCurrency":{"type":"string"},"categoryId":{"type":["string","null"],"description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"merchantId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"merchantAutoAssigned":{"type":["boolean","null"]},"excludeFromMerchantAutoAssignment":{"type":"boolean","default":false},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"usingStartDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"usingEndDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"notes":{"type":["string","null"]},"parentTransactionId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"parent":{"type":"boolean","default":false},"source":{"type":["string","null"]},"assignedUserId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"tagIds":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"},"default":[]},"pending":{"type":"boolean","default":false},"reviewed":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"The updated transaction","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"secondaryDate":{"type":["string","null"]},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":["string","null"],"format":"uuid"},"merchantId":{"type":["string","null"],"format":"uuid"},"merchantAutoAssigned":{"type":["boolean","null"]},"merchantCheckedGoogleMaps":{"type":["boolean","null"]},"merchantCheckedSearchApiGoogleWebSearch":{"type":["boolean","null"]},"excludeFromMerchantAutoAssignment":{"type":"boolean"},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"usingStartDate":{"type":["string","null"]},"usingEndDate":{"type":["string","null"]},"notes":{"type":["string","null"]},"parentTransactionId":{"type":["string","null"],"format":"uuid"},"parent":{"type":"boolean"},"source":{"type":["string","null"]},"assignedUserId":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"gocardlessTransactionId":{"type":["string","null"]},"gocardlessInternalTransactionId":{"type":["string","null"]},"finApiTransactionId":{"type":["string","null"]},"plaidTransactionId":{"type":["string","null"]},"klarnaTransactionId":{"type":["string","null"]},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"}},"pending":{"type":"boolean"},"reviewed":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","secondaryDate","fromTo","description","amountValue","amountCurrency","categoryId","merchantId","merchantAutoAssigned","merchantCheckedGoogleMaps","merchantCheckedSearchApiGoogleWebSearch","excludeFromMerchantAutoAssignment","usingDateRule","usingStartDate","usingEndDate","notes","parentTransactionId","parent","source","assignedUserId","transferCounterType","transferCounterId","gocardlessTransactionId","gocardlessInternalTransactionId","finApiTransactionId","plaidTransactionId","klarnaTransactionId","tagIds","pending","reviewed","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid transaction","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"delete":{"summary":"Delete a transaction","description":"Split children and comments are deleted with it (app-level cascade).","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The deleted transaction","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"secondaryDate":{"type":["string","null"]},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":["string","null"],"format":"uuid"},"merchantId":{"type":["string","null"],"format":"uuid"},"merchantAutoAssigned":{"type":["boolean","null"]},"merchantCheckedGoogleMaps":{"type":["boolean","null"]},"merchantCheckedSearchApiGoogleWebSearch":{"type":["boolean","null"]},"excludeFromMerchantAutoAssignment":{"type":"boolean"},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"usingStartDate":{"type":["string","null"]},"usingEndDate":{"type":["string","null"]},"notes":{"type":["string","null"]},"parentTransactionId":{"type":["string","null"],"format":"uuid"},"parent":{"type":"boolean"},"source":{"type":["string","null"]},"assignedUserId":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"gocardlessTransactionId":{"type":["string","null"]},"gocardlessInternalTransactionId":{"type":["string","null"]},"finApiTransactionId":{"type":["string","null"]},"plaidTransactionId":{"type":["string","null"]},"klarnaTransactionId":{"type":["string","null"]},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"}},"pending":{"type":"boolean"},"reviewed":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","secondaryDate","fromTo","description","amountValue","amountCurrency","categoryId","merchantId","merchantAutoAssigned","merchantCheckedGoogleMaps","merchantCheckedSearchApiGoogleWebSearch","excludeFromMerchantAutoAssignment","usingDateRule","usingStartDate","usingEndDate","notes","parentTransactionId","parent","source","assignedUserId","transferCounterType","transferCounterId","gocardlessTransactionId","gocardlessInternalTransactionId","finApiTransactionId","plaidTransactionId","klarnaTransactionId","tagIds","pending","reviewed","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/transactions/search":{"post":{"summary":"Search transactions","description":"Filter, sort, and paginate transactions. Filters compile to SQL where possible (fast path); a usingDate filter adds a JS pass for the proportional partial amount.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":500,"default":100,"description":"Number of transactions to return (1-500, default 100)."},"offset":{"type":"integer","minimum":0,"default":0,"description":"Number of transactions to skip (default 0)."},"sortBy":{"type":"string","enum":["date","amountValue","fromTo"],"default":"date","description":"Column to sort by."},"sortDirection":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort direction."},"filters":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["status"]},"status":{"type":"string","enum":["all","open","toBeReviewed","transfersWithoutCounterTransaction"],"description":"\"all\" = no filter, \"open\" = uncategorized or a transfer without a counter transaction, \"toBeReviewed\" = not yet reviewed, \"transfersWithoutCounterTransaction\" = transfers missing their counter transaction."}},"required":["type","status"]},{"type":"object","properties":{"type":{"type":"string","enum":["asset"]},"assets":{"type":["array","null"],"items":{"type":"string"},"description":"Asset IDs to include. Null = all assets."}},"required":["type","assets"]},{"type":"object","properties":{"type":{"type":"string","enum":["date"]},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD"}},"required":["type","startDate","endDate"]},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"texts":{"type":"array","items":{"type":"string"},"minItems":1,"description":"Search terms (OR logic)."}},"required":["type","texts"]},{"type":"object","properties":{"type":{"type":"string","enum":["fromTo"]},"texts":{"type":"array","items":{"type":"string"},"minItems":1,"description":"Search terms (OR logic)."}},"required":["type","texts"]},{"type":"object","properties":{"type":{"type":"string","enum":["description"]},"texts":{"type":"array","items":{"type":"string"},"minItems":1,"description":"Search terms (OR logic)."}},"required":["type","texts"]},{"type":"object","properties":{"type":{"type":"string","enum":["category"]},"categories":{"type":["array","null"],"items":{"type":"string"},"description":"Category IDs (or sentinels) to include. Null = all categories."},"showUnassigned":{"type":"boolean","default":true,"description":"Include uncategorized transactions."}},"required":["type","categories"]},{"type":"object","properties":{"type":{"type":"string","enum":["merchant"]},"merchants":{"type":["array","null"],"items":{"type":"string"},"description":"Merchant IDs to include. Null = all merchants."},"showUnassigned":{"type":"boolean","default":true,"description":"Include transactions with no merchant."}},"required":["type","merchants"]},{"type":"object","properties":{"type":{"type":"string","enum":["tag"]},"tagIds":{"type":["array","null"],"items":{"type":"string"},"description":"Tag IDs (array overlap). Null = any tagged transaction."}},"required":["type","tagIds"]},{"type":"object","properties":{"type":{"type":"string","enum":["usingDate"]},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD"}},"required":["type","startDate","endDate"]},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"minAmount":{"type":["object","null"],"properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"],"description":"Null for no lower bound."},"maxAmount":{"type":["object","null"],"properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"],"description":"Null for no upper bound."}},"required":["type","minAmount","maxAmount"]},{"type":"object","properties":{"type":{"type":"string","enum":["categoryType"]},"types":{"type":["array","null"],"items":{"type":"string"},"description":"Category types to include. Null = all types."},"showUnassigned":{"type":"boolean","default":true,"description":"Include uncategorized transactions."}},"required":["type","types"]},{"type":"object","properties":{"type":{"type":"string","enum":["assignedUser"]},"userIds":{"type":["array","null"],"items":{"type":"string"},"description":"User IDs to include. Null = all users."},"showUnassigned":{"type":"boolean","default":true,"description":"Include transactions with no assigned user."}},"required":["type","userIds"]},{"type":"object","properties":{"type":{"type":"string","enum":["quickSearch"]},"text":{"type":["string","null"],"description":"Searches fromTo, description, notes, merchant/category/asset name."},"minAmount":{"type":["object","null"],"properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"],"description":"An amount with value and currency."},"maxAmount":{"type":["object","null"],"properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"],"description":"An amount with value and currency."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["transactionIds"]},"ids":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":500,"description":"Transaction IDs to match (max 500)."}},"required":["type","ids"]},{"type":"object","properties":{"type":{"type":"string","enum":["counterAsset"]},"assetId":{"type":"string","description":"Match transactions booked against this asset as their transfer counterpart."}},"required":["type","assetId"]},{"type":"object","properties":{"type":{"type":"string","enum":["matchableForTransfer"]},"excludeAssetIds":{"type":["array","null"],"items":{"type":"string"},"description":"Source asset ids to exclude (ignoreAssetIds) — counterparts sit in a different asset."},"excludeAssetId":{"type":["string","null"],"description":"Deprecated single-asset alias for excludeAssetIds (folded into it)."},"startDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Earliest candidate date (inclusive)."},"endDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Latest candidate date (inclusive)."},"amountValue":{"type":["number","null"],"description":"Exact amount to match (already opposite-signed by the caller), rounded to 2 decimals."},"amountCurrency":{"type":["string","null"],"description":"Currency the candidate amount must match."}},"required":["type"]}]},"default":[],"description":"Filter objects. Each filter is active by its presence."}}}}}},"responses":{"200":{"description":"Paginated search results","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"secondaryDate":{"type":["string","null"]},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":["string","null"],"format":"uuid"},"merchantId":{"type":["string","null"],"format":"uuid"},"merchantAutoAssigned":{"type":["boolean","null"]},"merchantCheckedGoogleMaps":{"type":["boolean","null"]},"merchantCheckedSearchApiGoogleWebSearch":{"type":["boolean","null"]},"excludeFromMerchantAutoAssignment":{"type":"boolean"},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"usingStartDate":{"type":["string","null"]},"usingEndDate":{"type":["string","null"]},"notes":{"type":["string","null"]},"parentTransactionId":{"type":["string","null"],"format":"uuid"},"parent":{"type":"boolean"},"source":{"type":["string","null"]},"assignedUserId":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"gocardlessTransactionId":{"type":["string","null"]},"gocardlessInternalTransactionId":{"type":["string","null"]},"finApiTransactionId":{"type":["string","null"]},"plaidTransactionId":{"type":["string","null"]},"klarnaTransactionId":{"type":["string","null"]},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"}},"pending":{"type":"boolean"},"reviewed":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]},"partialAmount":{"type":"number","description":"When a usingDate filter is active, the transaction amount scaled by the overlap between its using-period and the filter window. Omitted when it equals the full amount."},"categoryName":{"type":["string","null"]},"categoryEmoji":{"type":["string","null"]},"categorySystemKey":{"type":["string","null"]},"categoryGroupName":{"type":["string","null"]},"categoryGroupFullName":{"type":["string","null"]},"categoryFullName":{"type":["string","null"]},"merchantName":{"type":["string","null"]},"merchantLogoUrl":{"type":["string","null"]},"merchantDomains":{"type":["array","null"],"items":{"type":"string"}},"assetName":{"type":["string","null"]},"assetType":{"type":["string","null"]},"assetDefaultCurrency":{"type":["string","null"]},"assetBankConnection":{"type":["object","null"],"additionalProperties":{}},"isTransfer":{"type":"boolean"},"counterTransactionId":{"type":["string","null"]},"splitParentId":{"type":["string","null"]},"hasSplits":{"type":"boolean"},"splitChildCount":{"type":"integer"},"splitChildTotal":{"type":["number","null"]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"commentCount":{"type":"integer"},"fileCount":{"type":"integer"},"comments":{"type":"array","items":{"type":"object","additionalProperties":{}}},"files":{"type":"array","items":{"type":"object","additionalProperties":{}}},"childTransactions":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["id","walletId","firestoreId","assetId","date","secondaryDate","fromTo","description","amountValue","amountCurrency","categoryId","merchantId","merchantAutoAssigned","merchantCheckedGoogleMaps","merchantCheckedSearchApiGoogleWebSearch","excludeFromMerchantAutoAssignment","usingDateRule","usingStartDate","usingEndDate","notes","parentTransactionId","parent","source","assignedUserId","transferCounterType","transferCounterId","gocardlessTransactionId","gocardlessInternalTransactionId","finApiTransactionId","plaidTransactionId","klarnaTransactionId","tagIds","pending","reviewed","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}},"totalCount":{"type":"number","description":"Total transactions matching all filters."},"balanceByDate":{"type":"object","additionalProperties":{"type":"object","properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"]},"description":"End-of-day running balance per visible date, in the asset's own currency. Populated only when the page rows share one asset and sortBy=date."}},"required":["items","totalCount"]}}}},"400":{"description":"A filter references an id not in this wallet","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/transactions/selection_summary":{"post":{"summary":"Summarize a transaction selection","description":"Per-currency amount sums and count over a selection (explicit ids, or a filter minus deselected ids). Read-only aggregate — uncapped, so it sums selections of any size.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"selection":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["ids"]},"ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":100000,"description":"Explicit list of transaction IDs to summarize."}},"required":["mode","ids"]},{"type":"object","properties":{"mode":{"type":"string","enum":["filter"]},"filter":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["status"]},"status":{"type":"string","enum":["all","open","toBeReviewed","transfersWithoutCounterTransaction"],"description":"\"all\" = no filter, \"open\" = uncategorized or a transfer without a counter transaction, \"toBeReviewed\" = not yet reviewed, \"transfersWithoutCounterTransaction\" = transfers missing their counter transaction."}},"required":["type","status"]},{"type":"object","properties":{"type":{"type":"string","enum":["asset"]},"assets":{"type":["array","null"],"items":{"type":"string"},"description":"Asset IDs to include. Null = all assets."}},"required":["type","assets"]},{"type":"object","properties":{"type":{"type":"string","enum":["date"]},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD"}},"required":["type","startDate","endDate"]},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"texts":{"type":"array","items":{"type":"string"},"minItems":1,"description":"Search terms (OR logic)."}},"required":["type","texts"]},{"type":"object","properties":{"type":{"type":"string","enum":["fromTo"]},"texts":{"type":"array","items":{"type":"string"},"minItems":1,"description":"Search terms (OR logic)."}},"required":["type","texts"]},{"type":"object","properties":{"type":{"type":"string","enum":["description"]},"texts":{"type":"array","items":{"type":"string"},"minItems":1,"description":"Search terms (OR logic)."}},"required":["type","texts"]},{"type":"object","properties":{"type":{"type":"string","enum":["category"]},"categories":{"type":["array","null"],"items":{"type":"string"},"description":"Category IDs (or sentinels) to include. Null = all categories."},"showUnassigned":{"type":"boolean","default":true,"description":"Include uncategorized transactions."}},"required":["type","categories"]},{"type":"object","properties":{"type":{"type":"string","enum":["merchant"]},"merchants":{"type":["array","null"],"items":{"type":"string"},"description":"Merchant IDs to include. Null = all merchants."},"showUnassigned":{"type":"boolean","default":true,"description":"Include transactions with no merchant."}},"required":["type","merchants"]},{"type":"object","properties":{"type":{"type":"string","enum":["tag"]},"tagIds":{"type":["array","null"],"items":{"type":"string"},"description":"Tag IDs (array overlap). Null = any tagged transaction."}},"required":["type","tagIds"]},{"type":"object","properties":{"type":{"type":"string","enum":["usingDate"]},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD"}},"required":["type","startDate","endDate"]},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"minAmount":{"type":["object","null"],"properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"],"description":"Null for no lower bound."},"maxAmount":{"type":["object","null"],"properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"],"description":"Null for no upper bound."}},"required":["type","minAmount","maxAmount"]},{"type":"object","properties":{"type":{"type":"string","enum":["categoryType"]},"types":{"type":["array","null"],"items":{"type":"string"},"description":"Category types to include. Null = all types."},"showUnassigned":{"type":"boolean","default":true,"description":"Include uncategorized transactions."}},"required":["type","types"]},{"type":"object","properties":{"type":{"type":"string","enum":["assignedUser"]},"userIds":{"type":["array","null"],"items":{"type":"string"},"description":"User IDs to include. Null = all users."},"showUnassigned":{"type":"boolean","default":true,"description":"Include transactions with no assigned user."}},"required":["type","userIds"]},{"type":"object","properties":{"type":{"type":"string","enum":["quickSearch"]},"text":{"type":["string","null"],"description":"Searches fromTo, description, notes, merchant/category/asset name."},"minAmount":{"type":["object","null"],"properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"],"description":"An amount with value and currency."},"maxAmount":{"type":["object","null"],"properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"],"description":"An amount with value and currency."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["transactionIds"]},"ids":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":500,"description":"Transaction IDs to match (max 500)."}},"required":["type","ids"]},{"type":"object","properties":{"type":{"type":"string","enum":["counterAsset"]},"assetId":{"type":"string","description":"Match transactions booked against this asset as their transfer counterpart."}},"required":["type","assetId"]},{"type":"object","properties":{"type":{"type":"string","enum":["matchableForTransfer"]},"excludeAssetIds":{"type":["array","null"],"items":{"type":"string"},"description":"Source asset ids to exclude (ignoreAssetIds) — counterparts sit in a different asset."},"excludeAssetId":{"type":["string","null"],"description":"Deprecated single-asset alias for excludeAssetIds (folded into it)."},"startDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Earliest candidate date (inclusive)."},"endDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Latest candidate date (inclusive)."},"amountValue":{"type":["number","null"],"description":"Exact amount to match (already opposite-signed by the caller), rounded to 2 decimals."},"amountCurrency":{"type":["string","null"],"description":"Currency the candidate amount must match."}},"required":["type"]}]},"default":[],"description":"Filter spec matching the search endpoint; resolves to all matching rows."},"excludedIds":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"IDs to exclude from the resolved filter result."}},"required":["mode"]}]}},"required":["selection"]}}}},"responses":{"200":{"description":"Per-currency amount sums over the selection","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","description":"Number of transactions in the selection."},"sums":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, e.g. \"EUR\"."},"value":{"type":"number","description":"Sum of transaction amounts in this currency."}},"required":["currency","value"]},"description":"Per-currency sums, sorted by currency code."},"partialSums":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, e.g. \"EUR\"."},"value":{"type":"number","description":"Sum of transaction amounts in this currency."}},"required":["currency","value"]},"description":"Present only when a usingDate filter attributes at least one selected row partially: per-currency sums of the in-window (partial) amounts, full amount for rows the window covers entirely."}},"required":["count","sums"]}}}},"400":{"description":"A filter references an id not in this wallet","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/transactions/bulk":{"post":{"summary":"Create multiple transactions","description":"Transactional bulk create for imports and sample data (legacy bulkAddImportTransactions).","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid","description":"Row uuid"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"secondaryDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"amountValue":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,4})?$","description":"Decimal amount as a string, up to 4 fraction digits"},"amountCurrency":{"type":"string"},"categoryId":{"type":["string","null"],"description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"merchantId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"merchantAutoAssigned":{"type":["boolean","null"]},"excludeFromMerchantAutoAssignment":{"type":"boolean","default":false},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"usingStartDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"usingEndDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"notes":{"type":["string","null"]},"parentTransactionId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"parent":{"type":"boolean","default":false},"source":{"type":["string","null"]},"assignedUserId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"tagIds":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"},"default":[]},"pending":{"type":"boolean","default":false},"reviewed":{"type":"boolean","default":false}},"required":["assetId","date","amountValue","amountCurrency"]},"minItems":1,"maxItems":5000}},"required":["items"]}}}},"responses":{"201":{"description":"The created transactions, in input order","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"secondaryDate":{"type":["string","null"]},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":["string","null"],"format":"uuid"},"merchantId":{"type":["string","null"],"format":"uuid"},"merchantAutoAssigned":{"type":["boolean","null"]},"merchantCheckedGoogleMaps":{"type":["boolean","null"]},"merchantCheckedSearchApiGoogleWebSearch":{"type":["boolean","null"]},"excludeFromMerchantAutoAssignment":{"type":"boolean"},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"usingStartDate":{"type":["string","null"]},"usingEndDate":{"type":["string","null"]},"notes":{"type":["string","null"]},"parentTransactionId":{"type":["string","null"],"format":"uuid"},"parent":{"type":"boolean"},"source":{"type":["string","null"]},"assignedUserId":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"gocardlessTransactionId":{"type":["string","null"]},"gocardlessInternalTransactionId":{"type":["string","null"]},"finApiTransactionId":{"type":["string","null"]},"plaidTransactionId":{"type":["string","null"]},"klarnaTransactionId":{"type":["string","null"]},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"}},"pending":{"type":"boolean"},"reviewed":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","secondaryDate","fromTo","description","amountValue","amountCurrency","categoryId","merchantId","merchantAutoAssigned","merchantCheckedGoogleMaps","merchantCheckedSearchApiGoogleWebSearch","excludeFromMerchantAutoAssignment","usingDateRule","usingStartDate","usingEndDate","notes","parentTransactionId","parent","source","assignedUserId","transferCounterType","transferCounterId","gocardlessTransactionId","gocardlessInternalTransactionId","finApiTransactionId","plaidTransactionId","klarnaTransactionId","tagIds","pending","reviewed","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}}},"400":{"description":"Invalid transaction","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/transactions/bulkUpdate":{"post":{"summary":"Update multiple transactions","description":"Transactional per-item partial updates (legacy bulkEditTransactions / uncategorizeTransactions / bulk tag edits). Each item is the transaction id plus the fields to change.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid","description":"Row uuid"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"secondaryDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"amountValue":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,4})?$","description":"Decimal amount as a string, up to 4 fraction digits"},"amountCurrency":{"type":"string"},"categoryId":{"type":["string","null"],"description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"merchantId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"merchantAutoAssigned":{"type":["boolean","null"]},"excludeFromMerchantAutoAssignment":{"type":"boolean","default":false},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"usingStartDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"usingEndDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"notes":{"type":["string","null"]},"parentTransactionId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"parent":{"type":"boolean","default":false},"source":{"type":["string","null"]},"assignedUserId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"tagIds":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"},"default":[]},"pending":{"type":"boolean","default":false},"reviewed":{"type":"boolean","default":false},"id":{"type":"string","format":"uuid","description":"Row uuid"}},"required":["id"]},"minItems":1,"maxItems":5000}},"required":["items"]}}}},"responses":{"200":{"description":"The updated transactions, in input order","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"secondaryDate":{"type":["string","null"]},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":["string","null"],"format":"uuid"},"merchantId":{"type":["string","null"],"format":"uuid"},"merchantAutoAssigned":{"type":["boolean","null"]},"merchantCheckedGoogleMaps":{"type":["boolean","null"]},"merchantCheckedSearchApiGoogleWebSearch":{"type":["boolean","null"]},"excludeFromMerchantAutoAssignment":{"type":"boolean"},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"usingStartDate":{"type":["string","null"]},"usingEndDate":{"type":["string","null"]},"notes":{"type":["string","null"]},"parentTransactionId":{"type":["string","null"],"format":"uuid"},"parent":{"type":"boolean"},"source":{"type":["string","null"]},"assignedUserId":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"gocardlessTransactionId":{"type":["string","null"]},"gocardlessInternalTransactionId":{"type":["string","null"]},"finApiTransactionId":{"type":["string","null"]},"plaidTransactionId":{"type":["string","null"]},"klarnaTransactionId":{"type":["string","null"]},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"}},"pending":{"type":"boolean"},"reviewed":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","secondaryDate","fromTo","description","amountValue","amountCurrency","categoryId","merchantId","merchantAutoAssigned","merchantCheckedGoogleMaps","merchantCheckedSearchApiGoogleWebSearch","excludeFromMerchantAutoAssignment","usingDateRule","usingStartDate","usingEndDate","notes","parentTransactionId","parent","source","assignedUserId","transferCounterType","transferCounterId","gocardlessTransactionId","gocardlessInternalTransactionId","finApiTransactionId","plaidTransactionId","klarnaTransactionId","tagIds","pending","reviewed","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}}},"400":{"description":"Invalid update","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"A transaction was not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/transactions/bulkDelete":{"post":{"summary":"Delete multiple transactions","description":"Transactional bulk delete (legacy bulkDeleteTransactions). Split children and comments cascade per row.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"},"minItems":1,"maxItems":5000}},"required":["ids"]}}}},"responses":{"200":{"description":"The deleted transactions","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"secondaryDate":{"type":["string","null"]},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":["string","null"],"format":"uuid"},"merchantId":{"type":["string","null"],"format":"uuid"},"merchantAutoAssigned":{"type":["boolean","null"]},"merchantCheckedGoogleMaps":{"type":["boolean","null"]},"merchantCheckedSearchApiGoogleWebSearch":{"type":["boolean","null"]},"excludeFromMerchantAutoAssignment":{"type":"boolean"},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"usingStartDate":{"type":["string","null"]},"usingEndDate":{"type":["string","null"]},"notes":{"type":["string","null"]},"parentTransactionId":{"type":["string","null"],"format":"uuid"},"parent":{"type":"boolean"},"source":{"type":["string","null"]},"assignedUserId":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"gocardlessTransactionId":{"type":["string","null"]},"gocardlessInternalTransactionId":{"type":["string","null"]},"finApiTransactionId":{"type":["string","null"]},"plaidTransactionId":{"type":["string","null"]},"klarnaTransactionId":{"type":["string","null"]},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"}},"pending":{"type":"boolean"},"reviewed":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","secondaryDate","fromTo","description","amountValue","amountCurrency","categoryId","merchantId","merchantAutoAssigned","merchantCheckedGoogleMaps","merchantCheckedSearchApiGoogleWebSearch","excludeFromMerchantAutoAssignment","usingDateRule","usingStartDate","usingEndDate","notes","parentTransactionId","parent","source","assignedUserId","transferCounterType","transferCounterId","gocardlessTransactionId","gocardlessInternalTransactionId","finApiTransactionId","plaidTransactionId","klarnaTransactionId","tagIds","pending","reviewed","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}}},"404":{"description":"A transaction was not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/transactions/{id}/split":{"post":{"summary":"Split a transaction into child transactions","description":"Replaces any existing split children with one child per amount (same currency as the parent) and marks the transaction as parent — transactional, mirroring the legacy createChildTransactions flow (children start uncategorized/unreviewed, source 'split').","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amounts":{"type":"array","items":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,4})?$","description":"Decimal amount as a string, up to 4 fraction digits"},"minItems":1,"maxItems":100}},"required":["amounts"]}}}},"responses":{"200":{"description":"The parent with its new children (parent first)","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"secondaryDate":{"type":["string","null"]},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":["string","null"],"format":"uuid"},"merchantId":{"type":["string","null"],"format":"uuid"},"merchantAutoAssigned":{"type":["boolean","null"]},"merchantCheckedGoogleMaps":{"type":["boolean","null"]},"merchantCheckedSearchApiGoogleWebSearch":{"type":["boolean","null"]},"excludeFromMerchantAutoAssignment":{"type":"boolean"},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"usingStartDate":{"type":["string","null"]},"usingEndDate":{"type":["string","null"]},"notes":{"type":["string","null"]},"parentTransactionId":{"type":["string","null"],"format":"uuid"},"parent":{"type":"boolean"},"source":{"type":["string","null"]},"assignedUserId":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"gocardlessTransactionId":{"type":["string","null"]},"gocardlessInternalTransactionId":{"type":["string","null"]},"finApiTransactionId":{"type":["string","null"]},"plaidTransactionId":{"type":["string","null"]},"klarnaTransactionId":{"type":["string","null"]},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"}},"pending":{"type":"boolean"},"reviewed":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","secondaryDate","fromTo","description","amountValue","amountCurrency","categoryId","merchantId","merchantAutoAssigned","merchantCheckedGoogleMaps","merchantCheckedSearchApiGoogleWebSearch","excludeFromMerchantAutoAssignment","usingDateRule","usingStartDate","usingEndDate","notes","parentTransactionId","parent","source","assignedUserId","transferCounterType","transferCounterId","gocardlessTransactionId","gocardlessInternalTransactionId","finApiTransactionId","plaidTransactionId","klarnaTransactionId","tagIds","pending","reviewed","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/transactions/{id}/unsplit":{"post":{"summary":"Remove the split children of a transaction","description":"Deletes all split children and clears the parent flag — transactional, mirroring the legacy unsplitParentTransaction flow.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The former parent transaction","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"secondaryDate":{"type":["string","null"]},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":["string","null"],"format":"uuid"},"merchantId":{"type":["string","null"],"format":"uuid"},"merchantAutoAssigned":{"type":["boolean","null"]},"merchantCheckedGoogleMaps":{"type":["boolean","null"]},"merchantCheckedSearchApiGoogleWebSearch":{"type":["boolean","null"]},"excludeFromMerchantAutoAssignment":{"type":"boolean"},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"usingStartDate":{"type":["string","null"]},"usingEndDate":{"type":["string","null"]},"notes":{"type":["string","null"]},"parentTransactionId":{"type":["string","null"],"format":"uuid"},"parent":{"type":"boolean"},"source":{"type":["string","null"]},"assignedUserId":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"gocardlessTransactionId":{"type":["string","null"]},"gocardlessInternalTransactionId":{"type":["string","null"]},"finApiTransactionId":{"type":["string","null"]},"plaidTransactionId":{"type":["string","null"]},"klarnaTransactionId":{"type":["string","null"]},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"}},"pending":{"type":"boolean"},"reviewed":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","secondaryDate","fromTo","description","amountValue","amountCurrency","categoryId","merchantId","merchantAutoAssigned","merchantCheckedGoogleMaps","merchantCheckedSearchApiGoogleWebSearch","excludeFromMerchantAutoAssignment","usingDateRule","usingStartDate","usingEndDate","notes","parentTransactionId","parent","source","assignedUserId","transferCounterType","transferCounterId","gocardlessTransactionId","gocardlessInternalTransactionId","finApiTransactionId","plaidTransactionId","klarnaTransactionId","tagIds","pending","reviewed","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/transactions/{id}/edit":{"post":{"summary":"Edit a transaction (intent only)","description":"The full edit intent (date/merchant/category/fromTo/description/amount). The server reads the stored row and derives excludeFromMerchantAutoAssignment (merchant changed), reviewed (category set/cleared), and the using-period window from the row's existing rule — the pre-image math the legacy client did from Redux.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"merchantId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"categoryId":{"type":["string","null"],"description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"amountValue":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,4})?$","description":"Decimal amount as a string, up to 4 fraction digits"},"amountCurrency":{"type":"string"}},"required":["date","merchantId","categoryId","fromTo","description","amountValue","amountCurrency"]}}}},"responses":{"200":{"description":"The updated transaction","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"secondaryDate":{"type":["string","null"]},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":["string","null"],"format":"uuid"},"merchantId":{"type":["string","null"],"format":"uuid"},"merchantAutoAssigned":{"type":["boolean","null"]},"merchantCheckedGoogleMaps":{"type":["boolean","null"]},"merchantCheckedSearchApiGoogleWebSearch":{"type":["boolean","null"]},"excludeFromMerchantAutoAssignment":{"type":"boolean"},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"usingStartDate":{"type":["string","null"]},"usingEndDate":{"type":["string","null"]},"notes":{"type":["string","null"]},"parentTransactionId":{"type":["string","null"],"format":"uuid"},"parent":{"type":"boolean"},"source":{"type":["string","null"]},"assignedUserId":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"gocardlessTransactionId":{"type":["string","null"]},"gocardlessInternalTransactionId":{"type":["string","null"]},"finApiTransactionId":{"type":["string","null"]},"plaidTransactionId":{"type":["string","null"]},"klarnaTransactionId":{"type":["string","null"]},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"}},"pending":{"type":"boolean"},"reviewed":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","secondaryDate","fromTo","description","amountValue","amountCurrency","categoryId","merchantId","merchantAutoAssigned","merchantCheckedGoogleMaps","merchantCheckedSearchApiGoogleWebSearch","excludeFromMerchantAutoAssignment","usingDateRule","usingStartDate","usingEndDate","notes","parentTransactionId","parent","source","assignedUserId","transferCounterType","transferCounterId","gocardlessTransactionId","gocardlessInternalTransactionId","finApiTransactionId","plaidTransactionId","klarnaTransactionId","tagIds","pending","reviewed","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid reference","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/transactions/bulkEdit":{"post":{"summary":"Bulk-edit transactions (intent only)","description":"Applies one shared updateData to every id. The server merges it against each stored row: a newly-set merchant fills an empty category from the merchant default (and its default date rule), the using-period window is derived, and reviewed is suppressed when a row would still have no category. Mirrors the legacy bulkEditTransactions.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"},"minItems":1,"maxItems":5000},"updateData":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"notes":{"type":["string","null"]},"categoryId":{"type":["string","null"],"description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"merchantId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"merchantAutoAssigned":{"type":["boolean","null"]},"excludeFromMerchantAutoAssignment":{"type":"boolean"},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"usingStartDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"usingEndDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"assignedUserId":{"type":["string","null"]},"tagIds":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"}},"pending":{"type":"boolean"},"reviewed":{"type":"boolean"},"amountValue":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,4})?$","description":"Decimal amount as a string, up to 4 fraction digits"},"amountCurrency":{"type":"string"}}}},"required":["ids","updateData"]}}}},"responses":{"200":{"description":"The updated transactions, in input order","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"secondaryDate":{"type":["string","null"]},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":["string","null"],"format":"uuid"},"merchantId":{"type":["string","null"],"format":"uuid"},"merchantAutoAssigned":{"type":["boolean","null"]},"merchantCheckedGoogleMaps":{"type":["boolean","null"]},"merchantCheckedSearchApiGoogleWebSearch":{"type":["boolean","null"]},"excludeFromMerchantAutoAssignment":{"type":"boolean"},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"usingStartDate":{"type":["string","null"]},"usingEndDate":{"type":["string","null"]},"notes":{"type":["string","null"]},"parentTransactionId":{"type":["string","null"],"format":"uuid"},"parent":{"type":"boolean"},"source":{"type":["string","null"]},"assignedUserId":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"gocardlessTransactionId":{"type":["string","null"]},"gocardlessInternalTransactionId":{"type":["string","null"]},"finApiTransactionId":{"type":["string","null"]},"plaidTransactionId":{"type":["string","null"]},"klarnaTransactionId":{"type":["string","null"]},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"}},"pending":{"type":"boolean"},"reviewed":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","secondaryDate","fromTo","description","amountValue","amountCurrency","categoryId","merchantId","merchantAutoAssigned","merchantCheckedGoogleMaps","merchantCheckedSearchApiGoogleWebSearch","excludeFromMerchantAutoAssignment","usingDateRule","usingStartDate","usingEndDate","notes","parentTransactionId","parent","source","assignedUserId","transferCounterType","transferCounterId","gocardlessTransactionId","gocardlessInternalTransactionId","finApiTransactionId","plaidTransactionId","klarnaTransactionId","tagIds","pending","reviewed","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}}},"400":{"description":"Invalid update","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"A transaction was not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/transactions/totalBalance":{"post":{"summary":"Add a total-balance transaction (intent only)","description":"Records a 'Balance update' transaction that moves the asset's running balance ≤ date to newBalance. The server sums the existing balance and (when auto-calculating) the last same-category using-end date, then derives the amount delta and using-period window — the legacy addTotalBalanceTransaction pre-image math.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid","description":"Row uuid"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"categoryId":{"type":["string","null"],"description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"newBalanceValue":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,4})?$","description":"Decimal amount as a string, up to 4 fraction digits"},"newBalanceCurrency":{"type":"string"},"autoCalculateDatePeriod":{"type":"boolean"}},"required":["assetId","date","categoryId","newBalanceValue","newBalanceCurrency","autoCalculateDatePeriod"]}}}},"responses":{"201":{"description":"The created balance transaction","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"secondaryDate":{"type":["string","null"]},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":["string","null"],"format":"uuid"},"merchantId":{"type":["string","null"],"format":"uuid"},"merchantAutoAssigned":{"type":["boolean","null"]},"merchantCheckedGoogleMaps":{"type":["boolean","null"]},"merchantCheckedSearchApiGoogleWebSearch":{"type":["boolean","null"]},"excludeFromMerchantAutoAssignment":{"type":"boolean"},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"usingStartDate":{"type":["string","null"]},"usingEndDate":{"type":["string","null"]},"notes":{"type":["string","null"]},"parentTransactionId":{"type":["string","null"],"format":"uuid"},"parent":{"type":"boolean"},"source":{"type":["string","null"]},"assignedUserId":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"gocardlessTransactionId":{"type":["string","null"]},"gocardlessInternalTransactionId":{"type":["string","null"]},"finApiTransactionId":{"type":["string","null"]},"plaidTransactionId":{"type":["string","null"]},"klarnaTransactionId":{"type":["string","null"]},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"}},"pending":{"type":"boolean"},"reviewed":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","secondaryDate","fromTo","description","amountValue","amountCurrency","categoryId","merchantId","merchantAutoAssigned","merchantCheckedGoogleMaps","merchantCheckedSearchApiGoogleWebSearch","excludeFromMerchantAutoAssignment","usingDateRule","usingStartDate","usingEndDate","notes","parentTransactionId","parent","source","assignedUserId","transferCounterType","transferCounterId","gocardlessTransactionId","gocardlessInternalTransactionId","finApiTransactionId","plaidTransactionId","klarnaTransactionId","tagIds","pending","reviewed","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/transactions/bulkAddTags":{"post":{"summary":"Add tags to transactions (intent only)","description":"Appends tagIdsToAdd (deduped) to each transaction's tagIds. The server merges against the stored arrays; the legacy client did the arrayUnion from Redux.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"transactionIds":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"},"maxItems":5000},"tagIdsToAdd":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"}}},"required":["transactionIds","tagIdsToAdd"]}}}},"responses":{"200":{"description":"The updated transactions, in input order","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"secondaryDate":{"type":["string","null"]},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":["string","null"],"format":"uuid"},"merchantId":{"type":["string","null"],"format":"uuid"},"merchantAutoAssigned":{"type":["boolean","null"]},"merchantCheckedGoogleMaps":{"type":["boolean","null"]},"merchantCheckedSearchApiGoogleWebSearch":{"type":["boolean","null"]},"excludeFromMerchantAutoAssignment":{"type":"boolean"},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"usingStartDate":{"type":["string","null"]},"usingEndDate":{"type":["string","null"]},"notes":{"type":["string","null"]},"parentTransactionId":{"type":["string","null"],"format":"uuid"},"parent":{"type":"boolean"},"source":{"type":["string","null"]},"assignedUserId":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"gocardlessTransactionId":{"type":["string","null"]},"gocardlessInternalTransactionId":{"type":["string","null"]},"finApiTransactionId":{"type":["string","null"]},"plaidTransactionId":{"type":["string","null"]},"klarnaTransactionId":{"type":["string","null"]},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"}},"pending":{"type":"boolean"},"reviewed":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","secondaryDate","fromTo","description","amountValue","amountCurrency","categoryId","merchantId","merchantAutoAssigned","merchantCheckedGoogleMaps","merchantCheckedSearchApiGoogleWebSearch","excludeFromMerchantAutoAssignment","usingDateRule","usingStartDate","usingEndDate","notes","parentTransactionId","parent","source","assignedUserId","transferCounterType","transferCounterId","gocardlessTransactionId","gocardlessInternalTransactionId","finApiTransactionId","plaidTransactionId","klarnaTransactionId","tagIds","pending","reviewed","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}}},"400":{"description":"Invalid tag","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"A transaction was not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/transactions/removeAssetHistory":{"post":{"summary":"Remove an asset's transaction history before a date (intent only)","description":"Deletes every transaction of the asset with date < the given date (split children and comments cascade), sums them (with the server FX rates) into the asset default currency, and creates one 'Initial balance' rollup transaction at the date. Legacy removeHistoryForAsset.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid","description":"Row uuid"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["assetId","date"]}}}},"responses":{"201":{"description":"The rollup transaction","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"secondaryDate":{"type":["string","null"]},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":["string","null"],"format":"uuid"},"merchantId":{"type":["string","null"],"format":"uuid"},"merchantAutoAssigned":{"type":["boolean","null"]},"merchantCheckedGoogleMaps":{"type":["boolean","null"]},"merchantCheckedSearchApiGoogleWebSearch":{"type":["boolean","null"]},"excludeFromMerchantAutoAssignment":{"type":"boolean"},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"usingStartDate":{"type":["string","null"]},"usingEndDate":{"type":["string","null"]},"notes":{"type":["string","null"]},"parentTransactionId":{"type":["string","null"],"format":"uuid"},"parent":{"type":"boolean"},"source":{"type":["string","null"]},"assignedUserId":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"gocardlessTransactionId":{"type":["string","null"]},"gocardlessInternalTransactionId":{"type":["string","null"]},"finApiTransactionId":{"type":["string","null"]},"plaidTransactionId":{"type":["string","null"]},"klarnaTransactionId":{"type":["string","null"]},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"}},"pending":{"type":"boolean"},"reviewed":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","secondaryDate","fromTo","description","amountValue","amountCurrency","categoryId","merchantId","merchantAutoAssigned","merchantCheckedGoogleMaps","merchantCheckedSearchApiGoogleWebSearch","excludeFromMerchantAutoAssignment","usingDateRule","usingStartDate","usingEndDate","notes","parentTransactionId","parent","source","assignedUserId","transferCounterType","transferCounterId","gocardlessTransactionId","gocardlessInternalTransactionId","finApiTransactionId","plaidTransactionId","klarnaTransactionId","tagIds","pending","reviewed","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/securityDetails":{"get":{"summary":"List security details for held ISINs","description":"Global security metadata (name, wkn, splits) for every ISIN this wallet holds a security transaction in. Splits are a { date: factor } map per ISIN.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"responses":{"200":{"description":"Security details, one per held ISIN","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SecurityDetail"}}}}}}}},"/wallets/{walletId}/backgroundTasks":{"get":{"summary":"List background tasks","description":"The wallet's background tasks (bank refresh + merchant suggestion jobs), newest first. Server-produced; read-only.","tags":["Holdings"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"responses":{"200":{"description":"All background tasks of the wallet","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"type":{"type":"string","enum":["suggestMerchants","gocardlessRefreshAssetTransactions","finapiRefreshAssetTransactions","plaidRefreshAssetTransactions"]},"status":{"type":"string","enum":["open","running","failed","succeeded"]},"assetId":{"type":["string","null"],"format":"uuid"},"newTransactionCount":{"type":["integer","null"],"minimum":-2147483648,"maximum":2147483647},"numberOfTransactionsAutoUpdated":{"type":["integer","null"],"minimum":-2147483648,"maximum":2147483647},"error":{"type":["string","null"]},"errorDetails":{"type":["string","null"]},"createdTime":{"type":"string","format":"date-time"},"finishedTime":{"type":["string","null"],"format":"date-time"},"expireAt":{"type":["string","null"],"format":"date-time"}},"required":["id","walletId","firestoreId","type","status","assetId","newTransactionCount","numberOfTransactionsAutoUpdated","error","errorDetails","createdTime","finishedTime","expireAt"]}}}}}}}},"/wallets/{walletId}/cryptoTransactions":{"get":{"summary":"List cryptoTransactions","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"responses":{"200":{"description":"All cryptoTransactions of the wallet","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"type":{"type":"string","enum":["initialBalance","buy","sell"]},"cryptoCurrency":{"type":"string","enum":["BTC","ETH"]},"quantity":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"priceValue":{"type":"string"},"priceCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"feesValue":{"type":"string"},"feesCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"taxValue":{"type":"string"},"taxCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":"string","format":"uuid"},"notes":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","type","cryptoCurrency","quantity","priceValue","priceCurrency","feesValue","feesCurrency","taxValue","taxCurrency","categoryId","notes","transferCounterType","transferCounterId","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}}}}},"post":{"summary":"Create a crypto transaction","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid","description":"Row uuid"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"type":{"type":"string","enum":["initialBalance","buy","sell"]},"quantity":{"type":"number"},"priceValue":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,4})?$","description":"Decimal amount as a string, up to 4 fraction digits"},"priceCurrency":{"type":"string"},"feesValue":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,4})?$","description":"Decimal amount as a string, up to 4 fraction digits"},"feesCurrency":{"type":"string"},"taxValue":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,4})?$","description":"Decimal amount as a string, up to 4 fraction digits"},"taxCurrency":{"type":"string"},"categoryId":{"type":"string","description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"notes":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"cryptoCurrency":{"type":"string","enum":["BTC","ETH"]}},"required":["assetId","date","type","quantity","priceValue","priceCurrency","feesValue","feesCurrency","taxValue","taxCurrency","categoryId","cryptoCurrency"]}}}},"responses":{"201":{"description":"The created crypto transaction","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"type":{"type":"string","enum":["initialBalance","buy","sell"]},"cryptoCurrency":{"type":"string","enum":["BTC","ETH"]},"quantity":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"priceValue":{"type":"string"},"priceCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"feesValue":{"type":"string"},"feesCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"taxValue":{"type":"string"},"taxCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":"string","format":"uuid"},"notes":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","type","cryptoCurrency","quantity","priceValue","priceCurrency","feesValue","feesCurrency","taxValue","taxCurrency","categoryId","notes","transferCounterType","transferCounterId","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/cryptoTransactions/{id}":{"get":{"summary":"Get a crypto transaction","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The crypto transaction","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"type":{"type":"string","enum":["initialBalance","buy","sell"]},"cryptoCurrency":{"type":"string","enum":["BTC","ETH"]},"quantity":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"priceValue":{"type":"string"},"priceCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"feesValue":{"type":"string"},"feesCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"taxValue":{"type":"string"},"taxCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":"string","format":"uuid"},"notes":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","type","cryptoCurrency","quantity","priceValue","priceCurrency","feesValue","feesCurrency","taxValue","taxCurrency","categoryId","notes","transferCounterType","transferCounterId","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"patch":{"summary":"Update a crypto transaction","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid","description":"Row uuid"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"type":{"type":"string","enum":["initialBalance","buy","sell"]},"quantity":{"type":"number"},"priceValue":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,4})?$","description":"Decimal amount as a string, up to 4 fraction digits"},"priceCurrency":{"type":"string"},"feesValue":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,4})?$","description":"Decimal amount as a string, up to 4 fraction digits"},"feesCurrency":{"type":"string"},"taxValue":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,4})?$","description":"Decimal amount as a string, up to 4 fraction digits"},"taxCurrency":{"type":"string"},"categoryId":{"type":"string","description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"notes":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"cryptoCurrency":{"type":"string","enum":["BTC","ETH"]}}}}}},"responses":{"200":{"description":"The updated crypto transaction","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"type":{"type":"string","enum":["initialBalance","buy","sell"]},"cryptoCurrency":{"type":"string","enum":["BTC","ETH"]},"quantity":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"priceValue":{"type":"string"},"priceCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"feesValue":{"type":"string"},"feesCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"taxValue":{"type":"string"},"taxCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":"string","format":"uuid"},"notes":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","type","cryptoCurrency","quantity","priceValue","priceCurrency","feesValue","feesCurrency","taxValue","taxCurrency","categoryId","notes","transferCounterType","transferCounterId","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"delete":{"summary":"Delete a crypto transaction","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The deleted crypto transaction","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"type":{"type":"string","enum":["initialBalance","buy","sell"]},"cryptoCurrency":{"type":"string","enum":["BTC","ETH"]},"quantity":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"priceValue":{"type":"string"},"priceCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"feesValue":{"type":"string"},"feesCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"taxValue":{"type":"string"},"taxCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":"string","format":"uuid"},"notes":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","type","cryptoCurrency","quantity","priceValue","priceCurrency","feesValue","feesCurrency","taxValue","taxCurrency","categoryId","notes","transferCounterType","transferCounterId","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/securityTransactions":{"get":{"summary":"List securityTransactions","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"responses":{"200":{"description":"All securityTransactions of the wallet","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"type":{"type":"string","enum":["initialBalance","buy","sell"]},"isin":{"type":"string"},"quantity":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"priceValue":{"type":"string"},"priceCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"feesValue":{"type":"string"},"feesCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"taxValue":{"type":"string"},"taxCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":"string","format":"uuid"},"notes":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","type","isin","quantity","priceValue","priceCurrency","feesValue","feesCurrency","taxValue","taxCurrency","categoryId","notes","transferCounterType","transferCounterId","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}}}}},"post":{"summary":"Create a security transaction","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid","description":"Row uuid"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"type":{"type":"string","enum":["initialBalance","buy","sell"]},"quantity":{"type":"number"},"priceValue":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,4})?$","description":"Decimal amount as a string, up to 4 fraction digits"},"priceCurrency":{"type":"string"},"feesValue":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,4})?$","description":"Decimal amount as a string, up to 4 fraction digits"},"feesCurrency":{"type":"string"},"taxValue":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,4})?$","description":"Decimal amount as a string, up to 4 fraction digits"},"taxCurrency":{"type":"string"},"categoryId":{"type":"string","description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"notes":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"isin":{"type":"string","minLength":1}},"required":["assetId","date","type","quantity","priceValue","priceCurrency","feesValue","feesCurrency","taxValue","taxCurrency","categoryId","isin"]}}}},"responses":{"201":{"description":"The created security transaction","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"type":{"type":"string","enum":["initialBalance","buy","sell"]},"isin":{"type":"string"},"quantity":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"priceValue":{"type":"string"},"priceCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"feesValue":{"type":"string"},"feesCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"taxValue":{"type":"string"},"taxCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":"string","format":"uuid"},"notes":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","type","isin","quantity","priceValue","priceCurrency","feesValue","feesCurrency","taxValue","taxCurrency","categoryId","notes","transferCounterType","transferCounterId","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/securityTransactions/{id}":{"get":{"summary":"Get a security transaction","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The security transaction","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"type":{"type":"string","enum":["initialBalance","buy","sell"]},"isin":{"type":"string"},"quantity":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"priceValue":{"type":"string"},"priceCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"feesValue":{"type":"string"},"feesCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"taxValue":{"type":"string"},"taxCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":"string","format":"uuid"},"notes":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","type","isin","quantity","priceValue","priceCurrency","feesValue","feesCurrency","taxValue","taxCurrency","categoryId","notes","transferCounterType","transferCounterId","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"patch":{"summary":"Update a security transaction","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid","description":"Row uuid"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"type":{"type":"string","enum":["initialBalance","buy","sell"]},"quantity":{"type":"number"},"priceValue":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,4})?$","description":"Decimal amount as a string, up to 4 fraction digits"},"priceCurrency":{"type":"string"},"feesValue":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,4})?$","description":"Decimal amount as a string, up to 4 fraction digits"},"feesCurrency":{"type":"string"},"taxValue":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,4})?$","description":"Decimal amount as a string, up to 4 fraction digits"},"taxCurrency":{"type":"string"},"categoryId":{"type":"string","description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"notes":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"isin":{"type":"string","minLength":1}}}}}},"responses":{"200":{"description":"The updated security transaction","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"type":{"type":"string","enum":["initialBalance","buy","sell"]},"isin":{"type":"string"},"quantity":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"priceValue":{"type":"string"},"priceCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"feesValue":{"type":"string"},"feesCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"taxValue":{"type":"string"},"taxCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":"string","format":"uuid"},"notes":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","type","isin","quantity","priceValue","priceCurrency","feesValue","feesCurrency","taxValue","taxCurrency","categoryId","notes","transferCounterType","transferCounterId","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"delete":{"summary":"Delete a security transaction","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The deleted security transaction","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"type":{"type":"string","enum":["initialBalance","buy","sell"]},"isin":{"type":"string"},"quantity":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"priceValue":{"type":"string"},"priceCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"feesValue":{"type":"string"},"feesCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"taxValue":{"type":"string"},"taxCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":"string","format":"uuid"},"notes":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","type","isin","quantity","priceValue","priceCurrency","feesValue","feesCurrency","taxValue","taxCurrency","categoryId","notes","transferCounterType","transferCounterId","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/totalValueUpdates":{"get":{"summary":"List totalValueUpdates","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"responses":{"200":{"description":"All totalValueUpdates of the wallet","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"notes":{"type":["string","null"]},"initialBalance":{"type":"boolean"},"source":{"type":["string","null"]},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","amountValue","amountCurrency","notes","initialBalance","source","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}}}}},"post":{"summary":"Create a total value update","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid","description":"Row uuid"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"amountValue":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,4})?$","description":"Decimal amount as a string, up to 4 fraction digits"},"amountCurrency":{"type":"string"},"notes":{"type":["string","null"]},"initialBalance":{"type":"boolean","default":false},"source":{"type":["string","null"]}},"required":["assetId","date","amountValue","amountCurrency"]}}}},"responses":{"201":{"description":"The created total value update","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"notes":{"type":["string","null"]},"initialBalance":{"type":"boolean"},"source":{"type":["string","null"]},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","amountValue","amountCurrency","notes","initialBalance","source","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/totalValueUpdates/{id}":{"get":{"summary":"Get a total value update","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The total value update","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"notes":{"type":["string","null"]},"initialBalance":{"type":"boolean"},"source":{"type":["string","null"]},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","amountValue","amountCurrency","notes","initialBalance","source","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"patch":{"summary":"Update a total value update","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"amountValue":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,4})?$","description":"Decimal amount as a string, up to 4 fraction digits"},"amountCurrency":{"type":"string"},"notes":{"type":["string","null"]},"initialBalance":{"type":"boolean"},"source":{"type":["string","null"]}}}}}},"responses":{"200":{"description":"The updated total value update","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"notes":{"type":["string","null"]},"initialBalance":{"type":"boolean"},"source":{"type":["string","null"]},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","amountValue","amountCurrency","notes","initialBalance","source","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"delete":{"summary":"Delete a total value update","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The deleted total value update","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"notes":{"type":["string","null"]},"initialBalance":{"type":"boolean"},"source":{"type":["string","null"]},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","amountValue","amountCurrency","notes","initialBalance","source","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/totalValueUpdates/removeAssetHistory":{"post":{"summary":"Remove an asset's total-value history before a date (intent only)","description":"Deletes total-value updates with date < the given date and creates one initialBalance rollup update at date, carrying the latest deleted value converted into the asset default currency. Returns the created rollup (null when the asset had no earlier history) and how many rows were deleted.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid","description":"Row uuid"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["assetId","date"]}}}},"responses":{"200":{"description":"The rollup update (or null) and the deleted count","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"notes":{"type":["string","null"]},"initialBalance":{"type":"boolean"},"source":{"type":["string","null"]},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","amountValue","amountCurrency","notes","initialBalance","source","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]},"deletedCount":{"type":"number"}},"required":["created","deletedCount"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/cryptoTransactions/search":{"post":{"summary":"Search crypto transactions (transfer-counterpart candidates)","description":"Enriched crypto transactions matchable as a transfer counterpart: date window, include/exclude assets, the no-counter-link + transfer/uncategorized predicate, and an exact signed-total match. Backs the counter-picker crypto tab.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"startDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Earliest candidate date (inclusive)."},"endDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Latest candidate date (inclusive)."},"assetIds":{"type":["array","null"],"items":{"type":"string"},"description":"Include only these asset ids. Null/omitted = all assets; [] = none."},"excludeAssetIds":{"type":"array","items":{"type":"string"},"default":[],"description":"Exclude these asset ids (the source asset — counterparts sit elsewhere)."},"onlyMatchableForTransfer":{"type":"boolean","default":false,"description":"Only rows with no counter link and the transfer (or no) category."},"exactAmount":{"type":["object","null"],"properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"],"description":"The (already opposite-signed) amount the holding total must equal."},"limit":{"type":"integer","minimum":1,"maximum":500,"default":200},"offset":{"type":"integer","minimum":0,"default":0}}}}}},"responses":{"200":{"description":"Matching crypto transactions","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"type":{"type":"string","enum":["initialBalance","buy","sell"]},"cryptoCurrency":{"type":"string","enum":["BTC","ETH"]},"quantity":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"priceValue":{"type":"string"},"priceCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"feesValue":{"type":"string"},"feesCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"taxValue":{"type":"string"},"taxCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":"string","format":"uuid"},"notes":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]},"assetName":{"type":["string","null"]},"assetType":{"type":["string","null"]},"assetDefaultCurrency":{"type":["string","null"]},"categoryName":{"type":["string","null"]},"categoryEmoji":{"type":["string","null"]},"categorySystemKey":{"type":["string","null"]},"isTransfer":{"type":"boolean"},"totalPriceValue":{"type":"number"},"totalPriceCurrency":{"type":"string"},"matchAmountValue":{"type":"number"},"matchAmountCurrency":{"type":"string"}},"required":["id","walletId","firestoreId","assetId","date","type","cryptoCurrency","quantity","priceValue","priceCurrency","feesValue","feesCurrency","taxValue","taxCurrency","categoryId","notes","transferCounterType","transferCounterId","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}},"totalCount":{"type":"number"}},"required":["items","totalCount"]}}}}}}},"/wallets/{walletId}/securityTransactions/search":{"post":{"summary":"Search security transactions (transfer-counterpart candidates)","description":"Enriched security transactions matchable as a transfer counterpart: date window, include/exclude assets, the no-counter-link + transfer/uncategorized predicate, and an exact signed-total match. Backs the counter-picker security tab.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"startDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Earliest candidate date (inclusive)."},"endDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Latest candidate date (inclusive)."},"assetIds":{"type":["array","null"],"items":{"type":"string"},"description":"Include only these asset ids. Null/omitted = all assets; [] = none."},"excludeAssetIds":{"type":"array","items":{"type":"string"},"default":[],"description":"Exclude these asset ids (the source asset — counterparts sit elsewhere)."},"onlyMatchableForTransfer":{"type":"boolean","default":false,"description":"Only rows with no counter link and the transfer (or no) category."},"exactAmount":{"type":["object","null"],"properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"],"description":"The (already opposite-signed) amount the holding total must equal."},"limit":{"type":"integer","minimum":1,"maximum":500,"default":200},"offset":{"type":"integer","minimum":0,"default":0}}}}}},"responses":{"200":{"description":"Matching security transactions","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"type":{"type":"string","enum":["initialBalance","buy","sell"]},"isin":{"type":"string"},"quantity":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"priceValue":{"type":"string"},"priceCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"feesValue":{"type":"string"},"feesCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"taxValue":{"type":"string"},"taxCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":"string","format":"uuid"},"notes":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]},"assetName":{"type":["string","null"]},"assetType":{"type":["string","null"]},"assetDefaultCurrency":{"type":["string","null"]},"categoryName":{"type":["string","null"]},"categoryEmoji":{"type":["string","null"]},"categorySystemKey":{"type":["string","null"]},"isTransfer":{"type":"boolean"},"totalPriceValue":{"type":"number"},"totalPriceCurrency":{"type":"string"},"matchAmountValue":{"type":"number"},"matchAmountCurrency":{"type":"string"}},"required":["id","walletId","firestoreId","assetId","date","type","isin","quantity","priceValue","priceCurrency","feesValue","feesCurrency","taxValue","taxCurrency","categoryId","notes","transferCounterType","transferCounterId","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}},"totalCount":{"type":"number"}},"required":["items","totalCount"]}}}}}}},"/wallets/{walletId}/comments":{"get":{"summary":"List comments","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"responses":{"200":{"description":"All comments of the wallet","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"transactionId":{"type":"string","format":"uuid"},"text":{"type":"string"},"taggedUserIds":{"type":"array","items":{"type":"string"}},"likedUserIds":{"type":"array","items":{"type":"string"}},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","transactionId","text","taggedUserIds","likedUserIds","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}}}}},"post":{"summary":"Create a comment","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"transactionId":{"type":"string","format":"uuid","description":"Row uuid"},"text":{"type":"string","minLength":1},"taggedUserIds":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"},"default":[]}},"required":["transactionId","text"]}}}},"responses":{"201":{"description":"The created comment","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"transactionId":{"type":"string","format":"uuid"},"text":{"type":"string"},"taggedUserIds":{"type":"array","items":{"type":"string"}},"likedUserIds":{"type":"array","items":{"type":"string"}},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","transactionId","text","taggedUserIds","likedUserIds","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/comments/{id}":{"get":{"summary":"Get a comment","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The comment","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"transactionId":{"type":"string","format":"uuid"},"text":{"type":"string"},"taggedUserIds":{"type":"array","items":{"type":"string"}},"likedUserIds":{"type":"array","items":{"type":"string"}},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","transactionId","text","taggedUserIds","likedUserIds","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"patch":{"summary":"Update a comment","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1},"taggedUserIds":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"}},"likedUserIds":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"}}}}}}},"responses":{"200":{"description":"The updated comment","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"transactionId":{"type":"string","format":"uuid"},"text":{"type":"string"},"taggedUserIds":{"type":"array","items":{"type":"string"}},"likedUserIds":{"type":"array","items":{"type":"string"}},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","transactionId","text","taggedUserIds","likedUserIds","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"delete":{"summary":"Delete a comment","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The deleted comment","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"transactionId":{"type":"string","format":"uuid"},"text":{"type":"string"},"taggedUserIds":{"type":"array","items":{"type":"string"}},"likedUserIds":{"type":"array","items":{"type":"string"}},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","transactionId","text","taggedUserIds","likedUserIds","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/files":{"get":{"summary":"List files","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"responses":{"200":{"description":"All files of the wallet","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"transactionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"cryptoTransactionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"securityTransactionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"filename":{"type":"string"},"fileExtension":{"type":"string"},"size":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"storagePath":{"type":"string"},"parseStatus":{"type":"string","enum":["open","running","failed","succeeded"]},"parseData":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","transactionIds","cryptoTransactionIds","securityTransactionIds","filename","fileExtension","size","storagePath","parseStatus","parseData","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}}}}}},"/wallets/{walletId}/files/{id}":{"get":{"summary":"Get a file","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The file","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"transactionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"cryptoTransactionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"securityTransactionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"filename":{"type":"string"},"fileExtension":{"type":"string"},"size":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"storagePath":{"type":"string"},"parseStatus":{"type":"string","enum":["open","running","failed","succeeded"]},"parseData":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","transactionIds","cryptoTransactionIds","securityTransactionIds","filename","fileExtension","size","storagePath","parseStatus","parseData","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"patch":{"summary":"Update a file","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"transactionIds":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"}},"cryptoTransactionIds":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"}},"securityTransactionIds":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"}},"filename":{"type":"string","minLength":1},"parseData":{"type":["object","null"],"additionalProperties":{}}}}}}},"responses":{"200":{"description":"The updated file","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"transactionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"cryptoTransactionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"securityTransactionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"filename":{"type":"string"},"fileExtension":{"type":"string"},"size":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"storagePath":{"type":"string"},"parseStatus":{"type":"string","enum":["open","running","failed","succeeded"]},"parseData":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","transactionIds","cryptoTransactionIds","securityTransactionIds","filename","fileExtension","size","storagePath","parseStatus","parseData","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"delete":{"summary":"Delete a file","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The deleted file","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"transactionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"cryptoTransactionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"securityTransactionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"filename":{"type":"string"},"fileExtension":{"type":"string"},"size":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"storagePath":{"type":"string"},"parseStatus":{"type":"string","enum":["open","running","failed","succeeded"]},"parseData":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","transactionIds","cryptoTransactionIds","securityTransactionIds","filename","fileExtension","size","storagePath","parseStatus","parseData","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/notifications":{"get":{"summary":"List notifications","description":"User sessions see their own notifications; API keys see the whole wallet. Newest first. Paginate with limit/offset.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":500},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Notifications","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"type":{"type":"string"},"recipientUserId":{"type":"string"},"readTime":{"type":["string","null"],"format":"date-time"},"payload":{"type":["object","null"],"additionalProperties":{}},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","type","recipientUserId","readTime","payload","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}}}}},"post":{"summary":"Create a notification","description":"Only the client-produced social types (assigned user, comments). The payload is a display snapshot stored verbatim; the recipient must be a wallet member.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["assignedUser","bulkAssignedUser","newComment","likedComment"]},"recipientUserId":{"type":"string","format":"uuid","description":"Row uuid"},"payload":{"type":["object","null"],"additionalProperties":{}}},"required":["type","recipientUserId"]}}}},"responses":{"201":{"description":"The created notification","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"type":{"type":"string"},"recipientUserId":{"type":"string"},"readTime":{"type":["string","null"],"format":"date-time"},"payload":{"type":["object","null"],"additionalProperties":{}},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","type","recipientUserId","readTime","payload","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid notification","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/notifications/{id}/read":{"post":{"summary":"Mark a notification as read","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The notification","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"type":{"type":"string"},"recipientUserId":{"type":"string"},"readTime":{"type":["string","null"],"format":"date-time"},"payload":{"type":["object","null"],"additionalProperties":{}},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","type","recipientUserId","readTime","payload","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/notifications/markRead":{"post":{"summary":"Mark notifications as read or unread","description":"Bulk read-state toggle (legacy markNotificationsAsRead / markNotificationsAsUnread). User sessions can only touch their own notifications.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"},"minItems":1,"maxItems":1000},"read":{"type":"boolean","default":true}},"required":["ids"]}}}},"responses":{"200":{"description":"The updated notifications","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"type":{"type":"string"},"recipientUserId":{"type":"string"},"readTime":{"type":["string","null"],"format":"date-time"},"payload":{"type":["object","null"],"additionalProperties":{}},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","type","recipientUserId","readTime","payload","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}}},"404":{"description":"A notification was not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/notifications/{id}":{"delete":{"summary":"Delete a notification","description":"User sessions can only delete their own notifications.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The deleted notification","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"type":{"type":"string"},"recipientUserId":{"type":"string"},"readTime":{"type":["string","null"],"format":"date-time"},"payload":{"type":["object","null"],"additionalProperties":{}},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","type","recipientUserId","readTime","payload","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/comments/{id}/like":{"post":{"summary":"Like or unlike a comment (intent only)","description":"Adds or removes a user id from the comment's likedUserIds (legacy like/unlikeComment). op 'add' is idempotent; 'remove' filters the id out.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"op":{"type":"string","enum":["add","remove"]},"userId":{"type":"string","minLength":1}},"required":["op","userId"]}}}},"responses":{"200":{"description":"The updated comment","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"transactionId":{"type":"string","format":"uuid"},"text":{"type":"string"},"taggedUserIds":{"type":"array","items":{"type":"string"}},"likedUserIds":{"type":"array","items":{"type":"string"}},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","transactionId","text","taggedUserIds","likedUserIds","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/files/{id}/assign":{"post":{"summary":"Assign transactions to a file (intent only)","description":"Unions the given transaction / crypto / security ids into the file's arrays (legacy assignFile). Returns the updated file.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"transactionIds":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"}},"cryptoTransactionIds":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"}},"securityTransactionIds":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"}}}}}}},"responses":{"200":{"description":"The updated file","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"transactionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"cryptoTransactionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"securityTransactionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"filename":{"type":"string"},"fileExtension":{"type":"string"},"size":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"storagePath":{"type":"string"},"parseStatus":{"type":"string","enum":["open","running","failed","succeeded"]},"parseData":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","transactionIds","cryptoTransactionIds","securityTransactionIds","filename","fileExtension","size","storagePath","parseStatus","parseData","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid reference","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/files/{id}/unassign":{"post":{"summary":"Unassign transactions from a file (intent only)","description":"Removes the given ids from the file's arrays; with no ids given, clears all three arrays (legacy unassignFile). Errors when the file has no assignments at all.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"transactionIds":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"}},"cryptoTransactionIds":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"}},"securityTransactionIds":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"}}}}}}},"responses":{"200":{"description":"The updated file","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"transactionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"cryptoTransactionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"securityTransactionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"filename":{"type":"string"},"fileExtension":{"type":"string"},"size":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"storagePath":{"type":"string"},"parseStatus":{"type":"string","enum":["open","running","failed","succeeded"]},"parseData":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","transactionIds","cryptoTransactionIds","securityTransactionIds","filename","fileExtension","size","storagePath","parseStatus","parseData","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"File is not assigned to any transactions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/tags/merge":{"post":{"summary":"Merge tags","description":"Creates the merged tag, moves every transaction reference from the old tags to it, and deletes the old tags — one transaction (legacy mergeTags).","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"newTag":{"type":"object","properties":{"name":{"type":"string","minLength":1}},"required":["name"]},"tagIds":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"},"minItems":1,"maxItems":200}},"required":["newTag","tagIds"]}}}},"responses":{"201":{"description":"The merged (newly created) row","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid merge","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/categories/merge":{"post":{"summary":"Merge categories","description":"Creates the merged category, repoints transactions, merchant and asset default categories, and scenario change events; merges scenario starting bases (converted into the wallet base currency, legacy-exact); removes plan items that targeted or referenced the old categories; deletes the old categories — one transaction (legacy mergeCategories).","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"newCategory":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["activeIncome","passiveIncome","gainsLosses","fixedExpenses","variableExpenses","neutral"]},"emoji":{"type":["string","null"]},"order":{"type":"number"},"categoryGroupId":{"type":["string","null"],"format":"uuid","description":"Row uuid"}},"required":["name","type"]},"categoryIds":{"type":"array","items":{"type":"string","description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"minItems":1,"maxItems":200}},"required":["newCategory","categoryIds"]}}}},"responses":{"201":{"description":"The merged (newly created) row","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"type":{"type":"string","enum":["activeIncome","passiveIncome","gainsLosses","fixedExpenses","variableExpenses","neutral"]},"emoji":{"type":["string","null"]},"system":{"type":"boolean"},"systemKey":{"type":["string","null"]},"order":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"categoryGroupId":{"type":["string","null"],"format":"uuid"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","type","emoji","system","systemKey","order","categoryGroupId","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid merge","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/merchants/merge":{"post":{"summary":"Merge merchants","description":"Creates the merged merchant, repoints every transaction to it, and deletes the old merchants — one transaction (legacy mergeMerchants).","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"newMerchant":{"type":"object","properties":{"name":{"type":"string","minLength":1},"defaultCategoryId":{"type":["string","null"],"description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"defaultUsingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"domains":{"type":"array","items":{"type":"string"}},"logo":{"type":"boolean","default":false},"autoReviewTransactions":{"type":"boolean","default":false}},"required":["name"]},"merchantIds":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"},"minItems":1,"maxItems":200}},"required":["newMerchant","merchantIds"]}}}},"responses":{"201":{"description":"The merged (newly created) row","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"defaultCategoryId":{"type":["string","null"],"format":"uuid"},"defaultUsingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"domains":{"type":"array","items":{"type":"string"}},"logo":{"type":"boolean"},"autoCreatedSource":{"type":["string","null"],"enum":["googleMaps","searchApiGoogleWebSearch","bingWebSearch",null]},"autoReviewTransactions":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","defaultCategoryId","defaultUsingDateRule","domains","logo","autoCreatedSource","autoReviewTransactions","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid merge","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/merchants/{id}/applyDefaults":{"post":{"summary":"Apply a merchant's default category and date rule to its transactions","description":"Sets categoryId and usingDateRule on every transaction of the merchant (legacy editMerchant with updateExistingTransactions… — bug-compatible: the date-rule window dates are left untouched, exactly like the legacy batch).","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"Number of updated transactions","content":{"application/json":{"schema":{"type":"object","properties":{"updatedTransactionCount":{"type":"number"}},"required":["updatedTransactionCount"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/categoryGroups/merge":{"post":{"summary":"Merge category groups","description":"Creates the merged group, moves categories and child groups onto it, and deletes the old groups — one transaction (legacy mergeCategoryGroups).","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"newCategoryGroup":{"type":"object","properties":{"name":{"type":"string","minLength":1},"emoji":{"type":["string","null"]},"parentCategoryGroupId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"order":{"type":"number"}},"required":["name"]},"categoryGroupIds":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"},"minItems":1,"maxItems":200}},"required":["newCategoryGroup","categoryGroupIds"]}}}},"responses":{"201":{"description":"The merged (newly created) row","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"emoji":{"type":["string","null"]},"parentCategoryGroupId":{"type":["string","null"],"format":"uuid"},"order":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","emoji","parentCategoryGroupId","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid merge","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/assetGroups/merge":{"post":{"summary":"Merge asset groups","description":"Creates the merged group, moves assets onto it, and deletes the old groups — one transaction (legacy mergeAssetGroups).","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"newAssetGroup":{"type":"object","properties":{"name":{"type":"string","minLength":1},"archived":{"type":"boolean","default":false},"order":{"type":"number"}},"required":["name"]},"assetGroupIds":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"},"minItems":1,"maxItems":200}},"required":["newAssetGroup","assetGroupIds"]}}}},"responses":{"201":{"description":"The merged (newly created) row","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"archived":{"type":"boolean"},"order":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","archived","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid merge","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/transfers/link":{"post":{"summary":"Link two positions as a transfer","description":"Sets the transfer-counter pair on both sides and assigns the transfer system category; transaction sides get the transactionDate rule window (legacy linkTransactions).","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["transaction","securityTransaction","cryptoTransaction"]},"id":{"type":"string","format":"uuid","description":"Row uuid"}},"required":["type","id"]},"target":{"type":"object","properties":{"type":{"type":"string","enum":["transaction","securityTransaction","cryptoTransaction"]},"id":{"type":"string","format":"uuid","description":"Row uuid"}},"required":["type","id"]}},"required":["source","target"]}}}},"responses":{"200":{"description":"Linked","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"Invalid link","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"A position was not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/transfers/unlink":{"post":{"summary":"Unlink a transfer","description":"Clears the transfer-counter pair on the position and — when the counter is a transaction/holding — on the counter position too. Categories are left untouched (legacy unlink).","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["transaction","securityTransaction","cryptoTransaction"]},"id":{"type":"string","format":"uuid","description":"Row uuid"}},"required":["type","id"]}}}},"responses":{"200":{"description":"Unlinked","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"Not linked","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Position not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/transfers/counterAsset":{"post":{"summary":"Book a position against a counter asset","description":"Sets the transfer-counter pair (type asset) on the position; the balance effect is computed on the fly by the engine (legacy createCounterTransactionInAsset, canBeCounterAsset branch — no category change).","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["transaction","securityTransaction","cryptoTransaction"]},"id":{"type":"string","format":"uuid","description":"Row uuid"}},"required":["type","id"]},"assetId":{"type":"string","format":"uuid","description":"Row uuid"}},"required":["source","assetId"]}}}},"responses":{"200":{"description":"Linked to the asset","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"Asset cannot be a counter asset","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/transfers/counterTransaction":{"post":{"summary":"Create a counter transaction in an asset (intent only)","description":"Reads the source position, builds the mirror transaction in the target asset (amount negated / holding total price, FX-converted into the asset currency, categorized as a transfer), and links the pair. The canCreateCounterTransaction branch of the legacy createCounterTransactionInAsset.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["transaction","securityTransaction","cryptoTransaction"]},"id":{"type":"string","format":"uuid","description":"Row uuid"}},"required":["type","id"]},"assetId":{"type":"string","format":"uuid","description":"Row uuid"}},"required":["source","assetId"]}}}},"responses":{"201":{"description":"The created counter transaction","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"assetId":{"type":"string","format":"uuid"},"date":{"type":"string"},"secondaryDate":{"type":["string","null"]},"fromTo":{"type":["string","null"]},"description":{"type":["string","null"]},"amountValue":{"type":"string"},"amountCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"]},"categoryId":{"type":["string","null"],"format":"uuid"},"merchantId":{"type":["string","null"],"format":"uuid"},"merchantAutoAssigned":{"type":["boolean","null"]},"merchantCheckedGoogleMaps":{"type":["boolean","null"]},"merchantCheckedSearchApiGoogleWebSearch":{"type":["boolean","null"]},"excludeFromMerchantAutoAssignment":{"type":"boolean"},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null]},"usingStartDate":{"type":["string","null"]},"usingEndDate":{"type":["string","null"]},"notes":{"type":["string","null"]},"parentTransactionId":{"type":["string","null"],"format":"uuid"},"parent":{"type":"boolean"},"source":{"type":["string","null"]},"assignedUserId":{"type":["string","null"]},"transferCounterType":{"type":["string","null"],"enum":["transaction","asset","securityTransaction","cryptoTransaction",null]},"transferCounterId":{"type":["string","null"],"format":"uuid"},"gocardlessTransactionId":{"type":["string","null"]},"gocardlessInternalTransactionId":{"type":["string","null"]},"finApiTransactionId":{"type":["string","null"]},"plaidTransactionId":{"type":["string","null"]},"klarnaTransactionId":{"type":["string","null"]},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"}},"pending":{"type":"boolean"},"reviewed":{"type":"boolean"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","assetId","date","secondaryDate","fromTo","description","amountValue","amountCurrency","categoryId","merchantId","merchantAutoAssigned","merchantCheckedGoogleMaps","merchantCheckedSearchApiGoogleWebSearch","excludeFromMerchantAutoAssignment","usingDateRule","usingStartDate","usingEndDate","notes","parentTransactionId","parent","source","assignedUserId","transferCounterType","transferCounterId","gocardlessTransactionId","gocardlessInternalTransactionId","finApiTransactionId","plaidTransactionId","klarnaTransactionId","tagIds","pending","reviewed","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Asset cannot create a counter transaction","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/scenarios":{"get":{"summary":"List scenarios","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"responses":{"200":{"description":"All scenarios of the wallet","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"startDate":{"type":"string"},"endMonth":{"type":["string","null"]},"startingBasePerCategory":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"expectedAnnualReturn":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"assetIds":{"type":["array","null"],"items":{"type":"string","format":"uuid"}},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","startDate","endMonth","startingBasePerCategory","expectedAnnualReturn","assetIds","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}}}}},"post":{"summary":"Create a scenario","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endMonth":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}$"},"startingBasePerCategory":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"]}},"expectedAnnualReturn":{"type":"number"},"assetIds":{"type":["array","null"],"items":{"type":"string","format":"uuid","description":"Row uuid"}}},"required":["name","startDate","expectedAnnualReturn"]}}}},"responses":{"201":{"description":"The created scenario","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"startDate":{"type":"string"},"endMonth":{"type":["string","null"]},"startingBasePerCategory":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"expectedAnnualReturn":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"assetIds":{"type":["array","null"],"items":{"type":"string","format":"uuid"}},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","startDate","endMonth","startingBasePerCategory","expectedAnnualReturn","assetIds","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/scenarios/{id}":{"get":{"summary":"Get a scenario","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The scenario","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"startDate":{"type":"string"},"endMonth":{"type":["string","null"]},"startingBasePerCategory":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"expectedAnnualReturn":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"assetIds":{"type":["array","null"],"items":{"type":"string","format":"uuid"}},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","startDate","endMonth","startingBasePerCategory","expectedAnnualReturn","assetIds","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"patch":{"summary":"Update a scenario","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endMonth":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}$"},"startingBasePerCategory":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"]}},"expectedAnnualReturn":{"type":"number"},"assetIds":{"type":["array","null"],"items":{"type":"string","format":"uuid","description":"Row uuid"}}}}}}},"responses":{"200":{"description":"The updated scenario","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"startDate":{"type":"string"},"endMonth":{"type":["string","null"]},"startingBasePerCategory":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"expectedAnnualReturn":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"assetIds":{"type":["array","null"],"items":{"type":"string","format":"uuid"}},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","startDate","endMonth","startingBasePerCategory","expectedAnnualReturn","assetIds","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"delete":{"summary":"Delete a scenario","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The deleted scenario","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"startDate":{"type":"string"},"endMonth":{"type":["string","null"]},"startingBasePerCategory":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"expectedAnnualReturn":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"assetIds":{"type":["array","null"],"items":{"type":"string","format":"uuid"}},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","startDate","endMonth","startingBasePerCategory","expectedAnnualReturn","assetIds","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/scenarios/{id}/duplicate":{"post":{"summary":"Duplicate a scenario","description":"Copies the scenario and all its change events; the copy is named \"<name> (Copy)\".","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"201":{"description":"The new scenario","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"startDate":{"type":"string"},"endMonth":{"type":["string","null"]},"startingBasePerCategory":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"expectedAnnualReturn":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"assetIds":{"type":["array","null"],"items":{"type":"string","format":"uuid"}},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","startDate","endMonth","startingBasePerCategory","expectedAnnualReturn","assetIds","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/scenarioChangeEvents":{"get":{"summary":"List scenarioChangeEvents","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"responses":{"200":{"description":"All scenarioChangeEvents of the wallet","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"scenarioId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"categoryId":{"type":"string","format":"uuid"},"startMonth":{"type":"string"},"ongoingBase":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"ongoingPercentageChangePerYear":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"oneTime":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"active":{"type":"boolean"}},"required":["id","walletId","scenarioId","firestoreId","name","categoryId","startMonth","ongoingBase","ongoingPercentageChangePerYear","oneTime","active"]}}}}}}},"post":{"summary":"Create a scenario change event","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"scenarioId":{"type":"string","format":"uuid","description":"Row uuid"},"name":{"type":"string","minLength":1},"categoryId":{"type":"string","description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"startMonth":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"ongoingBase":{"type":["object","null"],"properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"]},"ongoingPercentageChangePerYear":{"type":["number","null"]},"oneTime":{"type":["object","null"],"properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"]},"active":{"type":"boolean"}},"required":["scenarioId","name","categoryId","startMonth","active"]}}}},"responses":{"201":{"description":"The created scenario change event","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"scenarioId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"categoryId":{"type":"string","format":"uuid"},"startMonth":{"type":"string"},"ongoingBase":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"ongoingPercentageChangePerYear":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"oneTime":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"active":{"type":"boolean"}},"required":["id","walletId","scenarioId","firestoreId","name","categoryId","startMonth","ongoingBase","ongoingPercentageChangePerYear","oneTime","active"]}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/scenarioChangeEvents/{id}":{"get":{"summary":"Get a scenario change event","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The scenario change event","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"scenarioId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"categoryId":{"type":"string","format":"uuid"},"startMonth":{"type":"string"},"ongoingBase":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"ongoingPercentageChangePerYear":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"oneTime":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"active":{"type":"boolean"}},"required":["id","walletId","scenarioId","firestoreId","name","categoryId","startMonth","ongoingBase","ongoingPercentageChangePerYear","oneTime","active"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"patch":{"summary":"Update a scenario change event","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"scenarioId":{"type":"string","format":"uuid","description":"Row uuid"},"name":{"type":"string","minLength":1},"categoryId":{"type":"string","description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"startMonth":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"ongoingBase":{"type":["object","null"],"properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"]},"ongoingPercentageChangePerYear":{"type":["number","null"]},"oneTime":{"type":["object","null"],"properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"]},"active":{"type":"boolean"}}}}}},"responses":{"200":{"description":"The updated scenario change event","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"scenarioId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"categoryId":{"type":"string","format":"uuid"},"startMonth":{"type":"string"},"ongoingBase":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"ongoingPercentageChangePerYear":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"oneTime":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"active":{"type":"boolean"}},"required":["id","walletId","scenarioId","firestoreId","name","categoryId","startMonth","ongoingBase","ongoingPercentageChangePerYear","oneTime","active"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"delete":{"summary":"Delete a scenario change event","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The deleted scenario change event","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"scenarioId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"categoryId":{"type":"string","format":"uuid"},"startMonth":{"type":"string"},"ongoingBase":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"ongoingPercentageChangePerYear":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"oneTime":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"active":{"type":"boolean"}},"required":["id","walletId","scenarioId","firestoreId","name","categoryId","startMonth","ongoingBase","ongoingPercentageChangePerYear","oneTime","active"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/planScenarios":{"get":{"summary":"List planScenarios","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"responses":{"200":{"description":"All planScenarios of the wallet","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}}}}}},"/wallets/{walletId}/planItems":{"get":{"summary":"List planItems","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"responses":{"200":{"description":"All planItems of the wallet","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"scenarioId":{"type":["string","null"],"format":"uuid"},"month":{"type":"string"},"categoryOrCategoryGroupId":{"type":"string","format":"uuid"},"amount":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"duration":{"type":["integer","null"],"minimum":-2147483648,"maximum":2147483647},"frequency":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","scenarioId","month","categoryOrCategoryGroupId","amount","duration","frequency","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}}}}},"post":{"summary":"Create a plan item","description":"For duration = 1, an existing single-month item for the same month and target is replaced (legacy addPlanItem semantics).","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"scenarioId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"categoryOrCategoryGroupId":{"type":"string","format":"uuid","description":"Row uuid"},"amount":{"type":"object","additionalProperties":{}},"duration":{"type":["integer","null"]},"frequency":{"type":"integer","default":1}},"required":["month","categoryOrCategoryGroupId","amount"]}}}},"responses":{"201":{"description":"The created plan item","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"scenarioId":{"type":["string","null"],"format":"uuid"},"month":{"type":"string"},"categoryOrCategoryGroupId":{"type":"string","format":"uuid"},"amount":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"duration":{"type":["integer","null"],"minimum":-2147483648,"maximum":2147483647},"frequency":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","scenarioId","month","categoryOrCategoryGroupId","amount","duration","frequency","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid plan item","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/planItems/{id}":{"get":{"summary":"Get a plan item","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The plan item","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"scenarioId":{"type":["string","null"],"format":"uuid"},"month":{"type":"string"},"categoryOrCategoryGroupId":{"type":"string","format":"uuid"},"amount":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"duration":{"type":["integer","null"],"minimum":-2147483648,"maximum":2147483647},"frequency":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","scenarioId","month","categoryOrCategoryGroupId","amount","duration","frequency","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"patch":{"summary":"Update a plan item","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"scenarioId":{"type":["string","null"],"format":"uuid","description":"Row uuid"},"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"categoryOrCategoryGroupId":{"type":"string","format":"uuid","description":"Row uuid"},"amount":{"type":"object","additionalProperties":{}},"duration":{"type":["integer","null"]},"frequency":{"type":"integer","default":1}}}}}},"responses":{"200":{"description":"The updated plan item","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"scenarioId":{"type":["string","null"],"format":"uuid"},"month":{"type":"string"},"categoryOrCategoryGroupId":{"type":"string","format":"uuid"},"amount":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"duration":{"type":["integer","null"],"minimum":-2147483648,"maximum":2147483647},"frequency":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","scenarioId","month","categoryOrCategoryGroupId","amount","duration","frequency","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"delete":{"summary":"Delete a plan item","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The deleted plan item","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"scenarioId":{"type":["string","null"],"format":"uuid"},"month":{"type":"string"},"categoryOrCategoryGroupId":{"type":"string","format":"uuid"},"amount":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"duration":{"type":["integer","null"],"minimum":-2147483648,"maximum":2147483647},"frequency":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","scenarioId","month","categoryOrCategoryGroupId","amount","duration","frequency","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Mutation not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/scenarios/{id}/changeEvents":{"post":{"summary":"Reconcile a scenario's change events (intent only)","description":"Takes the whole desired change-event map (keyed by change-event id) and diffs it against the stored rows: new keys are created, changed entries updated, and vanished entries deleted — one transaction. The client no longer diffs (legacy editScenario changeEvents). Returns the resulting change-event rows.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"changeEvents":{"type":"object","additionalProperties":{"type":"object","properties":{"name":{"type":"string","minLength":1},"categoryId":{"type":"string","description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"startMonth":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"ongoingBase":{"type":["object","null"],"properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"]},"ongoingPercentageChangePerYear":{"type":["number","null"]},"oneTime":{"type":["object","null"],"properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"]},"active":{"type":"boolean"}},"required":["name","categoryId","startMonth","active"]}}},"required":["changeEvents"]}}}},"responses":{"200":{"description":"The scenario's change events after the diff","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"scenarioId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"categoryId":{"type":"string","format":"uuid"},"startMonth":{"type":"string"},"ongoingBase":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"ongoingPercentageChangePerYear":{"type":["number","null"],"minimum":-140737488355328,"maximum":140737488355327},"oneTime":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"active":{"type":"boolean"}},"required":["id","walletId","scenarioId","firestoreId","name","categoryId","startMonth","ongoingBase","ongoingPercentageChangePerYear","oneTime","active"]}}}}},"400":{"description":"Invalid reference","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Scenario not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/scenarios/{id}/categoryBase":{"post":{"summary":"Set a scenario category's starting base (intent only)","description":"Merges { categoryId, amount } into the scenario startingBasePerCategory jsonb; an amount value of 0 removes the entry (legacy updateCategoryBase deleteField).","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"categoryId":{"type":"string","description":"Category row uuid or a system-category sentinel ('transfer'/'balance'/'offset')"},"amount":{"type":"object","properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"]}},"required":["categoryId","amount"]}}}},"responses":{"200":{"description":"The updated scenario","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"startDate":{"type":"string"},"endMonth":{"type":["string","null"]},"startingBasePerCategory":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"expectedAnnualReturn":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"assetIds":{"type":["array","null"],"items":{"type":"string","format":"uuid"}},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","startDate","endMonth","startingBasePerCategory","expectedAnnualReturn","assetIds","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid reference","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Scenario not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/scenarios/{id}/categoryBases":{"post":{"summary":"Bulk-set a scenario's category starting bases (intent only)","description":"Merges a { categoryId: amount } map into startingBasePerCategory; an amount value of 0 removes that entry (legacy bulkUpdateCategoryBases, taking proper amounts rather than the legacy bare-number write).","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"bases":{"type":"object","additionalProperties":{"type":"object","properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"]}}},"required":["bases"]}}}},"responses":{"200":{"description":"The updated scenario","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"firestoreId":{"type":["string","null"]},"name":{"type":"string"},"startDate":{"type":"string"},"endMonth":{"type":["string","null"]},"startingBasePerCategory":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"expectedAnnualReturn":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"assetIds":{"type":["array","null"],"items":{"type":"string","format":"uuid"}},"createdTime":{"type":["string","null"],"format":"date-time"},"createdUserId":{"type":["string","null"]},"lastUpdatedTime":{"type":["string","null"],"format":"date-time"},"lastUpdatedUserId":{"type":["string","null"]}},"required":["id","walletId","firestoreId","name","startDate","endMonth","startingBasePerCategory","expectedAnnualReturn","assetIds","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId"]}}}},"400":{"description":"Invalid reference","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Scenario not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/planItems/clean":{"post":{"summary":"Delete plan items not on a kept plan level (intent only)","description":"Deletes every plan item whose categoryOrCategoryGroupId is not in planLevels (legacy cleanPlanItems). An empty planLevels deletes them all.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"planLevels":{"type":"array","items":{"type":"string","format":"uuid","description":"Row uuid"}}},"required":["planLevels"]}}}},"responses":{"200":{"description":"How many plan items were deleted","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"number"}},"required":["deleted"]}}}}}}},"/wallets/{walletId}/planItems/deleteUnused":{"post":{"summary":"Delete plan items that never occur in the usage window (intent only)","description":"Walks each plan item's occurrence months inside 2020-01 → now+10y (later-created items win a month); items that never win a month are unused and deleted (legacy deleteUnusedPlanItems).","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"}],"responses":{"200":{"description":"How many plan items were deleted","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"number"}},"required":["deleted"]}}}}}}},"/wallets/{walletId}/data/batch":{"post":{"summary":"Run a batch of dashboard data slices","tags":["Data"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The wallet id (row uuid)"},"required":true,"description":"The wallet id (row uuid)","name":"walletId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slices":{"type":"array","items":{"type":"object","additionalProperties":{}}},"timeZone":{"type":"string"}},"required":["slices"]}}}},"responses":{"200":{"description":"Batch slice data ({ results, _timing }, results index-aligned with the request)","content":{"application/json":{"schema":{}}}},"400":{"description":"One or more slices have invalid params","content":{"application/json":{"schema":{}}}}}}},"/wallets/{walletId}/data/netWorthTimeSeries":{"post":{"summary":"netWorthTimeSeries slice","tags":["Data"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The wallet id (row uuid)"},"required":true,"description":"The wallet id (row uuid)","name":"walletId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"period":{"anyOf":[{"type":"string","enum":["today","yesterday","7days","30days","3months","6months","1year","mtd","ytd","lastWeek","lastMonth","lastYear","thisYear","thisAndNextYear","allTime"],"description":"A named relative window (e.g. \"ytd\", \"1year\", \"allTime\")."},{"type":"object","properties":{"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["startDate","endDate"],"description":"An explicit inclusive date window."}],"description":"Window to bound the series to. Omit for full history (earliest tx → today)."},"dateInterval":{"type":"string","enum":["month","day"],"description":"Bucket granularity (default 'month')."},"assetIds":{"type":"array","items":{"type":"string"},"description":"Scope the series to these asset uuids (asset-detail view); omit for whole-wallet."}}}}}},"responses":{"200":{"description":"netWorthTimeSeries result","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"period":{"type":"string","description":"Bucket label (YYYY-MM for month, YYYY-MM-DD for day)."},"inPeriod":{"type":"number","description":"Net-worth change within the bucket, in base currency."},"cumulative":{"type":"number","description":"Cumulative net worth at the end of the bucket, in base currency."},"fxEffectCumulative":{"type":"number","description":"Cumulative currency-change effect at the end of the bucket."}},"required":["period","inPeriod","cumulative","fxEffectCumulative"]}}}}},"400":{"description":"Invalid params","content":{"application/json":{"schema":{}}}}}}},"/wallets/{walletId}/data/netWorthByAsset":{"post":{"summary":"netWorthByAsset slice","tags":["Data"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The wallet id (row uuid)"},"required":true,"description":"The wallet id (row uuid)","name":"walletId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"period":{"anyOf":[{"type":"string","enum":["today","yesterday","7days","30days","3months","6months","1year","mtd","ytd","lastWeek","lastMonth","lastYear","thisYear","thisAndNextYear","allTime"],"description":"A named relative window (e.g. \"ytd\", \"1year\", \"allTime\")."},{"type":"object","properties":{"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["startDate","endDate"],"description":"An explicit inclusive date window."}],"description":"Window the net-worth snapshot is computed for."},"assetIds":{"type":"array","items":{"type":"string"},"description":"Scope the snapshot + KPIs to these asset uuids; omit for whole-wallet."}},"required":["period"]}}}},"responses":{"200":{"description":"netWorthByAsset result","content":{"application/json":{"schema":{"type":"object","properties":{"byAsset":{"type":"object","additionalProperties":{"type":"object","properties":{"asset":{"allOf":[{"anyOf":[{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["manualBank"],"description":"Asset type: A manually managed bank account where transactions are entered by the user."},"accountNumber":{"type":["string","null"],"description":"The bank account number. Null if not provided."},"importSettings":{"type":"object","properties":{"csv":{"description":"Settings related to CSV import for this bank account, if configured."}},"description":"Configuration for importing transactions into this manual bank account."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type","accountNumber","importSettings"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["automatedBank"],"description":"Asset type: An automated bank account connected to a bank feed for transaction import."},"accountNumber":{"type":["string","null"],"description":"The bank account number. Null if not provided or not available from the bank feed."},"bankConnection":{"type":"object","properties":{"type":{"type":"string","enum":["klarna","gocardless","finApi","plaid"],"description":"The type of bank connection provider (e.g., GoCardless, FinAPI)."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"GoCardless account details, if this connection is via GoCardless. Null otherwise."},"finApiAccount":{"type":["object","null"],"properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"FinAPI account details, if this connection is via FinAPI. Null otherwise."},"plaidAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Plaid account details, if this connection is via Plaid. Null otherwise."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"Status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"Expiry time of the bank connection. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"Last synchronization time of the bank connection. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"],"description":"Details of the bank connection for this automated bank asset."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type","accountNumber","bankConnection"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value from the automated source is provided."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value from the automated feed."},"bankConnection":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["finApi"],"description":"Specifies that this bank connection is of type FinAPI."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account. This is enforced to be non-null for FinAPI connections."},"plaidAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account, if applicable. Null otherwise."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]},{"type":"object","properties":{"type":{"type":"string","enum":["plaid"],"description":"Specifies that this bank connection is of type Plaid."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":["object","null"],"properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account, if applicable. Null otherwise."},"plaidAccount":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account. This is enforced to be non-null for Plaid connections."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]}],"description":"Details of the bank connection used to automate total value updates."},"type":{"type":"string","enum":["automatedBankTotalValue"],"description":"Asset type: An automated bank account where only the total value is synced, not individual transactions."},"accountNumber":{"type":["string","null"],"description":"The bank account number. Null if not provided or not available."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","bankConnection","type","accountNumber"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"type":{"type":"string","enum":["manualCrypto"],"description":"Asset type: A manually managed cryptocurrency asset where individual crypto transactions (buy, sell, initial balance) are recorded."},"gainsLossesCategoryId":{"type":"string","description":"Category ID for recording gains or losses from cryptocurrency transactions."},"feesCategoryId":{"type":"string","description":"Category ID for recording fees related to cryptocurrency transactions."},"taxCategoryId":{"type":"string","description":"Category ID for recording taxes related to cryptocurrency transactions."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","type","gainsLossesCategoryId","feesCategoryId","taxCategoryId"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["manualCash"],"description":"Asset type: Physical cash holdings, managed manually."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["manualCreditCard"],"description":"Asset type: A manually managed credit card account where transactions are entered by the user."},"accountNumber":{"type":["string","null"],"description":"The credit card account number. Null if not provided."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type","accountNumber"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["automatedCreditCard"],"description":"Asset type: An automated credit card account connected to a feed for transaction import."},"accountNumber":{"type":["string","null"],"description":"The credit card account number. Null if not provided or not available from the feed."},"bankConnection":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["finApi"],"description":"Specifies that this bank connection is of type FinAPI."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account. This is enforced to be non-null for FinAPI connections."},"plaidAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account, if applicable. Null otherwise."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]},{"type":"object","properties":{"type":{"type":"string","enum":["plaid"],"description":"Specifies that this bank connection is of type Plaid."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":["object","null"],"properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account, if applicable. Null otherwise."},"plaidAccount":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account. This is enforced to be non-null for Plaid connections."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]}],"description":"Details of the bank connection used for this automated credit card."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type","accountNumber","bankConnection"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value from the automated source is provided."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value from the automated feed."},"bankConnection":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["finApi"],"description":"Specifies that this bank connection is of type FinAPI."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account. This is enforced to be non-null for FinAPI connections."},"plaidAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account, if applicable. Null otherwise."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]},{"type":"object","properties":{"type":{"type":"string","enum":["plaid"],"description":"Specifies that this bank connection is of type Plaid."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":["object","null"],"properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account, if applicable. Null otherwise."},"plaidAccount":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account. This is enforced to be non-null for Plaid connections."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]}],"description":"Details of the bank connection used to automate total value updates."},"type":{"type":"string","enum":["automatedCreditCardTotalValue"],"description":"Asset type: An automated credit card account where only the total value is synced."},"accountNumber":{"type":["string","null"],"description":"The credit card account number. Null if not provided or not available."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","bankConnection","type","accountNumber"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["manualLoan"],"description":"Asset type: A manually managed loan (either taken or given out) where transactions are recorded by the user."},"accountNumber":{"type":["string","null"],"description":"The loan account number or identifier. Null if not provided."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type","accountNumber"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["automatedLoan"],"description":"Asset type: An automated loan account connected to a feed for transaction import."},"accountNumber":{"type":["string","null"],"description":"The loan account number. Null if not provided or not available from the feed."},"bankConnection":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["finApi"],"description":"Specifies that this bank connection is of type FinAPI."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account. This is enforced to be non-null for FinAPI connections."},"plaidAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account, if applicable. Null otherwise."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]},{"type":"object","properties":{"type":{"type":"string","enum":["plaid"],"description":"Specifies that this bank connection is of type Plaid."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":["object","null"],"properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account, if applicable. Null otherwise."},"plaidAccount":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account. This is enforced to be non-null for Plaid connections."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]}],"description":"Details of the bank connection used for this automated loan."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type","accountNumber","bankConnection"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value from the automated source is provided."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value from the automated feed."},"bankConnection":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["finApi"],"description":"Specifies that this bank connection is of type FinAPI."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account. This is enforced to be non-null for FinAPI connections."},"plaidAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account, if applicable. Null otherwise."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]},{"type":"object","properties":{"type":{"type":"string","enum":["plaid"],"description":"Specifies that this bank connection is of type Plaid."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":["object","null"],"properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account, if applicable. Null otherwise."},"plaidAccount":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account. This is enforced to be non-null for Plaid connections."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]}],"description":"Details of the bank connection used to automate total value updates."},"type":{"type":"string","enum":["automatedLoanTotalValue"],"description":"Asset type: An automated loan account where only the total value (outstanding balance) is synced."},"accountNumber":{"type":["string","null"],"description":"The loan account number. Null if not provided or not available."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","bankConnection","type","accountNumber"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["manualRealEstate"],"description":"Asset type: A manually managed real estate property where related income/expenses are tracked as transactions."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value of this asset is typically recorded."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value of this asset (e.g., market appreciation/depreciation)."},"type":{"type":"string","enum":["manualRealEstateTotalValue"],"description":"Asset type: A manually managed real estate property where only its total market value is tracked."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","type"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["manualPhysicalAsset"],"description":"Asset type: A manually managed physical asset (e.g., car, art) where related income/expenses are tracked."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value of this asset is typically recorded."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value of this asset (e.g., market appreciation/depreciation)."},"type":{"type":"string","enum":["manualPhysicalTotalValue"],"description":"Asset type: A manually managed physical asset where only its total value is tracked."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","type"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["manualTransitAccount"],"description":"Asset type: A manually managed transit or clearing account used for temporary holding of funds during transfers."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["manualOther"],"description":"Asset type: A generic manually managed asset for types not covered elsewhere, with transaction tracking."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["manualCompany"],"description":"Asset type: A manually managed representation of a company's finances (e.g., for entrepreneurs tracking business income/expenses)."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value of this asset is typically recorded."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value of this asset (e.g., market appreciation/depreciation)."},"type":{"type":"string","enum":["manualBankTotalValue"],"description":"Asset type: A manually managed bank account where only the total value is tracked by the user."},"accountNumber":{"type":["string","null"],"description":"The bank account number. Null if not provided."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","type","accountNumber"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value of this asset is typically recorded."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value of this asset (e.g., market appreciation/depreciation)."},"type":{"type":"string","enum":["manualCreditCardTotalValue"],"description":"Asset type: A manually managed credit card account where only the total value is tracked."},"accountNumber":{"type":["string","null"],"description":"The credit card account number. Null if not provided."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","type","accountNumber"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value of this asset is typically recorded."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value of this asset (e.g., market appreciation/depreciation)."},"type":{"type":"string","enum":["manualLoanTotalValue"],"description":"Asset type: A manually managed loan where only the total outstanding value is tracked."},"accountNumber":{"type":["string","null"],"description":"The loan account number. Null if not provided."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","type","accountNumber"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value of this asset is typically recorded."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value of this asset (e.g., market appreciation/depreciation)."},"type":{"type":"string","enum":["manualCompanyTotalValue"],"description":"Asset type: A manually managed asset representing the total value of a company or business interest."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","type"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value of this asset is typically recorded."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value of this asset (e.g., market appreciation/depreciation)."},"type":{"type":"string","enum":["manualOtherTotalValue"],"description":"Asset type: A generic manually managed asset where only its total value is tracked."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","type"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value of this asset is typically recorded."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value of this asset (e.g., market appreciation/depreciation)."},"type":{"type":"string","enum":["manualCryptoTotalValue"],"description":"Asset type: A manually managed cryptocurrency asset where only the total value is tracked (not individual crypto transactions)."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","type"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value from the automated source is provided."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value from the automated feed."},"bankConnection":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["finApi"],"description":"Specifies that this bank connection is of type FinAPI."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account. This is enforced to be non-null for FinAPI connections."},"plaidAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account, if applicable. Null otherwise."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]},{"type":"object","properties":{"type":{"type":"string","enum":["plaid"],"description":"Specifies that this bank connection is of type Plaid."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":["object","null"],"properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account, if applicable. Null otherwise."},"plaidAccount":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account. This is enforced to be non-null for Plaid connections."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]}],"description":"Details of the bank connection used to automate total value updates."},"type":{"type":"string","enum":["automatedCryptoTotalValue"],"description":"Asset type: An automated crypto account where only the total value is synced."},"accountNumber":{"type":["string","null"],"description":"The crypto account number. Null if not provided or not available."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","bankConnection","type","accountNumber"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["manualInvestmentPortfolio"],"description":"Asset type: A manually managed investment portfolio where individual buy/sell transactions can be recorded (but not security details like ISIN)."},"accountNumber":{"type":["string","null"],"description":"The investment account number. Null if not provided."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type","accountNumber"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value of this asset is typically recorded."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value of this asset (e.g., market appreciation/depreciation)."},"type":{"type":"string","enum":["manualInvestmentPortfolioTotalValue"],"description":"Asset type: A manually managed investment portfolio where only the total value is tracked."},"accountNumber":{"type":["string","null"],"description":"The investment account number. Null if not provided."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","type","accountNumber"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"type":{"type":"string","enum":["manualSecurity"],"description":"Asset type: A manually managed security asset (stocks, ETFs, etc.) where individual security transactions (buy, sell, ISIN, quantity) are recorded."},"gainsLossesCategoryId":{"type":"string","description":"Category ID for recording gains or losses from security transactions."},"feesCategoryId":{"type":"string","description":"Category ID for recording fees related to security transactions."},"taxCategoryId":{"type":"string","description":"Category ID for recording taxes related to security transactions."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","type","gainsLossesCategoryId","feesCategoryId","taxCategoryId"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value from the automated source is provided."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value from the automated feed."},"bankConnection":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["finApi"],"description":"Specifies that this bank connection is of type FinAPI."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account. This is enforced to be non-null for FinAPI connections."},"plaidAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account, if applicable. Null otherwise."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]},{"type":"object","properties":{"type":{"type":"string","enum":["plaid"],"description":"Specifies that this bank connection is of type Plaid."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":["object","null"],"properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account, if applicable. Null otherwise."},"plaidAccount":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account. This is enforced to be non-null for Plaid connections."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]}],"description":"Details of the bank connection used to automate total value updates."},"type":{"type":"string","enum":["automatedInvestmentPortfolioTotalValue"],"description":"Asset type: An automated investment portfolio where only the total value is synced."},"accountNumber":{"type":["string","null"],"description":"The investment account number. Null if not provided or not available."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","bankConnection","type","accountNumber"]}]},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},"value":{"type":"number","description":"The networth/balance of the asset at the end of the given period"},"valuePreviousPeriod":{"type":"number","description":"The networth/balance of the asset before the start of the given period"},"valueChange":{"type":"number","description":"The change in networth/balance of the asset between the start and end of the given period"},"valuePreviousPeriodWithTransfersAndBalancesAdded":{"type":"number","description":"The networth/balance of the asset before the start of the given period, excluding transfers and initial balances"}},"required":["asset","value","valuePreviousPeriod","valueChange","valuePreviousPeriodWithTransfersAndBalancesAdded"]}},"kpis":{"type":"object","properties":{"total":{"type":"number","description":"The total networth of all assets at the end of the given period"},"totalPreviousPeriod":{"type":"number","description":"The total networth of all assets before the start of the given period"},"totalChange":{"type":"number","description":"The change in total networth of all assets between the start and end of the given period"},"emergencyFund":{"type":"number","description":"The networth of all assets with easy/liquid access at the end of the given period"},"emergencyFundPreviousPeriod":{"type":"number","description":"The networth of all assets with easy/liquid access before the start of the given period"},"emergencyFundChange":{"type":"number","description":"The change in networth of all assets with easy/liquid access between the start and end of the given period"}},"required":["total","totalPreviousPeriod","totalChange","emergencyFund","emergencyFundPreviousPeriod","emergencyFundChange"]}},"required":["byAsset","kpis"]}}}},"400":{"description":"Invalid params","content":{"application/json":{"schema":{}}}}}}},"/wallets/{walletId}/data/cashFlowByCategory":{"post":{"summary":"cashFlowByCategory slice","tags":["Data"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The wallet id (row uuid)"},"required":true,"description":"The wallet id (row uuid)","name":"walletId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"period":{"anyOf":[{"type":"string","enum":["today","yesterday","7days","30days","3months","6months","1year","mtd","ytd","lastWeek","lastMonth","lastYear","thisYear","thisAndNextYear","allTime"],"description":"A named relative window (e.g. \"ytd\", \"1year\", \"allTime\")."},{"type":"object","properties":{"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["startDate","endDate"],"description":"An explicit inclusive date window."}],"description":"Window the per-category income/expense totals are computed for."},"assetIds":{"type":"array","items":{"type":"string"},"description":"Scope to these asset uuids; omit for whole-wallet."},"categoryIds":{"type":"array","items":{"type":"string"},"description":"Scope to these category uuids; omit for all categories."}},"required":["period"]}}}},"responses":{"200":{"description":"cashFlowByCategory result","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"object","properties":{"category":{"type":"object","properties":{"name":{"type":"string","description":"The name of the category."},"type":{"type":"string","enum":["activeIncome","passiveIncome","gainsLosses","fixedExpenses","variableExpenses","neutral"],"description":"The financial type of the category."},"emoji":{"type":["string","null"],"description":"An emoji representing the category."},"system":{"type":"boolean","description":"Flag indicating if this is a system-defined category."},"order":{"type":"number","description":"A number used for ordering categories in the UI."},"categoryGroupId":{"type":["string","null"],"description":"The ID of the parent category group, if any."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"id":{"type":"string"}},"required":["name","type","emoji","system","order","categoryGroupId","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","id"],"additionalProperties":false},"categoryNameWithParentGroups":{"type":"string","description":"The category name including all parent groups in hierarchical format"},"value":{"type":"number","description":"The income/expense of the category at the end of the given period"},"valuePreviousPeriod":{"type":"number","description":"The income/expense of the category before the start of the given period"},"valueChange":{"type":"number","description":"The change in income/expense of the category between the start and end of the given period"}},"required":["value","valuePreviousPeriod","valueChange"]}}}}},"400":{"description":"Invalid params","content":{"application/json":{"schema":{}}}}}}},"/wallets/{walletId}/data/cashFlowTimeSeries":{"post":{"summary":"cashFlowTimeSeries slice","tags":["Data"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The wallet id (row uuid)"},"required":true,"description":"The wallet id (row uuid)","name":"walletId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"period":{"anyOf":[{"type":"string","enum":["today","yesterday","7days","30days","3months","6months","1year","mtd","ytd","lastWeek","lastMonth","lastYear","thisYear","thisAndNextYear","allTime"],"description":"A named relative window (e.g. \"ytd\", \"1year\", \"allTime\")."},{"type":"object","properties":{"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["startDate","endDate"],"description":"An explicit inclusive date window."}],"description":"Window to bound the series to. Omit for full history."},"dateInterval":{"type":"string","enum":["month","day"],"description":"Bucket granularity (default 'month')."},"assetIds":{"type":"array","items":{"type":"string"},"description":"Scope to these asset uuids; omit for whole-wallet."},"categoryIds":{"type":"array","items":{"type":"string"},"description":"Scope to these category uuids; omit for all categories."}}}}}},"responses":{"200":{"description":"cashFlowTimeSeries result","content":{"application/json":{"schema":{"type":"object","properties":{"series":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"period":{"type":"string"},"value":{"type":"number"}},"required":["period","value"]}}}},"required":["series"]}}}},"400":{"description":"Invalid params","content":{"application/json":{"schema":{}}}}}}},"/wallets/{walletId}/data/categoryBreakdown":{"post":{"summary":"categoryBreakdown slice","tags":["Data"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The wallet id (row uuid)"},"required":true,"description":"The wallet id (row uuid)","name":"walletId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"period":{"anyOf":[{"type":"string","enum":["today","yesterday","7days","30days","3months","6months","1year","mtd","ytd","lastWeek","lastMonth","lastYear","thisYear","thisAndNextYear","allTime"],"description":"A named relative window (e.g. \"ytd\", \"1year\", \"allTime\")."},{"type":"object","properties":{"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["startDate","endDate"],"description":"An explicit inclusive date window."}],"description":"Window the income/expense KPIs are computed for."},"assetIds":{"type":"array","items":{"type":"string"},"description":"Scope to these asset uuids; omit for whole-wallet."},"categoryIds":{"type":"array","items":{"type":"string"},"description":"Scope to these category uuids; omit for all categories."}},"required":["period"]}}}},"responses":{"200":{"description":"categoryBreakdown result","content":{"application/json":{"schema":{"type":"object","properties":{"income":{"type":"number","description":"The sum of all income within the given period"},"incomePreviousPeriod":{"type":"number","description":"The sum of all income within the previous period"},"incomeChange":{"type":"number","description":"The change in income between the given period and the previous period"},"expenses":{"type":"number","description":"The sum of all expenses within the given period"},"expensesPreviousPeriod":{"type":"number","description":"The sum of all expenses within the previous period"},"expensesChange":{"type":"number","description":"The change in expenses between the given period and the previous period"},"gainsLosses":{"type":"number","description":"The sum of all gains/losses within the given period"},"gainsLossesPreviousPeriod":{"type":"number","description":"The sum of all gains/losses within the previous period"},"gainsLossesChange":{"type":"number","description":"The change in gains/losses between the given period and the previous period"},"uncategorized":{"type":"number","description":"The sum of all uncategorized income/expenses within the given period"},"uncategorizedPreviousPeriod":{"type":"number","description":"The sum of all uncategorized income/expenses within the previous period"},"uncategorizedChange":{"type":"number","description":"The change in uncategorized income/expenses between the given period and the previous period"},"profit":{"type":"number","description":"The profit within the given period"},"profitPreviousPeriod":{"type":"number","description":"The profit within the previous period"},"profitChange":{"type":"number","description":"The change in profit between the given period and the previous period"},"plainProfit":{"type":"number","description":"The plain profit (without gains/losses and uncategorized) within the given period"},"plainProfitPreviousPeriod":{"type":"number","description":"The plain profit (without gains/losses and uncategorized) within the previous period"},"plainProfitChange":{"type":"number","description":"The change in plain profit (without gains/losses and uncategorized) between the given period and the previous period"}},"required":["income","incomePreviousPeriod","incomeChange","expenses","expensesPreviousPeriod","expensesChange","gainsLosses","gainsLossesPreviousPeriod","gainsLossesChange","uncategorized","uncategorizedPreviousPeriod","uncategorizedChange","profit","profitPreviousPeriod","profitChange","plainProfit","plainProfitPreviousPeriod","plainProfitChange"]}}}},"400":{"description":"Invalid params","content":{"application/json":{"schema":{}}}}}}},"/wallets/{walletId}/data/assetPerformance":{"post":{"summary":"assetPerformance slice","tags":["Data"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The wallet id (row uuid)"},"required":true,"description":"The wallet id (row uuid)","name":"walletId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"period":{"anyOf":[{"type":"string","enum":["today","yesterday","7days","30days","3months","6months","1year","mtd","ytd","lastWeek","lastMonth","lastYear","thisYear","thisAndNextYear","allTime"],"description":"A named relative window (e.g. \"ytd\", \"1year\", \"allTime\")."},{"type":"object","properties":{"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["startDate","endDate"],"description":"An explicit inclusive date window."}],"description":"Window the per-asset return is computed for."}},"required":["period"]}}}},"responses":{"200":{"description":"assetPerformance result","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"assetName":{"type":"string"},"value":{"type":"number","description":"Net worth of the asset at the end of the period, in base currency."},"valueChange":{"type":"number","description":"Change in net worth across the period, in base currency."},"basis":{"type":"number","description":"Prior-period value excluding transfers and initial balances — the return denominator."},"returnPct":{"type":"number","description":"valueChange / basis as a percentage (0 when basis is 0)."}},"required":["assetId","assetName","value","valueChange","basis","returnPct"]}}}}},"400":{"description":"Invalid params","content":{"application/json":{"schema":{}}}}}}},"/wallets/{walletId}/data/topExpenses":{"post":{"summary":"topExpenses slice","tags":["Data"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The wallet id (row uuid)"},"required":true,"description":"The wallet id (row uuid)","name":"walletId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"period":{"anyOf":[{"type":"string","enum":["today","yesterday","7days","30days","3months","6months","1year","mtd","ytd","lastWeek","lastMonth","lastYear","thisYear","thisAndNextYear","allTime"],"description":"A named relative window (e.g. \"ytd\", \"1year\", \"allTime\")."},{"type":"object","properties":{"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["startDate","endDate"],"description":"An explicit inclusive date window."}],"description":"Window the top expenses are drawn from."}},"required":["period"]}}}},"responses":{"200":{"description":"topExpenses result","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string","description":"The ID of the asset associated with this transaction."},"date":{"type":"string","format":"date","description":"The date of the transaction in ISO format (YYYY-MM-DD)."},"fromTo":{"type":["string","null"],"description":"A description of the sender or recipient of the transaction."},"description":{"type":["string","null"],"description":"A user- or bank-provided description or memo for the transaction. Null if there are no details."},"amount":{"type":"object","properties":{"value":{"type":"number","description":"The numerical value of the amount."},"currency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency code for the amount."}},"required":["value","currency"],"description":"The amount and currency of the transaction."},"categoryId":{"type":["string","null"],"description":"The ID of the category assigned to this transaction."},"merchantId":{"type":["string","null"],"description":"The ID of the merchant associated with this transaction."},"merchantAutoAssigned":{"type":"boolean","description":"Flag indicating if the merchant was automatically assigned."},"merchantCheckedGoogleMaps":{"type":"boolean","description":"Flag indicating if Google Maps was checked for this merchant."},"merchantCheckedSearchApiGoogleWebSearch":{"type":"boolean","description":"Flag indicating if Search API Google Web Search was checked for this merchant."},"excludeFromMerchantAutoAssignment":{"type":"boolean","description":"Flag to exclude this transaction from automatic merchant assignment."},"usingDateRule":{"type":["string","null"],"enum":["transactionDate","transactionMonth","monthAfterTransactionDate","monthBeforeTransactionDate","yearBeforeTransactionDate","oneMonthFromTransactionDate","oneYearFromTransactionDate","sixMonthsFromTransactionDate","custom",null],"description":"The rule used to determine the effective date of the transaction for accounting or reporting needs. Null if the transaction has not been categorized yet"},"usingStartDate":{"type":["string","null"],"format":"date","description":"The start date as generated by the date rule, if applicable. The user-selected start date if date rule is set to Custom"},"usingEndDate":{"type":["string","null"],"format":"date","description":"The end date as generated by the date rule, if applicable. The user-selected end date if date rule is set to Custom"},"notes":{"type":["string","null"],"description":"Additional notes or comments for the transaction. Null if there are no details."},"parentTransactionId":{"type":["string","null"],"description":"The ID of the parent transaction, if this is a split transaction. Null if the transaction is not a split transaction."},"parent":{"type":"boolean","description":"Flag indicating if this transaction is a parent of split transactions."},"source":{"type":["string","null"],"description":"The source of the transaction data (e.g., bank import, manual entry)."},"assignedUserId":{"type":["string","null"],"description":"The ID of the user to whom this transaction is assigned for review or action."},"transferCounterPosition":{"type":["object","null"],"properties":{"type":{"type":"string","enum":["transaction","asset","securityTransaction","cryptoTransaction"],"description":"The type of the counter object in a transfer between accounts."},"id":{"type":"string","description":"The ID of the counter object in a transfer between accounts."}},"required":["type","id"],"additionalProperties":false,"description":"The counter object in a transfer between accounts. Null if the transaction is not a transfer or the counter object has not been selected yet."},"gocardlessTransactionId":{"type":["string","null"],"description":"The transaction ID from GoCardless, if applicable. Null if the transaction is not from GoCardless."},"gocardlessInternalTransactionId":{"type":["string","null"],"description":"The internal transaction ID from GoCardless, if applicable. Null if the transaction is not from GoCardless."},"finApiTransactionId":{"type":["number","null"],"description":"The transaction ID from FinAPI, if applicable. Null if the transaction is not from FinAPI."},"plaidTransactionId":{"type":["string","null"],"description":"The transaction ID from Plaid, if applicable. Null if the transaction is not from Plaid."},"tagIds":{"type":"array","items":{"type":"string"},"description":"An array of tag IDs associated with this transaction."},"pending":{"type":"boolean","description":"Flag indicating if the transaction is pending and not yet cleared."},"reviewed":{"type":"boolean","description":"Flag indicating if the transaction has been reviewed by a user."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"id":{"type":"string"}},"required":["assetId","date","fromTo","description","amount","categoryId","merchantId","excludeFromMerchantAutoAssignment","usingDateRule","usingStartDate","usingEndDate","notes","parentTransactionId","parent","source","assignedUserId","transferCounterPosition","gocardlessTransactionId","gocardlessInternalTransactionId","finApiTransactionId","plaidTransactionId","tagIds","pending","reviewed","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","id"],"additionalProperties":false}}}}},"400":{"description":"Invalid params","content":{"application/json":{"schema":{}}}}}}},"/wallets/{walletId}/data/transfers":{"post":{"summary":"transfers slice","tags":["Data"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The wallet id (row uuid)"},"required":true,"description":"The wallet id (row uuid)","name":"walletId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"period":{"anyOf":[{"type":"string","enum":["today","yesterday","7days","30days","3months","6months","1year","mtd","ytd","lastWeek","lastMonth","lastYear","thisYear","thisAndNextYear","allTime"],"description":"A named relative window (e.g. \"ytd\", \"1year\", \"allTime\")."},{"type":"object","properties":{"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["startDate","endDate"],"description":"An explicit inclusive date window."}],"description":"Window the net transfers between assets are computed for."},"assetIds":{"type":"array","items":{"type":"string"},"description":"Scope transfers to edges touching these asset uuids; omit for all assets."}},"required":["period"]}}}},"responses":{"200":{"description":"transfers result","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"sourceAssetId":{"type":"string","description":"The id of the asset that is the source of the transfer"},"sourceAssetName":{"type":"string","description":"The name of the asset that is the source of the transfer"},"targetAssetId":{"type":"string","description":"The id of the asset that is the target of the transfer"},"targetAssetName":{"type":"string","description":"The name of the asset that is the target of the transfer"},"amount":{"type":"number","description":"The amount of the transfer in base currency"}},"required":["sourceAssetId","sourceAssetName","targetAssetId","targetAssetName","amount"]}}}}},"400":{"description":"Invalid params","content":{"application/json":{"schema":{}}}}}}},"/wallets/{walletId}/data/planVsActual":{"post":{"summary":"planVsActual slice","tags":["Data"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The wallet id (row uuid)"},"required":true,"description":"The wallet id (row uuid)","name":"walletId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"monthPeriod":{"type":"object","properties":{"startMonth":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"Inclusive first month (YYYY-MM)."},"endMonth":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"Inclusive last month (YYYY-MM)."}},"required":["startMonth","endMonth"],"description":"The planning window. Omit for the default ±10 years around now."},"scenarioId":{"type":"string","description":"Restrict plan items to this scenario; omit for the whole plan."}}}}}},"responses":{"200":{"description":"planVsActual result","content":{"application/json":{"schema":{"type":"object","properties":{"notImplemented":{"type":"boolean","enum":[false]},"categories":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object","properties":{"actual":{"type":["number","null"]},"plan":{"type":["number","null"]},"planItem":{"type":["object","null"],"properties":{"scenarioId":{"type":["string","null"],"description":"The ID of the scenario this item is associated with. Null means the item is part of the global plan."},"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"The month in YYYY-MM format."},"categoryOrCategoryGroupId":{"type":"string","description":"The ID of the category or category group this item is associated with."},"amount":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fixed"],"description":"Fixed amount type."},"amount":{"type":"object","properties":{"value":{"type":"number","description":"The numerical value of the amount."},"currency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency code for the amount."}},"required":["value","currency"],"description":"The fixed amount."},"relativeChange":{"type":"number","description":"The relative change from one period to the next."}},"required":["type","amount","relativeChange"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["average"],"description":"Average amount type based on historical data."},"referencePeriod":{"type":"number","description":"The number of months to look back for calculating the average."},"relativeChange":{"type":"number","description":"The relative change from one period to the next."}},"required":["type","referencePeriod","relativeChange"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["reference"],"description":"Reference amount type based on another category or net worth."},"ref":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["categoryOrCategoryGroupId"],"description":"Category or category group type for the reference."},"id":{"type":"string","description":"The ID of the reference category or category group."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["networthStart"],"description":"Net worth type for the reference."}},"required":["type"],"additionalProperties":false}]},"share":{"type":"number","description":"The share of the reference amount to use."},"referenceMonth":{"type":"string","enum":["same","previous"],"description":"Whether to use the same month or previous month as reference."}},"required":["type","ref","share","referenceMonth"],"additionalProperties":false}],"description":"The amount configuration for the plan, supporting fixed, average, or reference-based calculations."},"duration":{"type":["number","null"],"description":"The duration of the plan in months. Null means infinite duration."},"frequency":{"type":"number","description":"How often the plan occurs within the duration. Default is 1, meaning it happens every month."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"id":{"type":"string"}},"required":["scenarioId","month","categoryOrCategoryGroupId","amount","duration","frequency","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","id"],"additionalProperties":false},"inactivePlanItems":{"type":"array","items":{"type":"object","properties":{"scenarioId":{"type":["string","null"],"description":"The ID of the scenario this item is associated with. Null means the item is part of the global plan."},"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"The month in YYYY-MM format."},"categoryOrCategoryGroupId":{"type":"string","description":"The ID of the category or category group this item is associated with."},"amount":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fixed"],"description":"Fixed amount type."},"amount":{"type":"object","properties":{"value":{"type":"number","description":"The numerical value of the amount."},"currency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency code for the amount."}},"required":["value","currency"],"description":"The fixed amount."},"relativeChange":{"type":"number","description":"The relative change from one period to the next."}},"required":["type","amount","relativeChange"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["average"],"description":"Average amount type based on historical data."},"referencePeriod":{"type":"number","description":"The number of months to look back for calculating the average."},"relativeChange":{"type":"number","description":"The relative change from one period to the next."}},"required":["type","referencePeriod","relativeChange"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["reference"],"description":"Reference amount type based on another category or net worth."},"ref":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["categoryOrCategoryGroupId"],"description":"Category or category group type for the reference."},"id":{"type":"string","description":"The ID of the reference category or category group."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["networthStart"],"description":"Net worth type for the reference."}},"required":["type"],"additionalProperties":false}]},"share":{"type":"number","description":"The share of the reference amount to use."},"referenceMonth":{"type":"string","enum":["same","previous"],"description":"Whether to use the same month or previous month as reference."}},"required":["type","ref","share","referenceMonth"],"additionalProperties":false}],"description":"The amount configuration for the plan, supporting fixed, average, or reference-based calculations."},"duration":{"type":["number","null"],"description":"The duration of the plan in months. Null means infinite duration."},"frequency":{"type":"number","description":"How often the plan occurs within the duration. Default is 1, meaning it happens every month."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"id":{"type":"string"}},"required":["scenarioId","month","categoryOrCategoryGroupId","amount","duration","frequency","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","id"],"additionalProperties":false}}},"required":["actual","plan","planItem","inactivePlanItems"]}}},"unassigned":{"type":"object","additionalProperties":{"type":"object","properties":{"actual":{"type":["number","null"]},"plan":{"type":["number","null"]},"planItem":{"type":["object","null"],"properties":{"scenarioId":{"type":["string","null"],"description":"The ID of the scenario this item is associated with. Null means the item is part of the global plan."},"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"The month in YYYY-MM format."},"categoryOrCategoryGroupId":{"type":"string","description":"The ID of the category or category group this item is associated with."},"amount":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fixed"],"description":"Fixed amount type."},"amount":{"type":"object","properties":{"value":{"type":"number","description":"The numerical value of the amount."},"currency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency code for the amount."}},"required":["value","currency"],"description":"The fixed amount."},"relativeChange":{"type":"number","description":"The relative change from one period to the next."}},"required":["type","amount","relativeChange"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["average"],"description":"Average amount type based on historical data."},"referencePeriod":{"type":"number","description":"The number of months to look back for calculating the average."},"relativeChange":{"type":"number","description":"The relative change from one period to the next."}},"required":["type","referencePeriod","relativeChange"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["reference"],"description":"Reference amount type based on another category or net worth."},"ref":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["categoryOrCategoryGroupId"],"description":"Category or category group type for the reference."},"id":{"type":"string","description":"The ID of the reference category or category group."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["networthStart"],"description":"Net worth type for the reference."}},"required":["type"],"additionalProperties":false}]},"share":{"type":"number","description":"The share of the reference amount to use."},"referenceMonth":{"type":"string","enum":["same","previous"],"description":"Whether to use the same month or previous month as reference."}},"required":["type","ref","share","referenceMonth"],"additionalProperties":false}],"description":"The amount configuration for the plan, supporting fixed, average, or reference-based calculations."},"duration":{"type":["number","null"],"description":"The duration of the plan in months. Null means infinite duration."},"frequency":{"type":"number","description":"How often the plan occurs within the duration. Default is 1, meaning it happens every month."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"id":{"type":"string"}},"required":["scenarioId","month","categoryOrCategoryGroupId","amount","duration","frequency","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","id"],"additionalProperties":false},"inactivePlanItems":{"type":"array","items":{"type":"object","properties":{"scenarioId":{"type":["string","null"],"description":"The ID of the scenario this item is associated with. Null means the item is part of the global plan."},"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"The month in YYYY-MM format."},"categoryOrCategoryGroupId":{"type":"string","description":"The ID of the category or category group this item is associated with."},"amount":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fixed"],"description":"Fixed amount type."},"amount":{"type":"object","properties":{"value":{"type":"number","description":"The numerical value of the amount."},"currency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency code for the amount."}},"required":["value","currency"],"description":"The fixed amount."},"relativeChange":{"type":"number","description":"The relative change from one period to the next."}},"required":["type","amount","relativeChange"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["average"],"description":"Average amount type based on historical data."},"referencePeriod":{"type":"number","description":"The number of months to look back for calculating the average."},"relativeChange":{"type":"number","description":"The relative change from one period to the next."}},"required":["type","referencePeriod","relativeChange"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["reference"],"description":"Reference amount type based on another category or net worth."},"ref":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["categoryOrCategoryGroupId"],"description":"Category or category group type for the reference."},"id":{"type":"string","description":"The ID of the reference category or category group."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["networthStart"],"description":"Net worth type for the reference."}},"required":["type"],"additionalProperties":false}]},"share":{"type":"number","description":"The share of the reference amount to use."},"referenceMonth":{"type":"string","enum":["same","previous"],"description":"Whether to use the same month or previous month as reference."}},"required":["type","ref","share","referenceMonth"],"additionalProperties":false}],"description":"The amount configuration for the plan, supporting fixed, average, or reference-based calculations."},"duration":{"type":["number","null"],"description":"The duration of the plan in months. Null means infinite duration."},"frequency":{"type":"number","description":"How often the plan occurs within the duration. Default is 1, meaning it happens every month."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"id":{"type":"string"}},"required":["scenarioId","month","categoryOrCategoryGroupId","amount","duration","frequency","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","id"],"additionalProperties":false}}},"required":["actual","plan","planItem","inactivePlanItems"]}},"currencyChangeEffectPerMonth":{"type":"object","additionalProperties":{"type":"object","properties":{"actual":{"type":["number","null"]},"plan":{"type":["number","null"]},"planItem":{"type":["object","null"],"properties":{"scenarioId":{"type":["string","null"],"description":"The ID of the scenario this item is associated with. Null means the item is part of the global plan."},"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"The month in YYYY-MM format."},"categoryOrCategoryGroupId":{"type":"string","description":"The ID of the category or category group this item is associated with."},"amount":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fixed"],"description":"Fixed amount type."},"amount":{"type":"object","properties":{"value":{"type":"number","description":"The numerical value of the amount."},"currency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency code for the amount."}},"required":["value","currency"],"description":"The fixed amount."},"relativeChange":{"type":"number","description":"The relative change from one period to the next."}},"required":["type","amount","relativeChange"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["average"],"description":"Average amount type based on historical data."},"referencePeriod":{"type":"number","description":"The number of months to look back for calculating the average."},"relativeChange":{"type":"number","description":"The relative change from one period to the next."}},"required":["type","referencePeriod","relativeChange"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["reference"],"description":"Reference amount type based on another category or net worth."},"ref":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["categoryOrCategoryGroupId"],"description":"Category or category group type for the reference."},"id":{"type":"string","description":"The ID of the reference category or category group."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["networthStart"],"description":"Net worth type for the reference."}},"required":["type"],"additionalProperties":false}]},"share":{"type":"number","description":"The share of the reference amount to use."},"referenceMonth":{"type":"string","enum":["same","previous"],"description":"Whether to use the same month or previous month as reference."}},"required":["type","ref","share","referenceMonth"],"additionalProperties":false}],"description":"The amount configuration for the plan, supporting fixed, average, or reference-based calculations."},"duration":{"type":["number","null"],"description":"The duration of the plan in months. Null means infinite duration."},"frequency":{"type":"number","description":"How often the plan occurs within the duration. Default is 1, meaning it happens every month."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"id":{"type":"string"}},"required":["scenarioId","month","categoryOrCategoryGroupId","amount","duration","frequency","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","id"],"additionalProperties":false},"inactivePlanItems":{"type":"array","items":{"type":"object","properties":{"scenarioId":{"type":["string","null"],"description":"The ID of the scenario this item is associated with. Null means the item is part of the global plan."},"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"The month in YYYY-MM format."},"categoryOrCategoryGroupId":{"type":"string","description":"The ID of the category or category group this item is associated with."},"amount":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fixed"],"description":"Fixed amount type."},"amount":{"type":"object","properties":{"value":{"type":"number","description":"The numerical value of the amount."},"currency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency code for the amount."}},"required":["value","currency"],"description":"The fixed amount."},"relativeChange":{"type":"number","description":"The relative change from one period to the next."}},"required":["type","amount","relativeChange"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["average"],"description":"Average amount type based on historical data."},"referencePeriod":{"type":"number","description":"The number of months to look back for calculating the average."},"relativeChange":{"type":"number","description":"The relative change from one period to the next."}},"required":["type","referencePeriod","relativeChange"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["reference"],"description":"Reference amount type based on another category or net worth."},"ref":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["categoryOrCategoryGroupId"],"description":"Category or category group type for the reference."},"id":{"type":"string","description":"The ID of the reference category or category group."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["networthStart"],"description":"Net worth type for the reference."}},"required":["type"],"additionalProperties":false}]},"share":{"type":"number","description":"The share of the reference amount to use."},"referenceMonth":{"type":"string","enum":["same","previous"],"description":"Whether to use the same month or previous month as reference."}},"required":["type","ref","share","referenceMonth"],"additionalProperties":false}],"description":"The amount configuration for the plan, supporting fixed, average, or reference-based calculations."},"duration":{"type":["number","null"],"description":"The duration of the plan in months. Null means infinite duration."},"frequency":{"type":"number","description":"How often the plan occurs within the duration. Default is 1, meaning it happens every month."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"id":{"type":"string"}},"required":["scenarioId","month","categoryOrCategoryGroupId","amount","duration","frequency","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","id"],"additionalProperties":false}}},"required":["actual","plan","planItem","inactivePlanItems"]}},"netWorthStartPerMonth":{"type":"object","additionalProperties":{"type":"object","properties":{"actual":{"type":["number","null"]},"plan":{"type":["number","null"]},"planItem":{"type":["object","null"],"properties":{"scenarioId":{"type":["string","null"],"description":"The ID of the scenario this item is associated with. Null means the item is part of the global plan."},"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"The month in YYYY-MM format."},"categoryOrCategoryGroupId":{"type":"string","description":"The ID of the category or category group this item is associated with."},"amount":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fixed"],"description":"Fixed amount type."},"amount":{"type":"object","properties":{"value":{"type":"number","description":"The numerical value of the amount."},"currency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency code for the amount."}},"required":["value","currency"],"description":"The fixed amount."},"relativeChange":{"type":"number","description":"The relative change from one period to the next."}},"required":["type","amount","relativeChange"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["average"],"description":"Average amount type based on historical data."},"referencePeriod":{"type":"number","description":"The number of months to look back for calculating the average."},"relativeChange":{"type":"number","description":"The relative change from one period to the next."}},"required":["type","referencePeriod","relativeChange"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["reference"],"description":"Reference amount type based on another category or net worth."},"ref":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["categoryOrCategoryGroupId"],"description":"Category or category group type for the reference."},"id":{"type":"string","description":"The ID of the reference category or category group."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["networthStart"],"description":"Net worth type for the reference."}},"required":["type"],"additionalProperties":false}]},"share":{"type":"number","description":"The share of the reference amount to use."},"referenceMonth":{"type":"string","enum":["same","previous"],"description":"Whether to use the same month or previous month as reference."}},"required":["type","ref","share","referenceMonth"],"additionalProperties":false}],"description":"The amount configuration for the plan, supporting fixed, average, or reference-based calculations."},"duration":{"type":["number","null"],"description":"The duration of the plan in months. Null means infinite duration."},"frequency":{"type":"number","description":"How often the plan occurs within the duration. Default is 1, meaning it happens every month."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"id":{"type":"string"}},"required":["scenarioId","month","categoryOrCategoryGroupId","amount","duration","frequency","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","id"],"additionalProperties":false},"inactivePlanItems":{"type":"array","items":{"type":"object","properties":{"scenarioId":{"type":["string","null"],"description":"The ID of the scenario this item is associated with. Null means the item is part of the global plan."},"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"The month in YYYY-MM format."},"categoryOrCategoryGroupId":{"type":"string","description":"The ID of the category or category group this item is associated with."},"amount":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fixed"],"description":"Fixed amount type."},"amount":{"type":"object","properties":{"value":{"type":"number","description":"The numerical value of the amount."},"currency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency code for the amount."}},"required":["value","currency"],"description":"The fixed amount."},"relativeChange":{"type":"number","description":"The relative change from one period to the next."}},"required":["type","amount","relativeChange"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["average"],"description":"Average amount type based on historical data."},"referencePeriod":{"type":"number","description":"The number of months to look back for calculating the average."},"relativeChange":{"type":"number","description":"The relative change from one period to the next."}},"required":["type","referencePeriod","relativeChange"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["reference"],"description":"Reference amount type based on another category or net worth."},"ref":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["categoryOrCategoryGroupId"],"description":"Category or category group type for the reference."},"id":{"type":"string","description":"The ID of the reference category or category group."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["networthStart"],"description":"Net worth type for the reference."}},"required":["type"],"additionalProperties":false}]},"share":{"type":"number","description":"The share of the reference amount to use."},"referenceMonth":{"type":"string","enum":["same","previous"],"description":"Whether to use the same month or previous month as reference."}},"required":["type","ref","share","referenceMonth"],"additionalProperties":false}],"description":"The amount configuration for the plan, supporting fixed, average, or reference-based calculations."},"duration":{"type":["number","null"],"description":"The duration of the plan in months. Null means infinite duration."},"frequency":{"type":"number","description":"How often the plan occurs within the duration. Default is 1, meaning it happens every month."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"id":{"type":"string"}},"required":["scenarioId","month","categoryOrCategoryGroupId","amount","duration","frequency","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","id"],"additionalProperties":false}}},"required":["actual","plan","planItem","inactivePlanItems"]}},"netWorthEndPerMonth":{"type":"object","additionalProperties":{"type":"object","properties":{"actual":{"type":["number","null"]},"plan":{"type":["number","null"]},"planItem":{"type":["object","null"],"properties":{"scenarioId":{"type":["string","null"],"description":"The ID of the scenario this item is associated with. Null means the item is part of the global plan."},"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"The month in YYYY-MM format."},"categoryOrCategoryGroupId":{"type":"string","description":"The ID of the category or category group this item is associated with."},"amount":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fixed"],"description":"Fixed amount type."},"amount":{"type":"object","properties":{"value":{"type":"number","description":"The numerical value of the amount."},"currency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency code for the amount."}},"required":["value","currency"],"description":"The fixed amount."},"relativeChange":{"type":"number","description":"The relative change from one period to the next."}},"required":["type","amount","relativeChange"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["average"],"description":"Average amount type based on historical data."},"referencePeriod":{"type":"number","description":"The number of months to look back for calculating the average."},"relativeChange":{"type":"number","description":"The relative change from one period to the next."}},"required":["type","referencePeriod","relativeChange"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["reference"],"description":"Reference amount type based on another category or net worth."},"ref":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["categoryOrCategoryGroupId"],"description":"Category or category group type for the reference."},"id":{"type":"string","description":"The ID of the reference category or category group."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["networthStart"],"description":"Net worth type for the reference."}},"required":["type"],"additionalProperties":false}]},"share":{"type":"number","description":"The share of the reference amount to use."},"referenceMonth":{"type":"string","enum":["same","previous"],"description":"Whether to use the same month or previous month as reference."}},"required":["type","ref","share","referenceMonth"],"additionalProperties":false}],"description":"The amount configuration for the plan, supporting fixed, average, or reference-based calculations."},"duration":{"type":["number","null"],"description":"The duration of the plan in months. Null means infinite duration."},"frequency":{"type":"number","description":"How often the plan occurs within the duration. Default is 1, meaning it happens every month."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"id":{"type":"string"}},"required":["scenarioId","month","categoryOrCategoryGroupId","amount","duration","frequency","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","id"],"additionalProperties":false},"inactivePlanItems":{"type":"array","items":{"type":"object","properties":{"scenarioId":{"type":["string","null"],"description":"The ID of the scenario this item is associated with. Null means the item is part of the global plan."},"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"The month in YYYY-MM format."},"categoryOrCategoryGroupId":{"type":"string","description":"The ID of the category or category group this item is associated with."},"amount":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fixed"],"description":"Fixed amount type."},"amount":{"type":"object","properties":{"value":{"type":"number","description":"The numerical value of the amount."},"currency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency code for the amount."}},"required":["value","currency"],"description":"The fixed amount."},"relativeChange":{"type":"number","description":"The relative change from one period to the next."}},"required":["type","amount","relativeChange"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["average"],"description":"Average amount type based on historical data."},"referencePeriod":{"type":"number","description":"The number of months to look back for calculating the average."},"relativeChange":{"type":"number","description":"The relative change from one period to the next."}},"required":["type","referencePeriod","relativeChange"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["reference"],"description":"Reference amount type based on another category or net worth."},"ref":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["categoryOrCategoryGroupId"],"description":"Category or category group type for the reference."},"id":{"type":"string","description":"The ID of the reference category or category group."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["networthStart"],"description":"Net worth type for the reference."}},"required":["type"],"additionalProperties":false}]},"share":{"type":"number","description":"The share of the reference amount to use."},"referenceMonth":{"type":"string","enum":["same","previous"],"description":"Whether to use the same month or previous month as reference."}},"required":["type","ref","share","referenceMonth"],"additionalProperties":false}],"description":"The amount configuration for the plan, supporting fixed, average, or reference-based calculations."},"duration":{"type":["number","null"],"description":"The duration of the plan in months. Null means infinite duration."},"frequency":{"type":"number","description":"How often the plan occurs within the duration. Default is 1, meaning it happens every month."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"id":{"type":"string"}},"required":["scenarioId","month","categoryOrCategoryGroupId","amount","duration","frequency","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","id"],"additionalProperties":false}}},"required":["actual","plan","planItem","inactivePlanItems"]}},"netWorthChangePerMonth":{"type":"object","additionalProperties":{"type":"object","properties":{"actual":{"type":["number","null"]},"plan":{"type":["number","null"]},"planItem":{"type":["object","null"],"properties":{"scenarioId":{"type":["string","null"],"description":"The ID of the scenario this item is associated with. Null means the item is part of the global plan."},"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"The month in YYYY-MM format."},"categoryOrCategoryGroupId":{"type":"string","description":"The ID of the category or category group this item is associated with."},"amount":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fixed"],"description":"Fixed amount type."},"amount":{"type":"object","properties":{"value":{"type":"number","description":"The numerical value of the amount."},"currency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency code for the amount."}},"required":["value","currency"],"description":"The fixed amount."},"relativeChange":{"type":"number","description":"The relative change from one period to the next."}},"required":["type","amount","relativeChange"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["average"],"description":"Average amount type based on historical data."},"referencePeriod":{"type":"number","description":"The number of months to look back for calculating the average."},"relativeChange":{"type":"number","description":"The relative change from one period to the next."}},"required":["type","referencePeriod","relativeChange"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["reference"],"description":"Reference amount type based on another category or net worth."},"ref":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["categoryOrCategoryGroupId"],"description":"Category or category group type for the reference."},"id":{"type":"string","description":"The ID of the reference category or category group."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["networthStart"],"description":"Net worth type for the reference."}},"required":["type"],"additionalProperties":false}]},"share":{"type":"number","description":"The share of the reference amount to use."},"referenceMonth":{"type":"string","enum":["same","previous"],"description":"Whether to use the same month or previous month as reference."}},"required":["type","ref","share","referenceMonth"],"additionalProperties":false}],"description":"The amount configuration for the plan, supporting fixed, average, or reference-based calculations."},"duration":{"type":["number","null"],"description":"The duration of the plan in months. Null means infinite duration."},"frequency":{"type":"number","description":"How often the plan occurs within the duration. Default is 1, meaning it happens every month."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"id":{"type":"string"}},"required":["scenarioId","month","categoryOrCategoryGroupId","amount","duration","frequency","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","id"],"additionalProperties":false},"inactivePlanItems":{"type":"array","items":{"type":"object","properties":{"scenarioId":{"type":["string","null"],"description":"The ID of the scenario this item is associated with. Null means the item is part of the global plan."},"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"The month in YYYY-MM format."},"categoryOrCategoryGroupId":{"type":"string","description":"The ID of the category or category group this item is associated with."},"amount":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fixed"],"description":"Fixed amount type."},"amount":{"type":"object","properties":{"value":{"type":"number","description":"The numerical value of the amount."},"currency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency code for the amount."}},"required":["value","currency"],"description":"The fixed amount."},"relativeChange":{"type":"number","description":"The relative change from one period to the next."}},"required":["type","amount","relativeChange"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["average"],"description":"Average amount type based on historical data."},"referencePeriod":{"type":"number","description":"The number of months to look back for calculating the average."},"relativeChange":{"type":"number","description":"The relative change from one period to the next."}},"required":["type","referencePeriod","relativeChange"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["reference"],"description":"Reference amount type based on another category or net worth."},"ref":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["categoryOrCategoryGroupId"],"description":"Category or category group type for the reference."},"id":{"type":"string","description":"The ID of the reference category or category group."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["networthStart"],"description":"Net worth type for the reference."}},"required":["type"],"additionalProperties":false}]},"share":{"type":"number","description":"The share of the reference amount to use."},"referenceMonth":{"type":"string","enum":["same","previous"],"description":"Whether to use the same month or previous month as reference."}},"required":["type","ref","share","referenceMonth"],"additionalProperties":false}],"description":"The amount configuration for the plan, supporting fixed, average, or reference-based calculations."},"duration":{"type":["number","null"],"description":"The duration of the plan in months. Null means infinite duration."},"frequency":{"type":"number","description":"How often the plan occurs within the duration. Default is 1, meaning it happens every month."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"id":{"type":"string"}},"required":["scenarioId","month","categoryOrCategoryGroupId","amount","duration","frequency","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","id"],"additionalProperties":false}}},"required":["actual","plan","planItem","inactivePlanItems"]}},"refGraph":{"type":"array","items":{"type":"object","properties":{"source":{"type":"object","properties":{"id":{"type":"string"},"month":{"type":"string"}},"required":["id","month"]},"target":{"type":"object","properties":{"id":{"type":"string"},"month":{"type":"string"}},"required":["id","month"]}},"required":["source","target"]}}},"required":["notImplemented","categories","unassigned","currencyChangeEffectPerMonth","netWorthStartPerMonth","netWorthEndPerMonth","netWorthChangePerMonth","refGraph"]}}}},"400":{"description":"Invalid params","content":{"application/json":{"schema":{}}}}}}},"/wallets/{walletId}/data/expensesByMerchant":{"post":{"summary":"expensesByMerchant slice","tags":["Data"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The wallet id (row uuid)"},"required":true,"description":"The wallet id (row uuid)","name":"walletId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"period":{"anyOf":[{"type":"string","enum":["today","yesterday","7days","30days","3months","6months","1year","mtd","ytd","lastWeek","lastMonth","lastYear","thisYear","thisAndNextYear","allTime"],"description":"A named relative window (e.g. \"ytd\", \"1year\", \"allTime\")."},{"type":"object","properties":{"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["startDate","endDate"],"description":"An explicit inclusive date window."}],"description":"Window the merchant spend is aggregated over."},"limit":{"type":"integer","exclusiveMinimum":0,"description":"Max merchants to return (default 10)."},"assetIds":{"type":"array","items":{"type":"string"},"description":"Scope to these asset uuids; omit for whole-wallet."},"categoryIds":{"type":"array","items":{"type":"string"},"description":"Scope to these category uuids; omit for all categories."}},"required":["period"]}}}},"responses":{"200":{"description":"expensesByMerchant result","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"merchantId":{"type":"string"},"merchantName":{"type":"string"},"amount":{"type":"number","description":"Total spend with this merchant over the period, as a positive number in base currency."},"logo":{"type":"string","description":"Merchant logo URL, when a logo is available."}},"required":["merchantId","merchantName","amount"]}}}}},"400":{"description":"Invalid params","content":{"application/json":{"schema":{}}}}}}},"/wallets/{walletId}/data/netWorthByAssetAccess":{"post":{"summary":"netWorthByAssetAccess slice","tags":["Data"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The wallet id (row uuid)"},"required":true,"description":"The wallet id (row uuid)","name":"walletId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"period":{"anyOf":[{"type":"string","enum":["today","yesterday","7days","30days","3months","6months","1year","mtd","ytd","lastWeek","lastMonth","lastYear","thisYear","thisAndNextYear","allTime"],"description":"A named relative window (e.g. \"ytd\", \"1year\", \"allTime\")."},{"type":"object","properties":{"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["startDate","endDate"],"description":"An explicit inclusive date window."}],"description":"Window the access-liquidity series is bounded to."},"dateInterval":{"type":"string","enum":["month","day"],"description":"Bucket granularity (default 'day')."},"assetIds":{"type":"array","items":{"type":"string"},"description":"Scope to these asset uuids; omit for whole-wallet."}},"required":["period"]}}}},"responses":{"200":{"description":"netWorthByAssetAccess result","content":{"application/json":{"schema":{"type":"object","properties":{"series":{"type":"object","properties":{"fixed":{"type":"array","items":{"type":"object","properties":{"period":{"type":"string","description":"Bucket label (YYYY-MM-DD for day, YYYY-MM for month)."},"value":{"type":"number"}},"required":["period","value"]}},"semiFixed":{"type":"array","items":{"type":"object","properties":{"period":{"type":"string","description":"Bucket label (YYYY-MM-DD for day, YYYY-MM for month)."},"value":{"type":"number"}},"required":["period","value"]}},"liquid":{"type":"array","items":{"type":"object","properties":{"period":{"type":"string","description":"Bucket label (YYYY-MM-DD for day, YYYY-MM for month)."},"value":{"type":"number"}},"required":["period","value"]}}},"required":["fixed","semiFixed","liquid"]}},"required":["series"]}}}},"400":{"description":"Invalid params","content":{"application/json":{"schema":{}}}}}}},"/wallets/{walletId}/data/periodDetails":{"post":{"summary":"periodDetails slice","tags":["Data"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The wallet id (row uuid)"},"required":true,"description":"The wallet id (row uuid)","name":"walletId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Inclusive window start (YYYY-MM-DD)."},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Inclusive window end (YYYY-MM-DD)."},"dateDefinition":{"type":"string","enum":["cash","distributed"],"description":"Cash vs distributed accounting (default 'distributed')."},"requireCategoryAssignment":{"type":"boolean","description":"true = only categorized, false = only uncategorized, omitted = both."},"categoryIds":{"type":"array","items":{"type":"string"},"description":"Restrict to these category ids."},"categoryGroupIds":{"type":"array","items":{"type":"string"},"description":"Expanded server-side to their descendant category ids and merged into categoryIds."},"categoryTypes":{"type":"array","items":{"type":"string","enum":["activeIncome","passiveIncome","gainsLosses","fixedExpenses","variableExpenses","neutral"],"description":"The type of the category, used for financial classification and reporting."},"description":"Restrict to these category types."},"assetIds":{"type":"array","items":{"type":"string"},"description":"Restrict to these asset ids."}},"required":["startDate","endDate"]}}}},"responses":{"200":{"description":"periodDetails result","content":{"application/json":{"schema":{"type":"object","properties":{"amountByAssetId":{"type":"object","additionalProperties":{"type":"number"}},"total":{"type":"number"},"assetById":{"type":"object","additionalProperties":{"allOf":[{"anyOf":[{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["manualBank"],"description":"Asset type: A manually managed bank account where transactions are entered by the user."},"accountNumber":{"type":["string","null"],"description":"The bank account number. Null if not provided."},"importSettings":{"type":"object","properties":{"csv":{"description":"Settings related to CSV import for this bank account, if configured."}},"description":"Configuration for importing transactions into this manual bank account."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type","accountNumber","importSettings"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["automatedBank"],"description":"Asset type: An automated bank account connected to a bank feed for transaction import."},"accountNumber":{"type":["string","null"],"description":"The bank account number. Null if not provided or not available from the bank feed."},"bankConnection":{"type":"object","properties":{"type":{"type":"string","enum":["klarna","gocardless","finApi","plaid"],"description":"The type of bank connection provider (e.g., GoCardless, FinAPI)."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"GoCardless account details, if this connection is via GoCardless. Null otherwise."},"finApiAccount":{"type":["object","null"],"properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"FinAPI account details, if this connection is via FinAPI. Null otherwise."},"plaidAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Plaid account details, if this connection is via Plaid. Null otherwise."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"Status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"Expiry time of the bank connection. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"Last synchronization time of the bank connection. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"],"description":"Details of the bank connection for this automated bank asset."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type","accountNumber","bankConnection"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value from the automated source is provided."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value from the automated feed."},"bankConnection":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["finApi"],"description":"Specifies that this bank connection is of type FinAPI."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account. This is enforced to be non-null for FinAPI connections."},"plaidAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account, if applicable. Null otherwise."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]},{"type":"object","properties":{"type":{"type":"string","enum":["plaid"],"description":"Specifies that this bank connection is of type Plaid."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":["object","null"],"properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account, if applicable. Null otherwise."},"plaidAccount":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account. This is enforced to be non-null for Plaid connections."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]}],"description":"Details of the bank connection used to automate total value updates."},"type":{"type":"string","enum":["automatedBankTotalValue"],"description":"Asset type: An automated bank account where only the total value is synced, not individual transactions."},"accountNumber":{"type":["string","null"],"description":"The bank account number. Null if not provided or not available."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","bankConnection","type","accountNumber"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"type":{"type":"string","enum":["manualCrypto"],"description":"Asset type: A manually managed cryptocurrency asset where individual crypto transactions (buy, sell, initial balance) are recorded."},"gainsLossesCategoryId":{"type":"string","description":"Category ID for recording gains or losses from cryptocurrency transactions."},"feesCategoryId":{"type":"string","description":"Category ID for recording fees related to cryptocurrency transactions."},"taxCategoryId":{"type":"string","description":"Category ID for recording taxes related to cryptocurrency transactions."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","type","gainsLossesCategoryId","feesCategoryId","taxCategoryId"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["manualCash"],"description":"Asset type: Physical cash holdings, managed manually."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["manualCreditCard"],"description":"Asset type: A manually managed credit card account where transactions are entered by the user."},"accountNumber":{"type":["string","null"],"description":"The credit card account number. Null if not provided."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type","accountNumber"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["automatedCreditCard"],"description":"Asset type: An automated credit card account connected to a feed for transaction import."},"accountNumber":{"type":["string","null"],"description":"The credit card account number. Null if not provided or not available from the feed."},"bankConnection":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["finApi"],"description":"Specifies that this bank connection is of type FinAPI."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account. This is enforced to be non-null for FinAPI connections."},"plaidAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account, if applicable. Null otherwise."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]},{"type":"object","properties":{"type":{"type":"string","enum":["plaid"],"description":"Specifies that this bank connection is of type Plaid."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":["object","null"],"properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account, if applicable. Null otherwise."},"plaidAccount":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account. This is enforced to be non-null for Plaid connections."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]}],"description":"Details of the bank connection used for this automated credit card."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type","accountNumber","bankConnection"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value from the automated source is provided."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value from the automated feed."},"bankConnection":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["finApi"],"description":"Specifies that this bank connection is of type FinAPI."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account. This is enforced to be non-null for FinAPI connections."},"plaidAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account, if applicable. Null otherwise."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]},{"type":"object","properties":{"type":{"type":"string","enum":["plaid"],"description":"Specifies that this bank connection is of type Plaid."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":["object","null"],"properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account, if applicable. Null otherwise."},"plaidAccount":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account. This is enforced to be non-null for Plaid connections."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]}],"description":"Details of the bank connection used to automate total value updates."},"type":{"type":"string","enum":["automatedCreditCardTotalValue"],"description":"Asset type: An automated credit card account where only the total value is synced."},"accountNumber":{"type":["string","null"],"description":"The credit card account number. Null if not provided or not available."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","bankConnection","type","accountNumber"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["manualLoan"],"description":"Asset type: A manually managed loan (either taken or given out) where transactions are recorded by the user."},"accountNumber":{"type":["string","null"],"description":"The loan account number or identifier. Null if not provided."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type","accountNumber"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["automatedLoan"],"description":"Asset type: An automated loan account connected to a feed for transaction import."},"accountNumber":{"type":["string","null"],"description":"The loan account number. Null if not provided or not available from the feed."},"bankConnection":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["finApi"],"description":"Specifies that this bank connection is of type FinAPI."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account. This is enforced to be non-null for FinAPI connections."},"plaidAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account, if applicable. Null otherwise."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]},{"type":"object","properties":{"type":{"type":"string","enum":["plaid"],"description":"Specifies that this bank connection is of type Plaid."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":["object","null"],"properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account, if applicable. Null otherwise."},"plaidAccount":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account. This is enforced to be non-null for Plaid connections."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]}],"description":"Details of the bank connection used for this automated loan."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type","accountNumber","bankConnection"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value from the automated source is provided."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value from the automated feed."},"bankConnection":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["finApi"],"description":"Specifies that this bank connection is of type FinAPI."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account. This is enforced to be non-null for FinAPI connections."},"plaidAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account, if applicable. Null otherwise."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]},{"type":"object","properties":{"type":{"type":"string","enum":["plaid"],"description":"Specifies that this bank connection is of type Plaid."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":["object","null"],"properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account, if applicable. Null otherwise."},"plaidAccount":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account. This is enforced to be non-null for Plaid connections."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]}],"description":"Details of the bank connection used to automate total value updates."},"type":{"type":"string","enum":["automatedLoanTotalValue"],"description":"Asset type: An automated loan account where only the total value (outstanding balance) is synced."},"accountNumber":{"type":["string","null"],"description":"The loan account number. Null if not provided or not available."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","bankConnection","type","accountNumber"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["manualRealEstate"],"description":"Asset type: A manually managed real estate property where related income/expenses are tracked as transactions."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value of this asset is typically recorded."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value of this asset (e.g., market appreciation/depreciation)."},"type":{"type":"string","enum":["manualRealEstateTotalValue"],"description":"Asset type: A manually managed real estate property where only its total market value is tracked."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","type"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["manualPhysicalAsset"],"description":"Asset type: A manually managed physical asset (e.g., car, art) where related income/expenses are tracked."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value of this asset is typically recorded."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value of this asset (e.g., market appreciation/depreciation)."},"type":{"type":"string","enum":["manualPhysicalTotalValue"],"description":"Asset type: A manually managed physical asset where only its total value is tracked."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","type"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["manualTransitAccount"],"description":"Asset type: A manually managed transit or clearing account used for temporary holding of funds during transfers."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["manualOther"],"description":"Asset type: A generic manually managed asset for types not covered elsewhere, with transaction tracking."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["manualCompany"],"description":"Asset type: A manually managed representation of a company's finances (e.g., for entrepreneurs tracking business income/expenses)."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value of this asset is typically recorded."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value of this asset (e.g., market appreciation/depreciation)."},"type":{"type":"string","enum":["manualBankTotalValue"],"description":"Asset type: A manually managed bank account where only the total value is tracked by the user."},"accountNumber":{"type":["string","null"],"description":"The bank account number. Null if not provided."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","type","accountNumber"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value of this asset is typically recorded."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value of this asset (e.g., market appreciation/depreciation)."},"type":{"type":"string","enum":["manualCreditCardTotalValue"],"description":"Asset type: A manually managed credit card account where only the total value is tracked."},"accountNumber":{"type":["string","null"],"description":"The credit card account number. Null if not provided."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","type","accountNumber"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value of this asset is typically recorded."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value of this asset (e.g., market appreciation/depreciation)."},"type":{"type":"string","enum":["manualLoanTotalValue"],"description":"Asset type: A manually managed loan where only the total outstanding value is tracked."},"accountNumber":{"type":["string","null"],"description":"The loan account number. Null if not provided."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","type","accountNumber"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value of this asset is typically recorded."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value of this asset (e.g., market appreciation/depreciation)."},"type":{"type":"string","enum":["manualCompanyTotalValue"],"description":"Asset type: A manually managed asset representing the total value of a company or business interest."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","type"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value of this asset is typically recorded."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value of this asset (e.g., market appreciation/depreciation)."},"type":{"type":"string","enum":["manualOtherTotalValue"],"description":"Asset type: A generic manually managed asset where only its total value is tracked."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","type"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value of this asset is typically recorded."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value of this asset (e.g., market appreciation/depreciation)."},"type":{"type":"string","enum":["manualCryptoTotalValue"],"description":"Asset type: A manually managed cryptocurrency asset where only the total value is tracked (not individual crypto transactions)."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","type"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value from the automated source is provided."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value from the automated feed."},"bankConnection":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["finApi"],"description":"Specifies that this bank connection is of type FinAPI."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account. This is enforced to be non-null for FinAPI connections."},"plaidAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account, if applicable. Null otherwise."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]},{"type":"object","properties":{"type":{"type":"string","enum":["plaid"],"description":"Specifies that this bank connection is of type Plaid."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":["object","null"],"properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account, if applicable. Null otherwise."},"plaidAccount":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account. This is enforced to be non-null for Plaid connections."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]}],"description":"Details of the bank connection used to automate total value updates."},"type":{"type":"string","enum":["automatedCryptoTotalValue"],"description":"Asset type: An automated crypto account where only the total value is synced."},"accountNumber":{"type":["string","null"],"description":"The crypto account number. Null if not provided or not available."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","bankConnection","type","accountNumber"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The default currency for transactions recorded under this asset."},"defaultCategoryId":{"type":["string","null"],"description":"The default category ID to assign to new transactions for this asset. Null if no default is set."},"type":{"type":"string","enum":["manualInvestmentPortfolio"],"description":"Asset type: A manually managed investment portfolio where individual buy/sell transactions can be recorded (but not security details like ISIN)."},"accountNumber":{"type":["string","null"],"description":"The investment account number. Null if not provided."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","defaultCategoryId","type","accountNumber"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value of this asset is typically recorded."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value of this asset (e.g., market appreciation/depreciation)."},"type":{"type":"string","enum":["manualInvestmentPortfolioTotalValue"],"description":"Asset type: A manually managed investment portfolio where only the total value is tracked."},"accountNumber":{"type":["string","null"],"description":"The investment account number. Null if not provided."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","type","accountNumber"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"type":{"type":"string","enum":["manualSecurity"],"description":"Asset type: A manually managed security asset (stocks, ETFs, etc.) where individual security transactions (buy, sell, ISIN, quantity) are recorded."},"gainsLossesCategoryId":{"type":"string","description":"Category ID for recording gains or losses from security transactions."},"feesCategoryId":{"type":"string","description":"Category ID for recording fees related to security transactions."},"taxCategoryId":{"type":"string","description":"Category ID for recording taxes related to security transactions."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","type","gainsLossesCategoryId","feesCategoryId","taxCategoryId"]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset."},"access":{"type":"string","enum":["fixed","semiFixed","liquid"],"description":"The liquidity classification of the asset (fixed, semi-fixed, or liquid). Liquid assets are easily convertible to cash, semi-fixed assets are less liquid but still relatively easy to convert, and fixed assets are not easily convertible to cash."},"assetGroupId":{"type":["string","null"],"description":"The ID of the asset group this asset belongs to. Null if not part of any group."},"archived":{"type":"boolean","description":"Flag indicating if the asset is archived and should be hidden from most views."},"expectedAnnualReturn":{"type":["number","null"],"description":"The expected annual return percentage for this asset, if applicable. Null otherwise."},"order":{"type":"number","description":"A number used for ordering assets in the UI."},"createdTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was created. Format: YYYY-MM-DDTHH:MM:SSZ    "},"createdUserId":{"type":["string","null"],"description":"The ID of the user who created the entity. Null if the entity was created by the system."},"lastUpdatedTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the entity was last updated. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastUpdatedUserId":{"type":["string","null"],"description":"The ID of the user who last updated the entity. Null if the entity was updated by the system."},"defaultCurrency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The currency in which the total value from the automated source is provided."},"valueChangeCategoryId":{"type":"string","description":"The category ID used for recording changes in the total value from the automated feed."},"bankConnection":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["finApi"],"description":"Specifies that this bank connection is of type FinAPI."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account. This is enforced to be non-null for FinAPI connections."},"plaidAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account, if applicable. Null otherwise."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]},{"type":"object","properties":{"type":{"type":"string","enum":["plaid"],"description":"Specifies that this bank connection is of type Plaid."},"countryCode":{"type":["string","null"],"description":"The country of the bank this connection belongs to. Null if not available."},"gocardlessAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The GoCardless internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The GoCardless internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":"string","description":"The BIC (Bank Identifier Code) of the institution."},"logo":{"type":"string","description":"A URL to the logo of the banking institution."},"transactionTotalDays":{"type":"number","description":"The number of days of transaction history GoCardless typically provides for this institution."}},"required":["id","name","bic","logo","transactionTotalDays"],"description":"Details of the banking institution connected via GoCardless."}},"required":["id","iban","institution"],"description":"Details of the GoCardless connected account, if applicable. Null otherwise."},"finApiAccount":{"type":["object","null"],"properties":{"id":{"type":"number","description":"The FinAPI internal ID for the connected bank account."},"iban":{"type":["string","null"],"description":"The IBAN of the connected bank account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"number","description":"The FinAPI internal ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"bic":{"type":["string","null"],"description":"The BIC (Bank Identifier Code) of the institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."}},"required":["id","name","bic","logoStored"],"description":"Details of the banking institution connected via FinAPI."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."}},"required":["id","iban","institution","createdUserId"],"description":"Details of the FinAPI connected account, if applicable. Null otherwise."},"plaidAccount":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid account ID for the connected bank account."},"mask":{"type":["string","null"],"description":"The last 2-4 characters of the account number. Null if not available."},"type":{"type":"string","enum":["investment","credit","depository","loan","brokerage","other"],"description":"The type of the account."},"subtype":{"type":["string","null"],"description":"The subtype of the account. Null if not available."},"institution":{"type":"object","properties":{"id":{"type":"string","description":"The Plaid institution ID for the banking institution."},"name":{"type":"string","description":"The name of the banking institution."},"url":{"type":["string","null"],"description":"The URL of the banking institution. Null if not available."},"logoStored":{"type":"boolean","description":"Flag indicating if a logo is available for this bank."},"routingNumbers":{"type":["array","null"],"items":{"type":"string"},"description":"The routing numbers of the banking institution. Null if not available."},"primaryColor":{"type":["string","null"],"description":"The primary color of the banking institution. Null if not available."}},"required":["id","name","url","logoStored","routingNumbers","primaryColor"],"description":"Details of the banking institution connected via Plaid."},"createdUserId":{"type":"string","description":"The ID of the user who set up this bank connection."},"itemId":{"type":"string","description":"The Plaid item ID for the connected bank account representing a user to bank relationship."}},"required":["id","mask","type","subtype","institution","createdUserId","itemId"],"description":"Details of the Plaid connected account. This is enforced to be non-null for Plaid connections."},"status":{"type":"string","enum":["active","balanceMismatch","expired","error"],"description":"The current status of the bank connection."},"expireTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime when the bank connection is expected to expire. Null if not applicable or no expiry. Format: YYYY-MM-DDTHH:MM:SSZ"},"lastSyncTime":{"type":["string","null"],"format":"date-time","description":"The ISO datetime of the last successful synchronization with the bank. Null if never synced. Format: YYYY-MM-DDTHH:MM:SSZ"}},"required":["type","countryCode","gocardlessAccount","finApiAccount","plaidAccount","status","expireTime","lastSyncTime"]}],"description":"Details of the bank connection used to automate total value updates."},"type":{"type":"string","enum":["automatedInvestmentPortfolioTotalValue"],"description":"Asset type: An automated investment portfolio where only the total value is synced."},"accountNumber":{"type":["string","null"],"description":"The investment account number. Null if not provided or not available."}},"required":["name","access","assetGroupId","archived","expectedAnnualReturn","order","createdTime","createdUserId","lastUpdatedTime","lastUpdatedUserId","defaultCurrency","valueChangeCategoryId","bankConnection","type","accountNumber"]}]},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}}},"required":["amountByAssetId","total","assetById"]}}}},"400":{"description":"Invalid params","content":{"application/json":{"schema":{}}}}}}},"/wallets/{walletId}/data/profitLoss":{"post":{"summary":"profitLoss slice","tags":["Data"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The wallet id (row uuid)"},"required":true,"description":"The wallet id (row uuid)","name":"walletId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"monthPeriod":{"type":"object","properties":{"startMonth":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"Inclusive first month (YYYY-MM)."},"endMonth":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"Inclusive last month (YYYY-MM)."}},"required":["startMonth","endMonth"],"description":"The month window the P&L table covers."},"showUnassigned":{"type":"boolean","description":"Include uncategorized transactions (default true)."},"categoryIds":{"type":"array","items":{"type":"string"},"description":"Restrict to these category ids."},"assetIds":{"type":"array","items":{"type":"string"},"description":"Restrict to these asset ids."}},"required":["monthPeriod"]}}}},"responses":{"200":{"description":"profitLoss result","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"type":["string","null"]},"kind":{"type":"string","enum":["category","group"]},"level":{"type":"number"},"name":{"type":"string"},"amountsPerMonth":{"type":"array","items":{"type":"number"}},"hasPlainTransactionsPerMonth":{"type":"array","items":{"type":"boolean"}}},"required":["id","parentId","kind","level","name","amountsPerMonth","hasPlainTransactionsPerMonth"]}},"unassignedPerMonth":{"type":"array","items":{"type":"number"}},"currencyChangeEffectPerMonth":{"type":"array","items":{"type":"number"}},"totalsPerMonth":{"type":"array","items":{"type":"number"}},"months":{"type":"array","items":{"type":"string"},"description":"The month labels (YYYY-MM) each per-month array is aligned to."}},"required":["rows","unassignedPerMonth","currencyChangeEffectPerMonth","totalsPerMonth","months"]}}}},"400":{"description":"Invalid params","content":{"application/json":{"schema":{}}}}}}},"/wallets/{walletId}/data/networthAtDate":{"post":{"summary":"networthAtDate slice","tags":["Data"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The wallet id (row uuid)"},"required":true,"description":"The wallet id (row uuid)","name":"walletId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The date to read net worth at (YYYY-MM-DD)."},"assetIds":{"type":"array","items":{"type":"string"},"description":"Scope to these asset uuids; omit for whole-wallet."}},"required":["date"]}}}},"responses":{"200":{"description":"networthAtDate result","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"]}}}},"400":{"description":"Invalid params","content":{"application/json":{"schema":{}}}}}}},"/wallets/{walletId}/data/categoryAverages":{"post":{"summary":"categoryAverages slice","tags":["Data"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The wallet id (row uuid)"},"required":true,"description":"The wallet id (row uuid)","name":"walletId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"months":{"type":"integer","exclusiveMinimum":0,"description":"Number of months to average over (default 6)."},"endOffset":{"type":"integer","minimum":0,"description":"Months back the window ends (default 1 = last complete month)."}}}}}},"responses":{"200":{"description":"categoryAverages result","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"object","properties":{"value":{"type":"number"},"currency":{"type":"string"}},"required":["value","currency"]}}}}},"400":{"description":"Invalid params","content":{"application/json":{"schema":{}}}}}}},"/wallets/{walletId}/data/cryptoHoldingsValue":{"post":{"summary":"cryptoHoldingsValue slice","tags":["Data"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The wallet id (row uuid)"},"required":true,"description":"The wallet id (row uuid)","name":"walletId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assetIds":{"type":"array","items":{"type":"string"},"description":"Scope the holdings to these asset uuids; omit for the whole wallet."}}}}}},"responses":{"200":{"description":"cryptoHoldingsValue result","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset (crypto exchange account) this holding belongs to."},"cryptoCurrency":{"type":"string","enum":["BTC","ETH"],"description":"The held cryptocurrency."},"name":{"type":"string","description":"Display name of the cryptocurrency (e.g. \"Bitcoin\")."},"quantity":{"type":"number","description":"Units of the cryptocurrency held."},"value":{"type":"number","description":"Current market value in the wallet base currency (currentPrice × quantity)."},"currency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The wallet base currency `value` is denominated in."},"nativeValue":{"type":"number","description":"The holding amount in its own denomination (== quantity)."},"nativeCurrency":{"type":"string","description":"The holding's own denomination (the crypto currency, e.g. \"BTC\")."},"averageCostPerShareInBaseCurrency":{"type":"number","description":"FIFO average cost per unit, in base currency."},"currentPricePerShareInBaseCurrency":{"type":"number","description":"Current price per unit, in base currency."}},"required":["assetId","cryptoCurrency","name","quantity","value","currency","averageCostPerShareInBaseCurrency","currentPricePerShareInBaseCurrency"]},"description":"Crypto holdings keyed by `${assetId}:${cryptoCurrency}`."}}}},"400":{"description":"Invalid params","content":{"application/json":{"schema":{}}}}}}},"/wallets/{walletId}/data/securityHoldingsValue":{"post":{"summary":"securityHoldingsValue slice","tags":["Data"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The wallet id (row uuid)"},"required":true,"description":"The wallet id (row uuid)","name":"walletId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assetIds":{"type":"array","items":{"type":"string"},"description":"Scope the holdings to these asset uuids; omit for the whole wallet."}}}}}},"responses":{"200":{"description":"securityHoldingsValue result","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset (brokerage account) this holding belongs to."},"isin":{"type":"string","description":"The ISIN of the held security."},"name":{"type":"string","description":"Display name of the security (falls back to the ISIN when metadata is absent)."},"quantity":{"type":"number","description":"Number of shares held."},"value":{"type":"number","description":"Current market value in the wallet base currency (currentPrice × quantity)."},"currency":{"type":"string","enum":["EUR","AUD","BGN","BRL","CAD","CHF","CNY","CZK","DKK","GBP","HKD","HUF","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PLN","RON","SEK","SGD","THB","TRY","USD","ZAR"],"description":"The wallet base currency `value` is denominated in."},"nativeValue":{"type":"number","description":"The holding amount in its own denomination (== share quantity)."},"nativeCurrency":{"type":"string","description":"The holding's own denomination (the security ISIN)."},"averageCostPerShareInBaseCurrency":{"type":"number","description":"FIFO average cost per share, in base currency."},"currentPricePerShareInBaseCurrency":{"type":"number","description":"Current price per share, in base currency."},"details":{"type":["object","null"],"properties":{"name":{"type":"string","description":"The name of the security/stock/ETF/etc."},"isin":{"type":"string","description":"The ISIN of the security/stock/ETF/etc."},"objectID":{"type":"string","description":"The object ID of the security/stock/ETF/etc."},"wkn":{"type":"string","description":"The WKN of the security/stock/ETF/etc."},"type":{"type":"string","enum":["FUND","ETF","ETC","STOCK"],"description":"The type of the security/stock/ETF/etc."},"historyStartDate":{"type":"string","format":"date","description":"The start date of the history of the security/stock/ETF/etc."},"lastUpdatedTime":{"type":"string","format":"date","description":"The last updated time of the security/stock/ETF/etc."},"active":{"type":"boolean","description":"Whether the security/stock/ETF/etc. is active."},"splits":{"type":"object","additionalProperties":{"type":"number"},"description":"The historical splits of the security/stock/ETF/etc."}},"required":["name","isin","objectID","wkn","type","historyStartDate","lastUpdatedTime","active","splits"],"additionalProperties":false,"description":"Security metadata (name, wkn, splits); null when no metadata row exists."}},"required":["assetId","isin","name","quantity","value","currency","averageCostPerShareInBaseCurrency","currentPricePerShareInBaseCurrency"]},"description":"Security holdings keyed by `${assetId}:${isin}`."}}}},"400":{"description":"Invalid params","content":{"application/json":{"schema":{}}}}}}},"/wallets":{"get":{"summary":"List wallets","description":"The wallets this credential can reach. An API key is scoped to one wallet and lists only that one.","responses":{"200":{"description":"The wallets the caller has access to","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WalletSummary"}}}}}}}},"/wallets/{walletId}":{"get":{"summary":"Get a wallet","description":"Returns the wallet the caller has access to.","parameters":[{"schema":{"type":"string","format":"uuid","description":"The wallet row uuid"},"required":true,"description":"The wallet row uuid","name":"walletId","in":"path"}],"responses":{"200":{"description":"The wallet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wallet"}}}},"404":{"description":"Wallet not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"patch":{"summary":"Update wallet settings","parameters":[{"schema":{"type":"string","format":"uuid","description":"The wallet row uuid"},"required":true,"description":"The wallet row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"baseCurrency":{"type":"string"},"planSettings":{"type":["object","null"],"properties":{"levels":{"type":"array","items":{"type":"string"}},"showPercentageForPastMonths":{"type":"boolean"}},"required":["levels","showPercentageForPastMonths"]}}}}}},"responses":{"200":{"description":"The updated wallet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wallet"}}}}}},"delete":{"summary":"Delete a wallet","description":"Owner only, and a signed-in person rather than an API key. Deletes the wallet and everything in it (app-level cascade).","parameters":[{"schema":{"type":"string","format":"uuid","description":"The wallet row uuid"},"required":true,"description":"The wallet row uuid","name":"walletId","in":"path"}],"responses":{"200":{"description":"The deleted wallet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wallet"}}}}}}},"/wallets/{walletId}/members":{"get":{"summary":"List wallet members","parameters":[{"schema":{"type":"string","format":"uuid","description":"The wallet row uuid"},"required":true,"description":"The wallet row uuid","name":"walletId","in":"path"}],"responses":{"200":{"description":"The members of the wallet","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WalletMember"}}}}}}}},"/wallets/{walletId}/members/{userId}":{"patch":{"summary":"Change a member's role","description":"Owner only, and a signed-in person rather than an API key (legacy changeUserRole).","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"users row uuid"},"required":true,"description":"users row uuid","name":"userId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["owner","editor"]}},"required":["role"]}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"404":{"description":"Not a member","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"delete":{"summary":"Remove a member from the wallet","description":"Owner only, and a signed-in person rather than an API key (legacy deleteUserFromWallet).","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"users row uuid"},"required":true,"description":"users row uuid","name":"userId","in":"path"}],"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"404":{"description":"Not a member","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/wallets/{walletId}/invitations":{"get":{"summary":"List open invitations","parameters":[{"schema":{"type":"string","format":"uuid","description":"The wallet row uuid"},"required":true,"description":"The wallet row uuid","name":"walletId","in":"path"}],"responses":{"200":{"description":"The invitations of the wallet","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WalletInvitation"}}}}}}},"post":{"summary":"Invite a user to the wallet","description":"Owner only, and a signed-in person rather than an API key (legacy addInvite; matches the sharing UI, which shows member management to owners only). Enqueues the invitation email (legacy sendInvitationEmail callable, now the sendInvitationEmail pg-boss job).","parameters":[{"schema":{"type":"string","format":"uuid","description":"The wallet row uuid"},"required":true,"description":"The wallet row uuid","name":"walletId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","minLength":3},"role":{"type":"string","enum":["owner","editor"]}},"required":["email","role"]}}}},"responses":{"201":{"description":"The created invitation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletInvitation"}}}}}}},"/wallets/{walletId}/invitations/{id}":{"delete":{"summary":"Delete an invitation","description":"Owner only, and a signed-in person rather than an API key (legacy deleteInvite).","parameters":[{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"walletId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Row uuid"},"required":true,"description":"Row uuid","name":"id","in":"path"}],"responses":{"200":{"description":"The deleted invitation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletInvitation"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}}},"webhooks":{}}