Skip to content

ERP

Tasks, projects, calendar, notes, attendance, leave, notifications. · 49 endpoints

Projects

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

IPC channel: erp:project:list

Parameters

archived
query · optional
boolean
default false

Example request

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

Create a project

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

IPC channel: erp:project:create

Request body (JSON)

name
required
string
max 200
description
optional
string
max 5000
color
optional
string
max 20
department_id
optional
any

Example request

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"}'

Update a project

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

IPC channel: erp:project:update

Parameters

id
path · required
string
max 200

Example request

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 '{}'

Delete a project

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

IPC channel: erp:project:delete

Parameters

id
path · required
string
max 200

Example request

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

Tasks (filter by project, status, assignee...)

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

The query is passed as is to the filter of the Tasks page (e.g. project_id, status, assignee_id, search).

IPC channel: erp:task:list

Example request

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

Create a task

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

IPC channel: erp:task:create

Request body (JSON)

title
required
string
max 500

Example request

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"]}'

My task inbox

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

IPC channel: erp:task:listMyInbox

Parameters

filter
query · optional
"today" | "week" | "overdue" | "all"
default "week"

Example request

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

Task details

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

IPC channel: erp:task:get

Parameters

id
path · required
string
max 200

Example request

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

Update a task

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

IPC channel: erp:task:update

Parameters

id
path · required
string
max 200

Example request

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 '{}'

Delete a task

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

IPC channel: erp:task:delete

Parameters

id
path · required
string
max 200

Example request

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

Change a task's status

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

IPC channel: erp:task:updateStatus

Parameters

id
path · required
string
max 200

Request body (JSON)

status
required
string
max 30

Example request

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"}'

Assign a task to an employee

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

IPC channel: erp:task:assign

Parameters

id
path · required
string
max 200

Request body (JSON)

employee_ids
required
string[]
max 100 items

Example request

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":[]}'

Add a checklist item

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

IPC channel: erp:task:addChecklist

Parameters

id
path · required
string
max 200

Request body (JSON)

content
required
string
max 1000

Example request

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"}'

Mark a checklist item as done/not done

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

IPC channel: erp:task:toggleChecklist

Parameters

id
path · required
integer
≥ 1

Request body (JSON)

done
required
boolean

Example request

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}'

Comment on a task

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

IPC channel: erp:task:addComment

Parameters

id
path · required
string
max 200

Request body (JSON)

content
required
string
max 10000
mentions
optional
string[]
max 50 items · default []

Example request

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":[]}'

Edit a comment

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

IPC channel: erp:task:editComment

Parameters

id
path · required
integer
≥ 1

Request body (JSON)

content
required
string
max 10000

Example request

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"}'

Delete a comment

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

IPC channel: erp:task:deleteComment

Parameters

id
path · required
integer
≥ 1

Example request

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

Watch a task

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

IPC channel: erp:task:addWatcher

Parameters

id
path · required
string
max 200

Request body (JSON)

employee_id
optional
string
max 200

Example request

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"}'

Stop watching

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

IPC channel: erp:task:removeWatcher

Parameters

id
path · required
string
max 200
employeeId
path · required
string
max 200

Example request

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

Add a dependency

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

IPC channel: erp:task:addDependency

Parameters

id
path · required
string
max 200

Request body (JSON)

depends_on_id
required
string
max 200

Example request

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"}'

Remove a dependency

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

IPC channel: erp:task:removeDependency

Parameters

id
path · required
string
max 200
dependsOnId
path · required
string
max 200

Example request

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

Calendar events within a time range

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

IPC channel: erp:calendar:listEvents

Parameters

from
query · required
integer
≥ 0
to
query · required
integer
≥ 0
limit
query · optional
integer
≥ 1 · ≤ 1000
offset
query · optional
integer
≥ 0

Example request

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

Create a calendar event

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

IPC channel: erp:calendar:createEvent

Request body (JSON)

title
required
string
max 300
start_at
required
integer
≥ 0

Example request

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"]}'

Update an event

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

IPC channel: erp:calendar:updateEvent

Parameters

id
path · required
string
max 200

Example request

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 '{}'

Delete an event

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

IPC channel: erp:calendar:deleteEvent

Parameters

id
path · required
string
max 200

Example request

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

Respond to an invitation (accepted/declined/tentative)

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

IPC channel: erp:calendar:respond

Parameters

id
path · required
string
max 200

Request body (JSON)

status
required
string
max 20

Example request

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"}'

Notes

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

IPC channel: erp:note:list

Example request

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

Create a note

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

IPC channel: erp:note:create

Request body (JSON)

title
optional
string
max 500

Example request

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"}'

Get a note

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

IPC channel: erp:note:get

Parameters

id
path · required
string
max 200

Example request

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

Update a note

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

IPC channel: erp:note:update

Parameters

id
path · required
string
max 200

Example request

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 '{}'

Delete a note

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

IPC channel: erp:note:delete

Parameters

id
path · required
string
max 200

Example request

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

Pin / unpin a note

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

IPC channel: erp:note:pin

Parameters

id
path · required
string
max 200

Request body (JSON)

pinned
required
boolean

Example request

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}'

Note version history

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

IPC channel: erp:note:versions

Parameters

id
path · required
string
max 200

Example request

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

Note folders

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

IPC channel: erp:note:listFolders

Example request

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

Note tags

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

IPC channel: erp:note:listTags

Example request

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

ERP notifications

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

IPC channel: erp:notify:listInbox

Example request

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

Unread notification count

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

IPC channel: erp:notify:unreadCount

Example request

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

Mark as read

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

IPC channel: erp:notify:markRead

Request body (JSON)

ids
required
integer[]
max 1000 items

Example request

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":[]}'

Mark all as read

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

IPC channel: erp:notify:markAllRead

Example request

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

Departments

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

IPC channel: erp:department:list

Example request

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

Create a department

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

IPC channel: erp:department:create

Request body (JSON)

name
required
string
max 200

Example request

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"}'

Update a department

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

IPC channel: erp:department:update

Parameters

id
path · required
integer
≥ 1

Example request

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 '{}'

Delete a department

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

IPC channel: erp:department:delete

Parameters

id
path · required
integer
≥ 1

Example request

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

Positions

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

IPC channel: erp:position:list

Example request

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

Staff profiles (by department)

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

IPC channel: erp:employee:listByDepartment

Parameters

department_id
query · optional
integer

Example request

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

A staff member's profile

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

IPC channel: erp:employee:getProfile

Parameters

employeeId
path · required
string
max 200

Example request

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

Attendance sheet

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

IPC channel: erp:attendance:list

Example request

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

Leave requests awaiting approval

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

IPC channel: erp:leave:listPending

Example request

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

Approve / reject a leave request

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

IPC channel: erp:leave:decide

Parameters

id
path · required
integer
≥ 1

Request body (JSON)

status
required
"approved" | "rejected"
note
optional
string
max 1000

Example request

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"}'