WebAPI (v1)

Download OpenAPI specification:

Auth

Thực hiện đăng nhập bằng Tên người dùng và Mật khẩu.

Sau khi đăng nhập thành công, Refresh Token sẽ được gắn vào Cookie (HttpOnly) và Access Token được trả về trong body response.

Authorizations:
Bearer
Request Body schema:

Thông tin đăng nhập từ người dùng.

username
required
string
password
required
string

Responses

Request samples

Content type
{
  • "username": "string",
  • "password": "string"
}

Lấy Access Token mới bằng Refresh Token đã lưu trong Cookie.

API này sẽ tự động đọc 'refreshToken' từ Cookie. Nếu Refresh Token hết hạn hoặc không hợp lệ, người dùng cần phải đăng nhập lại.

Authorizations:
Bearer

Responses

Class

Lấy danh sách Lớp học (Classes) theo phân trang và bộ lọc.

Authorizations:
Bearer
query Parameters
soTrang
required
integer <int32>
Default: 1

Số trang muốn lấy (mặc định 1).

soBanGhi
required
integer <int32>
Default: 10

Số lượng bản ghi trên mỗi trang (mặc định 10).

maTrangThai
integer <int32>
Default: 2

Mã Trạng thái Lớp (mặc định 2: Đang hoạt động).

maKhoaHoc
integer <int32>
Default: 0

Mã Khóa học

Responses

Response samples

Content type
application/json
{
  • "contentType": "string",
  • "serializerSettings": null,
  • "statusCode": 0,
  • "value": null
}

Tạo mới hoặc Cập nhật thông tin Lớp học.

Authorizations:
Bearer
Request Body schema:
required

Thông tin chi tiết Lớp học cần tạo hoặc cập nhật.

maLopHoc
integer <int32>

Mã định danh duy nhất của Lớp học.

tenLopHoc
required
string

Tên đầy đủ của Lớp học.

maKhoaHoc
required
integer <int32>

Mã Khóa học mà Lớp học này thuộc về.

tongSoHocVienMax
required
integer <int32>

Tổng số học viên tối đa cho phép trong lớp.

ngayBatDau
required
string <date>

Ngày Lớp học chính thức bắt đầu.

ngayKetThuc
required
string <date>

Ngày Lớp học chính thức kết thúc.

maLoaiLopHoc
required
integer <int32>

Loại hình Lớp học (Ví dụ: Regular, Active).

tongNgay
required
integer <int32>

Tổng số ngày học

tongGio
required
integer <int32>

Tổng số giờ học

maChiNhanhOdoo
required
string

Mã chi nhánh trên Odoo

ghiChu
string or null

Ghi chú

required
Array of objects (Schedule)

Danh sách lịch học chi tiết trong tuần của Lớp.

Responses

Request samples

Content type
{
  • "maLopHoc": 0,
  • "tenLopHoc": "string",
  • "maKhoaHoc": 0,
  • "tongSoHocVienMax": 0,
  • "ngayBatDau": "2019-08-24",
  • "ngayKetThuc": "2019-08-24",
  • "maLoaiLopHoc": 0,
  • "tongNgay": 0,
  • "tongGio": 0,
  • "maChiNhanhOdoo": "string",
  • "ghiChu": "string",
  • "lichHocs": [
    ]
}

Response samples

Content type
application/json
{
  • "contentType": "string",
  • "serializerSettings": null,
  • "statusCode": 0,
  • "value": null
}

Lấy thông tin chi tiết của một Lớp học (Class) theo Mã Lớp học.

Authorizations:
Bearer
path Parameters
id
required
integer <int32>

Mã Lớp học (MaLopHoc) cần tìm.

Responses

Response samples

Content type
application/json
{
  • "contentType": "string",
  • "serializerSettings": null,
  • "statusCode": 0,
  • "value": null
}

Lấy danh sách Học viên đang tham gia Lớp học theo Mã Lớp học.

Authorizations:
Bearer
path Parameters
id
required
integer <int32>

Mã Lớp học cần truy vấn danh sách học viên.

Responses

Cập nhật Trạng thái của Lớp học (ví dụ: chuyển từ 'Đang chờ' sang 'Đang hoạt động').

Authorizations:
Bearer
path Parameters
id
required
integer <int32>

Mã lớp học Ebm

Request Body schema:
required

Mã trạng thái Lớp học

maTrangThai
required
integer <int32>

Tên trạng thái của Lớp học trong Ebm.

Responses

Request samples

Content type
{
  • "maTrangThai": 0
}

Response samples

Content type
application/json
{
  • "contentType": "string",
  • "serializerSettings": null,
  • "statusCode": 0,
  • "value": null
}

Gán (Assign) một danh sách các Học viên (đã được đồng bộ từ Odoo) vào một Lớp học cụ thể trong hệ thống EBM.

API này cho phép gán nhiều học viên cùng lúc vào Lớp học được chỉ định bởi ID trong đường dẫn (Path Parameter). Body Request là một mảng chứa thông tin chi tiết của từng học viên (Student_Odoo_Request) cần gán. Yêu cầu xác thực JWT ({[Authorize]}) để đảm bảo quyền truy cập.

Authorizations:
Bearer
path Parameters
id
required
integer <int32>

Mã định danh duy nhất (ID) của Lớp học (Class) trong hệ thống EBM. Trường này được lấy từ URL Path Parameter (ví dụ: {/classes/123/assignStudent}).

Request Body schema:
required

Danh sách mô hình chứa thông tin chi tiết của Học viên cần gán (Student_Odoo_Request). Dữ liệu này là bắt buộc ({[Required]}).

Array
student_id
required
integer <int32>

Mã định danh duy nhất của Học viên (Student ID) trong Odoo. Đây là trường khóa chính được sử dụng để định danh Học viên trong các nghiệp vụ liên quan.

Responses

Request samples

Content type
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "contentType": "string",
  • "serializerSettings": null,
  • "statusCode": 0,
  • "value": null
}

Xóa (hoặc Hủy gán) danh sách học viên khỏi một Lớp học cụ thể.

Hành động này thường được sử dụng khi học viên rút khỏi lớp, chuyển lớp, hoặc bị hủy đăng ký. Quá trình này sẽ cập nhật trạng thái của học viên trong Lớp học EBM.

Authorizations:
Bearer
path Parameters
id
required
integer <int32>

Mã Lớp học (MaLopHoc) tại EBM cần xóa học viên khỏi.

Request Body schema:
required

Danh sách các Học viên từ Odoo cần xóa khỏi lớp.

Array
student_id
required
integer <int32>

Mã định danh duy nhất của Học viên (Student ID) trong Odoo. Đây là trường khóa chính được sử dụng để định danh Học viên trong các nghiệp vụ liên quan.

Responses

Request samples

Content type
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "contentType": "string",
  • "serializerSettings": null,
  • "statusCode": 0,
  • "value": null
}

Gán một Giáo viên vào Lớp học với vai trò cụ thể (Giáo viên chính hoặc Trợ giảng).

Endpoint này dùng để thiết lập hoặc thay đổi vai trò của Giáo viên trong Lớp.

Authorizations:
Bearer
path Parameters
id
required
integer <int32>

Mã Lớp học (MaLopHoc) cần gán Giáo viên.

Request Body schema:

Thông tin Giáo viên (ID) cần gán.

maGiaoVien
required
integer <int32>

Mã định danh cho duy nhất của Giáo viên (Teacher ID) trong Ebm.

tuNgay
required
string <date-time>
denNgay
required
string <date-time>

Responses

Request samples

Content type
{
  • "maGiaoVien": 0,
  • "tuNgay": "2019-08-24T14:15:22Z",
  • "denNgay": "2019-08-24T14:15:22Z"
}

Hủy gán (Xóa) một Giáo viên khỏi Lớp học.

Hành động này sẽ loại bỏ mối liên kết giữa Giáo viên và Lớp học cho vai trò cụ thể đó.

Authorizations:
Bearer
path Parameters
id
required
integer <int32>

Mã Lớp học (MaLopHoc) cần hủy gán Giáo viên.

query Parameters
maGiaoVien
required
integer <int32>

Thông tin Giáo viên (ID)cần hủy gán.

Responses

Course

Lấy danh sách Nhóm Khóa học (Group courses) theo phân trang.

Authorizations:
Bearer
query Parameters
soTrang
required
integer <int32>
Default: 1

Số trang muốn lấy (mặc định 1).

soBanGhi
required
integer <int32>
Default: 10

Số lượng bản ghi trên mỗi trang (mặc định 10).

Responses

Response samples

Content type
application/json
{
  • "contentType": "string",
  • "serializerSettings": null,
  • "statusCode": 0,
  • "value": null
}

Lấy danh sách Khóa học (Courses) theo phân trang.

Authorizations:
Bearer
query Parameters
soTrang
required
integer <int32>
Default: 1

Số trang muốn lấy (mặc định 1).

soBanGhi
required
integer <int32>
Default: 10

Số lượng bản ghi trên mỗi trang (mặc định 10).

maNhomKhoaHoc
integer <int32>
Default: 0

Responses

Response samples

Content type
application/json
{
  • "contentType": "string",
  • "serializerSettings": null,
  • "statusCode": 0,
  • "value": null
}

Lấy thông tin chi tiết của một Khóa học theo Mã Khóa học.

Authorizations:
Bearer
path Parameters
id
required
integer <int32>

Mã Khóa học cần tìm.

Responses

Response samples

Content type
application/json
{
  • "contentType": "string",
  • "serializerSettings": null,
  • "statusCode": 0,
  • "value": null
}

Lấy danh sách Bài học (Lessons) thuộc về một Khóa học cụ thể.

Authorizations:
Bearer
path Parameters
id
required
integer <int32>

Mã Khóa học (MaKhoaHoc) để lọc các Bài học.

Responses

Response samples

Content type
application/json
{
  • "contentType": "string",
  • "serializerSettings": null,
  • "statusCode": 0,
  • "value": null
}

Lấy danh sách tất cả Bài học (Lessons) theo phân trang.

Authorizations:
Bearer
query Parameters
soTrang
required
integer <int32>
Default: 1

Số trang muốn lấy (mặc định 1).

soBanGhi
required
integer <int32>
Default: 10

Số lượng bản ghi trên mỗi trang (mặc định 10).

Responses

Response samples

Content type
application/json
{
  • "contentType": "string",
  • "serializerSettings": null,
  • "statusCode": 0,
  • "value": null
}

Ebm

Lấy danh sách Lead/Contact(tiềm năng) theo phân trang.

Authorizations:
Bearer
query Parameters
soTrang
required
integer <int32>
Default: 1

Số trang muốn lấy (mặc định 1).

soBanGhi
required
integer <int32>
Default: 10

Số lượng bản ghi trên mỗi trang (mặc định 10).

Responses

Response samples

Content type
application/json
{
  • "contentType": "string",
  • "serializerSettings": null,
  • "statusCode": 0,
  • "value": null
}

Lấy lịch sử hành động (Action Histories) của Contact theo phân trang.

Authorizations:
Bearer
query Parameters
soTrang
required
integer <int32>
Default: 1

Số trang muốn lấy (mặc định 1).

soBanGhi
required
integer <int32>
Default: 10

Số lượng bản ghi trên mỗi trang (mặc định 10).

Responses

Response samples

Content type
application/json
{
  • "contentType": "string",
  • "serializerSettings": null,
  • "statusCode": 0,
  • "value": null
}

Lấy danh sách các Danh mục (Categories) hiện có.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "contentType": "string",
  • "serializerSettings": null,
  • "statusCode": 0,
  • "value": null
}

Teacher

Lấy danh sách Giáo viên có phân trang và tùy chọn bộ lọc.

Authorizations:
Bearer
query Parameters
soTrang
required
integer <int32>
Default: 1

Số trang muốn lấy (mặc định 1).

soBanGhi
required
integer <int32>
Default: 10

Số lượng bản ghi trên mỗi trang (mặc định 10).

maPhanLoai
integer <int32>
Default: 0

Mã phân loại giáo viên trên EBM. Danh mục mã phân loại dùng API: /api/ebm/categories.

maChiNhanh
integer <int32>
Default: 0

Mã chi nhánh EBM.

Responses

Response samples

Content type
application/json
{
  • "contentType": "string",
  • "serializerSettings": null,
  • "statusCode": 0,
  • "value": null
}

Lấy thông tin chi tiết của một Giáo viên dựa trên Mã Giáo viên (Teacher ID).

Hàm này truy vấn cơ sở dữ liệu để lấy thông tin chi tiết cá nhân và lịch sử công tác của Giáo viên.

Authorizations:
Bearer
path Parameters
id
required
integer <int32>

Mã Giáo viên (TeacherId) cần truy vấn.

Responses

Response samples

Content type
application/json
{
  • "contentType": "string",
  • "serializerSettings": null,
  • "statusCode": 0,
  • "value": null
}