put https://api.timeero.app/api/public/timesheets/8542079
Endpoint: PUT /timesheets/timesheetId
Description: Updates the details of an existing timesheet specified by the timesheet ID. All fields are optional and can be provided as needed except user_id.
Note: A list of valid timezones to be used in API requests can be found here: Timezones. Please note that when using ISO 8601 date/time values with an offset, the offset must match the provided timezone. If no timezone is provided, it will default to the previous timezone for the timesheet or the company's timezone.
URL Parameters:
Parameter | Type | Description |
---|---|---|
timesheetId | string | The ID of the timesheet to update. |
Request Body:
Parameter | Type | Description |
---|---|---|
user_id required | integer | The ID of the user. |
job_id optional | integer | The ID of the job. |
task_id optional | integer | The ID of the task. |
start optional | datetime | Start time of the timesheet in ISO 8601 format: YYYY-MM-DDTHH:MM:SS±HH:MM. |
end optional | datetime | End time of the timesheet in ISO 8601 format: YYYY-MM-DDTHH:MM:SS±HH:MM |
clock_in_timezone optional | string | The timezone at clock in. The previously saved timezone for the timesheet or the company's timezone will be used if none is provided. And it must match the offset when ISO 8601 offset is set. |
clock_out_timezone optional | string | The timezone at clock out. The previously saved timezone for the timesheet or the company's timezone will be used if none is provided. And it must match the offset when ISO 8601 offset is set. |
notes optional | string | A description |
mileage optional | double/float | Distance covered in miles |
Request Body Sample:
{
"user_id": 1,
"mileage": 10,
"notes": "",
"lunch_break_duration":0,
"start": "2024-10-23T12:10:48-07:00",
"end": null,
"clock_in_timezone":"America/Chicago",
"clock_out_timezone":"America/Phoenix"
}
Where user_id is required
All the other fields are optional.