Clock
post/v2/clock

Request

  • Base URL
    https://my.clockodo.com/api
  • URL
    https://my.clockodo.com/api/v2/clock
  • Auth
    • HTTP basic and API key in header X-Clockodo-External-Application
    • or API key in header X-ClockodoApiUser and API key in header X-ClockodoApiKey and API key in header X-Clockodo-External-Application
    • or OAuth 2
      Authorization code: /oauth/authorize
      Token URL: /token

Request body

customers_idinteger required
services_idinteger required
billable0 | 1 | 2 | 12

Possible values:

  • 0: NotBillable
  • 1: Billable
  • 2: Billed
  • 12: BillableOrBilled
clear_overlapsboolean

Resolve overlaps caused by a backdated clock start ("time_since" in the past): existing time entries within the resulting period are deleted, entries crossing the clock start are shortened to it. Entries reaching beyond the current time stay untouched. Requires "time_since".

clocked_nowboolean

The clock was punched now, while "time_since" only sets the start of the entry. Use it for a backdated start performed by a present user, so the entry is not recorded as clocked offline. Without it a backdated start is treated as an offline recording, which is what the offline synchronization needs. An explicitly supplied "time_clocked_since" always wins. Requires "time_since".

duration_transferinteger nullable
projects_idinteger nullable
subprojects_idinteger nullable
textstring nullable
time_sincestring date-time nullable
users_idinteger nullable

Example request

{
  "time_since": "2023-02-28T12:00:00Z"
}

Response

Successful operation

current_timestring date-time required
stopped_has_been_truncatedboolean required
deleted_entries_idsinteger[]

Example response

{
  "running": {
    "id": 10,
    "customers_id": 10,
    "time_since": "2023-02-28T00:00:00Z",
    "time_insert": "2023-02-28T00:00:00Z",
    "time_last_change": "2023-02-28T00:00:00Z",
    "customers_name": "Hotel Bergblick",
    "projects_name": "Publicity campaign",
    "subprojects_name": "Social media ads",
    "users_name": "Max Mustermann",
    "revenue": 999.9,
    "time_last_change_work_time": "2023-02-28T00:00:00Z",
    "time_clocked_since": "2023-02-28T00:00:00Z",
    "hourly_rate": 99.99,
    "services_name": "SEO service"
  },
  "stopped": {
    "id": 10,
    "customers_id": 10,
    "time_since": "2023-02-28T00:00:00Z",
    "time_insert": "2023-02-28T00:00:00Z",
    "time_last_change": "2023-02-28T00:00:00Z",
    "customers_name": "Hotel Bergblick",
    "projects_name": "Publicity campaign",
    "subprojects_name": "Social media ads",
    "users_name": "Max Mustermann",
    "revenue": 999.9,
    "time_last_change_work_time": "2023-02-28T00:00:00Z",
    "time_clocked_since": "2023-02-28T00:00:00Z",
    "hourly_rate": 99.99,
    "services_name": "SEO service",
    "time_until": "2023-02-28T00:00:00Z"
  },
  "current_time": "2023-02-28T00:00:00.000Z",
  "additional_message": {
    "type": "warn"
  },
  "truncated_entries": [
    {
      "id": 10,
      "customers_id": 10,
      "time_since": "2023-02-28T00:00:00Z",
      "time_insert": "2023-02-28T00:00:00Z",
      "time_last_change": "2023-02-28T00:00:00Z",
      "customers_name": "Hotel Bergblick",
      "projects_name": "Publicity campaign",
      "subprojects_name": "Social media ads",
      "users_name": "Max Mustermann",
      "revenue": 999.9,
      "time_last_change_work_time": "2023-02-28T00:00:00Z",
      "time_clocked_since": "2023-02-28T00:00:00Z",
      "hourly_rate": 99.99,
      "services_name": "SEO service"
    }
  ]
}

Changes

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • breaking

      added to the response property oneOf list for the response status

    • info

      added the required property // to the response with the status

    • info

      added the required property /// to the response with the status