PeopleSync API
  1. Employees
PeopleSync API
  • Authentication
    • Authenticate user
      POST
    • Get current user
      GET
  • Roles
    • List all roles
      GET
    • Create a new role
      POST
    • Get role details
      GET
    • Update role
      PUT
  • Departments
    • List all departments
      GET
    • Create a new department
      POST
    • Get department details
      GET
    • Update department
      PUT
  • Employees
    • List employees
      GET
    • Create employee
      POST
    • Get employee details
      GET
    • Update employee
      PUT
  • Attendances
    • Record clock-in
      POST
    • Sync offline attendances
      POST
  • Leaves
    • List leaves
      GET
    • Create leave request
      POST
    • Approve/reject leave
      PATCH
  • SalaryComponents
    • List all salary components
      GET
    • Create a new salary component
      POST
    • Get salary component details
      GET
    • Update salary component
      PUT
  • Payroll
    • Generate payroll
  • Jobs
    • Check job status
  • Uploads
    • Get presigned upload URL
  • Settings
    • Get organization settings
    • Update settings
  • ActivityLogs
    • List activity logs
  • Notifications
    • List notifications
  • System
    • Health check
  • Schemas
    • Schemas
      • MetaPagination
      • ErrorResponse
      • UUID
      • AuthLoginRequest
      • User
      • AuthLoginResponse
      • Role
      • Department
      • DepartmentCreate
      • DepartmentUpdate
      • Employee
      • EmployeeCreate
      • EmployeeUpdate
      • Attendance
      • AttendanceClockIn
      • AttendanceSync
      • Leave
      • LeaveCreate
      • LeaveApprove
      • SalaryComponent
      • SalaryComponentCreate
      • SalaryComponentUpdate
      • Payroll
      • PayrollItem
      • PayrollGenerate
      • PayrollSnapshot
      • ActivityLog
      • Notification
      • Setting
      • SettingUpdate
      • JobStatus
      • PresignedUrl
      • PresignRequest
      • HealthCheck
    • Response
      • Unauthorized
      • Forbidden
      • NotFound
      • ValidationError
      • Conflict
  1. Employees

Create employee

Develop Env
https://dev.your-api-server.com
Develop Env
https://dev.your-api-server.com
POST
/employees
Add new employee record

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
Body Params application/jsonRequired

Example
{
    "employee_number": "EMP-1002",
    "first_name": "Jane",
    "last_name": "Smith",
    "email": "user@example.com",
    "phone": "string",
    "department_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "hired_at": "2019-08-24",
    "status": "active"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://dev.your-api-server.com/employees' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "employee_number": "EMP-1002",
    "first_name": "Jane",
    "last_name": "Smith",
    "email": "user@example.com",
    "phone": "string",
    "department_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "hired_at": "2019-08-24",
    "status": "active"
}'

Responses

🟢201Created
application/json
Employee created successfully
Body

Example
{
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "employee_number": "EMP-1001",
    "first_name": "John",
    "last_name": "Doe",
    "email": "john.doe@company.com",
    "phone": "+628123456789",
    "department_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "department": {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "name": "Engineering",
        "code": "ENG",
        "parent_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "created_at": "2025-01-12T10:15:00Z"
    },
    "hired_at": "2020-01-15",
    "status": "active",
    "current_salary": 15000000,
    "latest_payroll_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "latest_payroll": {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "employee_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "period_year": 2025,
        "period_month": 11,
        "gross_amount": 12500000,
        "net_amount": 11250000,
        "status": "draft",
        "items": [
            {
                "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "component_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "component_name": "Basic Salary",
                "amount": 10000000,
                "note": "Monthly base salary"
            }
        ],
        "generated_at": "2025-11-26T14:30:00Z",
        "paid_at": "2019-08-24T14:15:22.123Z",
        "created_at": "2025-11-25T09:00:00Z"
    },
    "created_at": "2025-01-15T08:00:00Z",
    "updated_at": "2025-01-20T10:30:00Z"
}
🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
Modified at 2025-11-17 05:13:15
Previous
List employees
Next
Get employee details
Built with