Employees
Ce contenu n’est pas encore disponible dans votre langue.
Overview
Section titled “Overview”The Employees resource provides fake employee data with names, emails, job titles, departments, employment types, and status information.
Endpoints
Section titled “Endpoints”| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/employees | List all employees |
| GET | /v1/employees/:id | Get a specific employee |
Employee Object
Section titled “Employee Object”{ "id": 1, "organizationId": 1, "departmentId": 1, "managerId": 5, "userId": 1, "firstName": "Alice", "lastName": "Johnson", "email": "alice.johnson@example.com", "phone": "+1-555-0123", "jobTitle": "Software Engineer", "employmentType": "full-time", "status": "active", "hireDate": "2025-06-15", "avatar": "https://example.com/avatar.png", "createdAt": "2026-01-15T10:30:00.000Z", "updatedAt": "2026-01-15T10:30:00.000Z"}| Field | Type | Description |
|---|---|---|
id |
number |
Unique identifier |
organizationId |
number |
ID of the parent organization |
departmentId |
number |
ID of the department |
managerId |
number |
ID of the employee’s manager |
userId |
number |
Linked user account ID |
firstName |
string |
Employee first name |
lastName |
string |
Employee last name |
email |
string |
Employee email address |
phone |
string |
Phone number |
jobTitle |
string |
Job title |
employmentType |
string |
Employment type (full-time, part-time, contract, intern) |
status |
string |
Employment status (active, inactive, terminated) |
hireDate |
string |
Date of hire (ISO 8601 date) |
avatar |
string |
Avatar image URL |
createdAt |
string |
ISO 8601 timestamp |
updatedAt |
string |
ISO 8601 timestamp |
List Employees
Section titled “List Employees”curl https://api.phantomjson.app/v1/employeesQuery Parameters
Section titled “Query Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
page |
number |
1 |
Page number |
limit |
number |
20 |
Items per page (max: 100) |
sort |
string |
— | Sort field and direction |
q |
string |
— | Search query |
fields |
string |
— | Fields to return |
organizationId |
number |
— | Filter by organization ID |
departmentId |
number |
— | Filter by department ID |
status |
string |
— | Filter by status |
employmentType |
string |
— | Filter by employment type |
Response
Section titled “Response”{ "data": [ { "id": 1, "organizationId": 1, "departmentId": 1, "firstName": "Alice", "lastName": "Johnson", "email": "alice.johnson@example.com", "jobTitle": "Software Engineer", "status": "active" } ], "meta": { "total": 150, "page": 1, "limit": 20, "totalPages": 8 }}Get Employee by ID
Section titled “Get Employee by ID”curl https://api.phantomjson.app/v1/employees/1Response
Section titled “Response”{ "data": { "id": 1, "organizationId": 1, "departmentId": 1, "managerId": 5, "firstName": "Alice", "lastName": "Johnson", "email": "alice.johnson@example.com", "phone": "+1-555-0123", "jobTitle": "Software Engineer", "employmentType": "full-time", "status": "active", "hireDate": "2025-06-15", "avatar": "https://example.com/avatar.png", "organization": { "id": 1, "name": "Acme Corporation" }, "department": { "id": 1, "name": "Engineering" } }}Examples
Section titled “Examples”Search Employees
Section titled “Search Employees”curl "https://api.phantomjson.app/v1/employees?q=alice"Filter by Organization
Section titled “Filter by Organization”curl "https://api.phantomjson.app/v1/employees?organizationId=1"Filter by Department
Section titled “Filter by Department”curl "https://api.phantomjson.app/v1/employees?departmentId=1"Filter by Status
Section titled “Filter by Status”curl "https://api.phantomjson.app/v1/employees?status=active"Filter by Employment Type
Section titled “Filter by Employment Type”curl "https://api.phantomjson.app/v1/employees?employmentType=full-time"Field Selection
Section titled “Field Selection”curl "https://api.phantomjson.app/v1/employees?fields=id,firstName,lastName,jobTitle,email"Combined Query
Section titled “Combined Query”# Active full-time employees in organization 1, sorted by namecurl "https://api.phantomjson.app/v1/employees?organizationId=1&status=active&employmentType=full-time&sort=lastName:asc&fields=id,firstName,lastName,jobTitle"Employment Types
Section titled “Employment Types”Available employment types:
full-timepart-timecontractintern
Statuses
Section titled “Statuses”Available employment statuses:
activeinactiveterminated
Relations
Section titled “Relations”- Organization — Each employee belongs to an organization (
organizationId) - Department — Each employee may belong to a department (
departmentId) - Manager — Each employee may have a manager (
managerId) - User — Each employee may be linked to a user account (
userId)
