EndpointsHrm Employee Documents

Hrm Employee Documents

Function-calling namespace: hrmEmployeeDocuments

  • 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.

add

Source: backend/endpoints/hrm-employee-documents/add

Input Fields

FieldTypeRequiredConstraints
organizationIdstringNo-
employeeIdstringNo-
documentNamestringNo-
documentTypestringNo-
documentUrlstringNo-
remarksstringNo-

Example Request

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

Example Response

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

delete

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

Example Response

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

list

Source: backend/endpoints/hrm-employee-documents/list

Input Fields

FieldTypeRequiredConstraints
organizationIdstringNo-
employeeIdstringNo-

Example Request

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

Response Data Format

FieldTypeRequiredConstraints
itemsarray<object>No-

Response Data Format Nested Structures

items[] item

FieldTypeRequiredConstraints
idstringNo-
organizationIdstringNo-
employeeIdstringNo-
documentNamestringNo-
documentTypestringNo-
documentUrlstringNo-
remarksstringNo-
isDeletedbooleanNo-
deletedAtintegerNounix-ms timestamp; nullable
createdAtintegerNounix-ms timestamp
updatedAtintegerNounix-ms timestamp

Response Data Format Example

{
  "items": [
    {
      "id": "id_123",
      "organizationId": "org_123",
      "employeeId": "employee_123",
      "documentName": "value",
      "documentType": "general",
      "documentUrl": "value",
      "remarks": "value",
      "isDeleted": false,
      "deletedAt": 1710201600000,
      "createdAt": 1710201600000,
      "updatedAt": 1710201600000
    }
  ]
}

Example Response

{
  "status": "ok",
  "data": {
    "items": [
      {
        "id": "id_123",
        "organizationId": "org_123",
        "employeeId": "employee_123",
        "documentName": "value",
        "documentType": "general",
        "documentUrl": "value",
        "remarks": "value",
        "isDeleted": false,
        "deletedAt": 1710201600000,
        "createdAt": 1710201600000,
        "updatedAt": 1710201600000
      }
    ]
  }
}

update

Source: backend/endpoints/hrm-employee-documents/update

Input Fields

FieldTypeRequiredConstraints
idstringNo-
organizationIdstringNo-
documentNamestringNo-
documentTypestringNo-
documentUrlstringNo-
remarksstringNo-

Example Request

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

Example Response

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