Bỏ qua tới nội dung

ERP

Công việc, dự án, lịch, ghi chú, chấm công, nghỉ phép, thông báo. · 49 endpoint

Dự án

GET/api/v1/erp/projectsScope: erp:read

Kênh: erp:project:list

Tham số

archived
query · tuỳ chọn
boolean
default false

Lệnh mẫu

bash
curl "http://127.0.0.1:9900/api/v1/erp/projects" \
  -H "Authorization: Bearer dpk_xxx"

Tạo dự án

POST/api/v1/erp/projectsScope: erp:write

Kênh: erp:project:create

Body (JSON)

name
bắt buộc
string
max 200
description
tuỳ chọn
string
max 5000
color
tuỳ chọn
string
max 20
department_id
tuỳ chọn
any

Lệnh mẫu

bash
curl -X POST "http://127.0.0.1:9900/api/v1/erp/projects" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","description":"string","color":"string"}'

Sửa dự án

PATCH/api/v1/erp/projects/{id}Scope: erp:write

Kênh: erp:project:update

Tham số

id
path · bắt buộc
string
max 200

Lệnh mẫu

bash
curl -X PATCH "http://127.0.0.1:9900/api/v1/erp/projects/{id}" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{}'

Xoá dự án

DELETE/api/v1/erp/projects/{id}Scope: erp:write

Kênh: erp:project:delete

Tham số

id
path · bắt buộc
string
max 200

Lệnh mẫu

bash
curl -X DELETE "http://127.0.0.1:9900/api/v1/erp/projects/{id}" \
  -H "Authorization: Bearer dpk_xxx"

Công việc (lọc theo dự án, trạng thái, người làm...)

GET/api/v1/erp/tasksScope: erp:read

Query được chuyển nguyên cho bộ lọc của trang Công việc (vd: project_id, status, assignee_id, search).

Kênh: erp:task:list

Lệnh mẫu

bash
curl "http://127.0.0.1:9900/api/v1/erp/tasks" \
  -H "Authorization: Bearer dpk_xxx"

Tạo công việc

POST/api/v1/erp/tasksScope: erp:write

Kênh: erp:task:create

Body (JSON)

title
bắt buộc
string
max 500

Lệnh mẫu

bash
curl -X POST "http://127.0.0.1:9900/api/v1/erp/tasks" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"title":"Gọi lại khách DH2291","project_id":"p1","priority":"high","status":"todo","due_date":1760000000000,"assignees":["emp-001"]}'

Hộp việc của tôi

GET/api/v1/erp/tasks/inboxScope: erp:read

Kênh: erp:task:listMyInbox

Tham số

filter
query · tuỳ chọn
"today" | "week" | "overdue" | "all"
default "week"

Lệnh mẫu

bash
curl "http://127.0.0.1:9900/api/v1/erp/tasks/inbox" \
  -H "Authorization: Bearer dpk_xxx"

Chi tiết công việc

GET/api/v1/erp/tasks/{id}Scope: erp:read

Kênh: erp:task:get

Tham số

id
path · bắt buộc
string
max 200

Lệnh mẫu

bash
curl "http://127.0.0.1:9900/api/v1/erp/tasks/{id}" \
  -H "Authorization: Bearer dpk_xxx"

Sửa công việc

PATCH/api/v1/erp/tasks/{id}Scope: erp:write

Kênh: erp:task:update

Tham số

id
path · bắt buộc
string
max 200

Lệnh mẫu

bash
curl -X PATCH "http://127.0.0.1:9900/api/v1/erp/tasks/{id}" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{}'

Xoá công việc

DELETE/api/v1/erp/tasks/{id}Scope: erp:write

Kênh: erp:task:delete

Tham số

id
path · bắt buộc
string
max 200

Lệnh mẫu

bash
curl -X DELETE "http://127.0.0.1:9900/api/v1/erp/tasks/{id}" \
  -H "Authorization: Bearer dpk_xxx"

Đổi trạng thái công việc

POST/api/v1/erp/tasks/{id}/statusScope: erp:write

Kênh: erp:task:updateStatus

Tham số

id
path · bắt buộc
string
max 200

Body (JSON)

status
bắt buộc
string
max 30

Lệnh mẫu

bash
curl -X POST "http://127.0.0.1:9900/api/v1/erp/tasks/{id}/status" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"status":"string"}'

Giao việc cho nhân viên

POST/api/v1/erp/tasks/{id}/assignScope: erp:write

Kênh: erp:task:assign

Tham số

id
path · bắt buộc
string
max 200

Body (JSON)

employee_ids
bắt buộc
string[]
max 100 items

Lệnh mẫu

bash
curl -X POST "http://127.0.0.1:9900/api/v1/erp/tasks/{id}/assign" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"employee_ids":[]}'

Thêm mục checklist

POST/api/v1/erp/tasks/{id}/checklistScope: erp:write

Kênh: erp:task:addChecklist

Tham số

id
path · bắt buộc
string
max 200

Body (JSON)

content
bắt buộc
string
max 1000

Lệnh mẫu

bash
curl -X POST "http://127.0.0.1:9900/api/v1/erp/tasks/{id}/checklist" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"content":"string"}'

Đánh dấu xong/chưa xong mục checklist

PATCH/api/v1/erp/checklist/{id}Scope: erp:write

Kênh: erp:task:toggleChecklist

Tham số

id
path · bắt buộc
integer
≥ 1

Body (JSON)

done
bắt buộc
boolean

Lệnh mẫu

bash
curl -X PATCH "http://127.0.0.1:9900/api/v1/erp/checklist/{id}" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"done":false}'

Bình luận vào công việc

POST/api/v1/erp/tasks/{id}/commentsScope: erp:write

Kênh: erp:task:addComment

Tham số

id
path · bắt buộc
string
max 200

Body (JSON)

content
bắt buộc
string
max 10000
mentions
tuỳ chọn
string[]
max 50 items · default []

Lệnh mẫu

bash
curl -X POST "http://127.0.0.1:9900/api/v1/erp/tasks/{id}/comments" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"content":"string","mentions":[]}'

Sửa bình luận

PATCH/api/v1/erp/comments/{id}Scope: erp:write

Kênh: erp:task:editComment

Tham số

id
path · bắt buộc
integer
≥ 1

Body (JSON)

content
bắt buộc
string
max 10000

Lệnh mẫu

bash
curl -X PATCH "http://127.0.0.1:9900/api/v1/erp/comments/{id}" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"content":"string"}'

Xoá bình luận

DELETE/api/v1/erp/comments/{id}Scope: erp:write

Kênh: erp:task:deleteComment

Tham số

id
path · bắt buộc
integer
≥ 1

Lệnh mẫu

bash
curl -X DELETE "http://127.0.0.1:9900/api/v1/erp/comments/{id}" \
  -H "Authorization: Bearer dpk_xxx"

Theo dõi công việc

POST/api/v1/erp/tasks/{id}/watchersScope: erp:write

Kênh: erp:task:addWatcher

Tham số

id
path · bắt buộc
string
max 200

Body (JSON)

employee_id
tuỳ chọn
string
max 200

Lệnh mẫu

bash
curl -X POST "http://127.0.0.1:9900/api/v1/erp/tasks/{id}/watchers" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"employee_id":"string"}'

Bỏ theo dõi

DELETE/api/v1/erp/tasks/{id}/watchers/{employeeId}Scope: erp:write

Kênh: erp:task:removeWatcher

Tham số

id
path · bắt buộc
string
max 200
employeeId
path · bắt buộc
string
max 200

Lệnh mẫu

bash
curl -X DELETE "http://127.0.0.1:9900/api/v1/erp/tasks/{id}/watchers/{employeeId}" \
  -H "Authorization: Bearer dpk_xxx"

Thêm phụ thuộc

POST/api/v1/erp/tasks/{id}/dependenciesScope: erp:write

Kênh: erp:task:addDependency

Tham số

id
path · bắt buộc
string
max 200

Body (JSON)

depends_on_id
bắt buộc
string
max 200

Lệnh mẫu

bash
curl -X POST "http://127.0.0.1:9900/api/v1/erp/tasks/{id}/dependencies" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"depends_on_id":"string"}'

Bỏ phụ thuộc

DELETE/api/v1/erp/tasks/{id}/dependencies/{dependsOnId}Scope: erp:write

Kênh: erp:task:removeDependency

Tham số

id
path · bắt buộc
string
max 200
dependsOnId
path · bắt buộc
string
max 200

Lệnh mẫu

bash
curl -X DELETE "http://127.0.0.1:9900/api/v1/erp/tasks/{id}/dependencies/{dependsOnId}" \
  -H "Authorization: Bearer dpk_xxx"

Sự kiện lịch trong khoảng thời gian

GET/api/v1/erp/calendar/eventsScope: erp:read

Kênh: erp:calendar:listEvents

Tham số

from
query · bắt buộc
integer
≥ 0
to
query · bắt buộc
integer
≥ 0
limit
query · tuỳ chọn
integer
≥ 1 · ≤ 1000
offset
query · tuỳ chọn
integer
≥ 0

Lệnh mẫu

bash
curl "http://127.0.0.1:9900/api/v1/erp/calendar/events" \
  -H "Authorization: Bearer dpk_xxx"

Tạo sự kiện lịch

POST/api/v1/erp/calendar/eventsScope: erp:write

Kênh: erp:calendar:createEvent

Body (JSON)

title
bắt buộc
string
max 300
start_at
bắt buộc
integer
≥ 0

Lệnh mẫu

bash
curl -X POST "http://127.0.0.1:9900/api/v1/erp/calendar/events" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"title":"Hẹn khách xem nhà","start_at":1760000000000,"end_at":1760003600000,"attendees":["emp-001"]}'

Sửa sự kiện

PATCH/api/v1/erp/calendar/events/{id}Scope: erp:write

Kênh: erp:calendar:updateEvent

Tham số

id
path · bắt buộc
string
max 200

Lệnh mẫu

bash
curl -X PATCH "http://127.0.0.1:9900/api/v1/erp/calendar/events/{id}" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{}'

Xoá sự kiện

DELETE/api/v1/erp/calendar/events/{id}Scope: erp:write

Kênh: erp:calendar:deleteEvent

Tham số

id
path · bắt buộc
string
max 200

Lệnh mẫu

bash
curl -X DELETE "http://127.0.0.1:9900/api/v1/erp/calendar/events/{id}" \
  -H "Authorization: Bearer dpk_xxx"

Trả lời lời mời (accepted/declined/tentative)

POST/api/v1/erp/calendar/events/{id}/respondScope: erp:write

Kênh: erp:calendar:respond

Tham số

id
path · bắt buộc
string
max 200

Body (JSON)

status
bắt buộc
string
max 20

Lệnh mẫu

bash
curl -X POST "http://127.0.0.1:9900/api/v1/erp/calendar/events/{id}/respond" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"status":"string"}'

Ghi chú

GET/api/v1/erp/notesScope: erp:read

Kênh: erp:note:list

Lệnh mẫu

bash
curl "http://127.0.0.1:9900/api/v1/erp/notes" \
  -H "Authorization: Bearer dpk_xxx"

Tạo ghi chú

POST/api/v1/erp/notesScope: erp:write

Kênh: erp:note:create

Body (JSON)

title
tuỳ chọn
string
max 500

Lệnh mẫu

bash
curl -X POST "http://127.0.0.1:9900/api/v1/erp/notes" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"title":"string"}'

Một ghi chú

GET/api/v1/erp/notes/{id}Scope: erp:read

Kênh: erp:note:get

Tham số

id
path · bắt buộc
string
max 200

Lệnh mẫu

bash
curl "http://127.0.0.1:9900/api/v1/erp/notes/{id}" \
  -H "Authorization: Bearer dpk_xxx"

Sửa ghi chú

PATCH/api/v1/erp/notes/{id}Scope: erp:write

Kênh: erp:note:update

Tham số

id
path · bắt buộc
string
max 200

Lệnh mẫu

bash
curl -X PATCH "http://127.0.0.1:9900/api/v1/erp/notes/{id}" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{}'

Xoá ghi chú

DELETE/api/v1/erp/notes/{id}Scope: erp:write

Kênh: erp:note:delete

Tham số

id
path · bắt buộc
string
max 200

Lệnh mẫu

bash
curl -X DELETE "http://127.0.0.1:9900/api/v1/erp/notes/{id}" \
  -H "Authorization: Bearer dpk_xxx"

Ghim / bỏ ghim ghi chú

POST/api/v1/erp/notes/{id}/pinScope: erp:write

Kênh: erp:note:pin

Tham số

id
path · bắt buộc
string
max 200

Body (JSON)

pinned
bắt buộc
boolean

Lệnh mẫu

bash
curl -X POST "http://127.0.0.1:9900/api/v1/erp/notes/{id}/pin" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"pinned":false}'

Lịch sử phiên bản ghi chú

GET/api/v1/erp/notes/{id}/versionsScope: erp:read

Kênh: erp:note:versions

Tham số

id
path · bắt buộc
string
max 200

Lệnh mẫu

bash
curl "http://127.0.0.1:9900/api/v1/erp/notes/{id}/versions" \
  -H "Authorization: Bearer dpk_xxx"

Thư mục ghi chú

GET/api/v1/erp/note-foldersScope: erp:read

Kênh: erp:note:listFolders

Lệnh mẫu

bash
curl "http://127.0.0.1:9900/api/v1/erp/note-folders" \
  -H "Authorization: Bearer dpk_xxx"

Tag ghi chú

GET/api/v1/erp/note-tagsScope: erp:read

Kênh: erp:note:listTags

Lệnh mẫu

bash
curl "http://127.0.0.1:9900/api/v1/erp/note-tags" \
  -H "Authorization: Bearer dpk_xxx"

Thông báo ERP

GET/api/v1/erp/notificationsScope: erp:read

Kênh: erp:notify:listInbox

Lệnh mẫu

bash
curl "http://127.0.0.1:9900/api/v1/erp/notifications" \
  -H "Authorization: Bearer dpk_xxx"

Số thông báo chưa đọc

GET/api/v1/erp/notifications/unread-countScope: erp:read

Kênh: erp:notify:unreadCount

Lệnh mẫu

bash
curl "http://127.0.0.1:9900/api/v1/erp/notifications/unread-count" \
  -H "Authorization: Bearer dpk_xxx"

Đánh dấu đã đọc

POST/api/v1/erp/notifications/readScope: erp:write

Kênh: erp:notify:markRead

Body (JSON)

ids
bắt buộc
integer[]
max 1000 items

Lệnh mẫu

bash
curl -X POST "http://127.0.0.1:9900/api/v1/erp/notifications/read" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"ids":[]}'

Đánh dấu tất cả đã đọc

POST/api/v1/erp/notifications/read-allScope: erp:write

Kênh: erp:notify:markAllRead

Lệnh mẫu

bash
curl -X POST "http://127.0.0.1:9900/api/v1/erp/notifications/read-all" \
  -H "Authorization: Bearer dpk_xxx"

Phòng ban

GET/api/v1/erp/departmentsScope: erp:read

Kênh: erp:department:list

Lệnh mẫu

bash
curl "http://127.0.0.1:9900/api/v1/erp/departments" \
  -H "Authorization: Bearer dpk_xxx"

Tạo phòng ban

POST/api/v1/erp/departmentsScope: erp:write

Kênh: erp:department:create

Body (JSON)

name
bắt buộc
string
max 200

Lệnh mẫu

bash
curl -X POST "http://127.0.0.1:9900/api/v1/erp/departments" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"name":"string"}'

Sửa phòng ban

PATCH/api/v1/erp/departments/{id}Scope: erp:write

Kênh: erp:department:update

Tham số

id
path · bắt buộc
integer
≥ 1

Lệnh mẫu

bash
curl -X PATCH "http://127.0.0.1:9900/api/v1/erp/departments/{id}" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{}'

Xoá phòng ban

DELETE/api/v1/erp/departments/{id}Scope: erp:write

Kênh: erp:department:delete

Tham số

id
path · bắt buộc
integer
≥ 1

Lệnh mẫu

bash
curl -X DELETE "http://127.0.0.1:9900/api/v1/erp/departments/{id}" \
  -H "Authorization: Bearer dpk_xxx"

Chức vụ

GET/api/v1/erp/positionsScope: erp:read

Kênh: erp:position:list

Lệnh mẫu

bash
curl "http://127.0.0.1:9900/api/v1/erp/positions" \
  -H "Authorization: Bearer dpk_xxx"

Hồ sơ nhân sự (theo phòng ban)

GET/api/v1/erp/profilesScope: erp:read

Kênh: erp:employee:listByDepartment

Tham số

department_id
query · tuỳ chọn
integer

Lệnh mẫu

bash
curl "http://127.0.0.1:9900/api/v1/erp/profiles" \
  -H "Authorization: Bearer dpk_xxx"

Hồ sơ một nhân sự

GET/api/v1/erp/profiles/{employeeId}Scope: erp:read

Kênh: erp:employee:getProfile

Tham số

employeeId
path · bắt buộc
string
max 200

Lệnh mẫu

bash
curl "http://127.0.0.1:9900/api/v1/erp/profiles/{employeeId}" \
  -H "Authorization: Bearer dpk_xxx"

Bảng chấm công

GET/api/v1/erp/attendanceScope: erp:read

Kênh: erp:attendance:list

Lệnh mẫu

bash
curl "http://127.0.0.1:9900/api/v1/erp/attendance" \
  -H "Authorization: Bearer dpk_xxx"

Đơn nghỉ phép chờ duyệt

GET/api/v1/erp/leaves/pendingScope: erp:read

Kênh: erp:leave:listPending

Lệnh mẫu

bash
curl "http://127.0.0.1:9900/api/v1/erp/leaves/pending" \
  -H "Authorization: Bearer dpk_xxx"

Duyệt / từ chối đơn nghỉ

POST/api/v1/erp/leaves/{id}/decideScope: erp:write

Kênh: erp:leave:decide

Tham số

id
path · bắt buộc
integer
≥ 1

Body (JSON)

status
bắt buộc
"approved" | "rejected"
note
tuỳ chọn
string
max 1000

Lệnh mẫu

bash
curl -X POST "http://127.0.0.1:9900/api/v1/erp/leaves/{id}/decide" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"status":"approved","note":"string"}'