curl --request POST \
--url https://api.example.com/api/investment/:accountId/analyze-profile \
--header 'Content-Type: application/json' \
--data '
{
"age": 123,
"monthlyIncome": 123,
"jobStability": "<string>",
"hasEmergencyFund": "<string>",
"horizonYears": "<string>",
"reactionToDrop": "<string>",
"experienceLevel": "<string>",
"financialMetrics": {
"avgMonthlyIncome": 123,
"avgMonthlyExpenses": 123,
"savingsCapacity": 123,
"savingsRate": 123,
"historicalMonths": 123,
"trend": "<string>",
"deficitMonths": 123
}
}
'{
"success": true,
"data": {
"recommendedProfile": "<string>",
"confidence": 123,
"reasoning": "<string>",
"investmentPercentage": 123,
"monthlyInvestable": 123,
"liquidityReserve": 123,
"historicalInsights": {
"monthsAnalyzed": 123,
"trend": "<string>",
"bestMonth": "<string>",
"worstMonth": "<string>",
"savingsConsistency": "<string>"
},
"warnings": [
{}
],
"marketContext": "<string>"
},
"error": {
"success": true,
"message": "<string>"
}
}curl --request POST \
--url https://api.example.com/api/investment/:accountId/analyze-profile \
--header 'Content-Type: application/json' \
--data '
{
"age": 123,
"monthlyIncome": 123,
"jobStability": "<string>",
"hasEmergencyFund": "<string>",
"horizonYears": "<string>",
"reactionToDrop": "<string>",
"experienceLevel": "<string>",
"financialMetrics": {
"avgMonthlyIncome": 123,
"avgMonthlyExpenses": 123,
"savingsCapacity": 123,
"savingsRate": 123,
"historicalMonths": 123,
"trend": "<string>",
"deficitMonths": 123
}
}
'{
"success": true,
"data": {
"recommendedProfile": "<string>",
"confidence": 123,
"reasoning": "<string>",
"investmentPercentage": 123,
"monthlyInvestable": 123,
"liquidityReserve": 123,
"historicalInsights": {
"monthsAnalyzed": 123,
"trend": "<string>",
"bestMonth": "<string>",
"worstMonth": "<string>",
"savingsConsistency": "<string>"
},
"warnings": [
{}
],
"marketContext": "<string>"
},
"error": {
"success": true,
"message": "<string>"
}
}high, medium, lowyes, partial, no<3, 3-10, >10sell, hold, buy_morenone, basic, intermediate, advancedShow financialMetrics properties
improving, stable, decliningShow data properties
conservative, balanced, dynamicShow historicalInsights properties
curl -X POST 'https://api.example.com/api/investment/acc_123/analyze-profile' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"age": 32,
"monthlyIncome": 3500,
"jobStability": "high",
"hasEmergencyFund": "partial",
"horizonYears": "3-10",
"reactionToDrop": "hold",
"experienceLevel": "basic",
"financialMetrics": {
"avgMonthlyIncome": 3500,
"avgMonthlyExpenses": 2200,
"savingsCapacity": 1300,
"savingsRate": 37.14,
"historicalMonths": 12,
"trend": "stable",
"deficitMonths": 1
}
}'
{
"success": true,
"data": {
"recommendedProfile": "balanced",
"confidence": 0.85,
"reasoning": "Based on your stable job, medium-term horizon, and willingness to hold during downturns, a balanced portfolio suits your profile. Your partial emergency fund should be completed before aggressive investing.",
"investmentPercentage": 25,
"monthlyInvestable": 325,
"liquidityReserve": 6600,
"historicalInsights": {
"monthsAnalyzed": 12,
"trend": "Stable savings pattern with consistent positive flow",
"bestMonth": "Month 8 with 1,800€ saved",
"worstMonth": "Month 3 with -150€ deficit",
"savingsConsistency": "High - 11 out of 12 months positive"
},
"warnings": [
"Complete your emergency fund to 3 months of expenses before increasing investment allocation",
"Start with lower-risk investments given your basic experience level"
],
"marketContext": "Current market volatility suggests starting with index funds and gradual position building"
}
}
400 - Invalid input data (validation failed)401 - Unauthorized (missing or invalid token)403 - Forbidden (no access to this account)503 - AI service unavailable