All routine endpoints require a valid JWT Bearer token. The API enforces ownership — users can only read, update, or delete their own routines.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/jaimegayo/KERNDOCUMENTATION/llms.txt
Use this file to discover all available pages before exploring further.
POST /routines/create
Creates a new routine with its exercises and series in a single atomic transaction. Auth required: YesRequest body
The ID of the authenticated user. Must match the token’s owner.
Display name for the routine (e.g.,
"Día A — Empuje").Array of exercises to include in the routine.
Response — 200
Always
"success" on a successful creation.Human-readable confirmation message.
The auto-incremented ID of the newly created routine. Store this to retrieve or update the routine later.
Example
GET /routines/
Returns a detailed view of a routine including exercise instructions, coaching tips, and historical progression data from the user’s most recent completed session. Auth required: YesPath parameters
The ID of the routine to retrieve.
Response — 200
Routine ID.
Routine display name.
ISO 8601 creation timestamp.
Number of exercises in this routine.
Total number of sets across all exercises.
Always
0.0 — the session starts fresh and volume is calculated client-side as the user logs sets.kilos and reps in each serie are always returned as 0. The Android client should use prev_kilos and prev_reps to pre-fill input fields, showing the user their starting suggestion based on the previous session.Example
PUT /routines/
Updates the routine’s name and completely replaces all its exercises. All existing exercises for this routine are deleted and re-created in a single transaction. Auth required: YesPath parameters
The ID of the routine to update.
Request body
Same shape asPOST /routines/create: user_id, nombre, and ejercicios[].
Response — 200
Always
"success" on success."Rutina actualizada correctamente"Example
DELETE /routines/
Permanently deletes a routine and all of its associated exercises. This action cannot be undone. SQLAlchemy cascade rules ensure allroutine_exercises rows are removed automatically.
Auth required: Yes
Path parameters
The ID of the routine to delete.
Response — 200
Always
"success" on success."Rutina eliminada correctamente"Errors
| Status | detail | Cause |
|---|---|---|
404 | "Rutina no encontrada o no tienes permiso para eliminarla" | No routine with this ID exists for the authenticated user |