curl --request POST \
--url https://api.ceboelha.com/problematic-foods \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"foodId": 1234,
"foodName": "Onion",
"symptomTypes": ["bloating", "gas", "cramps"],
"intensity": 4,
"notes": "Ate raw onion in salad, symptoms within 2 hours"
}'
{
"success": true,
"message": "Alimento adicionado à lista de problemáticos",
"data": {
"_id": "507f1f77bcf86cd799439011",
"userId": "507f191e810c19729de860ea",
"foodId": 1234,
"foodName": "Onion",
"totalIncidents": 1,
"lastIncident": "2024-03-15",
"status": "suspected",
"incidents": [
{
"diaryEntryId": "507f1f77bcf86cd799439012",
"date": "2024-03-15",
"symptomTypes": ["bloating", "gas", "cramps"],
"intensity": 4,
"notes": "Ate raw onion in salad, symptoms within 2 hours"
}
],
"createdAt": "2024-03-15T14:20:00.000Z",
"updatedAt": "2024-03-15T14:20:00.000Z"
}
}
Mark a food as problematic or add a new incident to an existing problematic food
curl --request POST \
--url https://api.ceboelha.com/problematic-foods \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"foodId": 1234,
"foodName": "Onion",
"symptomTypes": ["bloating", "gas", "cramps"],
"intensity": 4,
"notes": "Ate raw onion in salad, symptoms within 2 hours"
}'
{
"success": true,
"message": "Alimento adicionado à lista de problemáticos",
"data": {
"_id": "507f1f77bcf86cd799439011",
"userId": "507f191e810c19729de860ea",
"foodId": 1234,
"foodName": "Onion",
"totalIncidents": 1,
"lastIncident": "2024-03-15",
"status": "suspected",
"incidents": [
{
"diaryEntryId": "507f1f77bcf86cd799439012",
"date": "2024-03-15",
"symptomTypes": ["bloating", "gas", "cramps"],
"intensity": 4,
"notes": "Ate raw onion in salad, symptoms within 2 hours"
}
],
"createdAt": "2024-03-15T14:20:00.000Z",
"updatedAt": "2024-03-15T14:20:00.000Z"
}
}
confirmed.Bearer YOUR_TOKENbloating, gas, cramps, nausea, diarrhea, constipation, reflux, fatigue, headache, brain_fog, other.Show properties
suspected (1-2 incidents) or confirmed (3+ incidents).Show properties
curl --request POST \
--url https://api.ceboelha.com/problematic-foods \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"foodId": 1234,
"foodName": "Onion",
"symptomTypes": ["bloating", "gas", "cramps"],
"intensity": 4,
"notes": "Ate raw onion in salad, symptoms within 2 hours"
}'
{
"success": true,
"message": "Alimento adicionado à lista de problemáticos",
"data": {
"_id": "507f1f77bcf86cd799439011",
"userId": "507f191e810c19729de860ea",
"foodId": 1234,
"foodName": "Onion",
"totalIncidents": 1,
"lastIncident": "2024-03-15",
"status": "suspected",
"incidents": [
{
"diaryEntryId": "507f1f77bcf86cd799439012",
"date": "2024-03-15",
"symptomTypes": ["bloating", "gas", "cramps"],
"intensity": 4,
"notes": "Ate raw onion in salad, symptoms within 2 hours"
}
],
"createdAt": "2024-03-15T14:20:00.000Z",
"updatedAt": "2024-03-15T14:20:00.000Z"
}
}
date field for the incident is automatically set to today’s datesuspected to confirmed automatically after the 3rd incidentfoodName is not provided, it will be fetched from the foods databasetriggersIdentified) are updated when a food reaches confirmed status