1. API Purpose
The Food Menu API communicates the school cafeteria’s schedule and nutrition details to parents. It helps parents stay informed about their child’s tiffin/meal plans and supports dietary management.2. Endpoint Definition
3. Authentication Flow
Standard JWT validation.- Parents can only view the menu for their school.
- Staff require
food.managepermissions to update the menu or schedule.
4. Request Structure
GET /parent-app/food-menu
Query Parameters:GET /web-app/food-menu
Query Parameters:GET /web-app/food-menu/:id
URL Parameters:POST /web-app/food-menu
Request Body:PUT /web-app/food-menu/:id
Request Body:DELETE /web-app/food-menu/:id
URL Parameters:POST /web-app/bulk-import-food-menu-json
Request Body:POST /web-app/bulk-import-food-menu
Content-Type:multipart/form-data
Query Parameters: skole_id=SKL001
File: Upload .xlsx or .csv file.
5. Response Structure
Success: Parent Menu View (200 OK)
Route:GET /parent-app/food-menu
Success: Admin Menu List (200 OK)
Route:GET /web-app/food-menu
Success: Single Item Detail (200 OK)
Route:GET /web-app/food-menu/:id
Success: Menu Created (201 Created)
Route:POST /web-app/food-menu
Success: Bulk Import Results (200 OK)
Route:POST /web-app/bulk-import-food-menu-json
Success: Item Deleted (200 OK)
Route:DELETE /web-app/food-menu/:id
6. Error Responses
7. Security Considerations
- Tenant Isolation: Menus are strictly scoped by
skole_id. - Status Toggle: Inactive menus are automatically filtered out of the parent app view.
8. Token Usage
9. Token Refresh
N/A.10. Logout / Session Invalidation
N/A.11. Usage Example (cURL)
12. Notes / Special Behaviors
- Scheduling: The menu system separates “Menu Definitions” (what the food is) from “Schedules” (when it is served).
- Nutrients: Information is provided as a plain text summary for parent reference.