timeclock.event

Timeclock events (break in - 1, break out - 2, notes - 3, location - 4, position - 6, tips - 8)

SUPPORTED METHODS:

GET

Parameters

Type

Description

token (required)

Valid token

timeclock (required)

integer

Time clock id

CREATE

Parameters

Type

Description

token (required)

Valid token

timeclock (required)

integer

Time clock id

type (required)

enum { breakin, breakout, notes, location, position, tips }

Timeclock event types

timestamp (accepted)

varchar

Timestamp

notes (accepted)

varchar

Notes

location (accepted)

varchar

Location

position (accepted)

varchar

Position

tips (accepted)

varchar

Tips

UPDATE

Parameters

Type

Description

token (required)

timeclock (required)

integer

Time Clock id

type (required)

enum { breakin, breakout, notes, location, position, gps, tips, events }

Timeclock event types

event (accepted)

varchar

Event

data (accepted)

varchar

Data

timestamp (accepted)

varchar

Time stamp

notes (accepted)

varchar

Notes

location (accepted)

varchar

Location

position (accepted)

varchar

Position

clocktime (accepted)

varchar

Clock time

gps (accepted)

varchar

GPS

tips (accepted)

varchar

Tips

DELETE

Parameters

Type

Description

token (required)

Valid token

timeclock (required)

integer

Time Clock id

type (required)

enum { delete, restore }

Timeclock event types

event (required)

varchar

Ids of events you want to be removed delimited with |

DOCUMENTATION

GET
Get all events for timeclock.
Level 5 is required.

--

Example Request:

{
   "module":"timeclock.event",
   "method":"GET",
   "request":{
      "timeclock":101460718,
   }
}

Example Response:

{
    "status": 1,
    "data": [
        {
            "id": "146466099",
            "type": "1",
            "timestamp": "2018-12-20 09:00:00",
            "clock_time": "101460718",
            "data": null
        },
        {
            "id": "146466003",
            "type": "3",
            "timestamp": "2018-12-20 09:00:00",
            "clock_time": "101460718",
            "data": {
                "notes": "NOTES"
            }
        },
        {
            "id": "146466004",
            "type": "6",
            "timestamp": "2018-12-20 09:00:00",
            "clock_time": "101460718",
            "data": {
                "position": 1837893
            }
        },
        {
            "id": "146466005",
            "type": "4",
            "timestamp": "2018-12-20 09:00:00",
            "clock_time": "101460718",
            "data": {
                "location": 751708
            }
        },
        {
            "id": "146466100",
            "type": "2",
            "timestamp": "2018-12-20 09:07:00",
            "clock_time": "101460718",
            "data": {
                "breakin": 146466099
            }
        }
    ],
    "token": "xxxxxxx"
}

CREATE
Add a timeclock event.
Level 5 is required.

--

Example Request:

{
   "module":"timeclock.event",
   "method":"CREATE",
   "request":{
      "timeclock":"101660899",
      "type":"notes",
      "notes":"New note"
   }
}

Example response:

{
    "status": 1,
    "data": {
        "event": 146776498
    },
    "token": "e75a561fbf7b291d0058f505f5563e115d49bce9"
}

UPDATE
Update a timeclock event.
Level 5 is required.

--

Example Request:

{
   "module":"timeclock.event",
   "method":"UPDATE",
   "request":{ 
     "timeclock":"101660899",
     "event":"146776498",
     "type":"notes",
     "notes":"Updated note"
   }
}

Example Response:

{
    "status": 1,
    "data": {
        "status": "Note updated.",
        "events": {
            "146776210": {
                "id": "146776210",
                "type": "3",
                "timestamp": "2018-12-26 11:22:23",
                "clock_time": "101660899",
                "data": {
                    "notes": "note"
                }
            },
            "146776211": {
                "id": "146776211",
                "type": "4",
                "timestamp": "2018-12-26 11:22:29",
                "clock_time": "101660899",
                "data": {
                    "location": "796883"
                }
            },
            "146776216": {
                "id": "146776216",
                "type": "8",
                "timestamp": "2018-12-26 11:22:58",
                "clock_time": "101660899",
                "data": {
                    "tips": 15
                }
            },
            "146776498": {
                "id": "146776498",
                "type": "3",
                "timestamp": "2018-12-26 11:23:07",
                "clock_time": "101660899",
                "data": {
                    "notes": "New note"
                }
            }
        }
    },
    "token": "xxxxxxx"
}

DELETE
Delete a timeclock event.
Level 5 is required.

--

Example Request:

{
   "module":"timeclock.event",
   "method":"DELETE",
   "request":{
     "timeclock":"101660899",
     "event":"146776498|146776216",
     "type":"delete"
   }
}

Example Response:

{
    "status": 1,
    "data": {
        "status": "Event removed."
    },
    "token": "xxxxxxx"
}