1. List All Students
    curl -X GET http://yourdomain.com/api/student/list \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN_HERE" \
-d '{
    "status": "Active",
    "class": "1st Std",
    "section": "A"
}'

2. Search Students
    curl -X GET http://yourdomain.com/api/student/search \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN_HERE" \
-d '{
    "term": "John"
}'
3. Get Student Overview
    curl -X GET http://yourdomain.com/api/student/overview \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN_HERE" \
-d '{
    "student_id": 1
}'

4. Save Student (Add/Update)
    curl -X POST http://yourdomain.com/api/student/save \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN_HERE" \
-d '{
    "studentData": {
        "student_id": null,
        "admission_no": "A12345",
        "first_name": "John",
        "last_name": "Doe",
        "date_of_birth": "2010-01-01",
        "contact_number": "1234567890",
        "address": "123 Main St",
        "enrollment_date": "2024-06-01",
        "current_grade": 3,
        "status": "Active"
    },
    "parentData": {
        "parent_id": null,
        "first_name": "Jane",
        "last_name": "Doe",
        "contact_number": "0987654321",
        "address": "123 Main St",
        "email": "jane.doe@example.com"
    },
    "guardianData": {
        "guardian_id": null,
        "first_name": "Richard",
        "last_name": "Roe",
        "relationship": "Uncle",
        "contact_number": "1122334455",
        "email": "richard.roe@example.com",
        "address": "456 Elm St"
    },
    "enrollData": {
        "enrollment_id": null,
        "enrollment_date": "2024-06-01",
        "status": "Active"
    },
    "gradeData": [
        {
            "grade_id": null,
            "subject_id": 1,
            "grade": "A",
            "term": "Term 1"
        },
        {
            "grade_id": null,
            "subject_id": 2,
            "grade": "B",
            "term": "Term 1"
        }
    ]
}'

5. Delete Student by ID
    curl -X DELETE http://yourdomain.com/api/student/delete \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN_HERE" \
-d '{
    "studentId": 1
}'

6. Parent Login
    curl -X POST http://yourdomain.com/api/parent/login \
-H "Content-Type: application/json" \
-d '{
    "clientId": "client1",
    "contact_number": "0987654321",
    "password": "your_password"
}'

7. Find Parent or Gaurdian by contact_number
    curl -X POST http://yourdomain.com/api/student/findParent \
-H "Content-Type: application/json" \
-d '{
    "clientId": "client1",
    "contact_number": "0987654321",
    "type": "Parent"
}'

Mark Student Attendance
curl -X POST http://yourdomain.com/api/student/attendance/mark \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN_HERE" \
-d '{
    "attendance_id": null,
    "student_id": 123,
    "status": "Present",
    "clientId": "your_client_id"
}'
List Student Attendance
curl -X POST http://yourdomain.com/api/student/attendance/list \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN_HERE" \
-d '{
    "student_id": 123,
    "from_date": "2024-01-01",
    "to_date": "2024-01-31",
    "academic_year_id": 1,
    "statuses": ["Present", "Absent"],
    "offset": 0,
    "limit": 10,
    "clientId": "your_client_id"
}'
Delete Student Attendance
curl -X DELETE http://yourdomain.com/api/student/attendance/delete \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN_HERE" \
-d '{
    "attendance_id": 1,
    "clientId": "your_client_id"
}'
Mark Attendance List
curl -X POST http://yourdomain.com/api/student/markattendance/list \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN_HERE" \
-d '{
    "clientId": "your_client_id"
}'
Apply Student Leave
curl -X POST http://yourdomain.com/api/student/leave/apply \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN_HERE" \
-d '{
    "student_id": 1,
    "start_date": "2024-08-01",
    "end_date": "2024-08-07",
    "type": "Sick Leave",
    "status": "Pending",
    "clientId": "your_client_id"
}'
List Pending Student Leaves
curl -X POST http://yourdomain.com/api/student/leave/pending \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN_HERE" \
-d '{
    "clientId": "your_client_id"
}'
Get Student Leaves
curl -X POST http://yourdomain.com/api/student/leave/get \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN_HERE" \
-d '{
    "student_id": 1,
    "from_date": "2024-08-01",
    "to_date": "2024-08-31",
    "leave_types": ["Sick Leave", "Personal Leave"],
    "statuses": ["Pending", "Approved"],
    "limit": 10,
    "offset": 0,
    "clientId": "your_client_id"
}'
Update Student Leave Status
curl -X POST http://yourdomain.com/api/student/leave/update \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN_HERE" \
-d '{
    "leave_id": 1,
    "status": "Approved",
    "clientId": "your_client_id"
}'

APPs

1. Get Class Attendance
    curl -X GET http://yourdomain.com/api/app/student/getClassAttendance \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN_HERE" \
-d '{
    "class_id": 1
}'








1. Apply Late Fees

Endpoint: /transport/cron/apply_late_fees
Method: POST
Purpose: Apply late fees to overdue transport payments.

cURL Command:

bash
curl -X POST http://yourdomain.com/transport/cron/apply_late_fees

Sample Response:

json
{ "status": 1, "message": "Late fees applied successfully" }

2. Generate Monthly Transport Payments

Endpoint: /transport/cron/generate_monthly_payments
Method: POST
Purpose: Generate monthly transport payments for all students.

cURL Command:

bash
curl -X POST http://yourdomain.com/transport/cron/generate_monthly_payments

Sample Response:

json
{ "status": 1, "message": "Monthly transport payments generated successfully" }

3. Save Transport Payment

Endpoint: /transport/payment/save
Method: POST
Purpose: Record a transport payment made by a student.

cURL Command:

bash
curl -X POST http://yourdomain.com/transport/payment/save \ -H "Content-Type: application/json" \ -d '{ "student_id": 123, "amount_paid": 250.00, "payment_method": "Cash", "payment_date": "2023-06-01", "transaction_reference": "REC12345" }'

Sample Response:

json
{ "status": 1, "message": "Transport payment saved successfully" }

4. Delete Transport Payment

Endpoint: /transport/payment/delete
Method: POST
Purpose: Cancel a transport payment.

cURL Command:

bash
curl -X POST http://yourdomain.com/transport/payment/delete \ -H "Content-Type: application/json" \ -d '{ "transport_payment_id": 1 }'

Sample Response:

json
{ "status": 1, "message": "Transport payment canceled successfully" }

5. List Transport Payments

Endpoint: /transport/payment/list
Method: POST
Purpose: List all transport payments with pagination.

cURL Command:

bash
curl -X POST http://yourdomain.com/transport/payment/list \ -H "Content-Type: application/json" \ -d '{ "is_dashboard": true or false "offset": 0, "limit": 10 }'

Sample Response:

json
{ "status": 1, "totalRecords": 50, "data": [ { "transport_payment_id": 1, "student_id": 123, "student_transport_id": 10, "academic_year_id": 1, "month_of_payment": "2023-06-01", "due_date": "2023-06-07", "amount_due": 100.00, "amount_paid": 100.00, "late_fee": 0.00, "discount_amount": 0.00, "status": "Paid", "created": "2023-06-01 10:00:00", "updated": "2023-06-01 10:05:00", "first_name": "John", "last_name": "Doe" }, // ... more records ], "dashboard": { "total_revenue": 5000.00, "total_outstanding": 1500.00, "total_students": 120, "total_routes": 5, "total_vehicles": 4, "total_drivers": 4, "recent_payments": [ { "transaction_id": 101, "student_id": 123, "first_name": "John", "last_name": "Doe", "amount_paid": 100.00, "payment_date": "2023-10-01", "payment_method": "Cash" }, { "transaction_id": 100, "student_id": 124, "first_name": "Jane", "last_name": "Smith", "amount_paid": 150.00, "payment_date": "2023-09-30", "payment_method": "Credit Card" } // ... more recent payments ], "overdue_payments": 10, "vehicle_capacity_utilization": 80.00, "top_routes": [ { "route_name": "Route A", "students_assigned": 40 }, { "route_name": "Route B", "students_assigned": 30 } // ... more top routes ], "monthly_revenue_trends": [ { "month": "May 2023", "revenue": 4500.00 }, { "month": "Jun 2023", "revenue": 4800.00 }, // ... up to the current month ] } }

6. Get Transport Payment Details

Endpoint: /transport/payment/get
Method: POST
Purpose: Retrieve details of a specific transport payment.

cURL Command:

bash
curl -X POST http://yourdomain.com/transport/payment/get \ -H "Content-Type: application/json" \ -d '{ "transport_payment_id": 1 }'

Sample Response:

json
{ "status": 1, "data": { "transport_payment_id": 1, "student_id": 123, "student_transport_id": 10, "academic_year_id": 1, "month_of_payment": "2023-06-01", "due_date": "2023-06-07", "amount_due": 100.00, "amount_paid": 100.00, "late_fee": 0.00, "discount_amount": 0.00, "status": "Paid", "created": "2023-06-01 10:00:00", "updated": "2023-06-01 10:05:00", "allocations": [ { "allocation_id": 1, "transaction_id": 1, "transport_payment_id": 1, "amount_allocated": 100.00, "payment_date": "2023-06-01", "payment_method": "Cash" } ] } }

7. Add Transport Route

Endpoint: /transport/route/add
Method: POST
Purpose: Add a new transport route.

cURL Command:

bash
curl -X POST http://yourdomain.com/transport/route/add \ -H "Content-Type: application/json" \ -d '{ "route_name": "Route 1", "description": "Main route from downtown to school" }'

Sample Response:

json
{ "status": 1, "message": "Transport route added successfully" }

8. Add Transport Stop

Endpoint: /transport/stop/add
Method: POST
Purpose: Add a new stop to a transport route.

cURL Command:

bash
curl -X POST http://yourdomain.com/transport/stop/add \ -H "Content-Type: application/json" \ -d '{ "route_id": 1, "stop_name": "Main Street", "stop_order": 1, "fare_amount": 50.00 }'

Sample Response:

json
{ "status": 1, "message": "Transport stop added successfully" }

9. Add Driver

Endpoint: /transport/driver/add
Method: POST
Purpose: Add a new driver.

cURL Command:

bash
curl -X POST http://yourdomain.com/transport/driver/add \ -H "Content-Type: application/json" \ -d '{ "first_name": "Michael", "last_name": "Smith", "license_number": "D1234567", "contact_number": "1234567890", "address": "123 Elm Street", "status": "Active" }'

Sample Response:

json
{ "status": 1, "message": "Driver added successfully" }

10. Add Vehicle

Endpoint: /transport/vehicle/add
Method: POST
Purpose: Add a new vehicle.

cURL Command:

bash
curl -X POST http://yourdomain.com/transport/vehicle/add \ -H "Content-Type: application/json" \ -d '{ "vehicle_number": "AB123CD", "vehicle_type": "Bus", "capacity": 50, "status": "Active" }'

Sample Response:

json
{ "status": 1, "message": "Vehicle added successfully" }

11. Add Transport Schedule

Endpoint: /transport/schedule/add
Method: POST
Purpose: Add a new transport schedule.

cURL Command:

bash
curl -X POST http://yourdomain.com/transport/schedule/add \ -H "Content-Type: application/json" \ -d '{ "route_id": 1, "vehicle_id": 1, "driver_id": 1, "departure_time": "07:30:00", "arrival_time": "08:15:00", "status": "Active" }'

Sample Response:

json
{ "status": 1, "message": "Transport schedule added successfully" }

12. Assign Student to Transport

Endpoint: /transport/student/assign
Method: POST
Purpose: Assign a student to a transport route and stop.

cURL Command:

bash
curl -X POST http://yourdomain.com/transport/student/assign \ -H "Content-Type: application/json" \ -d '{ "student_id": 123, "route_id": 1, "stop_id": 1, "start_date": "2023-06-15", "discount_amount": 10.00 }'

Sample Response:

json
{ "status": 1, "message": "Student assigned to transport successfully" }

13. Update Student Transport Assignment

Endpoint: /transport/student/update
Method: POST
Purpose: Update a student's transport assignment.

cURL Command:

bash
curl -X POST http://yourdomain.com/transport/student/update \ -H "Content-Type: application/json" \ -d '{ "student_transport_id": 1, "end_date": "2023-07-31", "status": "Inactive" }'

Sample Response:

json
{ "status": 1, "message": "Student transport assignment updated successfully" }

Endpoint: /transport/route/list
Method: POST

cURL Command:

bash
curl -X POST http://yourdomain.com/transport/route/list

Sample Response:

json
{ "status": 1, "data": [ { "route_id": 1, "route_name": "Route A", "description": "Main route from downtown", "status": "Active" }, { "route_id": 2, "route_name": "Route B", "description": "Suburban route", "status": "Active" } // ... more routes ] }

2. List Transport Stops

Endpoint: /transport/stop/list
Method: POST
Required Field: route_id

cURL Command:

bash
curl -X POST http://yourdomain.com/transport/stop/list \ -H "Content-Type: application/json" \ -d '{ "route_id": 1 }'

Sample Response:

json
{ "status": 1, "data": [ { "stop_id": 1, "stop_name": "Main Street", "stop_order": 1, "fare_amount": 50.00 }, { "stop_id": 2, "stop_name": "Elm Street", "stop_order": 2, "fare_amount": 60.00 } // ... more stops ] }

3. List Drivers

Endpoint: /transport/driver/list
Method: POST

cURL Command:

bash
curl -X POST http://yourdomain.com/transport/driver/list

Sample Response:

json
{ "status": 1, "data": [ { "driver_id": 1, "first_name": "Michael", "last_name": "Smith", "license_number": "D1234567", "status": "Active" }, { "driver_id": 2, "first_name": "Sarah", "last_name": "Johnson", "license_number": "D7654321", "status": "Active" } // ... more drivers ] }

4. List Vehicles

Endpoint: /transport/vehicle/list
Method: POST

cURL Command:

bash
curl -X POST http://yourdomain.com/transport/vehicle/list

Sample Response:

json
{ "status": 1, "data": [ { "vehicle_id": 1, "vehicle_number": "AB123CD", "vehicle_type": "Bus", "capacity": 50, "status": "Active" }, { "vehicle_id": 2, "vehicle_number": "EF456GH", "vehicle_type": "Van", "capacity": 15, "status": "Active" } // ... more vehicles ] }

5. List Transport Schedules

Endpoint: /transport/schedule/list
Method: POST

cURL Command:

bash
curl -X POST http://yourdomain.com/transport/schedule/list

Sample Response:

json
{ "status": 1, "data": [ { "schedule_id": 1, "departure_time": "07:30:00", "arrival_time": "08:15:00", "route_name": "Route A", "vehicle_number": "AB123CD", "driver_first_name": "Michael", "driver_last_name": "Smith" }, { "schedule_id": 2, "departure_time": "07:45:00", "arrival_time": "08:30:00", "route_name": "Route B", "vehicle_number": "EF456GH", "driver_first_name": "Sarah", "driver_last_name": "Johnson" } // ... more schedules ] }

6. List Student Transports

Endpoint: /transport/student/list
Method: POST
Optional Field: student_id (If provided, lists transport assignments for that student only)

cURL Command:

Sample Response:

{ "status": 1, "data": [ { "student_transport_id": 1, "student_id": 1001, "first_name": "Amit", "last_name": "Kumar", "route_name": "Tirunelveli Route", "stop_name": "Melapalayam", "start_date": "2024-06-01", "end_date": null, "status": "Active" }, { "student_transport_id": 2, "student_id": 1002, "first_name": "Raj", "last_name": "Singh", "route_name": "Cheranmahadevi Route", "stop_name": "Kallidaikurichi", "start_date": "2024-06-01", "end_date": "2024-10-01", "status": "Inactive" } ], "pagination": { "current_page": 1, "total_pages": 5, "total_records": 50, "limit": 10 }, "dropdowns": { "routes": [ { "route_id": 1, "route_name": "Tirunelveli Route" }, { "route_id": 2, "route_name": "Cheranmahadevi Route" } ], "drivers": [ { "driver_id": 1, "driver_name": "John Doe" }, { "driver_id": 2, "driver_name": "Jane Smith" } ], "vehicles": [ { "vehicle_id": 1, "vehicle_number": "TN-72-1234" }, { "vehicle_id": 2, "vehicle_number": "TN-72-5678" } ] } }

V


Notice: session_start(): Ignoring session_start() because a session is already active (started from /home/indexscreener/schoolapi.indexscreener.in/config.php on line 50) in /home/indexscreener/schoolapi.indexscreener.in/index.php on line 469
Array
(
)
No user is logged in.