2. Downloading Employees via API
Downloading Employees from the Go2Clock Instance
Simple Info (Clock credentials)
To download users or employees you are going to send a POST request to the Go2Clock server.
The web address format you are going to send in is as follows...
Base URL format: app.go2clock.com/api/users/
Header Authentication Parameter: APIKEY=xxxxxxxxxxx This must match API key value in Go2Clock instance.
Example cURL command:
curl --location --request POST 'https://app.go2clock.com/api/users/' \ --header 'APIKEY: xxxxxxxxxxx' \ --header 'Content-Type: application/x-www-form-urlencoded'
Server Responses for Clock Credentials
The server will respond with an array of key values for each user, below is an example...
{
"status": "success",
"message": [
{
"id": 1,
"userid": 10,
"name": "Jane Doe",
"pwd": 23569,
"idcard": 0,
"mgflag": 0,
"shiftname": "Housekeeping",
"totalot": "",
"totalut": "",
"deptname": "Housekeeping",
"payrollno": null
} ],
"error": ""
}
Advanced Info (Employee Details)
To download Employees with extra details you are going to send a POST request to the Go2Clock server.
The web address format you are going to send in is as follows...
Base URL format: app.go2clock.com/api/employees/
Header Authentication Parameter: APIKEY=xxxxxxxxxxx This must match API key value in Go2Clock instance.
Example cURL command:
curl --location --request POST 'https://app.go2clock.com/api/employees/' \ --header 'APIKEY: xxxxxxxxxxx' \ --header 'Content-Type: application/x-www-form-urlencoded'
Server Responses for Employee Details
The server will respond with an array of key values for each user, below is an example...
{
"status": "success",
"message": [
{
"id":15,"userid":1,
"name":"John Doe",
"email":"john@doe.co.uk",
"mobilenumber":"",
"deptname":"Office",
"tradename":"Support",
"payrollno":1,
"photo":null,
"shiftname":null,
"shiftmon":134,
"shifttue":134,
"shiftwed":134,
"shiftthu":134,
"shiftfri":134,
"shiftsat":"",
"shiftsun":"",
"totalot":0,
"totalut":0,
"peoplehr_employeeid":"PW1",
"sagehr_employeeno":561234,
"sageref":"",
"sagerefot":"",
"sagerefdt":"",
"sagerefsick":"",
"payrate":1,
"payrateot":1.5,
"payratedt":1.5,
"payratecustom":0,
"payratecumulative":null,
"hourlypay":10,
"max_hours_week":50,
"max_hours_day":10,
"holiday_total_allowed":22,
"role_manager":1,
"role_supervisor":0,
"role_first_aider":0,
"role_safety_manager":0,
"role_employee":1,
"role_apprentice":0,
"role_agency_staff":0,
"role_subcontractor":0,
"role_fire_warden":1,
"start_date":"2023-01-31",
"termination_date":"0000-00-00",
"termination_reason":"",
"date_of_birth":"0000-00-00",
"home_phone":"",
"home_address":"",
"emergency_contacts":""
} ],
"error": ""
}