PUT Timeclock event

Changed on

/timeclocks/event/{timeclock} Permission level: 5

put/timeclocks/event/{timeclock}?access_token=xxxxxxx

Request

  • Base URL
    https://www.humanity.com/api/v2
  • Auth
    API key in query parameter access_token

Query parameters

timeclockinteger required

Time clock ID to which we want to add an event

Request body application/x-www-form-urlencoded

typestring required

Accepted parameter value is of these constant strings: breakin, breakout, notes, location, position, gps, tips, events

timestampstring date

Sets a custom date and time for this timeclock event. If not set, current time will be used. Should be in yyyy-MM-dd hh:mm:ss (24h) format.

notesstring

String variable holding a note. Used only with type=notes.

locationstring

String containing an ID or a name of a Remote Site. An ID is usually sent. Used only with type=location.

positionstring

String containing an ID or a name of a Position. An ID is usually sent. Used only with type=position.

tipsstring

If a setting "Enable Timeclock Tips" is enabled, employees can enter their tip amounts with this parameter. Used only with type=tips.

eventinteger

Id of event we want to update

datastring json

A JSON containing the data which is used when parameter type = events.

gpsstring
clocktimestring json

A JSON containing all data about parent timeclock. Used only when parameter type = events.

Response

200

statusinteger
tokenstring
errorunknown

Example response

{
  "status": 1,
  "data": {
    "status": "Clock time updated.",
    "events": {
      "100022881": {
        "id": "100022881",
        "type": "3",
        "timestamp": "2017-09-11 09:27:00",
        "clock_time": "70558246",
        "data": {
          "notes": "Added note"
        }
      },
      "100022882": {
        "id": "100022882",
        "type": "6",
        "timestamp": "2017-09-11 09:27:00",
        "clock_time": "70558246",
        "data": {
          "position": 743314
        }
      },
      "100022883": {
        "id": "100022883",
        "type": "4",
        "timestamp": "2017-09-11 09:27:00",
        "clock_time": "70558246",
        "data": {
          "location": 358844
        }
      },
      "100023219": {
        "id": "100023219",
        "type": "1",
        "timestamp": "2017-09-11 10:45:00",
        "clock_time": "70558246"
      },
      "100023567": {
        "id": "100023567",
        "type": "2",
        "timestamp": "2017-09-11 11:00:00",
        "clock_time": "70558246",
        "data": {
          "breakin": 100023219
        }
      }
    }
  },
  "token": "xxxxxxx"
}

Changes