timeclock.timeclock

Management of individual Clock Times.

SUPPORTED METHODS:

GET

ParametersTypeDescription
token (required)Valid token
id (required)integerIndividual clock time id

CREATE

ParametersTypeDescription
token (required)Valid token
start_date (required)dateStart date
employee (required)idEmployee id
end_date (accepted)dateEnd date
start_time (required)timeStart time
end_time (accepted)timeEnd time
notes (accepted)varcharNotes
tips (accepted)varcharTips
schedule (accepted)integerSchedule id
approved (accepted)enum (0,1)

UPDATE

ParametersTypeDescription
token (required)Valid token
id (required)integerTime clock id
start_date (accepted)dateStart date
end_date (accepted)dateEnd date
schedule (accepted)integerSchedule id
employee (accepted)integerEmployee id
start_time (accepted)timeStart time
end_time (accepted)timeEnd time
notes (accepted)varcharNotes
approvedenum (0,1)0: not approved
1: approved
tipsvarcharTips

DELETE

ParametersTypeDescription
token (required)Valid token
id (required)integerTimeclock id

DOCUMENTATION

GET
Retrieves an individual Clock Time.
Level 5 is required (all users can fetch this module)

--
Example Request:

{
   "module":"timeclock.timeclock",
   "method":"GET",
   "request":{
      "id":"64522004"
   }
}

Example response:

{
  "status": 1,
  "data": {
    "id": "64522004",
    "store": "202039",
    "status": "0",
    "schedule": null,
    "notes": null,
    "created": "1496929705",
    "in_timestamp": "1496929705",
    "in_day": "2962",
    "out_timestamp": "1496972905",
    "out_day": "2963",
    "in_hour": "68",
    "out_hour": "0",
    "in_location": "TC Location  IP",
    "out_location": "Website",
    "in_terminal": "0",
    "out_terminal": "-98",
    "approved_by": "0",
    "approved_time": "0",
    "approved_notes": "",
    "in_picture": null,
    "out_picture": "",
    "screenshots": null,
    "break_time": "0",
    "start_timestamp": "2017-06-08 16:48:25",
    "end_timestamp": "2017-06-09 04:48:25",
    "in_picture_url": "",
    "out_picture_url": null,
    "in_gps": "{\"latitude\":\"\",\"longitude\":\"\",\"supported\":0}",
    "out_gps": null,
    "shift": null,
    "employee": {
      "id": "2097936",
      "name": "Test Employee"
    },
    "in_time": {
      "time": "4:48pm",
      "day": "Jun 8, 2017",
      "timestamp": "2017-06-08 16:48:25"
    },
    "start": {
      "id": 2962,
      "month": 6,
      "day": 8,
      "wday": 4,
      "year": 2017,
      "weekday": "Thu",
      "mname": "Jun",
      "week": 23,
      "dayid": 5,
      "timeid": 68,
      "timeid_exact": 68,
      "formatted": "Jun 8, 2017",
      "iso8601": "2017-06-08T16:48:25+0300",
      "time": "4:48pm",
      "timestamp": 1496929705,
      "hours": 16,
      "minutes": 48,
      "seconds": 25,
      "date": "2017-06-08 16:48:25",
      "day_of_year": "158",
      "week_adjusted": 23,
      "sp_wday": 5
    },
    "length": {
      "hours": 12,
      "mins": 0,
      "total_hours": "12.00"
    },
    "out_time": {
      "time": "4:48am",
      "day": "Jun 9, 2017",
      "timestamp": "2017-06-09 04:48:25"
    },
    "end": {
      "id": 2963,
      "month": 6,
      "day": 9,
      "wday": 5,
      "year": 2017,
      "weekday": "Fri",
      "mname": "Jun",
      "week": 23,
      "dayid": 6,
      "timeid": 20,
      "timeid_exact": 20,
      "formatted": "Jun 9, 2017",
      "iso8601": "2017-06-09T04:48:25+0300",
      "time": "4:48am",
      "timestamp": 1496972905,
      "hours": 4,
      "minutes": 48,
      "seconds": 25,
      "date": "2017-06-09 04:48:25",
      "day_of_year": "159",
      "week_adjusted": 23,
      "sp_wday": 6
    },
    "current_length": {
      "hours": 24,
      "mins": 21,
      "total_hours": "24.35"
    },
    "events": []
  },
  "token": "xxxxxxxx"
}

CREATE
Creates an individual Clock Time.
Level 5 is required (all users can fetch this module)

--
Example Request:

{
   "module":"timeclock.timeclock",
   "method":"CREATE",
   "request":{
      "start_date":"June 09, 2017",
      "schedule":"1068294",
      "employee":"2165774",
      "start_time":"3:05"
   }
}

Example response:

{
  "status": 1,
  "data": {
    "id": "64598351",
    "store": "202039",
    "status": "0",
    "schedule": null,
    "notes": null,
    "created": "1497017588",
    "in_timestamp": "1496970000",
    "in_day": "2963",
    "out_timestamp": "0",
    "out_day": "0",
    "in_hour": "17",
    "out_hour": "0",
    "in_location": "Mobile",
    "out_location": "Website",
    "in_terminal": "0",
    "out_terminal": "-98",
    "approved_by": "0",
    "approved_time": "0",
    "approved_notes": "",
    "in_picture": null,
    "out_picture": "",
    "screenshots": null,
    "break_time": "0",
    "start_timestamp": "2017-06-09 04:00:00",
    "end_timestamp": null,
    "in_picture_url": null,
    "out_picture_url": null,
    "in_gps": null,
    "out_gps": null,
    "shift": null,
    "employee": {
      "id": "2165774",
      "name": "Brus Vejn"
    },
    "in_time": {
      "time": "4:00am",
      "day": "Jun 9, 2017",
      "timestamp": "2017-06-09 04:00:00"
    },
    "start": {
      "id": 2963,
      "month": 6,
      "day": 9,
      "wday": 5,
      "year": 2017,
      "weekday": "Fri",
      "mname": "Jun",
      "week": 23,
      "dayid": 6,
      "timeid": 17,
      "timeid_exact": 17,
      "formatted": "Jun 9, 2017",
      "iso8601": "2017-06-09T04:00:00+0300",
      "time": "4:00am",
      "timestamp": 1496970000,
      "hours": 4,
      "minutes": 0,
      "seconds": 0,
      "date": "2017-06-09 04:00:00",
      "day_of_year": "159",
      "week_adjusted": 23,
      "sp_wday": 6
    },
    "length": [],
    "out_time": [],
    "end": [],
    "current_length": {
      "hours": 13,
      "mins": 13,
      "total_hours": "13.22"
    },
    "events": []
  },
  "token": "xxxxxxxx"
}

UPDATE
Updates an individual Clock Time.
Level 5 is required (all users can fetch this module)

--
Example Request:

{
   "module":"timeclock.timeclock",
   "method":"UPDATE",
   "request":{
      "is":"64598351",
      "start_date":"June 09, 2017",
      "schedule":"1068294",
      "employee":"2165774",
      "start_time":"5:05"
   }
}

Example response:

{
  "status": 1,
  "data": {
    "id": "64598351",
    "store": "202039",
    "status": "0",
    "schedule": null,
    "notes": null,
    "created": "1497017588",
    "in_timestamp": "1496973900",
    "in_day": "2963",
    "out_timestamp": "0",
    "out_day": "0",
    "in_hour": "21",
    "out_hour": "0",
    "in_location": "Mobile",
    "out_location": "Website",
    "in_terminal": "0",
    "out_terminal": "-98",
    "approved_by": "0",
    "approved_time": "0",
    "approved_notes": "",
    "in_picture": null,
    "out_picture": "",
    "screenshots": null,
    "break_time": "0",
    "start_timestamp": "2017-06-09 05:05:00",
    "end_timestamp": null,
    "in_picture_url": null,
    "out_picture_url": null,
    "in_gps": null,
    "out_gps": null,
    "shift": null,
    "employee": {
      "id": "2165774",
      "name": "Brus Vejn"
    },
    "in_time": {
      "time": "5:05am",
      "day": "Jun 9, 2017",
      "timestamp": "2017-06-09 05:05:00"
    },
    "start": {
      "id": 2963,
      "month": 6,
      "day": 9,
      "wday": 5,
      "year": 2017,
      "weekday": "Fri",
      "mname": "Jun",
      "week": 23,
      "dayid": 6,
      "timeid": 21,
      "timeid_exact": 21,
      "formatted": "Jun 9, 2017",
      "iso8601": "2017-06-09T05:05:00+0300",
      "time": "5:05am",
      "timestamp": 1496973900,
      "hours": 5,
      "minutes": 5,
      "seconds": 0,
      "date": "2017-06-09 05:05:00",
      "day_of_year": "159",
      "week_adjusted": 23,
      "sp_wday": 6
    },
    "length": [],
    "out_time": [],
    "end": [],
    "current_length": {
      "hours": 12,
      "mins": 11,
      "total_hours": "12.19"
    },
    "events": []
  },
  "token": "xxxxxxx"
}

DELETE
Deletes an individual Clock Time.
Level 5 is required (all users can fetch this module)

--
Example Request:

{
   "module":"timeclock.timeclock",
   "method":"DELETE",
   "request":{
      "id":"64598351"
   }
}

Example response:

{
  "status": 1,
  "data": "Clock time deleted.",
  "token": "xxxxxxx"
}