Admin · Cuenta, restaurantes y usuarios¶
Esta área de la API es la gestión de la plataforma desde el panel de administración: el alta y la autenticación de administradores (OAuth → JWT), el ciclo de vida de los restaurantes que viven en la plataforma y la administración de los usuarios admin (creación, invitación, roles y estados). Es la puerta de entrada de cualquier sesión de admin —de aquí salen el token y el perfil— y la base sobre la que se apoyan el resto de superficies admin (menú, comanda, sala). Para el modelo de roles y permisos ver Administradores, roles y permisos; para el modelo de restaurantes y salas, Restaurantes y mesas; y para los servicios transversales de la plataforma (audit trail, OAuth, almacén de state), Servicios de plataforma.
Autenticación. Los administradores no tienen contraseña en el backend: se autentican contra un proveedor OAuth externo (Google o Apple) y reciben a cambio un JWT de admin. El flujo está endurecido con state anti-CSRF de un solo uso y PKCE (RFC 7636) en Google; un usuario que no esté previamente registrado en la plataforma recibe 403 (no hay auto-alta por OAuth). Salvo los endpoints de inicio de flujo, callback y aceptación de invitación, toda operación exige un AdminUser autenticado por Bearer token. El modelo completo de auth está en Seguridad y multitenancy.
Roles y multitenancy. El acceso se controla por rol (SUPER_ADMIN, RESTAURANT_OWNER y demás) y por restaurante. Las operaciones sobre restaurantes y usuarios scoped verifican siempre el acceso con require_restaurant_access, nunca se confía en el restaurant_id del cuerpo; SUPER_ADMIN bypassa el guard y ve toda la plataforma, mientras que los demás roles quedan acotados a los restaurantes que tienen asignados. La autoridad para crear o asignar un rol está limitada por el rol del propio actor (un admin solo puede asignar roles que su nivel le permite), y no es posible auto-modificarse en operaciones sensibles.
Patrones a tener en cuenta
- Paginación. Los listados (
restaurants,users) usan el shape canónicoPaginatedResponseconpage+per_page. - Ciclo de vida de usuarios. Un admin se crea o se invita en estado
pendingy se activa en su primer login OAuth; las invitaciones pueden venir ligadas a un restaurante concreto para aterrizar en el contexto correcto. - Operaciones en lote. Tanto restaurantes como usuarios admiten acciones masivas (cambio de estado, borrado) reservadas a
SUPER_ADMIN. - Audit trail. Las operaciones destructivas o de cambio de estado/rol quedan registradas en el audit trail de la plataforma.
Para la visión general de la API ver Referencia de la API.
Generado automáticamente
Las tablas y fichas de endpoints de esta página se generan desde el contrato OpenAPI. No las edites a mano; edita la intro en documentation/reference/api/_intros/admin-plataforma.md y regenera con python scripts/gen_openapi_reference.py.
Resumen de endpoints¶
| Método | Ruta | Resumen | Auth |
|---|---|---|---|
GET |
/api/v1/admin/analytics/orders |
Get Order Analytics | Bearer (admin) |
GET |
/api/v1/admin/analytics/overview |
Get Overview | Bearer (admin) |
GET |
/api/v1/admin/analytics/products |
Get Product Analytics | Bearer (admin) |
GET |
/api/v1/admin/analytics/revenue |
Get Revenue Analytics | Bearer (admin) |
GET |
/api/v1/admin/auth/apple |
Initiate Apple Oauth | Pública |
POST |
/api/v1/admin/auth/callback |
Oauth Callback | Pública |
GET |
/api/v1/admin/auth/google |
Initiate Google Oauth | Pública |
GET |
/api/v1/admin/chat/conversations |
List Conversations | Bearer (admin) |
DELETE |
/api/v1/admin/chat/conversations/{conversation_id} |
Delete Conversation | Bearer (admin) |
GET |
/api/v1/admin/chat/conversations/{conversation_id} |
Get Conversation Detail | Bearer (admin) |
GET |
/api/v1/admin/chat/conversations/{conversation_id}/export |
Export Conversation | Bearer (admin) |
GET |
/api/v1/admin/chat/conversations/{conversation_id}/logs |
Get Conversation Logs | Bearer (admin) |
PATCH |
/api/v1/admin/chat/conversations/{conversation_id}/status |
Update Conversation Status | Bearer (admin) |
GET |
/api/v1/admin/conversation-trees |
List Trees | Bearer (admin) |
POST |
/api/v1/admin/conversation-trees |
Create Tree Draft | Bearer (admin) |
GET |
/api/v1/admin/conversation-trees/active |
Get Active Tree | Bearer (admin) |
GET |
/api/v1/admin/conversation-trees/registered-actions |
List Registered Actions | Bearer (admin) |
GET |
/api/v1/admin/conversation-trees/{tree_id} |
Get Tree | Bearer (admin) |
PUT |
/api/v1/admin/conversation-trees/{tree_id} |
Update Tree Draft | Bearer (admin) |
POST |
/api/v1/admin/conversation-trees/{tree_id}/activate |
Activate Tree | Bearer (admin) |
POST |
/api/v1/admin/conversation-trees/{tree_id}/simulate |
Simulate Tree | Bearer (admin) |
POST |
/api/v1/admin/conversation-trees/{tree_id}/validate |
Validate Tree Endpoint | Bearer (admin) |
GET |
/api/v1/admin/manager-calls/restaurants/{restaurant_id}/pending-calls |
Get Pending Manager Calls | Bearer (admin) |
POST |
/api/v1/admin/manager-calls/{call_id}/respond |
Respond To Manager Call | Bearer (admin) |
GET |
/api/v1/admin/manager/restaurants/{restaurant_id}/events |
Manager Events | Pública |
GET |
/api/v1/admin/manager/restaurants/{restaurant_id}/kitchen/overload |
Get Kitchen Overload | Bearer (admin) |
POST |
/api/v1/admin/manager/restaurants/{restaurant_id}/kitchen/overload |
Set Kitchen Overload | Bearer (admin) |
GET |
/api/v1/admin/manager/restaurants/{restaurant_id}/sessions |
Get Active Sessions | Bearer (admin) |
POST |
/api/v1/admin/manager/sessions/{session_token}/courtesy-round |
Courtesy Round | Bearer (admin) |
POST |
/api/v1/admin/manager/sessions/{session_token}/deliver |
Mark Delivery | Bearer (admin) |
GET |
/api/v1/admin/me |
Get Current Admin Profile | Bearer (admin) |
POST |
/api/v1/admin/recommendations/recompute |
Recompute Artifacts | Bearer (admin) |
GET |
/api/v1/admin/restaurants |
List Restaurants | Bearer (admin) |
POST |
/api/v1/admin/restaurants |
Create Restaurant | Bearer (admin) |
PATCH |
/api/v1/admin/restaurants/bulk |
Bulk Operation | Bearer (admin) |
PATCH |
/api/v1/admin/restaurants/bulk/status |
Bulk Update Status | Bearer (admin) |
GET |
/api/v1/admin/restaurants/my-restaurants |
List My Restaurants | Bearer (admin) |
DELETE |
/api/v1/admin/restaurants/{restaurant_id} |
Delete Restaurant | Bearer (admin) |
GET |
/api/v1/admin/restaurants/{restaurant_id} |
Get Restaurant | Bearer (admin) |
PUT |
/api/v1/admin/restaurants/{restaurant_id} |
Update Restaurant | Bearer (admin) |
GET |
/api/v1/admin/restaurants/{restaurant_id}/access-check |
Check Restaurant Access | Bearer (admin) |
GET |
/api/v1/admin/restaurants/{restaurant_id}/settings |
Get Restaurant Settings | Bearer (admin) |
GET |
/api/v1/admin/restaurants/{restaurant_id}/staff |
Get Restaurant Staff | Bearer (admin) |
POST |
/api/v1/admin/restaurants/{restaurant_id}/staff/invite |
Invite Restaurant Staff | Bearer (admin) |
PATCH |
/api/v1/admin/restaurants/{restaurant_id}/status |
Change Restaurant Status | Bearer (admin) |
POST |
/api/v1/admin/tables |
Create Table | Bearer (admin) |
GET |
/api/v1/admin/tables/restaurant/{restaurant_id} |
List Tables | Bearer (admin) |
DELETE |
/api/v1/admin/tables/{table_id} |
Delete Table | Bearer (admin) |
PATCH |
/api/v1/admin/tables/{table_id} |
Update Table | Bearer (admin) |
GET |
/api/v1/admin/users |
List Users | Bearer (admin) |
POST |
/api/v1/admin/users |
Create User | Bearer (admin) |
PATCH |
/api/v1/admin/users/bulk |
Bulk User Operation | Bearer (admin) |
GET |
/api/v1/admin/users/email/check |
Check Email Status | Bearer (admin) |
POST |
/api/v1/admin/users/invite |
Invite User | Bearer (admin) |
POST |
/api/v1/admin/users/invite/accept |
Accept Invitation | Pública |
GET |
/api/v1/admin/users/me |
Get Current User | Bearer (admin) |
GET |
/api/v1/admin/users/roles/available |
Get Available Roles | Bearer (admin) |
DELETE |
/api/v1/admin/users/{user_id} |
Delete User | Bearer (admin) |
GET |
/api/v1/admin/users/{user_id} |
Get User | Bearer (admin) |
PATCH |
/api/v1/admin/users/{user_id} |
Update User | Bearer (admin) |
PATCH |
/api/v1/admin/users/{user_id}/role |
Change User Role | Bearer (admin) |
PATCH |
/api/v1/admin/users/{user_id}/status |
Update User Status | Bearer (admin) |
POST |
/api/v1/errors/log |
Log Error | Pública |
GET |
/api/v1/errors/recent |
Get Recent Errors | Bearer (admin) |
Detalle¶
GET /api/v1/admin/analytics/orders¶
Get Order Analytics
Get order analytics grouped by time period.
- Auth: Bearer (admin)
- Parámetros:
date_from(query, opcional),date_to(query, opcional),group_by(query, opcional),restaurant_id(query, opcional) - Respuestas:
200OrderAnalyticsResponse,422HTTPValidationError
GET /api/v1/admin/analytics/overview¶
Get Overview
Get dashboard overview statistics.
- Auth: Bearer (admin)
- Parámetros:
date_from(query, opcional),date_to(query, opcional),restaurant_id(query, opcional) - Respuestas:
200OverviewStatsResponse,422HTTPValidationError
GET /api/v1/admin/analytics/products¶
Get Product Analytics
Get product analytics (top selling products).
- Auth: Bearer (admin)
- Parámetros:
date_from(query, opcional),date_to(query, opcional),limit(query, opcional),restaurant_id(query, opcional) - Respuestas:
200ProductAnalyticsResponse,422HTTPValidationError
GET /api/v1/admin/analytics/revenue¶
Get Revenue Analytics
Get revenue analytics.
- Auth: Bearer (admin)
- Parámetros:
date_from(query, opcional),date_to(query, opcional),restaurant_id(query, opcional) - Respuestas:
200RevenueAnalyticsResponse,422HTTPValidationError
GET /api/v1/admin/auth/apple¶
Initiate Apple Oauth
Initiate Apple OAuth2 flow for admin authentication.
- Auth: Pública
- Parámetros: —
- Respuestas:
200OAuthInitResponse
POST /api/v1/admin/auth/callback¶
Oauth Callback
Handle OAuth2 callback and create admin session.
- Auth: Pública
- Parámetros: —
- Body:
OAuthCallbackRequest - Respuestas:
200AdminTokenResponse,422HTTPValidationError
GET /api/v1/admin/auth/google¶
Initiate Google Oauth
Initiate Google OAuth2 flow for admin authentication.
- Auth: Pública
- Parámetros: —
- Respuestas:
200OAuthInitResponse
GET /api/v1/admin/chat/conversations¶
List Conversations
List all conversations with filters and pagination.
- Auth: Bearer (admin)
- Parámetros:
customer_id(query, opcional),date_from(query, opcional),date_to(query, opcional),page(query, opcional),per_page(query, opcional),restaurant_id(query, opcional),status(query, opcional) - Respuestas:
200ConversationListResponse,422HTTPValidationError
DELETE /api/v1/admin/chat/conversations/{conversation_id}¶
Delete Conversation
Delete a conversation and all its messages.
- Auth: Bearer (admin)
- Parámetros:
conversation_id(path, requerido) - Respuestas:
200ConversationDeleteResponse,422HTTPValidationError
GET /api/v1/admin/chat/conversations/{conversation_id}¶
Get Conversation Detail
Get detailed conversation including thinking content.
- Auth: Bearer (admin)
- Parámetros:
conversation_id(path, requerido) - Respuestas:
200ConversationAdminResponse,422HTTPValidationError
GET /api/v1/admin/chat/conversations/{conversation_id}/export¶
Export Conversation
Export a conversation with full thinking content.
- Auth: Bearer (admin)
- Parámetros:
conversation_id(path, requerido),format(query, opcional) - Respuestas:
200ConversationExportResponse,422HTTPValidationError
GET /api/v1/admin/chat/conversations/{conversation_id}/logs¶
Get Conversation Logs
Get chat logs for a conversation including prompts and raw responses.
- Auth: Bearer (admin)
- Parámetros:
conversation_id(path, requerido) - Respuestas:
200ChatLogResponse[],422HTTPValidationError
PATCH /api/v1/admin/chat/conversations/{conversation_id}/status¶
Update Conversation Status
Update the status of a conversation.
- Auth: Bearer (admin)
- Parámetros:
conversation_id(path, requerido),status(query, requerido) - Respuestas:
200ConversationStatusUpdateResponse,422HTTPValidationError
GET /api/v1/admin/conversation-trees¶
List Trees
List every tree version for the restaurant (active + drafts + archived).
- Auth: Bearer (admin)
- Parámetros:
restaurant_id(query, requerido) - Respuestas:
200FlowListResponse,422HTTPValidationError
POST /api/v1/admin/conversation-trees¶
Create Tree Draft
Create a new draft with the next version number.
- Auth: Bearer (admin)
- Parámetros:
restaurant_id(query, requerido) - Body:
ConversationTreeCreate - Respuestas:
201ConversationTreeResponse,422HTTPValidationError
GET /api/v1/admin/conversation-trees/active¶
Get Active Tree
Return the restaurant's active tree.
- Auth: Bearer (admin)
- Parámetros:
restaurant_id(query, requerido) - Respuestas:
200ConversationTreeResponse,422HTTPValidationError
GET /api/v1/admin/conversation-trees/registered-actions¶
List Registered Actions
Introspect the action/check/intent registries (the editor's palette).
- Auth: Bearer (admin)
- Parámetros: —
- Respuestas:
200RegisteredActionsResponse
GET /api/v1/admin/conversation-trees/{tree_id}¶
Get Tree
Return one tree by id.
- Auth: Bearer (admin)
- Parámetros:
tree_id(path, requerido),restaurant_id(query, requerido) - Respuestas:
200ConversationTreeResponse,422HTTPValidationError
PUT /api/v1/admin/conversation-trees/{tree_id}¶
Update Tree Draft
Overwrite a draft's definition (409 unless status=draft).
- Auth: Bearer (admin)
- Parámetros:
tree_id(path, requerido),restaurant_id(query, requerido) - Body:
ConversationTreeCreate - Respuestas:
200ConversationTreeResponse,422HTTPValidationError
POST /api/v1/admin/conversation-trees/{tree_id}/activate¶
Activate Tree
Activate a version; the previous active tree is archived (rollback-able).
- Auth: Bearer (admin)
- Parámetros:
tree_id(path, requerido),restaurant_id(query, requerido) - Respuestas:
200ConversationTreeResponse,422HTTPValidationError
POST /api/v1/admin/conversation-trees/{tree_id}/simulate¶
Simulate Tree
Dry-run a phrase against the tree and return the walked node path.
- Auth: Bearer (admin)
- Parámetros:
tree_id(path, requerido),restaurant_id(query, requerido) - Body:
TreeSimulationRequest - Respuestas:
200TreeSimulationResponse,422HTTPValidationError
POST /api/v1/admin/conversation-trees/{tree_id}/validate¶
Validate Tree Endpoint
Validate the tree against the real interpreter registries.
- Auth: Bearer (admin)
- Parámetros:
tree_id(path, requerido),restaurant_id(query, requerido) - Respuestas:
200TreeValidationResponse,422HTTPValidationError
GET /api/v1/admin/manager-calls/restaurants/{restaurant_id}/pending-calls¶
Get Pending Manager Calls
Get all pending manager calls for a restaurant.
- Auth: Bearer (admin)
- Parámetros:
restaurant_id(path, requerido) - Respuestas:
200ManagerCallResponse[],422HTTPValidationError
POST /api/v1/admin/manager-calls/{call_id}/respond¶
Respond To Manager Call
Respond to a pending manager call.
- Auth: Bearer (admin)
- Parámetros:
call_id(path, requerido) - Body:
ManagerCallRespondRequest - Respuestas:
200ManagerCallResponse,422HTTPValidationError
GET /api/v1/admin/manager/restaurants/{restaurant_id}/events¶
Manager Events
SSE feed for the sala tablet:
sala_snapshotthen live table events.
- Auth: Pública
- Parámetros:
restaurant_id(path, requerido),token(query, requerido) - Respuestas:
200,422HTTPValidationError
GET /api/v1/admin/manager/restaurants/{restaurant_id}/kitchen/overload¶
Get Kitchen Overload
Read the current kitchen overload flag (without mutating it).
- Auth: Bearer (admin)
- Parámetros:
restaurant_id(path, requerido) - Respuestas:
200KitchenLoadResponse,422HTTPValidationError
POST /api/v1/admin/manager/restaurants/{restaurant_id}/kitchen/overload¶
Set Kitchen Overload
Set or clear the kitchen overload flag (read by the chat assistant).
- Auth: Bearer (admin)
- Parámetros:
restaurant_id(path, requerido) - Body:
KitchenLoadRequest - Respuestas:
200KitchenLoadResponse,422HTTPValidationError
GET /api/v1/admin/manager/restaurants/{restaurant_id}/sessions¶
Get Active Sessions
Return a snapshot of all active table sessions for the sala view.
- Auth: Bearer (admin)
- Parámetros:
restaurant_id(path, requerido) - Respuestas:
200SessionSnapshotResponse[],422HTTPValidationError
POST /api/v1/admin/manager/sessions/{session_token}/courtesy-round¶
Courtesy Round
Gift a free round (0€ SERVED comanda) and notify the customer's chat.
- Auth: Bearer (admin)
- Parámetros:
session_token(path, requerido) - Body:
CourtesyRoundRequest - Respuestas:
200CourtesyRoundResponse,422HTTPValidationError
POST /api/v1/admin/manager/sessions/{session_token}/deliver¶
Mark Delivery
Mark drinks or food delivered; transitions lifecycle and broadcasts SSE.
- Auth: Bearer (admin)
- Parámetros:
session_token(path, requerido) - Body:
DeliverRequest - Respuestas:
200DeliverResponse,422HTTPValidationError
GET /api/v1/admin/me¶
Get Current Admin Profile
Get current authenticated admin user profile.
- Auth: Bearer (admin)
- Parámetros: —
- Respuestas:
200AdminUserResponse
POST /api/v1/admin/recommendations/recompute¶
Recompute Artifacts
Recompute the co-occurrence + embeddings artifacts for a restaurant.
- Auth: Bearer (admin)
- Parámetros:
restaurant_id(query, requerido) - Respuestas:
200RecomputeResponse,422HTTPValidationError
GET /api/v1/admin/restaurants¶
List Restaurants
List restaurants with pagination and filters.
- Auth: Bearer (admin)
- Parámetros:
page(query, opcional),per_page(query, opcional),search(query, opcional),status(query, opcional) - Respuestas:
200PaginatedResponse_RestaurantResponse_,422HTTPValidationError
POST /api/v1/admin/restaurants¶
Create Restaurant
Create a new restaurant (super admin only).
- Auth: Bearer (admin)
- Parámetros: —
- Body:
RestaurantCreate - Respuestas:
201RestaurantResponse,422HTTPValidationError
PATCH /api/v1/admin/restaurants/bulk¶
Bulk Operation
Bulk operations on restaurants (super admin only).
- Auth: Bearer (admin)
- Parámetros: —
- Body:
BulkRestaurantOperation - Respuestas:
200,422HTTPValidationError
PATCH /api/v1/admin/restaurants/bulk/status¶
Bulk Update Status
Bulk update restaurant status (super admin only).
- Auth: Bearer (admin)
- Parámetros: —
- Body:
BulkStatusUpdate - Respuestas:
200,422HTTPValidationError
GET /api/v1/admin/restaurants/my-restaurants¶
List My Restaurants
List restaurants accessible to the current admin.
- Auth: Bearer (admin)
- Parámetros:
page(query, opcional),per_page(query, opcional) - Respuestas:
200PaginatedResponse_RestaurantResponse_,422HTTPValidationError
DELETE /api/v1/admin/restaurants/{restaurant_id}¶
Delete Restaurant
Soft delete a restaurant (super admin only).
- Auth: Bearer (admin)
- Parámetros:
restaurant_id(path, requerido) - Respuestas:
204,422HTTPValidationError
GET /api/v1/admin/restaurants/{restaurant_id}¶
Get Restaurant
Get restaurant detail.
- Auth: Bearer (admin)
- Parámetros:
restaurant_id(path, requerido) - Respuestas:
200RestaurantResponse,422HTTPValidationError
PUT /api/v1/admin/restaurants/{restaurant_id}¶
Update Restaurant
Update a restaurant.
- Auth: Bearer (admin)
- Parámetros:
restaurant_id(path, requerido) - Body:
RestaurantUpdate - Respuestas:
200RestaurantResponse,422HTTPValidationError
GET /api/v1/admin/restaurants/{restaurant_id}/access-check¶
Check Restaurant Access
Lightweight endpoint to verify admin access to a restaurant.
- Auth: Bearer (admin)
- Parámetros:
restaurant_id(path, requerido) - Respuestas:
200,422HTTPValidationError
GET /api/v1/admin/restaurants/{restaurant_id}/settings¶
Get Restaurant Settings
Get restaurant settings (used by layout for access verification).
- Auth: Bearer (admin)
- Parámetros:
restaurant_id(path, requerido) - Respuestas:
200RestaurantResponse,422HTTPValidationError
GET /api/v1/admin/restaurants/{restaurant_id}/staff¶
Get Restaurant Staff
List staff assigned to a restaurant.
- Auth: Bearer (admin)
- Parámetros:
restaurant_id(path, requerido) - Respuestas:
200AdminUserResponse[],422HTTPValidationError
POST /api/v1/admin/restaurants/{restaurant_id}/staff/invite¶
Invite Restaurant Staff
Invite a user to work at a specific restaurant.
- Auth: Bearer (admin)
- Parámetros:
restaurant_id(path, requerido) - Body:
AdminUserInvite - Respuestas:
200InviteResponse,422HTTPValidationError
PATCH /api/v1/admin/restaurants/{restaurant_id}/status¶
Change Restaurant Status
Change restaurant status (super admin only).
- Auth: Bearer (admin)
- Parámetros:
restaurant_id(path, requerido) - Body:
RestaurantStatusUpdate - Respuestas:
200RestaurantResponse,422HTTPValidationError
POST /api/v1/admin/tables¶
Create Table
Create a new table. If room_id is not provided, auto-creates a default room.
- Auth: Bearer (admin)
- Parámetros: —
- Body:
AdminTableCreateRequest - Respuestas:
201AdminTableResponse,422HTTPValidationError
GET /api/v1/admin/tables/restaurant/{restaurant_id}¶
List Tables
List all tables for a restaurant.
- Auth: Bearer (admin)
- Parámetros:
restaurant_id(path, requerido),page(query, opcional),size(query, opcional) - Respuestas:
200AdminTableListResponse,422HTTPValidationError
DELETE /api/v1/admin/tables/{table_id}¶
Delete Table
Delete a table.
- Auth: Bearer (admin)
- Parámetros:
table_id(path, requerido) - Respuestas:
204,422HTTPValidationError
PATCH /api/v1/admin/tables/{table_id}¶
Update Table
Update table settings.
- Auth: Bearer (admin)
- Parámetros:
table_id(path, requerido) - Body:
AdminTableUpdateRequest - Respuestas:
200AdminTableResponse,422HTTPValidationError
GET /api/v1/admin/users¶
List Users
List admin users with pagination and filters.
- Auth: Bearer (admin)
- Parámetros:
is_active(query, opcional),page(query, opcional),per_page(query, opcional),restaurant_id(query, opcional),role(query, opcional),search(query, opcional),status(query, opcional) - Respuestas:
200AdminUserListResponse,422HTTPValidationError
POST /api/v1/admin/users¶
Create User
Create a new admin user (super admin only).
- Auth: Bearer (admin)
- Parámetros: —
- Body:
AdminUserCreate - Respuestas:
201AdminUserResponse,422HTTPValidationError
PATCH /api/v1/admin/users/bulk¶
Bulk User Operation
Bulk operations on users (super admin only).
- Auth: Bearer (admin)
- Parámetros: —
- Body:
BulkUserOperation - Respuestas:
200,422HTTPValidationError
GET /api/v1/admin/users/email/check¶
Check Email Status
Check whether an email is already registered, and its status.
- Auth: Bearer (admin)
- Parámetros:
email(query, requerido) - Respuestas:
200,422HTTPValidationError
POST /api/v1/admin/users/invite¶
Invite User
Invite a new user via email and bind them to the requested restaurant.
- Auth: Bearer (admin)
- Parámetros: —
- Body:
AdminUserInvite - Respuestas:
200InviteResponse,422HTTPValidationError
POST /api/v1/admin/users/invite/accept¶
Accept Invitation
Accept an invitation token and activate the admin user.
- Auth: Pública
- Parámetros: —
- Body:
AdminUserInviteAccept - Respuestas:
200AdminUserResponse,422HTTPValidationError
GET /api/v1/admin/users/me¶
Get Current User
Return the currently authenticated admin user.
- Auth: Bearer (admin)
- Parámetros: —
- Respuestas:
200AdminUserResponse
GET /api/v1/admin/users/roles/available¶
Get Available Roles
Return the roles the current admin is allowed to assign.
- Auth: Bearer (admin)
- Parámetros: —
- Respuestas:
200AvailableRolesResponse
DELETE /api/v1/admin/users/{user_id}¶
Delete User
Hard-delete a user (super admin only).
- Auth: Bearer (admin)
- Parámetros:
user_id(path, requerido) - Respuestas:
204,422HTTPValidationError
GET /api/v1/admin/users/{user_id}¶
Get User
Get a user detail with cross-tenant and manage-role checks.
- Auth: Bearer (admin)
- Parámetros:
user_id(path, requerido) - Respuestas:
200AdminUserResponse,422HTTPValidationError
PATCH /api/v1/admin/users/{user_id}¶
Update User
Update a user's name / role / activation flag.
- Auth: Bearer (admin)
- Parámetros:
user_id(path, requerido) - Body:
AdminUserUpdate - Respuestas:
200AdminUserResponse,422HTTPValidationError
PATCH /api/v1/admin/users/{user_id}/role¶
Change User Role
Change a user's role with cross-tenant and assignment authority checks.
- Auth: Bearer (admin)
- Parámetros:
user_id(path, requerido) - Body:
RoleChangeRequest - Respuestas:
200AdminUserResponse,422HTTPValidationError
PATCH /api/v1/admin/users/{user_id}/status¶
Update User Status
Update a user's lifecycle status (super admin only).
- Auth: Bearer (admin)
- Parámetros:
user_id(path, requerido) - Body:
UserStatusUpdate - Respuestas:
200AdminUserResponse,422HTTPValidationError
POST /api/v1/errors/log¶
Log Error
Log a frontend error to the database.
- Auth: Pública
- Parámetros:
User-Agent(header, opcional),X-User-Id(header, opcional) - Body:
ErrorLogRequest - Respuestas:
200ErrorLogResponse,422HTTPValidationError
GET /api/v1/errors/recent¶
Get Recent Errors
Get recent error logs (admin only).
- Auth: Bearer (admin)
- Parámetros:
limit(query, opcional),severity(query, opcional) - Respuestas:
200ErrorLogsResponse,422HTTPValidationError