PeopleSync API
  1. Attendances
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. Attendances

Record clock-in

Develop Env
https://dev.your-api-server.com
Develop Env
https://dev.your-api-server.com
POST
/attendances/clock-in
Register employee attendance start with geolocation

Request

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

Example
{
    "lat": -6.2088,
    "lng": 106.8456,
    "location": "Office HQ, Jakarta",
    "location_accuracy": 15.3,
    "photo_url": "http://example.com"
}

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/attendances/clock-in' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "lat": -6.2088,
    "lng": 106.8456,
    "location": "Office HQ, Jakarta",
    "location_accuracy": 15.3,
    "photo_url": "http://example.com"
}'

Responses

🟢201Created
application/json
Clock-in recorded successfully
Body

Example
{
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "employee_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "clock_in": "2025-11-16T08:00:00Z",
    "clock_out": "2025-11-16T17:00:00Z",
    "lat": -6.2088,
    "lng": 106.8456,
    "location": "Office HQ, Jakarta",
    "location_accuracy": 5.5,
    "device_id": "mobile-app-v1",
    "photo_url": "https://cdn.peoplesync.example/attendances/2025/11/photo.jpg",
    "source": "mobile",
    "sync_status": "pending",
    "created_at": "2025-11-16T08:01:30Z"
}
🟠400Bad Request
🟠401Unauthorized
🟠409Conflict
Modified at 2025-11-17 05:13:15
Previous
Update employee
Next
Sync offline attendances
Built with