API Documentation

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:

ParameterTypeDescription
timesheetIdstringThe ID of the timesheet to update.

Request Body:

ParameterTypeDescription
user_id
required
integerThe ID of the user.
job_id
optional
integerThe ID of the job.
task_id
optional
integerThe ID of the task.
start
optional
datetimeStart time of the timesheet in ISO 8601 format: YYYY-MM-DDTHH:MM:SS±HH:MM.
end
optional
datetimeEnd time of the timesheet in ISO 8601 format: YYYY-MM-DDTHH:MM:SS±HH:MM
clock_in_timezone
optional
stringThe 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
stringThe 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
stringA description
mileage
optional
double/floatDistance 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.

Language
URL
Click Try It! to start a request and see the response here!