Update sick days record
Updates an existing sick days record.
What can be updated:
- Start and end dates
- Comment/notes
- Attached medical certificate file IDs
To update medical certificates:
- Upload new files via POST /api/public/workspace/upload
- Get file IDs from responses
- Include all file IDs (old and new) in
attachedFilesIdsarray
Note: This endpoint is only available for employee accounts. The system validates that there are no overlapping events for the specified period.
PUT
/account/employee/sick-days/{id}Authorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idstringrequiredRequest body
requiredapplication/jsonattachedFilesIdsstring[]requiredArray of attached file IDs
commentstringComment about the sickness
dateFromstringrequiredSickness start date
dateTostringrequiredSickness end date
Responses
200
successbooleanrequiredOperation success flag
400Validation errors
errorsobjectShow propertiesHide properties
attachedFilesIdsstring[]dateFromstring[]dateTostring[]globalErrorsstring[]messagestringstatusCodenumber401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X PUT "https://leadtime.app/api/public/account/employee/sick-days/string" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"attachedFilesIds": [
"file-id-1",
"file-id-2"
],
"comment": "Flu symptoms",
"dateFrom": "2024-06-01T00:00:00.000Z",
"dateTo": "2024-06-05T00:00:00.000Z"
}'const response = await fetch("https://leadtime.app/api/public/account/employee/sick-days/string", {
method: "PUT",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"attachedFilesIds": [
"file-id-1",
"file-id-2"
],
"comment": "Flu symptoms",
"dateFrom": "2024-06-01T00:00:00.000Z",
"dateTo": "2024-06-05T00:00:00.000Z"
})
});import requests
response = requests.put(
"https://leadtime.app/api/public/account/employee/sick-days/string",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"attachedFilesIds": [
"file-id-1",
"file-id-2"
],
"comment": "Flu symptoms",
"dateFrom": "2024-06-01T00:00:00.000Z",
"dateTo": "2024-06-05T00:00:00.000Z"
},
)Response
{
"success": true
}{
"errors": {
"attachedFilesIds": [
"Attached files IDs are required."
],
"dateFrom": [
"Date from is required."
],
"dateTo": [
"Date to is required."
],
"globalErrors": [
"There are already other events for this period. Please select another one."
]
},
"message": "Bad Request",
"statusCode": 400
}Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions