curl --request GET \
--url https://api.ceboelha.com/problematic-foods \
--header 'Authorization: Bearer YOUR_TOKEN'
{
"success": true,
"data": [
{
"_id": "507f1f77bcf86cd799439011",
"userId": "507f191e810c19729de860ea",
"foodId": 1234,
"foodName": "Onion",
"totalIncidents": 3,
"lastIncident": "2024-03-15",
"status": "confirmed",
"incidents": [
{
"diaryEntryId": "507f1f77bcf86cd799439012",
"date": "2024-03-15",
"symptomTypes": ["bloating", "gas", "cramps"],
"intensity": 4,
"notes": "Ate raw onion in salad, symptoms within 2 hours"
},
{
"diaryEntryId": "507f1f77bcf86cd799439013",
"date": "2024-03-10",
"symptomTypes": ["bloating", "gas"],
"intensity": 3
},
{
"diaryEntryId": "507f1f77bcf86cd799439014",
"date": "2024-03-05",
"symptomTypes": ["bloating"],
"intensity": 2
}
],
"createdAt": "2024-03-05T10:30:00.000Z",
"updatedAt": "2024-03-15T14:20:00.000Z"
}
]
}
Retrieve all foods marked as problematic by the authenticated user
curl --request GET \
--url https://api.ceboelha.com/problematic-foods \
--header 'Authorization: Bearer YOUR_TOKEN'
{
"success": true,
"data": [
{
"_id": "507f1f77bcf86cd799439011",
"userId": "507f191e810c19729de860ea",
"foodId": 1234,
"foodName": "Onion",
"totalIncidents": 3,
"lastIncident": "2024-03-15",
"status": "confirmed",
"incidents": [
{
"diaryEntryId": "507f1f77bcf86cd799439012",
"date": "2024-03-15",
"symptomTypes": ["bloating", "gas", "cramps"],
"intensity": 4,
"notes": "Ate raw onion in salad, symptoms within 2 hours"
},
{
"diaryEntryId": "507f1f77bcf86cd799439013",
"date": "2024-03-10",
"symptomTypes": ["bloating", "gas"],
"intensity": 3
},
{
"diaryEntryId": "507f1f77bcf86cd799439014",
"date": "2024-03-05",
"symptomTypes": ["bloating"],
"intensity": 2
}
],
"createdAt": "2024-03-05T10:30:00.000Z",
"updatedAt": "2024-03-15T14:20:00.000Z"
}
]
}
Bearer YOUR_TOKENShow properties
suspected (1-2 incidents) or confirmed (3+ incidents).Show properties
bloating, gas, cramps, nausea, diarrhea, constipation, reflux, fatigue, headache, brain_fog, other.curl --request GET \
--url https://api.ceboelha.com/problematic-foods \
--header 'Authorization: Bearer YOUR_TOKEN'
{
"success": true,
"data": [
{
"_id": "507f1f77bcf86cd799439011",
"userId": "507f191e810c19729de860ea",
"foodId": 1234,
"foodName": "Onion",
"totalIncidents": 3,
"lastIncident": "2024-03-15",
"status": "confirmed",
"incidents": [
{
"diaryEntryId": "507f1f77bcf86cd799439012",
"date": "2024-03-15",
"symptomTypes": ["bloating", "gas", "cramps"],
"intensity": 4,
"notes": "Ate raw onion in salad, symptoms within 2 hours"
},
{
"diaryEntryId": "507f1f77bcf86cd799439013",
"date": "2024-03-10",
"symptomTypes": ["bloating", "gas"],
"intensity": 3
},
{
"diaryEntryId": "507f1f77bcf86cd799439014",
"date": "2024-03-05",
"symptomTypes": ["bloating"],
"intensity": 2
}
],
"createdAt": "2024-03-05T10:30:00.000Z",
"updatedAt": "2024-03-15T14:20:00.000Z"
}
]
}
lastIncident in descending order (most recent first)confirmed after 3 or more incidentsfoodId (enforced by unique compound index)