CRM-Service

CRM Service API Documentation

Complete API reference for the CRM Service with 67+ endpoints across 10 feature phases.

Base URL

http://localhost:8080/api/v1

Authentication

All endpoints require API Key authentication via header:

X-API-Key: your-api-key-here

Some endpoints also require role-based access control (RBAC).


📚 Core Entities

Teachers

Courses

Students

Groups


📅 Scheduling & Attendance

Timetables

Attendance


📊 Grades & Exams

Grades

Exams


💰 Financial Management

Payments

Invoices


🔔 Notifications

Notifications

Notification Templates


📄 Document Management

Documents


💬 Communication Hub

Messages


📈 Analytics & Reporting

Analytics


📅 Calendar & Events

Events


🎓 Enrollment & Admission

Applications


🏠 Student & Teacher Portals

Portals


👤 User Management

Users

Sessions


🔍 Audit Logs

Audit


Example Requests

Create a Student

curl -X POST http://localhost:8080/api/v1/students \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John Doe",
    "email": "john@example.com",
    "phone": "+1234567890"
  }'

Submit Exam Result

curl -X POST http://localhost:8080/api/v1/exams/{examID}/results \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "student_id": "uuid-here",
    "marks_obtained": 85,
    "total_marks": 100,
    "remarks": "Excellent performance"
  }'

Get Student Dashboard

curl -X GET http://localhost:8080/api/v1/portal/student/{studentID} \
  -H "X-API-Key: your-api-key"

Error Responses

All endpoints return standard error responses:

{
  "success": false,
  "message": "Error description",
  "data": null
}

HTTP Status Codes


Rate Limiting

Currently no rate limiting is implemented. Consider adding in production.

Pagination

List endpoints support pagination via query parameters:

Response format:

{
  "data": [...],
  "total": 100,
  "page": 1,
  "page_size": 10,
  "total_pages": 10
}