Candidates (المرشحون)
Manage candidate profiles for recruitment. Candidates can be linked to multiple job applications.
Attributes
| Field | Type | Description |
|---|---|---|
id | integer | Primary key |
name_en | string | English name |
name_ar | string | Arabic name (nullable) |
email | string | Email address (nullable) |
phone | string | Phone number (nullable) |
source | enum | website, referral, agency, linkedin, other |
resume_path | string | Resume file path (nullable) |
notes | string | Notes (nullable) |
API Endpoints
| Method | URL | Description |
|---|---|---|
GET | /api/hr/candidates | List candidates |
POST | /api/hr/candidates | Create candidate |
GET | /api/hr/candidates/{id} | Show candidate with applications |
PUT | /api/hr/candidates/{id} | Update candidate |
DELETE | /api/hr/candidates/{id} | Delete candidate |
Examples
bash
curl -X POST "https://moon-erp.elbaset.com/api/hr/candidates" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"name_ar": "محمد علي",
"name_en": "Mohamed Ali",
"email": "mohamed@example.com",
"phone": "+201234567890",
"source": "linkedin"
}'dart
final response = await dio.post('/api/hr/candidates', data: {
'name_ar': 'محمد علي',
'name_en': 'Mohamed Ali',
'email': 'mohamed@example.com',
'source': 'linkedin',
});Business Rules
- A candidate can have multiple job applications across different openings
- Show endpoint eager-loads all related applications
- Deleting a candidate is only allowed if they have no active applications