Clockodo API:
Manage requests for change of work time

Endpoint api/v2/workTimes

This endpoint will yield valid data starting on Monday, August 21, 2023.

Object type "changeRequest"

Parameter Type Description
idinteger
The ID of the change request
datestring
The date for which work times should be changed
users_idinteger
The ID of the user whose work times should be changed
statusinteger
The status of the change request
1: requested; 2: declined
declined_atstring|null
The time at which the change request was declined
in format ISO 8601 UTC, e.g. "2023-07-30T12:34:56Z"
declined_byinteger|null
The ID of the user who declined the change request
changeschangeRequestInterval[]
The requested changes

Object type "changeRequestInterval"

Parameter Type Description
typeinteger
Type of change
1: add time; 2: remove time
time_sincestring
Start of the change interval
in format ISO 8601 UTC, e.g. "2023-07-30T12:34:56Z"
time_untilstring
End of the change interval
in format ISO 8601 UTC, e.g. "2023-07-30T12:34:56Z"

List change requests

Request
GET /api/v2/workTimes/changeRequests
Optional parameters date_sincestring
Start of the period for which change requests are being listed
date_untilstring
End of the period for which change requests are being listed
users_idinteger
ID of the user whose change requests are being listed
statusinteger
status filter
1: requested; 2: declined
Response
{
  "paging": [paging information],
  "change_requests": 
  {
    [object of type changeRequest],
    [object of type changeRequest], 
    ...
  }
}

Create change request

Request
POST /api/v2/workTimes/changeRequests
Required parameters datestring
users_idinteger
changeschangeRequestInterval[]
JSON body of a POST request (example)
{
    "date": "2023-07-30",
    "users_id": 123,
    "changes": [
        {
            "type": 1,
            "time_since": "2023-07-30T14:00:00Z",
            "time_until": "2023-07-30T15:00:00Z",
        },
        {
            "type": 2,
            "time_since": "2023-07-30T13:00:00Z",
            "time_until": "2023-07-30T14:00:00Z",
        },
    ]
}
Response
{
  'change_request':          [object of type changeRequest],      // The newly created change request
  'replaced_change_request': [object of type changeRequest]|null, // The previously pending change request for the day which was overwritten
  'approved_immediately':    boolean                              // Was the change request approved automatically?
}

There can only be one pending change request per user and day. By creating another change request for a day which already has a pending one, the existing change request will be overwritten. If a change request is submitted for a day on which the user is allowed to edit work times without a change request, the changes are approved automatically applied to the day's work times.

Approve change request

Request
POST /api/v2/workTimes/changeRequests/[ID]/approve
Response
{
  "change_request": null
}

Decline change request

Request
POST /api/v2/workTimes/changeRequests/[ID]/decline
Response
{
  "change_request": [object of type changeRequest]
}

Delete change request

Request
DELETE /api/v2/workTimes/changeRequests/[ID]

Declined change requests cannot be deleted.

Response
{
  "change_request": null
}
stripes illustration
Contact us!

Our Customer-Success-Team will answer your questions.

Contact now!
Test all functions 14 days free of charge
By submitting this form you accept our terms and conditions and our privacy policy and you confirm that you will use Clockodo as a commercial user.

Take advantage of the experience of 7,000 other companies:

Bechtle Mannheim LogoBechtlePeerigon LogoPeerigon GmbH
Phoenix Logistik LogoPhoenix LogistikFieda LogoFidea