KI Academy API
Welcome to the KI Academy API! 🌟 Our API offers a robust set of endpoints to interact with various features of our platform. Explore the modules below to see what we have to offer:
Registration and Login: 🚀 Manage student sign-ups via email, social media, or SSO. Includes email verification, login options, and password recovery.
Profile Management: 📝 Update personal details, manage passwords, and upload profile pictures.
Dashboard: 📈 Track enrolled courses, monitor progress, view certificates, and manage wallet balance.
Course Management: 🔍 Search, browse, and interact with course content, including videos and quizzes.
Payment Management: 💳 Handle wallet deposits, direct course purchases, and review transaction history.
Registration and Onboarding: 📝 Register as an instructor, complete verifications, and manage profile details.
Profile Management: 🛠️ Update bio, qualifications, and payment setup.
Dashboard: 📊 Create and manage courses, upload content, and track earnings.
Course Management: 📚 Edit course details, track enrollment, and engage with students.
User Management: 👥 Manage users, assign roles, and oversee platform activities.
Instructor and Institution Management: ✔️ Approve applications, perform KYC verifications, and oversee content.
Payment Management: 💰 Monitor transactions, handle disputes, and manage finances.
Reporting and Analytics: 📈 Generate reports on user activity, course enrollments, and financial performance.
Registration and Verification: 📝 Register an institution, submit documentation, and undergo verification.
Profile Management: 🛠️ Update institutional details, contact information, and payment settings.
Dashboard: 📊 Manage institution-specific courses, staff, and access performance metrics.
Course Creation and Management: 📚 Add and manage courses, track performance, and monitor engagement.
Token-Based Authentication
Authentication Header
Include the following header in your requests:
Authorization: Bearer YOUR_SECURE_TOKEN
YOUR_SECURE_TOKEN with your actual token.
Example Request
Here's how you can use the token with cURL:
curl -X GET "https://api.kiacademy.in/api/coupons" -H "Authorization: Bearer YOUR_SECURE_TOKEN"
Example Response
The response for a successful request with a valid token will be:
{
"status": 200,
"data": [
{
"coupon_id": "1",
"coupon_code": "DISCOUNT2024",
"discount_amount": "20%",
"expiry_date": "2024-12-31"
},
{
"coupon_id": "2",
"coupon_code": "SAVE10",
"discount_amount": "10%",
"expiry_date": "2024-11-30"
}
]
}
Error Response
If the token is invalid or not provided, you will receive an error response:
{
"status": 401,
"message": "Unauthorized"
}
Course API
- GET /courses: Retrieve a list of all courses.
- GET /courses/{course_id}: Retrieve details of a specific course by ID.
- POST /courses: Create a new course.
- PUT /courses/{course_id}: Update details of an existing course by ID.
- DELETE /courses/{course_id}: Remove a course by ID.
- GET /courses/by-instructor/(:num): Retrieve a list of courses by instructor ID.
Description
Fetches all records from the `courses` table.
Route:
https://api.kiacademy.in/api/courses
Response:
{
"status": 200,
"data": [
{
"course_id": "1",
"course_title": "Introduction to Python",
"course_description": "Learn Python from scratch with this beginner-friendly course.",
"instructor_id": "1",
"course_category_id": "4",
"course_language": "English",
"currency": "USD",
"course_price": "2",
"course_level": "beginner",
"course_thumbnail": "python_thumbnail.jpg",
"course_intro_video": "python_intro.mp4",
"course_status": "0",
"created_at": "2024-08-13 09:08:37",
"updated_at": "2024-09-11 11:11:59",
"deleted_at": null
},
{
"course_id": "4",
"course_title": "Introduction to Excel",
"course_description": "Learn how to use Excel for data analysis, from basics to advanced features.",
"instructor_id": "3",
"course_category_id": "4",
"course_language": "English",
"currency": "USD",
"course_price": null,
"course_level": "beginner",
"course_thumbnail": "excel_thumbnail.jpg",
"course_intro_video": "excel_intro.mp4",
"course_status": "0",
"created_at": "2024-08-13 09:08:37",
"updated_at": "2024-09-11 11:10:12",
"deleted_at": null
},
{
"course_id": "36",
"course_title": "Git & GitHub Crash Course: Create a Repository From Scratch!",
"course_description": "Description",
"instructor_id": "3",
"course_category_id": "4",
"course_language": "English",
"currency": "USD",
"course_price": null,
"course_level": "beginner",
"course_thumbnail": "1724056161_b5fe36a360e927ddd8f0.jpeg",
"course_intro_video": "1724056161_4895b4747cadf19fbc91.mp4",
"course_status": "0",
"created_at": "2024-08-19 08:29:21",
"updated_at": "2024-09-11 11:10:12",
"deleted_at": null
}
]
}
Description
Fetches a single course record by its ID.
Route:
https://api.kiacademy.in/api/courses/{course_id}
Parameters:
- id: The ID of the course to retrieve.
Response:
{
"status": 200,
"data": {
"course_id": "36",
"course_title": "Git & GitHub Crash Course: Create a Repository From Scratch!",
"course_description": "Description",
"instructor_id": "3",
"course_category_id": "4",
"course_language": "English",
"currency": "USD",
"course_price": null,
"course_level": "beginner",
"course_thumbnail": "1724056161_b5fe36a360e927ddd8f0.jpeg",
"course_intro_video": "1724056161_4895b4747cadf19fbc91.mp4",
"course_status": "0",
"created_at": "2024-08-19 08:29:21",
"updated_at": "2024-09-11 11:10:12",
"deleted_at": null
}
}
Description
Fetches a list of courses associated with a specific instructor ID.
Route:
https://api.kiacademy.in/api/courses/by-instructor/{instructor_id}
Parameters:
- instructor_id: The ID of the instructor for whom courses are to be retrieved.
Response:
{
"status": 200,
"data": [
{
"course_id": "1",
"course_title": "Introduction to Python",
"course_description": "Learn Python from scratch with this beginner-friendly course.",
"instructor_id": "1",
"course_category_id": "4",
"course_language": "English",
"currency": "USD",
"course_price": "2",
"course_level": "beginner",
"course_thumbnail": "python_thumbnail.jpg",
"course_intro_video": "python_intro.mp4",
"course_status": "0",
"created_at": "2024-08-13 09:08:37",
"updated_at": "2024-09-11 11:11:59",
"deleted_at": null
}
]
}
Description
Inserts a new record into the `courses` table. This includes uploading images and videos, and setting various course details.
Route:
https://api.kiacademy.in/api/courses/create
Request Body:
{
"course_id": "4",
"course_title": "Introduction to Excel",
"course_description": "Learn how to use Excel for data analysis, from basics to advanced features.",
"instructor_id": "3",
"course_category_id": "4",
"course_language": "English",
"currency": "USD",
"course_price": null,
"course_level": "beginner",
"course_thumbnail": "excel_thumbnail.jpg",
"course_intro_video": "excel_intro.mp4",
"course_status": "0",
"created_at": "2024-08-13 09:08:37",
"updated_at": "2024-09-11 11:10:12",
"deleted_at": null
},
Response:
{
"status": 201,
"message": "Course Created Successfully"
}
File Storage:
Image Storage Path: The course thumbnail image is stored in the `uploads/courses/image/` directory on the server. The filename is stored in the database.
Video Storage Path: The course introductory video is stored in the `uploads/courses/introvideo/` directory on the server. The filename is stored in the database.
Fetching Files:
To access the uploaded files, you can construct URLs based on the stored file paths. For example:
- Course Thumbnail:
https://api.kiacademy.in//uploads/courses/image/{course_thumbnail} - Course Intro Video:
https://api.kiacademy.in//uploads/courses/introvideo/{course_intro_video}
Course Additional Information API
- GET /courses/{course_id}/additional: Retrieve additional information for a specific course.
- POST /courses/{course_id}/additional: Create additional information for a specific course.
- PUT /courses/{course_id}/additional/update/{additional_id}: Update additional information for a specific course.
- DELETE /courses/{course_id}/additional/delete/{additional_id}: Delete additional information for a specific course.
Description
Fetches additional information for a specific course by its ID.
Route:
https://api.kiacademy.in/api/courses/{course_id}/additional
Parameters:
- course_id: The ID of the course for which additional information is to be retrieved.
Response:
{
"status": 200,
"data": [
{
"course_additional_id": "1",
"course_id": "1",
"who_is_for": "Ideal for beginners who are new to programming and want to start with Python.",
"what_you_will_learn": "Learn the basics of Python programming, including data types, control structures, and functions.",
"requirements": "No prior programming experience required. Basic computer skills are needed.",
"created_at": "2024-08-13 09:09:18",
"updated_at": "2024-08-13 09:09:18"
}
]
}
Description
Inserts a new record into the `courses_additional` table for a specific course.
Route:
https://api.kiacademy.in/api/courses/{course_id}/additional
Request Body:
{
"who_is_for": "Ideal for beginners who want to start with Python.",
"what_you_will_learn": "Basics of Python programming.",
"requirements": "No prior programming experience required."
}
Response:
{
"status": 201,
"message": "Additional information created successfully"
}
Description
Updates existing additional information for a specific course by its ID.
Route:
https://api.kiacademy.in/api/courses/{course_id}/additional/{additional_id}
Parameters:
- course_id: The ID of the course.
- additional_id: The ID of the additional information to update.
Request Body:
{
"who_is_for": "Updated description for beginners.",
"what_you_will_learn": "Updated learning objectives.",
"requirements": "Updated requirements."
}
Response:
{
"status": 200,
"message": "Additional information updated successfully",
"data": {
"who_is_for": "Updated description for beginners.",
"what_you_will_learn": "Updated learning objectives.",
"requirements": "Updated requirements.",
"updated_at": "2024-08-13 09:09:18"
}
}
Description
Deletes additional information for a specific course by its ID.
Route:
https://api.kiacademy.in/api/courses/{course_id}/additional/{additional_id}
Parameters:
- course_id: The ID of the course.
- additional_id: The ID of the additional information to delete.
Response:
{
"status": 200,
"message": "Additional information successfully deleted.",
"data": {
"course_id": "1",
"course_additional_id": "1"
}
}
Description
Updates an existing course record identified by its ID. The request supports updating text fields, and optionally uploading new files (thumbnail image and intro video).
Route:
https://api.kiacademy.in/api/courses/{course_id}
Parameters:
- course_id: The ID of the course to update.
Request Body:
The request body can include fields to update and optionally new files for thumbnail and intro video. If a file is not provided, the existing file reference will remain unchanged.
{
"course_title": "Updated Course",
"course_description": "Updated Description",
"instructor_id": "2",
"course_category_id": "2",
"course_language": "Spanish",
"course_price": "89.99",
"course_level": "intermediate",
"course_thumbnail": "updated_course_thumbnail.jpg", // Optional: new thumbnail image filename
"course_intro_video": "updated_intro_video.mp4", // Optional: new intro video filename
"course_status": 1
}
Response:
Upon successful update, the response includes the updated course data. If an error occurs, a corresponding error message will be provided.
{
"status": 200,
"message": "Course Updated Successfully",
"data": {
"course_title": "Updated Course",
"course_description": "Updated Description",
"instructor_id": "2",
"course_category_id": "2",
"course_language": "Spanish",
"course_price": "89.99",
"course_level": "intermediate",
"course_thumbnail": "updated_course_thumbnail.jpg", // Updated thumbnail image filename
"course_intro_video": "updated_intro_video.mp4", // Updated intro video filename
"course_status": 1
}
}
Description
Deletes a course record by its ID.
Route:
https://api.kiacademy.in/api/courses/delete/{course_id}
Parameters:
- id: The ID of the course to delete.
Response:
{
"course_id": 1
}
Course Categories API
- GET /course-categories: Retrieve a list of all categories.
- GET /course-categories/{category_id}: Retrieve details of a specific category by ID.
- POST /course-categories/create: Create a new category.
- POST /course-categories/update/{category_id}: Update details of an existing category by ID.
- DELETE /course-categories/delete/{category_id}: Remove a category by ID.
Description
Fetches all records from the course categories table.
Route:
https://api.kiacademy.in/api/course-categories
Response:
{
"status": 200,
"data": [
{
"category_id": "1",
"category_name": "Programming",
"category_description": "Courses focused on teaching various programming languages and techniques.",
"created_at": "2024-08-01 10:00:00",
"updated_at": "2024-08-01 10:00:00",
"deleted_at": null
},
{
"category_id": "2",
"category_name": "Data Science",
"category_description": "Courses related to data analysis, machine learning, and data visualization.",
"created_at": "2024-08-02 11:15:00",
"updated_at": "2024-08-02 11:15:00",
"deleted_at": null
},
{
"category_id": "3",
"category_name": "Design",
"category_description": "Courses covering graphic design, UX/UI, and visual communication.",
"created_at": "2024-08-03 12:30:00",
"updated_at": "2024-08-03 12:30:00",
"deleted_at": null
},
{
"category_id": "4",
"category_name": "Business",
"category_description": "Courses on business management, entrepreneurship, and strategy.",
"created_at": "2024-08-04 13:45:00",
"updated_at": "2024-08-04 13:45:00",
"deleted_at": null
}
]
}
Description
Fetches all courses belonging to the specified category.
Route:
https://api.kiacademy.in/api/category-by-course/{category_id}
Response:
{
"status": 200,
"data": [
{
"course_id": "1",
"course_title": "Introduction to Python",
"course_description": "Learn Python from scratch with this beginner-friendly course.",
"instructor_id": "1",
"course_category_id": "4",
"course_language": "English",
"currency": "USD",
"course_price": "2",
"course_level": "beginner",
"course_thumbnail": "python_thumbnail.jpg",
"course_intro_video": "python_intro.mp4",
"course_status": "0",
"created_at": "2024-08-13 09:08:37",
"updated_at": "2024-09-11 11:11:59",
"deleted_at": null
},
{
"course_id": "4",
"course_title": "Introduction to Excel",
"course_description": "Learn how to use Excel for data analysis, from basics to advanced features.",
"instructor_id": "3",
"course_category_id": "4",
"course_language": "English",
"currency": "USD",
"course_price": null,
"course_level": "beginner",
"course_thumbnail": "excel_thumbnail.jpg",
"course_intro_video": "excel_intro.mp4",
"course_status": "0",
"created_at": "2024-08-13 09:08:37",
"updated_at": "2024-09-11 11:10:12",
"deleted_at": null
},
{
"course_id": "36",
"course_title": "Git & GitHub Crash Course: Create a Repository From Scratch!",
"course_description": "Description",
"instructor_id": "3",
"course_category_id": "4",
"course_language": "English",
"currency": "USD",
"course_price": null,
"course_level": "beginner",
"course_thumbnail": "1724056161_b5fe36a360e927ddd8f0.jpeg",
"course_intro_video": "1724056161_4895b4747cadf19fbc91.mp4",
"course_status": "0",
"created_at": "2024-08-19 08:29:21",
"updated_at": "2024-09-11 11:10:12",
"deleted_at": null
}
]
}
Description
Fetches a single category record by its ID.
Route:
https://api.kiacademy.in/api/course-categories/{category_id}
Parameters:
- category_id: The ID of the category to retrieve.
Response:
{
"status": 200,
"data": {
"category_id": "1",
"category_name": "Programming",
"category_description": "Courses focused on teaching various programming languages and techniques.",
"created_at": "2024-08-01 10:00:00",
"updated_at": "2024-08-01 10:00:00",
"deleted_at": null
}
}
Description
Inserts a new record into the course categories table.
Route:
https://api.kiacademy.in/api/course-categories/create
Request Body:
{
"category_name": "New Category",
"category_description": "Description of the new category"
}
Response:
{
"status": 201,
"message": "Category Created Successfully"
}
Description
Updates an existing category record by its ID.
Route:
https://api.kiacademy.in/api/course-categories/update/{category_id}
Request Body:
{
"category_name": "Updated Category Name",
"category_description": "Updated Category Description"
}
Response:
{
"status": 200,
"message": "Category Updated Successfully"
}
Description
Deletes a category record by its ID.
Route:
https://api.kiacademy.in/api/course-categories/delete/{category_id}
Parameters:
- category_id: The ID of the category to delete.
Response:
{
"status": 200,
"message": "Category Deleted Successfully"
}
Course Sections API
- GET /course-sections/{section_id}: Retrieve details of a specific course section by its ID.
- GET /course-sections/by-course/{course_id}: Retrieve all sections associated with a specific course ID.
- POST /course-sections/create: Create a new course section.
- POST /course-sections/update/{section_id}: Update details of an existing course section by ID.
- DELETE /course-sections/delete/{section_id}: Remove a course section by ID.
Description
Fetches a single course section record by its ID.
Route:
https://api.kiacademy.in/api/course-sections/{section_id}
Parameters:
- section_id: The ID of the course section to retrieve.
Response:
{
"status": 200,
"data": {
"section_id": "1",
"course_id": "101",
"title": "Introduction to Programming",
"created_at": "2024-08-01 10:00:00",
"updated_at": "2024-08-01 10:00:00"
}
}
Description
Fetches all sections associated with a specific course ID.
Route:
https://api.kiacademy.in/api/course-sections/by-course/{course_id}
Parameters:
- course_id: The ID of the course to retrieve sections for.
Response:
{
"status": 200,
"data": [
{
"section_id": "1",
"course_id": "101",
"title": "Introduction to Programming",
"created_at": "2024-08-01 10:00:00",
"updated_at": "2024-08-01 10:00:00"
},
{
"section_id": "2",
"course_id": "101",
"title": "Advanced Programming Concepts",
"created_at": "2024-08-02 11:15:00",
"updated_at": "2024-08-02 11:15:00"
}
]
}
Description
Inserts a new record into the course sections table.
Route:
https://api.kiacademy.in/api/course-sections/create
Request Body:
{
"course_id": "101",
"title": "New Section Title"
}
Response:
{ "status": 201, "message": "New section created successfully." }
Description
Updates an existing course section record by its ID.
Route:
https://api.kiacademy.in/api/course-sections/update/{section_id}
Request Body:
{
"course_id": "101",
"title": "Updated Section Title"
}
Response:
{ "status": 200, "message": "Section updated successfully.", "data": { "course_id": "101", "title": "Updated Section Title", "updated_at": "2024-08-01 11:00:00" } }
Description
Removes a course section record by its ID.
Route:
https://api.kiacademy.in/api/course-sections/delete/{section_id}
Parameters:
- section_id: The ID of the course section to delete.
Response:
{
"status": 200,
"message": "Section deleted successfully."
}
Lectures API
- GET /lectures: Retrieve a list of all lectures or a specific lecture by ID.
- POST /lectures/create: Create a new lecture.
- POST /lectures/update/{lecture_id}: Update details of an existing lecture by ID.
- DELETE /lectures/delete/{lecture_id}: Remove a lecture by ID.
- GET /lectures/by-section/{section_id}: Retrieve lectures by section ID.
Description
Fetches all records from the lectures table. If an ID is provided, fetches a specific lecture by its ID.
Route:
https://api.kiacademy.in/api/lectures
Parameters:
- id (optional): The ID of the lecture to retrieve. If not provided, retrieves all lectures.
Response:
{
"status": 200,
"data": [
{
"lecture_id": "1",
"section_id": "10",
"lecture_title": "Introduction to Programming",
"lecture_video_url": "intro_programming.mp4",
"created_at": "2024-08-01 10:00:00",
"updated_at": "2024-08-01 10:00:00"
},
{
"lecture_id": "2",
"section_id": "10",
"lecture_title": "Variables and Data Types",
"lecture_video_url": "variables_data_types.mp4",
"created_at": "2024-08-02 11:15:00",
"updated_at": "2024-08-02 11:15:00"
}
]
}
Description
Fetches a single lecture record by its ID.
Route:
https://api.kiacademy.in/api/lectures/{lecture_id}
Parameters:
- lecture_id: The ID of the lecture to retrieve.
Response:
{
"status": 200,
"data": {
"lecture_id": "1",
"section_id": "10",
"lecture_title": "Introduction to Programming",
"lecture_video_url": "intro_programming.mp4",
"created_at": "2024-08-01 10:00:00",
"updated_at": "2024-08-01 10:00:00"
}
}
Description
Inserts a new record into the lectures table.
Route:
https://api.kiacademy.in/api/lectures/create
Request Body:
{
"section_id": "10",
"lecture_title": "New Lecture Title",
"lecture_video": "file" // Form-data for file upload
}
Response:
{
"status": 201,
"message": "Lecture Created Successfully"
}
Description
Updates an existing lecture record by its ID.
Route:
https://api.kiacademy.in/api/lectures/update/{lecture_id}
Request Body:
{
"section_id": "10",
"lecture_title": "Updated Lecture Title",
"lecture_video": "file" // Form-data for file upload (optional)
}
Response:
{
"status": 200,
"message": "Lecture Updated Successfully",
"data": {
"section_id": "10",
"lecture_title": "Updated Lecture Title",
"lecture_video_url": "updated_lecture_video.mp4", // If updated
"updated_at": "2024-08-25 14:30:00"
}
}
Description
Deletes a lecture record by its ID.
Route:
https://api.kiacademy.in/api/lectures/delete/{lecture_id}
Parameters:
- lecture_id: The ID of the lecture to delete.
Response:
{
"status": 200,
"message": "Lecture Deleted Successfully"
}
Description
Fetches all lectures associated with a specific section ID. If the section ID is not provided or no lectures are found for the given section ID, appropriate error responses will be returned.
Route:
https://api.kiacademy.in/api/lectures/by-section/{section_id}
Parameters:
- section_id: The ID of the section to retrieve lectures for. This is a required parameter.
Response:
{
"status": 200,
"message": "Lectures retrieved successfully.",
"data": [
{
"lecture_id": "1",
"section_id": "10",
"lecture_title": "Introduction to Programming",
"lecture_video_url": "intro_programming.mp4",
"created_at": "2024-08-01 10:00:00",
"updated_at": "2024-08-01 10:00:00"
},
{
"lecture_id": "2",
"section_id": "10",
"lecture_title": "Variables and Data Types",
"lecture_video_url": "variables_data_types.mp4",
"created_at": "2024-08-02 11:15:00",
"updated_at": "2024-08-02 11:15:00"
}
]
}
{
"status": 404,
"message": "No lectures found for the provided section ID."
}
Quiz API
- GET /quizzes: Retrieve a list of all quizzes or quizzes by section ID.
- GET /quizzes/quiz/{quiz_id}: Retrieve details of a specific quiz by ID.
- POST /quizzes/create: Create a new quiz.
- POST /quizzes/update/{quiz_id}: Update details of an existing quiz by ID.
- DELETE /quizzes/delete/{quiz_id}: Remove a quiz by ID.
Description
Fetches all quizzes or quizzes for a specific section if an ID is provided.
Route:
https://api.kiacademy.in/api/quizzes/(:segment)
Parameters:
- section_id (optional): The ID of the section to filter quizzes.
Response:
{
"status": 200,
"data": [
{
"quiz_id": "1",
"quiz_title": "Sample Quiz 1",
"section_id": "1",
"created_at": "2024-08-13 09:08:37",
"updated_at": "2024-08-13 09:08:37"
},
{
"quiz_id": "2",
"quiz_title": "Sample Quiz 2",
"section_id": "2",
"created_at": "2024-08-13 09:08:37",
"updated_at": "2024-08-13 09:08:37"
}
]
}
Description
Fetches a single quiz record by its ID.
Route:
https://api.kiacademy.in/api/quizzes/quiz/{quiz_id}
Parameters:
- quiz_id: The ID of the quiz to retrieve.
Response:
{
"status": 200,
"data": {
"quiz_id": "1",
"quiz_title": "Sample Quiz 1",
"section_id": "1",
"created_at": "2024-08-13 09:08:37",
"updated_at": "2024-08-13 09:08:37"
}
}
Description
Inserts a new record into the `quizzes` table.
Route:
https://api.kiacademy.in/api/quizzes/create
Request Body:
{
"quiz_title": "New Quiz",
"section_id": "1"
}
Response:
{
"status": 201,
"message": "Quiz created successfully"
}
Description
Updates an existing quiz record by its ID.
Route:
https://api.kiacademy.in/api/quizzes/update/{quiz_id}
Parameters:
- quiz_id: The ID of the quiz to update.
Request Body:
{
"quiz_title": "Updated Quiz Title",
"section_id": "1"
}
Response:
{
"status": 200,
"message": "Quiz updated successfully",
"data": {
"quiz_id": "1",
"quiz_title": "Updated Quiz Title",
"section_id": "1",
"updated_at": "2024-08-13 09:08:37"
}
}
Description
Removes a quiz record by its ID.
Route:
https://api.kiacademy.in/api/quizzes/delete/{quiz_id}
Parameters:
- quiz_id: The ID of the quiz to delete.
Response:
{
"status": 200,
"message": "Quiz deleted successfully"
}
Question and Answer API
- GET /questions/(:segment): Retrieve questions and their answers for a specific quiz.
- POST /questions/create: Create a new question with optional answers.
- POST /questions/update/{id}: Update an existing question and its answers.
- DELETE /questions/delete/{id}: Delete a question and its associated answers.
Description
Fetches all questions and their associated answers for a specific quiz. A quiz ID is required.
Route:
https://api.kiacademy.in/api/questions/(:segment)
Parameters:
- quiz_id: The ID of the quiz to fetch questions for.
Response:
{
"status": 200,
"data": [
{
"question_id": "1",
"question_text": "What is the capital of France?",
"answers": [
{
"answer_id": "1",
"answer_text": "Paris",
"is_correct": true
},
{
"answer_id": "2",
"answer_text": "Berlin",
"is_correct": false
}
]
}
]
}
Description
Creates a new question and optionally associated answers.
Route:
https://api.kiacademy.in/api/questions/create
Request Body:
{
"question_text": "What is the largest planet in our solar system?",
"quiz_id": "1",
"answers": [
{
"answer_text": "Jupiter",
"is_correct": true
},
{
"answer_text": "Saturn",
"is_correct": false
}
]
}
Response:
{
"status": 201,
"message": "Question and answers created successfully"
}
Description
Updates an existing question and its associated answers.
Route:
https://api.kiacademy.in/api/questions/update/{question_id}
Parameters:
- question_id: The ID of the question to update.
Request Body:
{
"question_text": "Updated question text?",
"answers": [
{
"answer_id": "1",
"answer_text": "Updated answer text",
"is_correct": true
}
]
}
Response:
{
"status": 200,
"message": "Question and answers updated successfully",
"data": {
"question_id": "1",
"question_text": "Updated question text?"
}
}
Description
Deletes a question and all associated answers based on the question ID.
Route:
https://api.kiacademy.in/api/questions/delete/{question_id}
Parameters:
- question_id: The ID of the question to delete.
Response:
{
"status": 200,
"message": "Question and associated answers deleted successfully"
}
Course Reviews API
- GET /course-reviews: Retrieve a list of all reviews.
- GET /course-reviews/{course_id}: Retrieve reviews for a specific course by course ID.
- POST /course-reviews/create: Create a new review.
- POST /course-reviews/update/{review_id}: Update details of an existing review by review ID.
- DELETE /course-reviews/delete/{review_id}: Remove a review by review ID.
Description
Fetches all records from the course reviews table.
Route:
https://api.kiacademy.in/api/course-reviews
Response:
{
"status": 200,
"data": [
{
"review_id": "1",
"course_id": "101",
"student_id": "202",
"rating": 5,
"comment": "Excellent course with in-depth content.",
"created_at": "2024-08-01 10:00:00",
"updated_at": "2024-08-01 10:00:00"
},
{
"review_id": "2",
"course_id": "101",
"student_id": "203",
"rating": 4,
"comment": "Great course, but could use more examples.",
"created_at": "2024-08-02 11:15:00",
"updated_at": "2024-08-02 11:15:00"
}
]
}
Description
Fetches all reviews associated with a specific course ID.
Route:
https://api.kiacademy.in/api/course-reviews/{course_id}
Parameters:
- course_id: The ID of the course to retrieve reviews for.
Response:
{
"status": 200,
"data": [
{
"review_id": "1",
"course_id": "101",
"student_id": "202",
"rating": 5,
"comment": "Excellent course with in-depth content.",
"created_at": "2024-08-01 10:00:00",
"updated_at": "2024-08-01 10:00:00"
},
{
"review_id": "2",
"course_id": "101",
"student_id": "203",
"rating": 4,
"comment": "Great course, but could use more examples.",
"created_at": "2024-08-02 11:15:00",
"updated_at": "2024-08-02 11:15:00"
}
]
}
Description
Inserts a new record into the course reviews table.
Route:
https://api.kiacademy.in/api/course-reviews/create
Request Body:
{
"course_id": "101",
"student_id": "204",
"rating": 5,
"comment": "Fantastic course with practical insights."
}
Response:
{
"status": 201,
"message": "Review Created Successfully"
}
Description
Updates an existing review record by its ID.
Route:
https://api.kiacademy.in/api/course-reviews/update/{review_id}
Parameters:
- review_id: The ID of the review to update.
Request Body:
{
"rating": 4,
"comment": "Updated review comment with more details."
}
Response:
{
"status": 200,
"message": "Review Updated Successfully"
}
Description
Deletes a review record by its ID.
Route:
https://api.kiacademy.in/api/course-reviews/delete/{review_id}
Parameters:
- review_id: The ID of the review to delete.
Response:
{
"status": 200,
"message": "Review Deleted Successfully"
}
Coupons API
- GET /coupons: Retrieve a list of all coupons.
- GET /coupons/{coupon_id}: Retrieve details of a specific coupon by ID.
- POST /coupons/create: Create a new coupon.
- POST /coupons/update/{coupon_id}: Update details of an existing coupon by ID.
- DELETE /coupons/delete/{coupon_id}: Remove a coupon by ID.
Description
Fetches all records from the coupons table.
Route:
https://api.kiacademy.in/api/coupons
Response:
{
"status": 200,
"data": [
{
"coupon_id": "1",
"coupon_code": "SUMMER2024",
"coupon_discount": "15.00",
"coupon_discount_type": "percentage",
"coupon_valid_from": "2024-06-01 00:00:00",
"coupon_valid_to": "2024-06-30 23:59:59",
"coupon_usage_limit": "100",
"coupon_used_count": "20",
"coupon_applicable_courses": "['1', '2', '3']",
"created_at": "2024-05-15 08:00:00",
"updated_at": "2024-05-15 08:00:00",
"deleted_at": null
},
{
"coupon_id": "2",
"coupon_code": "WELCOME10",
"coupon_discount": "10.00",
"coupon_discount_type": "fixed",
"coupon_valid_from": "2024-01-01 00:00:00",
"coupon_valid_to": "2024-12-31 23:59:59",
"coupon_usage_limit": "50",
"coupon_used_count": "5",
"coupon_applicable_courses": "['4', '5']",
"created_at": "2023-12-01 09:00:00",
"updated_at": "2023-12-01 09:00:00",
"deleted_at": null
}
// Additional coupon records...
]
}
Description
Fetches a single coupon record by its ID.
Route:
https://api.kiacademy.in/api/coupons/{coupon_id}
Parameters:
- coupon_id: The ID of the coupon to retrieve.
Response:
{
"status": 200,
"data": {
"coupon_id": "1",
"coupon_code": "SUMMER2024",
"coupon_discount": "15.00",
"coupon_discount_type": "percentage",
"coupon_valid_from": "2024-06-01 00:00:00",
"coupon_valid_to": "2024-06-30 23:59:59",
"coupon_usage_limit": "100",
"coupon_used_count": "20",
"coupon_applicable_courses": "['1', '2', '3']",
"created_at": "2024-05-15 08:00:00",
"updated_at": "2024-05-15 08:00:00",
"deleted_at": null
}
}
Description
Inserts a new record into the coupons table.
Route:
https://api.kiacademy.in/api/coupons/create
Request Body:
{
"coupon_code": "WINTER2024",
"coupon_discount": "20.00",
"coupon_discount_type": "fixed",
"coupon_valid_from": "2024-12-01 00:00:00",
"coupon_valid_to": "2024-12-31 23:59:59",
"coupon_usage_limit": "200",
"coupon_used_count": "0",
"coupon_applicable_courses": "['6', '7']"
}
Response:
{
"status": 201,
"message": "Coupon Created Successfully"
}
Description
Updates an existing coupon record by its ID.
Route:
https://api.kiacademy.in/api/coupons/update/{coupon_id}
Request Body:
{
"coupon_code": "WINTER2025",
"coupon_discount": "25.00",
"coupon_discount_type": "fixed",
"coupon_valid_from": "2024-12-01 00:00:00",
"coupon_valid_to": "2024-12-31 23:59:59",
"coupon_usage_limit": "300",
"coupon_used_count": "0",
"coupon_applicable_courses": "['8', '9']"
}
Response:
{
"status": 200,
"message": "Coupon Updated Successfully"
}
Description
Deletes a coupon record by its ID.
Route:
https://api.kiacademy.in/api/coupons/delete/{coupon_id}
Parameters:
- coupon_id: The ID of the coupon to delete.
Response:
{
"status": 200,
"message": "Coupon Deleted Successfully"
}
User API
- GET /users: Retrieve a list of all users.
- GET /users/{id}: Retrieve details of a specific user by ID.
- POST /users/create: Create a new user.
- POST /users/update/{id}: Update details of an existing user by ID.
- POST /users/updateKyc/{userId}: Update KYC details of a user by ID.
- GET /users/verify/{verificationCode}: Verify a user’s email with a verification code.
- GET /verify-email/{verificationCode}: Alternative route to verify email using a verification code.
Description
Fetches all records from the `users` table.
Route:
https://api.kiacademy.in/api/users
Response:
{
"status": 200,
"data": [ { "user_id": "1", "email": "user1@example.com", "first_name": "John", "last_name": "Doe", "role_id": "2", "user_status": "pending", "verification_code": "abcd1234", "expires_at": "2024-09-04 00:00:00", "profile_picture": "profile1.jpg", "created_at": "2024-09-01 12:00:00", "updated_at": "2024-09-01 12:00:00" }, { "user_id": "2", "email": "user2@example.com", "first_name": "Jane", "last_name": "Smith", "role_id": "3", "user_status": "active", "verification_code": null, "expires_at": null, "profile_picture": "profile2.jpg", "created_at": "2024-09-02 14:00:00", "updated_at": "2024-09-02 14:00:00" }]
}
Description
Fetches a single user record by its ID.
Route:
https://api.kiacademy.in/api/users/{id}
Parameters:
- id: The ID of the user to retrieve.
Response:
{
"status": 200,
"data": {
"user_id": "1",
"email": "user1@example.com",
"first_name": "John",
"last_name": "Doe",
"role_id": "2",
"user_status": "pending",
"verification_code": "abcd1234",
"expires_at": "2024-09-04 00:00:00",
"profile_picture": "profile1.jpg",
"created_at": "2024-09-01 12:00:00",
"updated_at": "2024-09-01 12:00:00"
}
}
Description
Inserts a new record into the `users` table. This includes handling file uploads for profile pictures and setting various user details. Sends a verification email if the user role requires it.
Route:
https://api.kiacademy.in/api/users/create
Request Body:
{
"email": "newuser@example.com",
"password": "password123",
"first_name": "New",
"last_name": "User",
"role_id": "2",
"profile_picture": "profile_picture.jpg",
"id_document_type": "passport",
"id_document_number": "A1234567",
"document_image": "document_image.jpg",
"proof_of_address": "proof_of_address.jpg",
"bio": "A short bio",
"status": "pending",
"verified_at": null
}
Response:
{ "status": 201, "message": "User Created Successfully" }
File Storage:
Profile Picture Storage Path: The user profile picture is stored in the uploads/profile_pictures/ directory on the server. The filename is stored in the database.
Verification Email:
For users with a role ID of 3, a verification email will be sent with a link to verify their email address. The link contains a unique verification code.
Description
Updates an existing user’s record by ID. This includes handling file uploads for profile pictures and ensuring old files are removed.
Route:
https://api.kiacademy.in/api/users/update/{id}
Request Body:
{
"email": "updateduser@example.com",
"first_name": "Updated",
"last_name": "User",
"profile_picture": "updated_profile_picture.jpg",
"bio": "Updated bio"
}
Response:
{ "status": 200, "message": "User Updated Successfully" }
File Storage:
Profile Picture Storage Path: The updated profile picture is stored in the uploads/profile_pictures/ directory on the server. The previous picture is deleted if a new one is uploaded.
Description
Updates the KYC details of a user by their ID. This includes handling file uploads for KYC documents.
Route:
https://api.kiacademy.in/api/users/updateKyc/{userId}
Request Body:
{
"id_document_type": "passport",
"id_document_number": "A1234567",
"document_image": "updated_document_image.jpg",
"proof_of_address": "updated_proof_of_address.jpg"
}
Response:
{ "status": 200, "message": "KYC Updated Successfully" }
File Storage:
Document Storage Path: KYC documents are stored in the uploads/kyc/ directory on the server. The previous documents are deleted if new ones are uploaded.
Description
Verifies a user's email address using a verification code sent via email.
Route:
https://api.kiacademy.in/api/users/verify/{verificationCode}
Parameters:
- verificationCode: The code used to verify the user's email address.
Response:
{
"status": 200,
"message": "Email Verified Successfully"
}
Description
Verifies a user's email address using a verification code. This is an alternative route for email verification.
Route:
https://api.kiacademy.in/api/verify-email/{verificationCode}
Parameters:
- verificationCode: The code used to verify the user's email address.
Response:
{
"status": 200,
"message": "Email Verified Successfully"
}
Description
Changes the password for a user. Requires the current password and the new password.
Route:
https://api.kiacademy.in/api/users/change-password
Parameters:
- user_id: The ID of the user whose password is to be changed.
- old_password: The user's current password.
- new_password: The new password.
Response:
{
"status": 200,
"message": "Password updated successfully."
}
Description
Requests a password reset for the user by sending a reset email to the provided email address.
Route:
https://api.kiacademy.in/api/users/request-password-reset
Parameters:
- email: The email address of the user requesting a password reset.
Response:
{
"status": 200,
"message": "Password reset email sent successfully."
}
Description
Resets a user's password using a reset token received via email.
Route:
https://api.kiacademy.in/api/users/reset-password/{token}
Parameters:
- token: The reset token sent to the user’s email.
- new_password: The new password for the user.
Response:
{
"status": 200,
"message": "Password reset successfully. A confirmation email has been sent."
}
Description
Fetches details of tutors associated with the user. If no ID is provided, fetches a list of all tutors.
Route:
https://api.kiacademy.in/api/users/tutors/{id}
Parameters:
- id: (Optional) The ID of the tutor to fetch. If not provided, returns all tutors.
Response:
{
"status": 200,
"data": [
{
"user_id": 1,
"email": "tutor@example.com",
"first_name": "Jane",
"last_name": "Smith",
"role_id": 2
}
]
}
Authentication API
- POST /auth/login: Authenticate a user and start a session.
- POST /auth/logout: End the user session and log out.
Description
Authenticates a user by email and password. If successful, starts a session and stores login details.
Route:
https://api.kiacademy.in/api/auth/login
Request Body:
{
"email": "user@example.com",
"password": "password123"
}
Response:
{
"status": 200,
"message": "Login successful",
"data": {
"user_id": "1",
"email": "user@example.com"
}
}
{
"status": 400,
"message": "Email and password are required"
}
{
"status": 401,
"message": "Invalid password"
}
Description
Ends the current user session and logs out the user.
Route:
https://api.kiacademy.in/api/auth/logout
Response:
{
"status": 200,
"message": "Logged out successfully"
}
Students API
- GET /students: Retrieve a list of all students.
- GET /students/{student_id}: Retrieve details of a specific student by ID.
- POST /students/create: Create a new student record.
- POST /students/update/{student_id}: Update details of an existing student by ID.
- DELETE /students/delete/{student_id}: Remove a student record by ID.
Description
Fetches all student records.
Route:
https://api.kiacademy.in/api/students
Response:
{
"status": 200,
"message": "List of students retrieved successfully.",
"data": [
{
"student_id": "1",
"user_id": "3",
"date_of_birth": "2024-08-05",
"bio": "I am New Student",
"student_mobile_number": "8546231079",
"student_parent_mobile": "5231064987",
"student_parent_email": "testing@gmail.com",
"address": "Hyderabad",
"enrollment_date": "2024-08-20 14:18:51",
"email": "mary.jane@example.com",
"first_name": "Mary",
"last_name": "Jane"
}
]
}
Description
Fetches a single student record by its ID.
Route:
https://api.kiacademy.in/api/students/{student_id}
Parameters:
- student_id: The ID of the student to retrieve.
Response:
{
"status": 200,
"message": "Student retrieved successfully.",
"data": {
"student_id": "1",
"user_id": "3",
"date_of_birth": "2024-08-05",
"bio": "I am New Student",
"student_mobile_number": "8546231079",
"student_parent_mobile": "5231064987",
"student_parent_email": "testing@gmail.com",
"address": "Hyderabad",
"enrollment_date": "2024-08-20 14:18:51",
"email": "mary.jane@example.com",
"first_name": "Mary",
"last_name": "Jane"
}
}
Description
Inserts a new student record.
Route:
https://api.kiacademy.in/api/students/create
Request Body:
{
"user_id": "4",
"date_of_birth": "2000-01-01",
"bio": "A new student.",
"student_mobile_number": "1234567890",
"student_parent_mobile": "0987654321",
"student_parent_email": "parent@example.com",
"address": "New City",
"enrollment_date": "2024-08-21 09:00:00"
}
Response:
{
"status": 201,
"message": "Student record created successfully.",
"data": {
"student_id": "2"
}
}
Description
Updates an existing student record by its ID.
Route:
https://api.kiacademy.in/api/students/update/{student_id}
Request Body:
{
"user_id": "4",
"date_of_birth": "2000-01-01",
"bio": "Updated bio.",
"student_mobile_number": "1234567890",
"student_parent_mobile": "0987654321",
"student_parent_email": "parent@example.com",
"address": "Updated Address",
"enrollment_date": "2024-08-21 09:00:00"
}
Response:
{
"status": 200,
"message": "Student record updated successfully.",
"data": {
"student_id": "1",
"user_id": "4",
"date_of_birth": "2000-01-01",
"bio": "Updated bio.",
"student_mobile_number": "1234567890",
"student_parent_mobile": "0987654321",
"student_parent_email": "parent@example.com",
"address": "Updated Address",
"enrollment_date": "2024-08-21 09:00:00"
}
}
Description
Deletes a student record by its ID.
Route:
https://api.kiacademy.in/api/students/delete/{student_id}
Parameters:
- student_id: The ID of the student to delete.
Response:
{
"status": 200,
"message": "Student record deleted successfully."
}
Tutors API
- GET /tutor: Retrieve a list of all tutors.
- GET /tutor/{tutor_id}: Retrieve details of a specific tutor by ID.
- GET /course-tutor/{tutor_id}: Retrieve a specific tutor along with their course creator details.
Description
Fetches all tutor records.
Route:
https://api.kiacademy.in/api/tutor
Response:
{
"status": 200,
"message": "List of tutors retrieved successfully.",
"data": [
{
"user_id": "13",
"email": "ahmedamiral134iy@gmail.com",
"first_name": "Amir Ali",
"last_name": "Ahmed",
...
}
]
}
Description
Fetches a single tutor record by its ID.
Route:
https://api.kiacademy.in/api/tutor/{tutor_id}
Parameters:
- tutor_id: The ID of the tutor to retrieve.
Response:
{
"status": 200,
"message": "Tutor retrieved successfully.",
"data": {
"user_id": null,
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
...
}
}
Description
Fetches a tutor along with their course creator details by tutor ID.
Route:
https://api.kiacademy.in/api/course-tutor/{tutor_id}
Parameters:
- tutor_id: The ID of the tutor to retrieve.
Response:
{
"status": 200,
"message": "Tutor retrieved successfully.",
"data": {
"first_name": "John",
"last_name": "Doe",
"profile_picture": "john_profile.jpg",
...
}
}
Enrollments API
- GET /enrollments: Retrieve a list of all enrollments.
- GET /enrollments/{id}: Retrieve details of a specific enrollment by ID.
- GET /enrollments/student/{student_id}: Retrieve enrollments for a specific student.
- GET /enrollments/instructor/{instructor_id}: Retrieve enrollments for a specific instructor.
- GET /enrollments/course/{course_id}: Retrieve enrollments for a specific course.
- POST /enrollment/enroll: Create a new enrollment.
Description
Fetches all records from the `enrollments` table.
Route:
https://api.kiacademy.in/api/enrollments
Response:
[
{
"id": 1,
"user_id": 1,
"course_id": 1
}
]
Description
Fetches a single enrollment record by its ID.
Route:
https://api.kiacademy.in/api/enrollments/{id}
Parameters:
- id: The ID of the enrollment to retrieve.
Response:
{
"id": 1,
"user_id": 1,
"course_id": 1
}
Description
Fetches all enrollment records for a specific student by their ID.
Route:
https://api.kiacademy.in/api/enrollments/student/{student_id}
Parameters:
- student_id: The ID of the student to retrieve enrollments for.
Response:
[
{
"id": 1,
"user_id": 1,
"course_id": 1
}
]
Description
Fetches all enrollment records for a specific instructor by their ID.
Route:
https://api.kiacademy.in/api/enrollments/instructor/{instructor_id}
Parameters:
- instructor_id: The ID of the instructor to retrieve enrollments for.
Response:
[
{
"id": 1,
"user_id": 1,
"course_id": 1
}
]
Description
Fetches all enrollment records for a specific course by its ID.
Route:
https://api.kiacademy.in/api/enrollments/course/{course_id}
Parameters:
- course_id: The ID of the course to retrieve enrollments for.
Response:
[
{
"id": 1,
"user_id": 1,
"course_id": 1
}
]
Description
Inserts a new record into the `enrollments` table.
Route:
https://api.kiacademy.in/api/enrollment/enroll
Request Body:
{
"user_id": 1,
"course_id": 1,
"payment_id": 2
}
Response:
{
"user_id": 1,
"course_id": 1,
}
Payment API
- POST /payment: Initiate a payment.
- GET /payment/{id}: Get the status of a specific payment.
- POST /payment/refund: Request a refund for a payment.
Description
Initiates a payment transaction.
Route:
https://api.kiacademy.in/api/payment
Request Body:
{
"amount": 100,
"currency": "USD",
"description": "Payment for course"
}
Response:
{
"payment_id": "abc123",
"status": "pending"
}
Description
Fetches the status of a payment by its ID.
Route:
https://api.kiacademy.in/api/payment/{id}
Parameters:
- id: The ID of the payment to retrieve.
Response:
{
"payment_id": "abc123",
"status": "completed"
}
Description
Requests a refund for a specified payment.
Route:
https://api.kiacademy.in/api/payment/refund
Request Body:
{
"payment_id": "abc123",
"amount": 100
}
Response:
{
"status": "refunded",
"amount": 100
}
Cart API
- GET /cart/view/{user_id}: Retrieve the current user's cart.
- POST /cart/add: Add an item to the cart.
- DELETE /cart/remove/{user_id}/{corse_id}: Remove an item from the cart.
Description
Fetches all items in the current user's cart.
Route:
https://api.kiacademy.in/api/cart/view/{user_id}
Response:
[
{
"cart_id": "1",
"course_id": "2",
"course_title": "Advanced Web Development",
"currency": "INR",
"date_added": "2024-10-07 11:10:16",
"display_price": "1899.00"
}
]
Description
Adds a new item to the current user's cart.
Route:
https://api.kiacademy.in/api/cart/add
Request Body:
{
"course_id": 1,
"user_id": 2
}
Response:
{
"status": 201,
"message": "Item added to cart successfully."
}
Description
Removes an item from the cart by its ID.
Route:
https://api.kiacademy.in/api/cart/remove/{user_id}/{course_id}
Parameters:
- cart_id: The ID of the cart item to remove.
Response:
{
"status": "200",
"message": "Item deleted successfully"
}
Wishlist API
- GET /wishlist/view/{user_id}: Retrieve the current user's wishlist.
- POST /wishlist/add: Add an item to the wishlist.
- PUT /wishlist/{id}: Update an item in the wishlist.
- DELETE /wishlist/{id}: Remove an item from the wishlist.
Description
Fetches all items in the current user's wishlist.
Route:
https://api.kiacademy.in/api/wishlist/view/{user_id}
Response:
[
{
"wishlist_id": "1",
"course_id": "5",
"course_title": "Beginner Python Programming",
"currency": "USD",
"date_added": "2024-10-07 11:20:12",
"display_price": "49.99"
}
]
Description
Adds a new item to the current user's wishlist.
Route:
https://api.kiacademy.in/api/wishlist/add
Request Body:
{
"course_id": 5,
"user_id": 2
}
Response:
{
"status": 201,
"message": "Item added to wishlist successfully."
}
Description
Updates the details of a specific item in the wishlist.
Route:
https://api.kiacademy.in/api/wishlist/{id}
Parameters:
- id: The ID of the wishlist item to update.
Request Body:
{
"course_id": 5
}
Response:
{
"id": 1,
"course_id": 5,
"updated": true
}
Description
Removes an item from the wishlist by its ID.
Route:
https://api.kiacademy.in/api/wishlist/{wishlist_id}
Parameters:
- wishlist_id: The ID of the wishlist item to remove.
Response:
{
"status": "200",
"message": "Wishlist item deleted successfully"
}
Notifications API
- GET /notifications: Retrieve all notifications.
- GET /notifications/{id}: Retrieve a specific notification by ID.
- POST /notifications/create: Create a new notification.
- POST /notifications/update/{id}: Update an existing notification.
- DELETE /notifications/delete/{id}: Delete a notification.
Description
Fetches all notifications for the current user.
Route:
https://api.kiacademy.in/api/notifications
Response:
[
{
"id": "1",
"sender_id": "2",
"receiver_id": "3",
"role_id": "1",
"message": "Your assignment has been graded.",
"is_read": false,
"created_at": "2024-10-14 10:00:00"
}
]
Description
Fetches a specific notification by its ID.
Route:
https://api.kiacademy.in/api/notifications/{id}
Response:
{
"id": "1",
"sender_id": "2",
"receiver_id": "3",
"role_id": "1",
"message": "Your assignment has been graded.",
"is_read": false,
"created_at": "2024-10-14 10:00:00"
}
Description
Creates a new notification for the user.
Route:
https://api.kiacademy.in/api/notifications/create
Request Body:
{
"sender_id": 2,
"receiver_id": 3,
"role_id": 1,
"message": "New course available.",
"is_read": false
}
Response:
{
"status": 201,
"message": "Notification created successfully."
}
Description
Updates the details of a specific notification.
Route:
https://api.kiacademy.in/api/notifications/update/{id}
Parameters:
- id: The ID of the notification to update.
Request Body:
{
"message": "Updated course notification.",
"is_read": true
}
Response:
{
"status": 200,
"message": "Notification updated successfully."
}
Description
Deletes a notification by its ID.
Route:
https://api.kiacademy.in/api/notifications/delete/{id}
Parameters:
- id: The ID of the notification to delete.
Response:
{
"status": 200,
"message": "Notification deleted successfully."
}
Institutions API
- GET /institutions: Retrieve all institutions.
- GET /institutions/{id}: Retrieve a specific institution by ID.
- POST /institutions/create: Create a new institution.
- POST /institutions/update/{id}: Update an existing institution.
- DELETE /institutions/delete/{id}: Delete an institution.
Description
Fetches all institutions with their details.
Route:
https://api.kiacademy.in/api/institutions
Response:
[
{
"id": "1",
"name": "ABC University",
"address": "123 Main St, City, Country",
"contact_number": "+1234567890",
"email": "contact@abcuniversity.com",
"registration_number": "REG12345",
"tin_number": "TIN987654",
"supporting_document": "document.pdf",
"profile_image": "profile.jpg",
"course_count": 10,
"student_count": 500,
"faculty_count": 50,
"feedback_score": 4.8,
"created_at": "2024-10-15 09:00:00",
"updated_at": "2024-10-15 09:30:00"
}
]
Description
Fetches a specific institution by its ID.
Route:
https://api.kiacademy.in/api/institutions/{id}
Response:
{
"id": "1",
"name": "ABC University",
"address": "123 Main St, City, Country",
"contact_number": "+1234567890",
"email": "contact@abcuniversity.com",
"registration_number": "REG12345",
"tin_number": "TIN987654",
"supporting_document": "document.pdf",
"profile_image": "profile.jpg",
"course_count": 10,
"student_count": 500,
"faculty_count": 50,
"feedback_score": 4.8,
"created_at": "2024-10-15 09:00:00",
"updated_at": "2024-10-15 09:30:00"
}
Description
Creates a new institution with the provided details.
Route:
https://api.kiacademy.in/api/institutions/create
Request Body:
{
"name": "ABC University",
"address": "123 Main St, City, Country",
"contact_number": "+1234567890",
"email": "contact@abcuniversity.com",
"registration_number": "REG12345",
"tin_number": "TIN987654",
"supporting_document": "document.pdf",
"profile_image": "profile.jpg"
}
Response:
{
"status": 201,
"message": "Institution created successfully."
}
Description
Updates the details of a specific institution.
Route:
https://api.kiacademy.in/api/institutions/update/{id}
Parameters:
- id: The ID of the institution to update.
Request Body:
{
"name": "Updated University Name",
"address": "Updated Address",
"contact_number": "+9876543210",
"email": "updated@university.com"
}
Response:
{
"status": 200,
"message": "Institution updated successfully."
}
Description
Deletes a specific institution by its ID.
Route:
https://api.kiacademy.in/api/institutions/delete/{id}
Response:
{
"status": 200,
"message": "Institution deleted successfully."
}