Introduction
Bar Galileo provides a RESTful API built with Django for managing restaurant operations, including tables, orders, products, and intelligent document-based chat using RAG (Retrieval-Augmented Generation).Base URL
All API endpoints are relative to your Bar Galileo installation:API Structure
The Bar Galileo API is organized into several functional modules:Core Modules
RAG Chat
Upload documents, query with AI, and manage document collections
Tables & Orders
Manage restaurant tables, orders, and billing
Products
Product catalog, categories, and inventory management
Authentication
User authentication using Django Allauth
HTTP Methods
The API uses standard HTTP methods:| Method | Description |
|---|---|
GET | Retrieve resources |
POST | Create new resources |
PUT / PATCH | Update existing resources |
DELETE | Remove resources |
Response Format
All API responses are returned in JSON format:Success Response
Error Response
Status Codes
| Code | Description |
|---|---|
200 | Success |
201 | Created successfully |
400 | Bad request - invalid parameters |
401 | Unauthorized - authentication required |
403 | Forbidden - insufficient permissions |
404 | Resource not found |
500 | Internal server error |
Authentication
Most API endpoints require authentication. Bar Galileo uses Django’s session-based authentication powered by django-allauth.See the Authentication page for detailed authentication flows.
CSRF Protection
Rate Limiting
Currently, Bar Galileo does not implement rate limiting. Consider implementing rate limiting in production environments.
Content Type
All POST/PUT requests should include:URL Namespaces
Bar Galileo uses Django’s URL namespacing:products:- Product-related endpointstables:- Table and order managementrag_chat:- RAG chat and document endpointscore:- Core application viewsadmin_dashboard:- Admin dashboard endpoints
External Integrations
Google Gemini API
RAG chat functionality uses Google’s Gemini 2.0 Flash model for generating contextual responses.Environment variable required for AI-powered responses
Next Steps
Authentication
Learn about user authentication
RAG Chat API
Explore the intelligent document chat API
