Create Timesheet

Create a new timesheet (time entry) for a worker on a project, account, or opportunity (and optionally a work order).

Authentication

x-api-keystring
API Key authentication via header

Request

This endpoint expects an object.
targetUserIdintegerRequired
Worker the time entry is logged for.
typeenumRequired
startDatestringRequiredformat: "date-time"
endDatestringRequiredformat: "date-time"
Must be after startDate.
projectIdintegerOptional
Project this time entry belongs to. Exactly one of projectId, accountId, or opportunityId is required.
accountIdintegerOptional
Account this time entry belongs to. Exactly one of projectId, accountId, or opportunityId is required.
opportunityIdintegerOptional
Opportunity this time entry belongs to. Exactly one of projectId, accountId, or opportunityId is required.
workOrderIdinteger or nullOptional
Work order this time entry is logged against, if any.
distancedouble or nullOptional
laborHourlyRatedouble or nullOptional
notestring or nullOptional

Response

Timesheet created successfully
idinteger
Unique identifier.
typeenum or null
Time entry type.
statusenum or null
Processing status of the time entry.
startDatestring or nullformat: "date-time"
endDatestring or nullformat: "date-time"
distancedouble or null
Distance traveled, for TRAVEL entries.
notestring or null
isArchivedboolean or null
createdAtstringformat: "date-time"
updatedAtstringformat: "date-time"
projectIdinteger or null

Set when the linked record is a Project. Null when it is an Account (see accountId) or Opportunity (see opportunityId).

accountIdinteger or null
Set when the linked record is an Account. Null otherwise.
opportunityIdinteger or null
Set when the linked record is an Opportunity. Null otherwise.
workOrderIdinteger or null
targetUserIdinteger or null
The worker the time entry is logged for.
createdByinteger or null
updatedByinteger or null
laborHourlyRatedouble or null

Labor cost ($/hr). Only visible with the appropriate financial privilege.

laborTotalCostdouble or null
Only visible with the appropriate financial privilege.

Errors

400
Bad Request Error
401
Unauthorized Error
502
Bad Gateway Error