API Documentation

Endpoint: POST /timesheets

Description: Create a new timesheet. All fields are optional and can be provided as needed except user_id and start.

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 company's timezone.

Request Body:

ParameterTypeDescription
user_id
required
integerThe ID of the user.
start
required
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
job_id
optional
integerThe ID of the job.
task_id
optional
integerThe ID of the task.
clock_in_timezone
optional
stringThe timezone at clock in. 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 company's timezone will be used if none is provided. And it must match the ISO 8601 offset when set.
notes
optional
stringA description
mileage
optional
double/floatDistance covered in miles

Request Body Sample:

{
    "user_id": 1,
    "job_id": 5102,
    "mileage": 10,
    "notes": "",
    "start": "2024-10-24T08:10:48+07:00",
    "end": null,
    "clock_in_timezone": "America/Los_Angeles",
    "clock_out_timezone":null
}

Where user_id and start are required

All the other fields are optional.

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