ERP
Tasks, projects, calendar, notes, attendance, leave, notifications. · 49 endpoints
- GET/erp/projects
- POST/erp/projects
- PATCH/erp/projects/{id}
- DELETE/erp/projects/{id}
- GET/erp/tasks
- POST/erp/tasks
- GET/erp/tasks/inbox
- GET/erp/tasks/{id}
- PATCH/erp/tasks/{id}
- DELETE/erp/tasks/{id}
- POST/erp/tasks/{id}/status
- POST/erp/tasks/{id}/assign
- POST/erp/tasks/{id}/checklist
- PATCH/erp/checklist/{id}
- POST/erp/tasks/{id}/comments
- PATCH/erp/comments/{id}
- DELETE/erp/comments/{id}
- POST/erp/tasks/{id}/watchers
- DELETE/erp/tasks/{id}/watchers/{employeeId}
- POST/erp/tasks/{id}/dependencies
- DELETE/erp/tasks/{id}/dependencies/{dependsOnId}
- GET/erp/calendar/events
- POST/erp/calendar/events
- PATCH/erp/calendar/events/{id}
- DELETE/erp/calendar/events/{id}
- POST/erp/calendar/events/{id}/respond
- GET/erp/notes
- POST/erp/notes
- GET/erp/notes/{id}
- PATCH/erp/notes/{id}
- DELETE/erp/notes/{id}
- POST/erp/notes/{id}/pin
- GET/erp/notes/{id}/versions
- GET/erp/note-folders
- GET/erp/note-tags
- GET/erp/notifications
- GET/erp/notifications/unread-count
- POST/erp/notifications/read
- POST/erp/notifications/read-all
- GET/erp/departments
- POST/erp/departments
- PATCH/erp/departments/{id}
- DELETE/erp/departments/{id}
- GET/erp/positions
- GET/erp/profiles
- GET/erp/profiles/{employeeId}
- GET/erp/attendance
- GET/erp/leaves/pending
- POST/erp/leaves/{id}/decide
Projects
/api/v1/erp/projectsScope: erp:readIPC channel: erp:project:list
Parameters
archivedquery · optional | boolean default false |
Example request
curl "http://127.0.0.1:9900/api/v1/erp/projects" \
-H "Authorization: Bearer dpk_xxx"Create a project
/api/v1/erp/projectsScope: erp:writeIPC channel: erp:project:create
Request body (JSON)
namerequired | string max 200 | |
descriptionoptional | string max 5000 | |
coloroptional | string max 20 | |
department_idoptional | any |
Example request
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
/api/v1/erp/projects/{id}Scope: erp:writeIPC channel: erp:project:update
Parameters
idpath · required | string max 200 |
Example request
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
/api/v1/erp/projects/{id}Scope: erp:writeIPC channel: erp:project:delete
Parameters
idpath · required | string max 200 |
Example request
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...)
/api/v1/erp/tasksScope: erp:readThe 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
curl "http://127.0.0.1:9900/api/v1/erp/tasks" \
-H "Authorization: Bearer dpk_xxx"Create a task
/api/v1/erp/tasksScope: erp:writeIPC channel: erp:task:create
Request body (JSON)
titlerequired | string max 500 |
Example request
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
/api/v1/erp/tasks/inboxScope: erp:readIPC channel: erp:task:listMyInbox
Parameters
filterquery · optional | "today" | "week" | "overdue" | "all" default "week" |
Example request
curl "http://127.0.0.1:9900/api/v1/erp/tasks/inbox" \
-H "Authorization: Bearer dpk_xxx"Task details
/api/v1/erp/tasks/{id}Scope: erp:readIPC channel: erp:task:get
Parameters
idpath · required | string max 200 |
Example request
curl "http://127.0.0.1:9900/api/v1/erp/tasks/{id}" \
-H "Authorization: Bearer dpk_xxx"Update a task
/api/v1/erp/tasks/{id}Scope: erp:writeIPC channel: erp:task:update
Parameters
idpath · required | string max 200 |
Example request
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
/api/v1/erp/tasks/{id}Scope: erp:writeIPC channel: erp:task:delete
Parameters
idpath · required | string max 200 |
Example request
curl -X DELETE "http://127.0.0.1:9900/api/v1/erp/tasks/{id}" \
-H "Authorization: Bearer dpk_xxx"Change a task's status
/api/v1/erp/tasks/{id}/statusScope: erp:writeIPC channel: erp:task:updateStatus
Parameters
idpath · required | string max 200 |
Request body (JSON)
statusrequired | string max 30 |
Example request
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
/api/v1/erp/tasks/{id}/assignScope: erp:writeIPC channel: erp:task:assign
Parameters
idpath · required | string max 200 |
Request body (JSON)
employee_idsrequired | string[] max 100 items |
Example request
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
/api/v1/erp/tasks/{id}/checklistScope: erp:writeIPC channel: erp:task:addChecklist
Parameters
idpath · required | string max 200 |
Request body (JSON)
contentrequired | string max 1000 |
Example request
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
/api/v1/erp/checklist/{id}Scope: erp:writeIPC channel: erp:task:toggleChecklist
Parameters
idpath · required | integer ≥ 1 |
Request body (JSON)
donerequired | boolean |
Example request
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
/api/v1/erp/tasks/{id}/commentsScope: erp:writeIPC channel: erp:task:addComment
Parameters
idpath · required | string max 200 |
Request body (JSON)
contentrequired | string max 10000 | |
mentionsoptional | string[] max 50 items · default [] |
Example request
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
/api/v1/erp/comments/{id}Scope: erp:writeIPC channel: erp:task:editComment
Parameters
idpath · required | integer ≥ 1 |
Request body (JSON)
contentrequired | string max 10000 |
Example request
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
/api/v1/erp/comments/{id}Scope: erp:writeIPC channel: erp:task:deleteComment
Parameters
idpath · required | integer ≥ 1 |
Example request
curl -X DELETE "http://127.0.0.1:9900/api/v1/erp/comments/{id}" \
-H "Authorization: Bearer dpk_xxx"Watch a task
/api/v1/erp/tasks/{id}/watchersScope: erp:writeIPC channel: erp:task:addWatcher
Parameters
idpath · required | string max 200 |
Request body (JSON)
employee_idoptional | string max 200 |
Example request
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
/api/v1/erp/tasks/{id}/watchers/{employeeId}Scope: erp:writeIPC channel: erp:task:removeWatcher
Parameters
idpath · required | string max 200 | |
employeeIdpath · required | string max 200 |
Example request
curl -X DELETE "http://127.0.0.1:9900/api/v1/erp/tasks/{id}/watchers/{employeeId}" \
-H "Authorization: Bearer dpk_xxx"Add a dependency
/api/v1/erp/tasks/{id}/dependenciesScope: erp:writeIPC channel: erp:task:addDependency
Parameters
idpath · required | string max 200 |
Request body (JSON)
depends_on_idrequired | string max 200 |
Example request
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
/api/v1/erp/tasks/{id}/dependencies/{dependsOnId}Scope: erp:writeIPC channel: erp:task:removeDependency
Parameters
idpath · required | string max 200 | |
dependsOnIdpath · required | string max 200 |
Example request
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
/api/v1/erp/calendar/eventsScope: erp:readIPC channel: erp:calendar:listEvents
Parameters
fromquery · required | integer ≥ 0 | |
toquery · required | integer ≥ 0 | |
limitquery · optional | integer ≥ 1 · ≤ 1000 | |
offsetquery · optional | integer ≥ 0 |
Example request
curl "http://127.0.0.1:9900/api/v1/erp/calendar/events" \
-H "Authorization: Bearer dpk_xxx"Create a calendar event
/api/v1/erp/calendar/eventsScope: erp:writeIPC channel: erp:calendar:createEvent
Request body (JSON)
titlerequired | string max 300 | |
start_atrequired | integer ≥ 0 |
Example request
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
/api/v1/erp/calendar/events/{id}Scope: erp:writeIPC channel: erp:calendar:updateEvent
Parameters
idpath · required | string max 200 |
Example request
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
/api/v1/erp/calendar/events/{id}Scope: erp:writeIPC channel: erp:calendar:deleteEvent
Parameters
idpath · required | string max 200 |
Example request
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)
/api/v1/erp/calendar/events/{id}/respondScope: erp:writeIPC channel: erp:calendar:respond
Parameters
idpath · required | string max 200 |
Request body (JSON)
statusrequired | string max 20 |
Example request
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
/api/v1/erp/notesScope: erp:readIPC channel: erp:note:list
Example request
curl "http://127.0.0.1:9900/api/v1/erp/notes" \
-H "Authorization: Bearer dpk_xxx"Create a note
/api/v1/erp/notesScope: erp:writeIPC channel: erp:note:create
Request body (JSON)
titleoptional | string max 500 |
Example request
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
/api/v1/erp/notes/{id}Scope: erp:readIPC channel: erp:note:get
Parameters
idpath · required | string max 200 |
Example request
curl "http://127.0.0.1:9900/api/v1/erp/notes/{id}" \
-H "Authorization: Bearer dpk_xxx"Update a note
/api/v1/erp/notes/{id}Scope: erp:writeIPC channel: erp:note:update
Parameters
idpath · required | string max 200 |
Example request
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
/api/v1/erp/notes/{id}Scope: erp:writeIPC channel: erp:note:delete
Parameters
idpath · required | string max 200 |
Example request
curl -X DELETE "http://127.0.0.1:9900/api/v1/erp/notes/{id}" \
-H "Authorization: Bearer dpk_xxx"Pin / unpin a note
/api/v1/erp/notes/{id}/pinScope: erp:writeIPC channel: erp:note:pin
Parameters
idpath · required | string max 200 |
Request body (JSON)
pinnedrequired | boolean |
Example request
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
/api/v1/erp/notes/{id}/versionsScope: erp:readIPC channel: erp:note:versions
Parameters
idpath · required | string max 200 |
Example request
curl "http://127.0.0.1:9900/api/v1/erp/notes/{id}/versions" \
-H "Authorization: Bearer dpk_xxx"Note folders
/api/v1/erp/note-foldersScope: erp:readIPC channel: erp:note:listFolders
Example request
curl "http://127.0.0.1:9900/api/v1/erp/note-folders" \
-H "Authorization: Bearer dpk_xxx"ERP notifications
/api/v1/erp/notificationsScope: erp:readIPC channel: erp:notify:listInbox
Example request
curl "http://127.0.0.1:9900/api/v1/erp/notifications" \
-H "Authorization: Bearer dpk_xxx"Unread notification count
/api/v1/erp/notifications/unread-countScope: erp:readIPC channel: erp:notify:unreadCount
Example request
curl "http://127.0.0.1:9900/api/v1/erp/notifications/unread-count" \
-H "Authorization: Bearer dpk_xxx"Mark as read
/api/v1/erp/notifications/readScope: erp:writeIPC channel: erp:notify:markRead
Request body (JSON)
idsrequired | integer[] max 1000 items |
Example request
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
/api/v1/erp/notifications/read-allScope: erp:writeIPC channel: erp:notify:markAllRead
Example request
curl -X POST "http://127.0.0.1:9900/api/v1/erp/notifications/read-all" \
-H "Authorization: Bearer dpk_xxx"Departments
/api/v1/erp/departmentsScope: erp:readIPC channel: erp:department:list
Example request
curl "http://127.0.0.1:9900/api/v1/erp/departments" \
-H "Authorization: Bearer dpk_xxx"Create a department
/api/v1/erp/departmentsScope: erp:writeIPC channel: erp:department:create
Request body (JSON)
namerequired | string max 200 |
Example request
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
/api/v1/erp/departments/{id}Scope: erp:writeIPC channel: erp:department:update
Parameters
idpath · required | integer ≥ 1 |
Example request
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
/api/v1/erp/departments/{id}Scope: erp:writeIPC channel: erp:department:delete
Parameters
idpath · required | integer ≥ 1 |
Example request
curl -X DELETE "http://127.0.0.1:9900/api/v1/erp/departments/{id}" \
-H "Authorization: Bearer dpk_xxx"Positions
/api/v1/erp/positionsScope: erp:readIPC channel: erp:position:list
Example request
curl "http://127.0.0.1:9900/api/v1/erp/positions" \
-H "Authorization: Bearer dpk_xxx"Staff profiles (by department)
/api/v1/erp/profilesScope: erp:readIPC channel: erp:employee:listByDepartment
Parameters
department_idquery · optional | integer |
Example request
curl "http://127.0.0.1:9900/api/v1/erp/profiles" \
-H "Authorization: Bearer dpk_xxx"A staff member's profile
/api/v1/erp/profiles/{employeeId}Scope: erp:readIPC channel: erp:employee:getProfile
Parameters
employeeIdpath · required | string max 200 |
Example request
curl "http://127.0.0.1:9900/api/v1/erp/profiles/{employeeId}" \
-H "Authorization: Bearer dpk_xxx"Attendance sheet
/api/v1/erp/attendanceScope: erp:readIPC channel: erp:attendance:list
Example request
curl "http://127.0.0.1:9900/api/v1/erp/attendance" \
-H "Authorization: Bearer dpk_xxx"Leave requests awaiting approval
/api/v1/erp/leaves/pendingScope: erp:readIPC channel: erp:leave:listPending
Example request
curl "http://127.0.0.1:9900/api/v1/erp/leaves/pending" \
-H "Authorization: Bearer dpk_xxx"Approve / reject a leave request
/api/v1/erp/leaves/{id}/decideScope: erp:writeIPC channel: erp:leave:decide
Parameters
idpath · required | integer ≥ 1 |
Request body (JSON)
statusrequired | "approved" | "rejected" | |
noteoptional | string max 1000 |
Example request
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"}'