Hrm Shift Assignments
Function-calling namespace: hrmShiftAssignments
- Base URL:
https://api.aivida.in - Engine endpoint:
POST /api - Auth: private API; Stack access token is required.
- Send token in header:
x-stack-access-token: <access_token>(orAuthorization: Bearer <access_token>). - Allowed roles:
platform_admin,hr. - Missing or invalid token returns
401; authenticated users without an allowed role return403.
assign
Source: backend/endpoints/hrm-shift-assignments/assign
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
organizationId | string | Yes | - |
employeeIds | array<string> | Yes | - |
shiftTemplateId | string | Yes | - |
effectiveFrom | string | Yes | - |
effectiveTo | string | No | nullable |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token>" \
-d '{
"namespace": "hrmShiftAssignments",
"apiName": "assign",
"data": {
"organizationId": "org_123",
"employeeIds": [
"employee_123"
],
"shiftTemplateId": "shifttemplate_123",
"effectiveFrom": "value"
}
}'Example Response
{ "status": "ok", "data": {} }list
Source: backend/endpoints/hrm-shift-assignments/list
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
organizationId | string | No | - |
employeeId | string | No | - |
page | integer | No | - |
pageSize | integer | No | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token>" \
-d '{
"namespace": "hrmShiftAssignments",
"apiName": "list",
"data": {
"organizationId": "org_123"
}
}'Response Data Format
| Field | Type | Required | Constraints |
|---|---|---|---|
items | array<object> | No | - |
total | integer | No | - |
page | integer | No | - |
pageSize | integer | No | - |
totalPages | integer | No | - |
Response Data Format Nested Structures
items[] item
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | No | - |
organizationId | string | No | - |
employeeId | string | No | - |
employeeName | string | No | - |
shiftTemplateId | string | No | - |
shiftTemplateName | string | No | - |
startTime | string | No | format: HH:mm |
endTime | string | No | format: HH:mm |
effectiveFrom | string | No | - |
effectiveTo | string | No | - |
isDeleted | boolean | No | - |
deletedAt | integer | No | unix-ms timestamp; nullable |
createdAt | integer | No | unix-ms timestamp |
updatedAt | integer | No | unix-ms timestamp |
Response Data Format Example
{
"items": [
{
"id": "id_123",
"organizationId": "org_123",
"employeeId": "employee_123",
"employeeName": "value",
"shiftTemplateId": "shifttemplate_123",
"shiftTemplateName": "value",
"startTime": "10:30",
"endTime": "10:30",
"effectiveFrom": "value",
"effectiveTo": "value",
"isDeleted": false,
"deletedAt": 1710201600000,
"createdAt": 1710201600000,
"updatedAt": 1710201600000
}
],
"total": 1,
"page": 1,
"pageSize": 1,
"totalPages": 1
}Example Response
{
"status": "ok",
"data": {
"items": [
{
"id": "id_123",
"organizationId": "org_123",
"employeeId": "employee_123",
"employeeName": "value",
"shiftTemplateId": "shifttemplate_123",
"shiftTemplateName": "value",
"startTime": "10:30",
"endTime": "10:30",
"effectiveFrom": "value",
"effectiveTo": "value",
"isDeleted": false,
"deletedAt": 1710201600000,
"createdAt": 1710201600000,
"updatedAt": 1710201600000
}
],
"total": 1,
"page": 1,
"pageSize": 1,
"totalPages": 1
}
}remove
Source: backend/endpoints/hrm-shift-assignments/remove
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | No | - |
organizationId | string | No | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token>" \
-d '{
"namespace": "hrmShiftAssignments",
"apiName": "remove",
"data": {
"organizationId": "org_123",
"id": "id_123"
}
}'Example Response
{ "status": "ok", "data": {} }update
Source: backend/endpoints/hrm-shift-assignments/update
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | No | - |
organizationId | string | No | - |
employeeIds | array<string> | No | - |
shiftTemplateId | string | No | nullable |
effectiveFrom | string | No | nullable |
effectiveTo | string | No | nullable |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token>" \
-d '{
"namespace": "hrmShiftAssignments",
"apiName": "update",
"data": {
"organizationId": "org_123",
"id": "id_123",
"employeeIds": [
"employee_123"
]
}
}'Example Response
{ "status": "ok", "data": {} }