{
  "info": {
    "name": "School Project API",
    "description": "Postman Collection for Bilgi Ağacı Anaokulu Nursery School API\n\nBase URL: {{BASE_URL}}/api\n\n## Unified Response Format\n\n### Single Item\n```json\n{ \"code\": 200, \"message\": \"...\", \"result\": { ... }, \"success\": true }\n```\n\n### Array (no pagination)\n```json\n{ \"code\": 200, \"message\": \"...\", \"result\": [ ... ], \"success\": true }\n```\n\n### Paginated\n```json\n{ \"code\": 200, \"count\": 50, \"message\": \"...\", \"page\": 1, \"pages\": 3, \"result\": [ ... ], \"success\": true, \"to\": 20 }\n```\n\n### Error\n```json\n{ \"code\": 422, \"message\": \"...\", \"errors\": { ... }, \"success\": false }\n```",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "BASE_URL",
      "value": "https://api.bilgiagaci.com/api",
      "type": "string"
    },
    {
      "key": "TOKEN",
      "value": "1|laravel_sanctum_token_string_here",
      "type": "string"
    }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{TOKEN}}",
        "type": "string"
      }
    ]
  },
  "item": [
    {
      "name": "1. Authentication",
      "item": [
        {
          "name": "POST Login",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": ["pm.test('Status 200', () => { pm.response.to.have.status(200); });", "pm.test('Has token', () => { const r = pm.response.json(); pm.expect(r.result.token).to.exist; pm.collectionVariables.set('TOKEN', r.result.token); });"],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" },
              { "key": "Accept-Language", "value": "tr" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"parent@bilgiagaci.com\",\n  \"password\": \"password123\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/auth/login",
              "host": ["{{BASE_URL}}"],
              "path": [ "auth", "login"]
            },
            "description": "Login with email and password. Returns Sanctum token."
          },
          "response": [
            {
              "name": "200 - Login Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Login successful\",\n  \"result\": {\n    \"token\": \"1|laravel_sanctum_token_string...\",\n    \"user\": {\n      \"id\": 1,\n      \"name\": \"Ahmet Yılmaz\",\n      \"email\": \"parent@bilgiagaci.com\",\n      \"phone\": \"+905551234567\",\n      \"lang\": \"tr\",\n      \"roles\": [\"parent\"],\n      \"students\": [\n        {\n          \"id\": 1,\n          \"first_name\": \"Defne\",\n          \"last_name\": \"Yılmaz\",\n          \"class_id\": 1,\n          \"class_name\": \"Butterflies\",\n          \"birth_date\": \"2022-03-15\",\n          \"gender\": \"female\"\n        }\n      ]\n    }\n  },\n  \"success\": true\n}"
            },
            {
              "name": "401 - Invalid credentials",
              "status": "Unauthorized",
              "code": 401,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 401,\n  \"message\": \"Invalid credentials\",\n  \"errors\": {\n    \"email\": [\"The provided credentials are incorrect.\"]\n  },\n  \"success\": false\n}"
            }
          ]
        },
        {
          "name": "GET Me",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Accept-Language", "value": "en" }
            ],
            "url": {
              "raw": "{{BASE_URL}}/auth/me",
              "host": ["{{BASE_URL}}"],
              "path": [ "auth", "me"]
            },
            "description": "Get currently authenticated user with roles, permissions, and students."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Authenticated user retrieved successfully\",\n  \"result\": {\n    \"id\": 1,\n    \"name\": \"Ahmet Yılmaz\",\n    \"email\": \"parent@bilgiagaci.com\",\n    \"phone\": \"+905551234567\",\n    \"lang\": \"tr\",\n    \"roles\": [\"parent\"],\n    \"permissions\": [\n      \"view_child_attendance\",\n      \"view_child_meal_records\",\n      \"view_child_sleep_records\",\n      \"view_class_activities\",\n      \"view_student_media\",\n      \"upload_media\",\n      \"view_announcements\",\n      \"send_pickup_alert\",\n      \"cancel_pickup_alert\",\n      \"view_own_payments\"\n    ],\n    \"students\": [\n      {\n        \"id\": 1,\n        \"first_name\": \"Defne\",\n        \"last_name\": \"Yılmaz\",\n        \"class_id\": 1,\n        \"class_name\": \"Butterflies\",\n        \"birth_date\": \"2022-03-15\",\n        \"gender\": \"female\",\n        \"relationship\": \"father\",\n        \"profile_photo_url\": \"https://cdn.bilgiagaci.com/students/1/profile/avatar.webp?token=...\"\n      }\n    ]\n  },\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "POST Logout",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "url": {
              "raw": "{{BASE_URL}}/auth/logout",
              "host": ["{{BASE_URL}}"],
              "path": [ "auth", "logout"]
            },
            "description": "Logout and invalidate token."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Logged out successfully\",\n  \"result\": null,\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "PUT Update Profile",
          "request": {
            "method": "PUT",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Ahmet Yılmaz\",\n  \"phone\": \"+905551234567\",\n  \"lang\": \"tr\",\n  \"fcm_token\": \"fcm_device_token_string...\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/auth/profile",
              "host": ["{{BASE_URL}}"],
              "path": [ "auth", "profile"]
            },
            "description": "Update authenticated user profile."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Profile updated successfully\",\n  \"result\": {\n    \"id\": 1,\n    \"name\": \"Ahmet Yılmaz\",\n    \"email\": \"parent@bilgiagaci.com\",\n    \"phone\": \"+905551234567\",\n    \"lang\": \"tr\"\n  },\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "PUT Change Password",
          "request": {
            "method": "PUT",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"current_password\": \"password123\",\n  \"new_password\": \"newpassword456\",\n  \"new_password_confirmation\": \"newpassword456\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/auth/password",
              "host": ["{{BASE_URL}}"],
              "path": [ "auth", "password"]
            },
            "description": "Change authenticated user password."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Password changed successfully\",\n  \"result\": null,\n  \"success\": true\n}"
            },
            {
              "name": "422 - Validation Error",
              "status": "Unprocessable Entity",
              "code": 422,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 422,\n  \"message\": \"Validation failed\",\n  \"errors\": {\n    \"current_password\": [\"The current password is incorrect.\"]\n  },\n  \"success\": false\n}"
            }
          ]
        }
      ],
      "description": "Authentication endpoints: login, logout, profile, password"
    },
    {
      "name": "2. Students",
      "item": [
        {
          "name": "GET Students List",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Accept-Language", "value": "tr" }
            ],
            "url": {
              "raw": "{{BASE_URL}}/students?class_id=1&status=active&page=1&per_page=20",
              "host": ["{{BASE_URL}}"],
              "path": [ "students"],
              "query": [
                { "key": "class_id", "value": "1" },
                { "key": "status", "value": "active" },
                { "key": "page", "value": "1" },
                { "key": "per_page", "value": "20" }
              ]
            },
            "description": "List students. Scoped by role (Parent: own children only, Teacher: own class only, Admin: all)."
          },
          "response": [
            {
              "name": "200 - Paginated",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"count\": 18,\n  \"message\": \"Students retrieved successfully\",\n  \"page\": 1,\n  \"pages\": 1,\n  \"result\": [\n    {\n      \"id\": 1,\n      \"first_name\": \"Defne\",\n      \"last_name\": \"Yılmaz\",\n      \"class_id\": 1,\n      \"class_name\": \"Butterflies\",\n      \"birth_date\": \"2022-03-15\",\n      \"gender\": \"female\",\n      \"status\": \"active\",\n      \"profile_photo_url\": \"https://cdn.bilgiagaci.com/students/1/profile/avatar.webp?token=...\"\n    },\n    {\n      \"id\": 2,\n      \"first_name\": \"Mehmet\",\n      \"last_name\": \"Kaya\",\n      \"class_id\": 1,\n      \"class_name\": \"Butterflies\",\n      \"birth_date\": \"2022-05-20\",\n      \"gender\": \"male\",\n      \"status\": \"active\",\n      \"profile_photo_url\": null\n    }\n  ],\n  \"success\": true,\n  \"to\": 18\n}"
            }
          ]
        },
        {
          "name": "GET Student Detail",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Accept-Language", "value": "en" }
            ],
            "url": {
              "raw": "{{BASE_URL}}/students/1",
              "host": ["{{BASE_URL}}"],
              "path": [ "students", "1"]
            },
            "description": "Get single student with attendance summary."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Student retrieved successfully\",\n  \"result\": {\n    \"id\": 1,\n    \"first_name\": \"Defne\",\n    \"last_name\": \"Yılmaz\",\n    \"class_id\": 1,\n    \"class_name\": \"Butterflies\",\n    \"birth_date\": \"2022-03-15\",\n    \"gender\": \"female\",\n    \"status\": \"active\",\n    \"enrollment_date\": \"2025-09-01\",\n    \"notes\": null,\n    \"profile_photo_url\": \"https://cdn.bilgiagaci.com/students/1/profile/avatar.webp?token=...\",\n    \"attendance_summary\": {\n      \"present\": 20,\n      \"absent\": 2,\n      \"late\": 1,\n      \"left_early\": 1\n    }\n  },\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "POST Create Student (Admin)",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"first_name\": \"Defne\",\n  \"last_name\": \"Yılmaz\",\n  \"class_id\": 1,\n  \"birth_date\": \"2022-03-15\",\n  \"gender\": \"female\",\n  \"enrollment_date\": \"2025-09-01\",\n  \"notes\": null\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/admin/students",
              "host": ["{{BASE_URL}}"],
              "path": [ "admin", "students"]
            },
            "description": "Create new student. Admin only."
          },
          "response": [
            {
              "name": "201 - Created",
              "status": "Created",
              "code": 201,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 201,\n  \"message\": \"Student created successfully\",\n  \"result\": {\n    \"id\": 1,\n    \"first_name\": \"Defne\",\n    \"last_name\": \"Yılmaz\",\n    \"class_id\": 1,\n    \"class_name\": \"Butterflies\",\n    \"birth_date\": \"2022-03-15\",\n    \"gender\": \"female\",\n    \"status\": \"active\"\n  },\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "PUT Update Student (Admin)",
          "request": {
            "method": "PUT",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"first_name\": \"Defne\",\n  \"last_name\": \"Yılmaz\",\n  \"class_id\": 2,\n  \"birth_date\": \"2022-03-15\",\n  \"gender\": \"female\",\n  \"status\": \"active\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/admin/students/1",
              "host": ["{{BASE_URL}}"],
              "path": [ "admin", "students", "1"]
            },
            "description": "Update student. Admin only."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Student updated successfully\",\n  \"result\": {\n    \"id\": 1,\n    \"first_name\": \"Defne\",\n    \"last_name\": \"Yılmaz\",\n    \"class_id\": 2,\n    \"class_name\": \"Daisies\",\n    \"birth_date\": \"2022-03-15\",\n    \"gender\": \"female\",\n    \"status\": \"active\"\n  },\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "DELETE Student (Admin)",
          "request": {
            "method": "DELETE",
            "url": {
              "raw": "{{BASE_URL}}/admin/students/1",
              "host": ["{{BASE_URL}}"],
              "path": [ "admin", "students", "1"]
            },
            "description": "Delete student. Admin only."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Student deleted successfully\",\n  \"result\": null,\n  \"success\": true\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "3. Attendance",
      "item": [
        {
          "name": "GET Student Attendance",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Accept-Language", "value": "en" }
            ],
            "url": {
              "raw": "{{BASE_URL}}/students/1/attendance?from=2026-06-01&to=2026-06-30&page=1&per_page=31",
              "host": ["{{BASE_URL}}"],
              "path": [ "students", "1", "attendance"],
              "query": [
                { "key": "from", "value": "2026-06-01" },
                { "key": "to", "value": "2026-06-30" },
                { "key": "page", "value": "1" },
                { "key": "per_page", "value": "31" }
              ]
            },
            "description": "Get attendance records for a student. Scoped by role."
          },
          "response": [
            {
              "name": "200 - Paginated",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"count\": 25,\n  \"message\": \"Attendance records retrieved successfully\",\n  \"page\": 1,\n  \"pages\": 1,\n  \"result\": [\n    {\n      \"id\": 1,\n      \"date\": \"2026-06-07\",\n      \"status\": \"present\",\n      \"arrival_time\": \"08:15\",\n      \"departure_time\": \"16:00\",\n      \"recorded_by\": \"Asya Öğretmen\"\n    },\n    {\n      \"id\": 2,\n      \"date\": \"2026-06-06\",\n      \"status\": \"absent\",\n      \"arrival_time\": null,\n      \"departure_time\": null,\n      \"recorded_by\": \"Asya Öğretmen\"\n    }\n  ],\n  \"success\": true,\n  \"to\": 25\n}"
            }
          ]
        },
        {
          "name": "POST Record Attendance",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"student_id\": 1,\n  \"date\": \"2026-06-07\",\n  \"status\": \"present\",\n  \"arrival_time\": \"08:15\",\n  \"departure_time\": null\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/attendance",
              "host": ["{{BASE_URL}}"],
              "path": [ "attendance"]
            },
            "description": "Record attendance for a single student. Teacher only."
          },
          "response": [
            {
              "name": "201 - Created",
              "status": "Created",
              "code": 201,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 201,\n  \"message\": \"Attendance recorded successfully\",\n  \"result\": {\n    \"id\": 1,\n    \"student_id\": 1,\n    \"student_name\": \"Defne Yılmaz\",\n    \"date\": \"2026-06-07\",\n    \"status\": \"present\",\n    \"arrival_time\": \"08:15\",\n    \"departure_time\": null\n  },\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "POST Record Attendance (Bulk)",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"class_id\": 1,\n  \"date\": \"2026-06-07\",\n  \"records\": [\n    { \"student_id\": 1, \"status\": \"present\", \"arrival_time\": \"08:15\" },\n    { \"student_id\": 2, \"status\": \"absent\", \"arrival_time\": null },\n    { \"student_id\": 3, \"status\": \"late\", \"arrival_time\": \"09:05\" }\n  ]\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/attendance/bulk",
              "host": ["{{BASE_URL}}"],
              "path": [ "attendance", "bulk"]
            },
            "description": "Record attendance for entire class in one request. Teacher only."
          },
          "response": [
            {
              "name": "201 - Created",
              "status": "Created",
              "code": 201,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 201,\n  \"message\": \"Bulk attendance recorded successfully\",\n  \"result\": {\n    \"date\": \"2026-06-07\",\n    \"class_id\": 1,\n    \"total\": 3,\n    \"saved\": 3\n  },\n  \"success\": true\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "4. Meals",
      "item": [
        {
          "name": "GET Meal Plans",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Accept-Language", "value": "tr" }
            ],
            "url": {
              "raw": "{{BASE_URL}}/meal-plans?date=2026-06-07",
              "host": ["{{BASE_URL}}"],
              "path": [ "meal-plans"],
              "query": [
                { "key": "date", "value": "2026-06-07" }
              ]
            },
            "description": "Get scheduled meal plans for a class on a specific date."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Meal plans retrieved successfully\",\n  \"result\": [\n    {\n      \"id\": 1,\n      \"meal_id\": 1,\n      \"meal_name\": \"Breakfast\",\n      \"meal_type\": \"breakfast\",\n      \"description\": \"Cheese sandwich, milk, cucumber\",\n      \"date\": \"2026-06-07\"\n    },\n    {\n      \"id\": 2,\n      \"meal_id\": 2,\n      \"meal_name\": \"Lunch\",\n      \"meal_type\": \"lunch\",\n      \"description\": \"Lentil soup, chicken with rice, salad\",\n      \"date\": \"2026-06-07\"\n    }\n  ],\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "GET Student Meal Records",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Accept-Language", "value": "en" }
            ],
            "url": {
              "raw": "{{BASE_URL}}/students/1/meal-records?date=2026-06-07",
              "host": ["{{BASE_URL}}"],
              "path": [ "students", "1", "meal-records"],
              "query": [
                { "key": "date", "value": "2026-06-07" }
              ]
            },
            "description": "Get meal records for a student on a specific date."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Meal records retrieved successfully\",\n  \"result\": [\n    {\n      \"id\": 1,\n      \"meal_id\": 1,\n      \"meal_type\": \"breakfast\",\n      \"meal_name\": \"Breakfast\",\n      \"status\": \"all\",\n      \"notes\": null,\n      \"recorded_by\": \"Asya Öğretmen\",\n      \"date\": \"2026-06-07\"\n    },\n    {\n      \"id\": 2,\n      \"meal_id\": 2,\n      \"meal_type\": \"lunch\",\n      \"meal_name\": \"Lunch\",\n      \"status\": \"little\",\n      \"notes\": \"Did not like the soup\",\n      \"recorded_by\": \"Asya Öğretmen\",\n      \"date\": \"2026-06-07\"\n    },\n    {\n      \"id\": 3,\n      \"meal_id\": 3,\n      \"meal_type\": \"snack\",\n      \"meal_name\": \"Afternoon Snack\",\n      \"status\": \"good_appetite\",\n      \"notes\": null,\n      \"recorded_by\": \"Asya Öğretmen\",\n      \"date\": \"2026-06-07\"\n    }\n  ],\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "POST Record Meal",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"student_id\": 1,\n  \"date\": \"2026-06-07\",\n  \"meal_id\": 1,\n  \"status\": \"all\",\n  \"notes\": \"Finished everything quickly\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/meal-records",
              "host": ["{{BASE_URL}}"],
              "path": [ "meal-records"]
            },
            "description": "Record meal for a single student. Teacher only."
          },
          "response": [
            {
              "name": "201 - Created",
              "status": "Created",
              "code": 201,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 201,\n  \"message\": \"Meal record saved successfully\",\n  \"result\": {\n    \"id\": 1,\n    \"student_id\": 1,\n    \"student_name\": \"Defne Yılmaz\",\n    \"meal_id\": 1,\n    \"meal_type\": \"breakfast\",\n    \"status\": \"all\",\n    \"notes\": \"Finished everything quickly\",\n    \"date\": \"2026-06-07\"\n  },\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "POST Record Meals (Bulk)",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"class_id\": 1,\n  \"date\": \"2026-06-07\",\n  \"meal_id\": 1,\n  \"records\": [\n    { \"student_id\": 1, \"status\": \"all\", \"notes\": null },\n    { \"student_id\": 2, \"status\": \"little\", \"notes\": \"Did not eat well\" },\n    { \"student_id\": 3, \"status\": \"none\", \"notes\": \"Had his own food from home\" }\n  ]\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/meal-records/bulk",
              "host": ["{{BASE_URL}}"],
              "path": [ "meal-records", "bulk"]
            },
            "description": "Record meals for entire class in one request. Teacher only."
          },
          "response": [
            {
              "name": "201 - Created",
              "status": "Created",
              "code": 201,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 201,\n  \"message\": \"Bulk meal records saved successfully\",\n  \"result\": {\n    \"date\": \"2026-06-07\",\n    \"meal_id\": 1,\n    \"meal_type\": \"breakfast\",\n    \"total\": 3,\n    \"saved\": 3\n  },\n  \"success\": true\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "5. Sleep",
      "item": [
        {
          "name": "GET Student Sleep Records",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Accept-Language", "value": "en" }
            ],
            "url": {
              "raw": "{{BASE_URL}}/students/1/sleep-records?from=2026-06-01&to=2026-06-30",
              "host": ["{{BASE_URL}}"],
              "path": [ "students", "1", "sleep-records"],
              "query": [
                { "key": "from", "value": "2026-06-01" },
                { "key": "to", "value": "2026-06-30" }
              ]
            },
            "description": "Get sleep records for a student. Only for classes with nap time."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Sleep records retrieved successfully\",\n  \"result\": [\n    {\n      \"id\": 1,\n      \"date\": \"2026-06-07\",\n      \"status\": \"slept\",\n      \"duration\": 90,\n      \"notes\": \"Slept peacefully\",\n      \"recorded_by\": \"Asya Öğretmen\"\n    },\n    {\n      \"id\": 2,\n      \"date\": \"2026-06-06\",\n      \"status\": \"not_slept\",\n      \"duration\": null,\n      \"notes\": \"Was restless\",\n      \"recorded_by\": \"Asya Öğretmen\"\n    }\n  ],\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "POST Record Sleep",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"student_id\": 1,\n  \"date\": \"2026-06-07\",\n  \"status\": \"slept\",\n  \"duration\": 90,\n  \"notes\": \"Slept well\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/sleep-records",
              "host": ["{{BASE_URL}}"],
              "path": [ "sleep-records"]
            },
            "description": "Record sleep for a single student. Teacher only."
          },
          "response": [
            {
              "name": "201 - Created",
              "status": "Created",
              "code": 201,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 201,\n  \"message\": \"Sleep record saved successfully\",\n  \"result\": {\n    \"id\": 1,\n    \"student_id\": 1,\n    \"student_name\": \"Defne Yılmaz\",\n    \"date\": \"2026-06-07\",\n    \"status\": \"slept\",\n    \"duration\": 90,\n    \"notes\": \"Slept well\"\n  },\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "POST Record Sleep (Bulk)",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"class_id\": 1,\n  \"date\": \"2026-06-07\",\n  \"records\": [\n    { \"student_id\": 1, \"status\": \"slept\", \"duration\": 90 },\n    { \"student_id\": 2, \"status\": \"not_slept\", \"duration\": null },\n    { \"student_id\": 3, \"status\": \"rested_only\", \"duration\": 45 }\n  ]\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/sleep-records/bulk",
              "host": ["{{BASE_URL}}"],
              "path": [ "sleep-records", "bulk"]
            },
            "description": "Record sleep for entire class in one request. Teacher only."
          },
          "response": [
            {
              "name": "201 - Created",
              "status": "Created",
              "code": 201,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 201,\n  \"message\": \"Bulk sleep records saved successfully\",\n  \"result\": {\n    \"date\": \"2026-06-07\",\n    \"class_id\": 1,\n    \"total\": 3,\n    \"saved\": 3\n  },\n  \"success\": true\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "6. Activities",
      "item": [
        {
          "name": "GET Student Activities",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Accept-Language", "value": "tr" }
            ],
            "url": {
              "raw": "{{BASE_URL}}/students/1/activities?from=2026-06-01&to=2026-06-30&page=1&per_page=20",
              "host": ["{{BASE_URL}}"],
              "path": [ "students", "1", "activities"],
              "query": [
                { "key": "from", "value": "2026-06-01" },
                { "key": "to", "value": "2026-06-30" },
                { "key": "page", "value": "1" },
                { "key": "per_page", "value": "20" }
              ]
            },
            "description": "Get activities for a student's class."
          },
          "response": [
            {
              "name": "200 - Paginated",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"count\": 12,\n  \"message\": \"Activities retrieved successfully\",\n  \"page\": 1,\n  \"pages\": 1,\n  \"result\": [\n    {\n      \"id\": 1,\n      \"title\": \"Robotics Activity\",\n      \"description\": \"Learning directions with Bee-Bot robot. Children guided the robot to reach targets on the mat.\",\n      \"objective\": \"Spatial awareness and direction concepts\",\n      \"type\": \"scheduled\",\n      \"class_id\": 1,\n      \"class_name\": \"Butterflies\",\n      \"date\": \"2026-06-07\",\n      \"created_by\": \"Asya Öğretmen\",\n      \"media\": [\n        {\n          \"id\": 42,\n          \"url\": \"https://cdn.bilgiagaci.com/activities/1/images/abc123.webp?token=...\",\n          \"thumbnail_url\": \"https://cdn.bilgiagaci.com/activities/1/images/abc123_thumb.webp?token=...\",\n          \"mime_type\": \"image/webp\"\n        }\n      ]\n    }\n  ],\n  \"success\": true,\n  \"to\": 12\n}"
            }
          ]
        },
        {
          "name": "GET Class Schedules",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Accept-Language", "value": "en" }
            ],
            "url": {
              "raw": "{{BASE_URL}}/classes/1/schedules",
              "host": ["{{BASE_URL}}"],
              "path": [ "classes", "1", "schedules"]
            },
            "description": "Get weekly activity schedule for a class."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Activity schedules retrieved successfully\",\n  \"result\": [\n    {\n      \"id\": 1,\n      \"class_id\": 1,\n      \"title\": \"Robotics\",\n      \"description\": \"Weekly robotics and coding activity\",\n      \"objective\": \"Problem solving and logical thinking\",\n      \"day_of_week\": 1,\n      \"day_name\": \"Monday\",\n      \"start_time\": \"10:00\",\n      \"end_time\": \"11:00\",\n      \"is_recurring\": true\n    },\n    {\n      \"id\": 2,\n      \"class_id\": 1,\n      \"title\": \"Art & Painting\",\n      \"description\": \"Creative arts with watercolors\",\n      \"objective\": \"Creativity and fine motor skills\",\n      \"day_of_week\": 3,\n      \"day_name\": \"Wednesday\",\n      \"start_time\": \"10:00\",\n      \"end_time\": \"11:00\",\n      \"is_recurring\": true\n    }\n  ],\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "POST Create Activity",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"title\": \"Robotics Activity\",\n  \"description\": \"Learning directions with Bee-Bot robot\",\n  \"objective\": \"Spatial awareness and direction concepts\",\n  \"class_id\": 1,\n  \"date\": \"2026-06-07\",\n  \"type\": \"ad_hoc\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/activities",
              "host": ["{{BASE_URL}}"],
              "path": [ "activities"]
            },
            "description": "Publish an activity. Teacher only."
          },
          "response": [
            {
              "name": "201 - Created",
              "status": "Created",
              "code": 201,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 201,\n  \"message\": \"Activity created successfully\",\n  \"result\": {\n    \"id\": 1,\n    \"title\": \"Robotics Activity\",\n    \"description\": \"Learning directions with Bee-Bot robot\",\n    \"objective\": \"Spatial awareness and direction concepts\",\n    \"class_id\": 1,\n    \"class_name\": \"Butterflies\",\n    \"date\": \"2026-06-07\",\n    \"type\": \"ad_hoc\",\n    \"published\": true,\n    \"media\": []\n  },\n  \"success\": true\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "7. Media",
      "item": [
        {
          "name": "POST Request Upload URL",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"mime_type\": \"image/jpeg\",\n  \"size\": 5242880,\n  \"collection\": \"daily_photos\",\n  \"original_name\": \"IMG_20260607.jpg\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/media/request-upload",
              "host": ["{{BASE_URL}}"],
              "path": [ "media", "request-upload"]
            },
            "description": "Step 1: Request a presigned URL for direct upload to R2. URL expires in 5 minutes."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Upload URL generated successfully\",\n  \"result\": {\n    \"upload_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n    \"upload_url\": \"https://bilgiagaci.r2.cloudflarestorage.com/uploads/temp/550e8400-e29b-41d4-a716-446655440000.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=...&X-Amz-Signature=...\",\n    \"file_key\": \"uploads/temp/550e8400-e29b-41d4-a716-446655440000.jpg\",\n    \"expires_in\": 300\n  },\n  \"success\": true\n}"
            },
            {
              "name": "422 - Validation Error",
              "status": "Unprocessable Entity",
              "code": 422,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 422,\n  \"message\": \"Validation failed\",\n  \"errors\": {\n    \"mime_type\": [\"Unsupported file type.\"],\n    \"size\": [\"File size exceeds maximum allowed (10 MB).\"]\n  },\n  \"success\": false\n}"
            }
          ]
        },
        {
          "name": "POST Register Uploaded Media",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"upload_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n  \"student_ids\": [1, 2],\n  \"class_id\": 1,\n  \"visibility\": \"parents_tagged\",\n  \"activity_id\": null\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/media/register",
              "host": ["{{BASE_URL}}"],
              "path": [ "media", "register"]
            },
            "description": "Step 3: After uploading file directly to R2, register the media record. A queue job will process the file (thumbnail, compression)."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Media registered successfully, processing started\",\n  \"result\": {\n    \"media_id\": 42,\n    \"status\": \"processing\",\n    \"collection\": \"daily_photos\",\n    \"original_name\": \"IMG_20260607.jpg\",\n    \"thumbnail_url\": null\n  },\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "GET Student Media",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Accept-Language", "value": "en" }
            ],
            "url": {
              "raw": "{{BASE_URL}}/students/1/media?type=image&status=ready&page=1&per_page=20",
              "host": ["{{BASE_URL}}"],
              "path": [ "students", "1", "media"],
              "query": [
                { "key": "type", "value": "image" },
                { "key": "status", "value": "ready" },
                { "key": "page", "value": "1" },
                { "key": "per_page", "value": "20" }
              ]
            },
            "description": "Get media for a student. URLs are temporary (60min)."
          },
          "response": [
            {
              "name": "200 - Paginated",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"count\": 25,\n  \"message\": \"Media retrieved successfully\",\n  \"page\": 1,\n  \"pages\": 2,\n  \"result\": [\n    {\n      \"id\": 42,\n      \"url\": \"https://cdn.bilgiagaci.com/students/1/photos/2026/06/abc123.webp?token=...\",\n      \"thumbnail_url\": \"https://cdn.bilgiagaci.com/students/1/photos/2026/06/abc123_thumb.webp?token=...\",\n      \"collection\": \"daily_photos\",\n      \"mime_type\": \"image/webp\",\n      \"original_name\": \"IMG_20260607.jpg\",\n      \"size\": 245760,\n      \"status\": \"ready\",\n      \"visibility\": \"parents_tagged\",\n      \"approved\": true,\n      \"created_at\": \"2026-06-07T10:30:00Z\"\n    }\n  ],\n  \"success\": true,\n  \"to\": 25\n}"
            }
          ]
        },
        {
          "name": "GET Media Status",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{BASE_URL}}/media/42/status",
              "host": ["{{BASE_URL}}"],
              "path": [ "media", "42", "status"]
            },
            "description": "Check processing status of uploaded media."
          },
          "response": [
            {
              "name": "200 - Processing",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Media status retrieved successfully\",\n  \"result\": {\n    \"id\": 42,\n    \"status\": \"processing\",\n    \"progress_percent\": 75,\n    \"original_name\": \"IMG_20260607.jpg\"\n  },\n  \"success\": true\n}"
            },
            {
              "name": "200 - Ready",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Media status retrieved successfully\",\n  \"result\": {\n    \"id\": 42,\n    \"status\": \"ready\",\n    \"progress_percent\": 100,\n    \"original_name\": \"IMG_20260607.jpg\",\n    \"thumbnail_url\": \"https://cdn.bilgiagaci.com/students/1/photos/2026/06/abc123_thumb.webp?token=...\"\n  },\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "GET Pending Media (Admin)",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Accept-Language", "value": "en" }
            ],
            "url": {
              "raw": "{{BASE_URL}}/admin/media/pending?page=1&per_page=20",
              "host": ["{{BASE_URL}}"],
              "path": [ "admin", "media", "pending"],
              "query": [
                { "key": "page", "value": "1" },
                { "key": "per_page", "value": "20" }
              ]
            },
            "description": "Get media waiting for admin approval."
          },
          "response": [
            {
              "name": "200 - Paginated",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"count\": 3,\n  \"message\": \"Pending media retrieved successfully\",\n  \"page\": 1,\n  \"pages\": 1,\n  \"result\": [\n    {\n      \"id\": 42,\n      \"url\": \"https://cdn.bilgiagaci.com/uploads/temp/placeholder.jpg?token=...\",\n      \"thumbnail_url\": \"https://cdn.bilgiagaci.com/uploads/temp/placeholder_thumb.jpg?token=...\",\n      \"collection\": \"daily_photos\",\n      \"mime_type\": \"image/webp\",\n      \"visibility\": \"parents_tagged\",\n      \"requires_approval\": true,\n      \"approved\": false,\n      \"uploaded_by\": \"Asya Öğretmen\",\n      \"class_id\": 1,\n      \"class_name\": \"Butterflies\",\n      \"student_ids\": [1, 2],\n      \"created_at\": \"2026-06-07T10:25:00Z\"\n    }\n  ],\n  \"success\": true,\n  \"to\": 3\n}"
            }
          ]
        },
        {
          "name": "POST Approve Media (Admin)",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"approved\": true\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/admin/media/42/approve",
              "host": ["{{BASE_URL}}"],
              "path": [ "admin", "media", "42", "approve"]
            },
            "description": "Approve or reject media. Admin only."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Media approved successfully\",\n  \"result\": {\n    \"id\": 42,\n    \"approved\": true,\n    \"approved_by\": \"Admin Name\",\n    \"approved_at\": \"2026-06-07T11:00:00Z\"\n  },\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "DELETE Media",
          "request": {
            "method": "DELETE",
            "url": {
              "raw": "{{BASE_URL}}/media/42",
              "host": ["{{BASE_URL}}"],
              "path": [ "media", "42"]
            },
            "description": "Delete a media file."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Media deleted successfully\",\n  \"result\": null,\n  \"success\": true\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "8. Announcements",
      "item": [
        {
          "name": "GET Announcements",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Accept-Language", "value": "tr" }
            ],
            "url": {
              "raw": "{{BASE_URL}}/announcements?scope=class&class_id=1&page=1&per_page=20",
              "host": ["{{BASE_URL}}"],
              "path": [ "announcements"],
              "query": [
                { "key": "scope", "value": "class" },
                { "key": "class_id", "value": "1" },
                { "key": "page", "value": "1" },
                { "key": "per_page", "value": "20" }
              ]
            },
            "description": "Get announcements. Scoped by user role."
          },
          "response": [
            {
              "name": "200 - Paginated",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"count\": 5,\n  \"message\": \"Announcements retrieved successfully\",\n  \"page\": 1,\n  \"pages\": 1,\n  \"result\": [\n    {\n      \"id\": 1,\n      \"title\": \"Parent Meeting\",\n      \"body\": \"There will be a meeting on Friday at 15:00 to discuss upcoming events.\",\n      \"scope\": \"class\",\n      \"target_class_id\": 1,\n      \"target_class_name\": \"Butterflies\",\n      \"created_by\": \"Admin Name\",\n      \"published_at\": \"2026-06-07T10:00:00Z\",\n      \"expires_at\": \"2026-06-14T10:00:00Z\",\n      \"read\": false\n    }\n  ],\n  \"success\": true,\n  \"to\": 5\n}"
            }
          ]
        },
        {
          "name": "POST Publish Announcement (Admin)",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"title\": \"Parent Meeting\",\n  \"body\": \"There will be a meeting on Friday at 15:00 to discuss upcoming events.\",\n  \"scope\": \"class\",\n  \"target_class_id\": 1,\n  \"target_user_id\": null,\n  \"expires_at\": \"2026-06-14T10:00:00\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/admin/announcements",
              "host": ["{{BASE_URL}}"],
              "path": [ "admin", "announcements"]
            },
            "description": "Publish an announcement. Admin only."
          },
          "response": [
            {
              "name": "201 - Created",
              "status": "Created",
              "code": 201,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 201,\n  \"message\": \"Announcement published successfully\",\n  \"result\": {\n    \"id\": 1,\n    \"title\": \"Parent Meeting\",\n    \"body\": \"There will be a meeting on Friday at 15:00 to discuss upcoming events.\",\n    \"scope\": \"class\",\n    \"published_at\": \"2026-06-07T10:00:00Z\"\n  },\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "POST Mark Announcement as Read",
          "request": {
            "method": "POST",
            "url": {
              "raw": "{{BASE_URL}}/announcements/1/read",
              "host": ["{{BASE_URL}}"],
              "path": [ "announcements", "1", "read"]
            },
            "description": "Mark announcement as read."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Announcement marked as read\",\n  \"result\": {\n    \"id\": 1,\n    \"read_at\": \"2026-06-07T10:05:00Z\"\n  },\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "DELETE Announcement (Admin)",
          "request": {
            "method": "DELETE",
            "url": {
              "raw": "{{BASE_URL}}/admin/announcements/1",
              "host": ["{{BASE_URL}}"],
              "path": [ "admin", "announcements", "1"]
            },
            "description": "Delete an announcement. Admin only."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Announcement deleted successfully\",\n  \"result\": null,\n  \"success\": true\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "9. Notifications",
      "item": [
        {
          "name": "GET Notifications",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Accept-Language", "value": "en" }
            ],
            "url": {
              "raw": "{{BASE_URL}}/notifications?page=1&per_page=20",
              "host": ["{{BASE_URL}}"],
              "path": [ "notifications"],
              "query": [
                { "key": "page", "value": "1" },
                { "key": "per_page", "value": "20" }
              ]
            },
            "description": "Get user notifications."
          },
          "response": [
            {
              "name": "200 - Paginated",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"count\": 15,\n  \"message\": \"Notifications retrieved successfully\",\n  \"page\": 1,\n  \"pages\": 1,\n  \"result\": [\n    {\n      \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n      \"type\": \"App\\\\Notifications\\\\AttendanceRecorded\",\n      \"data\": {\n        \"student_name\": \"Defne Yılmaz\",\n        \"status\": \"present\",\n        \"date\": \"2026-06-07\"\n      },\n      \"read_at\": null,\n      \"created_at\": \"2026-06-07T08:00:00Z\"\n    },\n    {\n      \"id\": \"550e8400-e29b-41d4-a716-446655440001\",\n      \"type\": \"App\\\\Notifications\\\\MealRecorded\",\n      \"data\": {\n        \"student_name\": \"Defne Yılmaz\",\n        \"meal_type\": \"breakfast\",\n        \"status\": \"all\",\n        \"date\": \"2026-06-07\"\n      },\n      \"read_at\": \"2026-06-07T09:30:00Z\",\n      \"created_at\": \"2026-06-07T09:30:00Z\"\n    }\n  ],\n  \"success\": true,\n  \"to\": 15\n}"
            }
          ]
        },
        {
          "name": "POST Mark Notification as Read",
          "request": {
            "method": "POST",
            "url": {
              "raw": "{{BASE_URL}}/notifications/550e8400-e29b-41d4-a716-446655440000/read",
              "host": ["{{BASE_URL}}"],
              "path": [ "notifications", "550e8400-e29b-41d4-a716-446655440000", "read"]
            },
            "description": "Mark a notification as read."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Notification marked as read\",\n  \"result\": {\n    \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n    \"read_at\": \"2026-06-07T10:00:00Z\"\n  },\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "GET Unread Count",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{BASE_URL}}/notifications/unread-count",
              "host": ["{{BASE_URL}}"],
              "path": [ "notifications", "unread-count"]
            },
            "description": "Get count of unread notifications."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Unread count retrieved successfully\",\n  \"result\": {\n    \"count\": 8\n  },\n  \"success\": true\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "10. Pickup Alert",
      "item": [
        {
          "name": "POST Send Pickup Alert",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"student_id\": 1,\n  \"estimated_minutes\": \"15\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/pickup/notify",
              "host": ["{{BASE_URL}}"],
              "path": [ "pickup", "notify"]
            },
            "description": "Parent sends a pickup alert to notify teachers."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Pickup alert sent successfully\",\n  \"result\": {\n    \"id\": 1,\n    \"student_id\": 1,\n    \"student_name\": \"Defne Yılmaz\",\n    \"class_id\": 1,\n    \"class_name\": \"Butterflies\",\n    \"estimated_minutes\": 15,\n    \"status\": \"pending\",\n    \"created_at\": \"2026-06-07T15:30:00Z\"\n  },\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "POST Cancel Pickup Alert",
          "request": {
            "method": "POST",
            "url": {
              "raw": "{{BASE_URL}}/pickup/1/cancel",
              "host": ["{{BASE_URL}}"],
              "path": [ "pickup", "1", "cancel"]
            },
            "description": "Cancel a previously sent pickup alert."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Pickup alert cancelled successfully\",\n  \"result\": {\n    \"id\": 1,\n    \"status\": \"cancelled\",\n    \"cancelled_at\": \"2026-06-07T15:35:00Z\"\n  },\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "GET Pickup Alerts (Teacher)",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Accept-Language", "value": "tr" }
            ],
            "url": {
              "raw": "{{BASE_URL}}/pickup/alerts?class_id=1&status=pending",
              "host": ["{{BASE_URL}}"],
              "path": [ "pickup", "alerts"],
              "query": [
                { "key": "class_id", "value": "1" },
                { "key": "status", "value": "pending" }
              ]
            },
            "description": "Get pending pickup alerts for a class. Teacher sees alerts for their class."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Pickup alerts retrieved successfully\",\n  \"result\": [\n    {\n      \"id\": 1,\n      \"student_id\": 1,\n      \"student_name\": \"Defne Yılmaz\",\n      \"parent_id\": 1,\n      \"parent_name\": \"Ahmet Yılmaz\",\n      \"class_id\": 1,\n      \"class_name\": \"Butterflies\",\n      \"estimated_minutes\": 15,\n      \"status\": \"pending\",\n      \"created_at\": \"2026-06-07T15:30:00Z\"\n    }\n  ],\n  \"success\": true\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "11. Settings",
      "item": [
        {
          "name": "GET Settings (Admin)",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Accept-Language", "value": "en" }
            ],
            "url": {
              "raw": "{{BASE_URL}}/admin/settings",
              "host": ["{{BASE_URL}}"],
              "path": [ "admin", "settings"]
            },
            "description": "Get all system settings. Admin only."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Settings retrieved successfully\",\n  \"result\": {\n    \"photos\": {\n      \"require_approval\": true\n    },\n    \"school\": {\n      \"name\": \"Bilgi Ağacı Anaokulu\",\n      \"working_hours\": {\n        \"start\": \"08:00\",\n        \"end\": \"17:00\"\n      },\n      \"academic_year\": \"2025-2026\"\n    }\n  },\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "PUT Update Settings (Admin)",
          "request": {
            "method": "PUT",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"photos.require_approval\": false,\n  \"school.name\": \"Bilgi Ağacı Anaokulu - Yeni Şube\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/admin/settings",
              "host": ["{{BASE_URL}}"],
              "path": [ "admin", "settings"]
            },
            "description": "Update system settings using dot notation. Super Admin only."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Settings updated successfully\",\n  \"result\": {\n    \"photos\": {\n      \"require_approval\": false\n    },\n    \"school\": {\n      \"name\": \"Bilgi Ağacı Anaokulu - Yeni Şube\",\n      \"working_hours\": {\n        \"start\": \"08:00\",\n        \"end\": \"17:00\"\n      },\n      \"academic_year\": \"2025-2026\"\n    }\n  },\n  \"success\": true\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "12. Reports (Admin)",
      "item": [
        {
          "name": "GET Attendance Report",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Accept-Language", "value": "en" }
            ],
            "url": {
              "raw": "{{BASE_URL}}/admin/reports/attendance?class_id=1&from=2026-06-01&to=2026-06-30&group=day",
              "host": ["{{BASE_URL}}"],
              "path": [ "admin", "reports", "attendance"],
              "query": [
                { "key": "class_id", "value": "1" },
                { "key": "from", "value": "2026-06-01" },
                { "key": "to", "value": "2026-06-30" },
                { "key": "group", "value": "day" }
              ]
            },
            "description": "Get attendance report. Admin only."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Attendance report generated successfully\",\n  \"result\": {\n    \"class_id\": 1,\n    \"class_name\": \"Butterflies\",\n    \"from\": \"2026-06-01\",\n    \"to\": \"2026-06-30\",\n    \"total_students\": 18,\n    \"summary\": {\n      \"present\": 340,\n      \"absent\": 40,\n      \"late\": 15,\n      \"left_early\": 10\n    },\n    \"daily\": [\n      {\n        \"date\": \"2026-06-01\",\n        \"present\": 16,\n        \"absent\": 2,\n        \"late\": 0,\n        \"left_early\": 0\n      },\n      {\n        \"date\": \"2026-06-02\",\n        \"present\": 15,\n        \"absent\": 3,\n        \"late\": 1,\n        \"left_early\": 0\n      }\n    ]\n  },\n  \"success\": true\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "13. Classes (Admin)",
      "item": [
        {
          "name": "GET Classes",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Accept-Language", "value": "tr" }
            ],
            "url": {
              "raw": "{{BASE_URL}}/admin/classes",
              "host": ["{{BASE_URL}}"],
              "path": [ "admin", "classes"]
            },
            "description": "Get all classes. Admin only."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Classes retrieved successfully\",\n  \"result\": [\n    {\n      \"id\": 1,\n      \"name\": \"Butterflies\",\n      \"grade\": \"3-4 years\",\n      \"age_min\": 36,\n      \"age_max\": 48,\n      \"has_nap_time\": true,\n      \"nap_start_time\": \"13:00\",\n      \"nap_end_time\": \"14:30\",\n      \"academic_year\": \"2025-2026\",\n      \"is_active\": true,\n      \"student_count\": 18,\n      \"teacher_count\": 2\n    }\n  ],\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "POST Create Class (Admin)",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Daisies\",\n  \"grade\": \"4-5 years\",\n  \"age_min\": 48,\n  \"age_max\": 60,\n  \"has_nap_time\": true,\n  \"nap_start_time\": \"13:00\",\n  \"nap_end_time\": \"14:00\",\n  \"academic_year\": \"2025-2026\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/admin/classes",
              "host": ["{{BASE_URL}}"],
              "path": [ "admin", "classes"]
            },
            "description": "Create a new class. Admin only."
          },
          "response": [
            {
              "name": "201 - Created",
              "status": "Created",
              "code": 201,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 201,\n  \"message\": \"Class created successfully\",\n  \"result\": {\n    \"id\": 2,\n    \"name\": \"Daisies\",\n    \"grade\": \"4-5 years\",\n    \"has_nap_time\": true,\n    \"is_active\": true\n  },\n  \"success\": true\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "14. Users (Admin)",
      "item": [
        {
          "name": "GET Users",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Accept-Language", "value": "en" }
            ],
            "url": {
              "raw": "{{BASE_URL}}/admin/users?role=teacher&is_active=true&page=1&per_page=20",
              "host": ["{{BASE_URL}}"],
              "path": [ "admin", "users"],
              "query": [
                { "key": "role", "value": "teacher" },
                { "key": "is_active", "value": "true" },
                { "key": "page", "value": "1" },
                { "key": "per_page", "value": "20" }
              ]
            },
            "description": "Get users list. Admin only."
          },
          "response": [
            {
              "name": "200 - Paginated",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"count\": 8,\n  \"message\": \"Users retrieved successfully\",\n  \"page\": 1,\n  \"pages\": 1,\n  \"result\": [\n    {\n      \"id\": 2,\n      \"name\": \"Asya Korkmaz\",\n      \"email\": \"asya@bilgiagaci.com\",\n      \"phone\": \"+905551112233\",\n      \"roles\": [\"teacher\"],\n      \"is_active\": true,\n      \"classes\": [\n        { \"id\": 1, \"name\": \"Butterflies\" }\n      ]\n    }\n  ],\n  \"success\": true,\n  \"to\": 8\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "15. Sensitivities (Allergies)",
      "item": [
        {
          "name": "GET Student Allergies",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Accept-Language", "value": "en" }
            ],
            "url": {
              "raw": "{{BASE_URL}}/students/1/allergies?page=1&per_page=20",
              "host": ["{{BASE_URL}}"],
              "path": [ "students", "1", "allergies"],
              "query": [
                { "key": "page", "value": "1" },
                { "key": "per_page", "value": "20" }
              ]
            },
            "description": "Get allergies for a student. Scoped by role (Parent: own children only, Teacher: own class only, Admin: all)."
          },
          "response": [
            {
              "name": "200 - Paginated",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"count\": 3,\n  \"message\": \"Allergies retrieved successfully\",\n  \"page\": 1,\n  \"pages\": 1,\n  \"result\": [\n    {\n      \"id\": 1,\n      \"student_id\": 1,\n      \"name\": \"Peanuts\",\n      \"type\": \"food\",\n      \"severity\": \"severe\",\n      \"notes\": \"Must carry EpiPen at all times\",\n      \"created_by\": 2,\n      \"created_at\": \"2026-06-07T10:00:00Z\",\n      \"updated_at\": \"2026-06-07T10:00:00Z\"\n    },\n    {\n      \"id\": 2,\n      \"student_id\": 1,\n      \"name\": \"Lactose\",\n      \"type\": \"food\",\n      \"severity\": \"moderate\",\n      \"notes\": \"Can consume lactose-free products\",\n      \"created_by\": 2,\n      \"created_at\": \"2026-06-07T09:30:00Z\",\n      \"updated_at\": \"2026-06-07T09:30:00Z\"\n    }\n  ],\n  \"success\": true,\n  \"to\": 3\n}"
            }
          ]
        },
        {
          "name": "GET Allergy Detail",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Accept-Language", "value": "en" }
            ],
            "url": {
              "raw": "{{BASE_URL}}/allergies/1",
              "host": ["{{BASE_URL}}"],
              "path": [ "allergies", "1"]
            },
            "description": "Get single allergy record."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Allergy retrieved successfully\",\n  \"result\": {\n    \"id\": 1,\n    \"student_id\": 1,\n    \"student_name\": \"Defne Yılmaz\",\n    \"name\": \"Peanuts\",\n    \"type\": \"food\",\n    \"severity\": \"severe\",\n    \"notes\": \"Must carry EpiPen at all times\",\n    \"created_by\": 2,\n    \"created_by_name\": \"Asya Korkmaz\",\n    \"created_at\": \"2026-06-07T10:00:00Z\",\n    \"updated_at\": \"2026-06-07T10:00:00Z\"\n  },\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "POST Create Allergy",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"student_id\": 1,\n  \"name\": \"Peanuts\",\n  \"type\": \"food\",\n  \"severity\": \"severe\",\n  \"notes\": \"Must carry EpiPen at all times\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/allergies",
              "host": ["{{BASE_URL}}"],
              "path": [ "allergies"]
            },
            "description": "Record an allergy for a student. Teacher or Admin only."
          },
          "response": [
            {
              "name": "201 - Created",
              "status": "Created",
              "code": 201,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 201,\n  \"message\": \"Allergy created successfully\",\n  \"result\": {\n    \"id\": 1,\n    \"student_id\": 1,\n    \"name\": \"Peanuts\",\n    \"type\": \"food\",\n    \"severity\": \"severe\",\n    \"notes\": \"Must carry EpiPen at all times\",\n    \"created_by\": 2,\n    \"created_at\": \"2026-06-07T10:00:00Z\",\n    \"updated_at\": \"2026-06-07T10:00:00Z\"\n  },\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "PUT Update Allergy",
          "request": {
            "method": "PUT",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Peanuts\",\n  \"type\": \"food\",\n  \"severity\": \"moderate\",\n  \"notes\": \"Updated: mild reaction only\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/allergies/1",
              "host": ["{{BASE_URL}}"],
              "path": [ "allergies", "1"]
            },
            "description": "Update an allergy record. Teacher or Admin only."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Allergy updated successfully\",\n  \"result\": {\n    \"id\": 1,\n    \"student_id\": 1,\n    \"name\": \"Peanuts\",\n    \"type\": \"food\",\n    \"severity\": \"moderate\",\n    \"notes\": \"Updated: mild reaction only\",\n    \"created_by\": 2,\n    \"created_at\": \"2026-06-07T10:00:00Z\",\n    \"updated_at\": \"2026-06-07T11:00:00Z\"\n  },\n  \"success\": true\n}"
            }
          ]
        },
        {
          "name": "DELETE Allergy",
          "request": {
            "method": "DELETE",
            "url": {
              "raw": "{{BASE_URL}}/allergies/1",
              "host": ["{{BASE_URL}}"],
              "path": [ "allergies", "1"]
            },
            "description": "Delete an allergy record. Teacher or Admin only."
          },
          "response": [
            {
              "name": "200 - Success",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"code\": 200,\n  \"message\": \"Allergy deleted successfully\",\n  \"result\": null,\n  \"success\": true\n}"
            }
          ]
        }
      ],
      "description": "Allergies (sensitivities) management: list student allergies, view details, create, update, delete."
    }
  ]
}
