Assign Employee Band API (Multiple Users)
Overview
Assigns an Employee Band to one or multiple employees in bulk under a company.
- Endpoint:
/api/bands/assign-band - Method:
POST - Access: Company Admin / Super Admin
Request Body Schema
| Field | Type | Required | Description |
|---|---|---|---|
bandId | String (UUID) | Yes | Target Employee Band ID |
userIds | Array of Strings (UUID) | Yes | Array of User IDs to assign this band |
Request Body Example
{
"bandId": "b1234567-89ab-cdef-0123-456789abcdef",
"userIds": [
"u1111111-1111-1111-1111-111111111111",
"u2222222-2222-2222-2222-222222222222"
]
}
Success Response (200 OK)
{
"success": true,
"message": "Employee Band 'Band 1' assigned successfully to 2 user(s)",
"data": {
"assignedCount": 2,
"band": {
"id": "b1234567-89ab-cdef-0123-456789abcdef",
"name": "Band 1",
"autoApprovalLimit": "7000.00"
},
"users": [
{
"id": "u1111111-1111-1111-1111-111111111111",
"firstName": "Rahul",
"lastName": "Sharma",
"email": "rahul.sharma@company.com",
"bandId": "b1234567-89ab-cdef-0123-456789abcdef",
"employeeBand": "Band 1"
}
]
}
}
Database Impact
- Table:
users - Fields Updated:
band_id,employee_band