Hrm Leave Policies
Function-calling namespace: hrmLeavePolicies
- 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.
get
Source: backend/endpoints/hrm-leave-policies/get
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
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": "hrmLeavePolicies",
"apiName": "get",
"data": {
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }save
Source: backend/endpoints/hrm-leave-policies/save
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
organizationId | string | Yes | - |
leavePolicies | array<object> | Yes | min items: 1 |
Nested Field Structures
leavePolicies item
| Field | Type | Required | Constraints |
|---|---|---|---|
leaveType | string | Yes | - |
daysPerYear | number | No | - |
isActive | boolean | No | nullable; default: true |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token>" \
-d '{
"namespace": "hrmLeavePolicies",
"apiName": "save",
"data": {
"organizationId": "org_123",
"leavePolicies": [
{
"leaveType": "CASUAL",
"daysPerYear": 12,
"isActive": true
}
]
}
}'Example Response
{ "status": "ok", "data": {} }