EndpointsHrm Attendance

Hrm Attendance

Function-calling namespace: hrmAttendance

  • 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> (or Authorization: Bearer <access_token>).
  • Allowed roles: platform_admin, hr.
  • Missing or invalid token returns 401; authenticated users without an allowed role return 403.

create

Source: backend/endpoints/hrm-attendance/create

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
employeeIdstringYes-
attendanceDatestringYesformat: YYYY-MM-DD
firstCheckInstringNo-
lastCheckOutstringNo-
workedMinutesintegerNonullable
lateMinutesintegerNonullable
shiftIdstringNo-
statusstringYes-
sourcestringNo-
remarksstringNo-
approvedBystringNo-
approvedAtstringNo-

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token>" \
  -d '{
  "namespace": "hrmAttendance",
  "apiName": "create",
  "data": {
    "organizationId": "org_123",
    "employeeId": "employee_123",
    "attendanceDate": "2026-03-12",
    "status": "scheduled"
  }
}'

Example Response

{ "status": "ok", "data": {} }

delete

Source: backend/endpoints/hrm-attendance/delete

Input Fields

FieldTypeRequiredConstraints
idstringNo-
organizationIdstringNo-

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token>" \
  -d '{
  "namespace": "hrmAttendance",
  "apiName": "delete",
  "data": {
    "organizationId": "org_123",
    "id": "id_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

getById

Source: backend/endpoints/hrm-attendance/get-by-id

Input Fields

FieldTypeRequiredConstraints
idstringNo-
organizationIdstringNo-

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token>" \
  -d '{
  "namespace": "hrmAttendance",
  "apiName": "getById",
  "data": {
    "organizationId": "org_123",
    "id": "id_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

getSummary

Source: backend/endpoints/hrm-attendance/get-summary

Input Fields

FieldTypeRequiredConstraints
organizationIdstringNo-
datestringNoformat: YYYY-MM-DD

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token>" \
  -d '{
  "namespace": "hrmAttendance",
  "apiName": "getSummary",
  "data": {
    "organizationId": "org_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

list

Source: backend/endpoints/hrm-attendance/list

Input Fields

FieldTypeRequiredConstraints
organizationIdstringNo-
datestringNoformat: YYYY-MM-DD
statusstringNo-
employeeIdstringNo-
departmentIdstringNo-
shiftIdstringNo-
searchstringNo-
pageintegerNo-
limitintegerNo-
sortBystringNo-
sortOrderstringNo-

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token>" \
  -d '{
  "namespace": "hrmAttendance",
  "apiName": "list",
  "data": {
    "organizationId": "org_123",
    "status": "scheduled"
  }
}'

Response Data Format

FieldTypeRequiredConstraints
itemsarray<object>No-
totalintegerNo-
pageintegerNo-
limitintegerNo-
totalPagesintegerNo-

Response Data Format Nested Structures

items[] item

FieldTypeRequiredConstraints
idstringNo-
employeeIdstringNo-
employeeCodestringNo-
employeeNamestringNo-
departmentIdstringNo-
departmentNamestringNo-
shiftIdstringNo-
attendanceDatestringNoformat: YYYY-MM-DD
checkInstringNo-
checkOutstringNo-
workedMinutesintegerNo-
hoursWorkedstringNo-
lateMinutesintegerNo-
statusstringNo-
sourcestringNo-
remarksstringNo-

Response Data Format Example

{
  "items": [
    {
      "id": "id_123",
      "employeeId": "employee_123",
      "employeeCode": "value",
      "employeeName": "value",
      "departmentId": "department_123",
      "departmentName": "value",
      "shiftId": "shift_123",
      "attendanceDate": "2026-03-12",
      "checkIn": "value",
      "checkOut": "value",
      "workedMinutes": 1,
      "hoursWorked": "value",
      "lateMinutes": 1,
      "status": "scheduled",
      "source": "value",
      "remarks": "value"
    }
  ],
  "total": 1,
  "page": 1,
  "limit": 1,
  "totalPages": 1
}

Example Response

{
  "status": "ok",
  "data": {
    "items": [
      {
        "id": "id_123",
        "employeeId": "employee_123",
        "employeeCode": "value",
        "employeeName": "value",
        "departmentId": "department_123",
        "departmentName": "value",
        "shiftId": "shift_123",
        "attendanceDate": "2026-03-12",
        "checkIn": "value",
        "checkOut": "value",
        "workedMinutes": 1,
        "hoursWorked": "value",
        "lateMinutes": 1,
        "status": "scheduled",
        "source": "value",
        "remarks": "value"
      }
    ],
    "total": 1,
    "page": 1,
    "limit": 1,
    "totalPages": 1
  }
}

update

Source: backend/endpoints/hrm-attendance/update

Input Fields

FieldTypeRequiredConstraints
idstringNo-
organizationIdstringNo-
employeeIdstringNonullable
attendanceDatestringNoformat: YYYY-MM-DD; nullable
firstCheckInstringNonullable
lastCheckOutstringNonullable
workedMinutesintegerNonullable
lateMinutesintegerNonullable
shiftIdstringNonullable
statusstringNonullable
sourcestringNonullable
remarksstringNonullable
approvedBystringNonullable
approvedAtstringNonullable

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token>" \
  -d '{
  "namespace": "hrmAttendance",
  "apiName": "update",
  "data": {
    "organizationId": "org_123",
    "id": "id_123",
    "status": "scheduled"
  }
}'

Example Response

{ "status": "ok", "data": {} }