Your browser is not up to date. This may cause security, speed, and display
issues. Please update your browser.
Update Browser
X
This endpoint will yield valid data starting on Monday, August 21, 2023.
Feel free to use our updated API documentation.
| Parameter | Type | Description |
|---|---|---|
| id | integer |
The ID of the change request
|
| date | string |
The date for which work times should be changed
|
| users_id | integer |
The ID of the user whose work times should be changed
|
| status | integer |
The status of the change request
1: requested; 2: declined
|
| declined_at | string|null |
The time at which the change request was declined
in format ISO 8601 UTC, e.g. "2023-07-30T12:34:56Z"
|
| declined_by | integer|null |
The ID of the user who declined the change request
|
| changes | changeRequestInterval[] |
The requested changes
|
| Parameter | Type | Description |
|---|---|---|
| type | integer |
Type of change
1: add time; 2: remove time
|
| time_since | string |
Start of the change interval
in format ISO 8601 UTC, e.g. "2023-07-30T12:34:56Z"
|
| time_until | string |
End of the change interval
in format ISO 8601 UTC, e.g. "2023-07-30T12:34:56Z"
|
GET /api/v2/workTimes/changeRequests
| Optional parameters | date_since | string |
Start of the period for which change requests are being listed
|
|---|---|---|---|
| date_until | string |
End of the period for which change requests are being listed
| |
| users_id | integer |
ID of the user whose change requests are being listed
| |
| status | integer |
status filter
1: requested; 2: declined
|
{
"paging": [paging information],
"change_requests":
{
[object of type changeRequest],
[object of type changeRequest],
...
}
}POST /api/v2/workTimes/changeRequests
| Required parameters | date | string |
|---|---|---|
| users_id | integer | |
| changes | changeRequestInterval[] |
{
"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",
},
]
}{
'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.
POST /api/v2/workTimes/changeRequests/[ID]/approve
{
"change_request": null
}POST /api/v2/workTimes/changeRequests/[ID]/decline
{
"change_request": [object of type changeRequest]
}DELETE /api/v2/workTimes/changeRequests/[ID]
Declined change requests cannot be deleted.
{
"change_request": null
}