2. Fermentos (Ferment Types)
GET /api/fermentos
List all ferment types. Public.
[
{
"id": 1,
"name": "Kombucha",
"description": "Fermented tea beverage...",
"image_url": "https://.../kombucha.jpg"
}
]
GET /api/fermentos/{id}
Get details for a ferment type. Public.
{
"id": 1,
"name": "Kombucha",
"description": "Fermented tea beverage...",
"image_url": "https://.../kombucha.jpg",
"guides": [
{ "id": 10, "title": "Basic Guide", "steps": [ ... ] }
],
"related_batches": [
{ "id": 101, "name": "My First Batch", "status": "active" }
]
}
3. FAQ, Privacy, Terms, Premium
GET /api/pages/{slug}
Static content (FAQ, privacy, terms, premium). Public.
{
"title": "FAQ",
"content": "...HTML or Markdown..."
}
5. Authentication
POST /api/auth/login
User login. Public.
{ "email": "user@example.com", "password": "..." }
{ "token": "...", "user": { "id": 1, "name": "User", "email": "user@example.com" } }
POST /api/auth/register
User registration. Public.
{ "name": "User", "email": "user@example.com", "password": "..." }
{ "token": "...", "user": { "id": 1, "name": "User", "email": "user@example.com" } }
POST /api/auth/google
Google login. Public.
{ "token": "google_id_token" }
{ "token": "...", "user": { ... } }
POST /api/auth/password/email
Password reset. Public.
{ "email": "user@example.com" }
{ "status": "email_sent" }
7. Batches
GET /api/batches
List user batches. Auth required.
[
{ "id": 101, "name": "Batch 1", "type": "Kombucha", "status": "active", "progress": 60 }
]
POST /api/batches
Create batch. Auth required.
{ "name": "Batch 1", "type_id": 1 }
{ "id": 101, "name": "Batch 1" }
GET /api/batches/{id}
Batch details. Auth required.
{ "id": 101, "name": "Batch 1", "type": "Kombucha", "status": "active", "logs": [ ... ], "events": [ ... ] }
PUT /api/batches/{id}
Update batch. Auth required.
{ ...fields to update... }
DELETE /api/batches/{id}
Delete batch. Auth required.
{ "status": "deleted" }
POST /api/batches/{id}/advance
Advance batch step. Auth required.
{ "status": "advanced", "batch": { ... } }
8. Batch Logs
GET /api/batches/{id}/logs
List logs for a batch. Auth required.
[
{ "id": 1, "date": "2026-04-20", "note": "Checked pH", "image_url": null }
]
POST /api/batches/{id}/logs
Add log entry. Auth required.
{ "date": "2026-04-20", "note": "Checked pH", "image": "...base64..." }
GET /api/batches/{id}/logs/{log_id}
Get log detail. Auth required.
PUT /api/batches/{id}/logs/{log_id}
Update log. Auth required.
DELETE /api/batches/{id}/logs/{log_id}
Delete log. Auth required.
{ "status": "deleted" }
12. Profile
GET /api/profile
View profile. Auth required.
{ "id": 1, "name": "User", "email": "user@example.com", "avatar_url": "..." }
PUT /api/profile
Update profile. Auth required.
{ ...fields to update... }
POST /api/profile/avatar
Upload avatar. Auth required.
multipart/form-data (file)
{ "avatar_url": "..." }
POST /api/profile/deletion/request
Request account deletion. Auth required.
{ "status": "requested" }
GET /api/profile/deletion/confirm/{user_id}
Confirm account deletion. Auth required.
{ "status": "confirmed" }
DELETE /api/profile
Delete account. Auth required.
{ "status": "deleted" }