EndpointsHrm Attendance Devices

Hrm Attendance Devices

Function-calling namespace: hrmAttendanceDevices

  • 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-devices/create

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
deviceNamestringYes-
deviceCodestringYes-
deviceTypestringYes-
serialNumberstringNo-
ipAddressstringNo-
portintegerNo-
locationNamestringNo-
latitudenumberNonullable
longitudenumberNonullable
statusstringNo-

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token>" \
  -d '{
  "namespace": "hrmAttendanceDevices",
  "apiName": "create",
  "data": {
    "organizationId": "org_123",
    "deviceName": "value",
    "deviceCode": "value",
    "deviceType": "general"
  }
}'

Example Response

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

delete

Source: backend/endpoints/hrm-attendance-devices/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": "hrmAttendanceDevices",
  "apiName": "delete",
  "data": {
    "organizationId": "org_123",
    "id": "id_123"
  }
}'

Example Response

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

getById

Source: backend/endpoints/hrm-attendance-devices/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": "hrmAttendanceDevices",
  "apiName": "getById",
  "data": {
    "organizationId": "org_123",
    "id": "id_123"
  }
}'

Example Response

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

list

Source: backend/endpoints/hrm-attendance-devices/list

Input Fields

FieldTypeRequiredConstraints
organizationIdstringNo-
statusstringNo-
searchstringNo-
sortBystringNo-
sortOrderstringNo-
pageintegerNo-
pageSizeintegerNo-

Example Request

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

Response Data Format

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

Response Data Format Nested Structures

items[] item

FieldTypeRequiredConstraints
idstringNo-
organizationIdstringNo-
deviceNamestringNo-
deviceCodestringNo-
deviceTypestringNo-
serialNumberstringNo-
ipAddressstringNo-
portintegerNo-
locationNamestringNo-
latitudenumberNonullable
longitudenumberNonullable
statusstringNo-
lastSyncAtintegerNounix-ms timestamp; nullable
isDeletedbooleanNo-
deletedAtintegerNounix-ms timestamp; nullable
createdAtintegerNounix-ms timestamp
updatedAtintegerNounix-ms timestamp

Response Data Format Example

{
  "items": [
    {
      "id": "id_123",
      "organizationId": "org_123",
      "deviceName": "value",
      "deviceCode": "value",
      "deviceType": "general",
      "serialNumber": "value",
      "ipAddress": "221B Baker Street",
      "port": 1,
      "locationName": "value",
      "latitude": 1,
      "longitude": 1,
      "status": "scheduled",
      "lastSyncAt": 1710201600000,
      "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",
        "deviceName": "value",
        "deviceCode": "value",
        "deviceType": "general",
        "serialNumber": "value",
        "ipAddress": "221B Baker Street",
        "port": 1,
        "locationName": "value",
        "latitude": 1,
        "longitude": 1,
        "status": "scheduled",
        "lastSyncAt": 1710201600000,
        "isDeleted": false,
        "deletedAt": 1710201600000,
        "createdAt": 1710201600000,
        "updatedAt": 1710201600000
      }
    ],
    "total": 1,
    "page": 1,
    "pageSize": 1,
    "totalPages": 1
  }
}

update

Source: backend/endpoints/hrm-attendance-devices/update

Input Fields

FieldTypeRequiredConstraints
idstringNo-
organizationIdstringNo-
deviceNamestringNonullable
deviceCodestringNonullable
deviceTypestringNonullable
serialNumberstringNonullable
ipAddressstringNonullable
portintegerNonullable
locationNamestringNonullable
latitudenumberNonullable
longitudenumberNonullable
statusstringNonullable

Example Request

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

Example Response

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