Aller au contenu

Employees

Ce contenu n’est pas encore disponible dans votre langue.

The Employees resource provides fake employee data with names, emails, job titles, departments, employment types, and status information.

MethodEndpointDescription
GET/v1/employeesList all employees
GET/v1/employees/:idGet a specific employee
{
"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
Terminal window
curl https://api.phantomjson.app/v1/employees
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
{
"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
}
}
Terminal window
curl https://api.phantomjson.app/v1/employees/1
{
"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"
}
}
}
Terminal window
curl "https://api.phantomjson.app/v1/employees?q=alice"
Terminal window
curl "https://api.phantomjson.app/v1/employees?organizationId=1"
Terminal window
curl "https://api.phantomjson.app/v1/employees?departmentId=1"
Terminal window
curl "https://api.phantomjson.app/v1/employees?status=active"
Terminal window
curl "https://api.phantomjson.app/v1/employees?employmentType=full-time"
Terminal window
curl "https://api.phantomjson.app/v1/employees?fields=id,firstName,lastName,jobTitle,email"
Terminal window
# Active full-time employees in organization 1, sorted by name
curl "https://api.phantomjson.app/v1/employees?organizationId=1&status=active&employmentType=full-time&sort=lastName:asc&fields=id,firstName,lastName,jobTitle"

Available employment types:

  • full-time
  • part-time
  • contract
  • intern

Available employment statuses:

  • active
  • inactive
  • terminated
  • 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)