Timesheets
- Timesheet Object
- Timesheet Entry Object
- Timesheet Entry Approval Object
- Approve Timesheets
- Decline Timesheets
Timesheets ensure workers are paid appropriately and help project managers invoice clients and track overall project costs and expenses over time.
Timesheets are used in both Projects and Time & Expenses. You can access Timesheets from both applications, but you need a subscription to Projects if you want to approve timesheets and save timesheets as drafts.
Each time a timesheet entry is submitted, a timesheet approval history object is created for tracking purposes.
Approve or Decline by Proxy
You can approve or decline timesheets for another qualified user by creating and using a Web services only user in the UI. This user must have Project permissions that include List and API Proxy for approving timesheets.
For details, see the information about Web Services only users in the Sage Intacct product help.
Timesheet Object
Get Timesheet Object Definition
lookup
List all the fields and relationships for the timesheet object:
Parameters
Name | Required | Type | Description |
---|---|---|---|
object | Required | string | Use TIMESHEET |
Query and List Timesheets
query
List the record number and employee ID for each timesheet for the given employee ID:
List information about timesheets that are available for approval (in
Submitted
state):
Parameters
Name | Required | Type | Description |
---|---|---|---|
object | Required | string | Use TIMESHEET |
filter | Optional | object | Filter expression to limit the response to only objects that match the expression. Check the value of a single field using operators such as equalto/like, or multiple fields using and/or. Query fields on related objects using the dot operator (for example, VENDOR.CREDITLIMIT on APBILL). |
select | Required | sequence | The names of the fields that you want included in the response, and an optional aggregate function such as count or sum . Returning all fields is not supported. |
orderby | Optional | object | Provide an order element with a field name and choose an ascending or descending sort order, for example: <order> |
options | Optional | object | Query options:
|
pagesize | Optional | integer | Maximum number of matching objects to return in the response, between 1 and 2000 items (Default: 100 ) |
offset | Optional | integer | Point at which to start indexing into records (Default: 0 ) |
Query and List Timesheets (Legacy)
readByQuery
Parameters
Name | Required | Type | Description |
---|---|---|---|
object | Required | string | Use TIMESHEET |
fields | Optional | string | Comma-separated list of fields on the object to list. For best performance and predictability, limit the number of fields. To return all fields, omit the element or provide * for the value. |
query | Required | string | SQL-like query based on fields on the object. The following operators are supported: < , > , >= , <= , = , like , not like , in , not in , IS NOT NULL , IS NULL , AND , OR . Illegal XML characters must be properly encoded, and single quotes must be escaped with backslashes ('Jane\'s Deli' ). Joins are not supported. |
pagesize | Optional | integer | Custom page size between 1 and 1000 items (Default: 100 ) |
query
Fields
Name | Required | Type | Description |
---|---|---|---|
STATE | Optional | string | State. Use S for Submitted, A for Approved, X for Partially Approved, R for Declined, I for Draft, E for Partially Declined, or V for Saved. |
Get Timesheet
read
Parameters
Name | Required | Type | Description |
---|---|---|---|
object | Required | string | Use TIMESHEET |
keys | Required | string | Comma-separated list of object RECORDNO to get |
fields | Optional | string | Comma-separated list of fields on the object to get. To return all fields, omit the element or provide * for the value.For best performance and predictability, limit the number of fields. |
returnFormat | Optional | string | Data format for the response body:
|
Create Timesheet
Release | Changes |
---|---|
2022 Release 2 | Added EMPPOSITIONID, LABORCLASSID, LABORSHIFTID, LABORUNIONID |
2020 Release 2 | Added COSTTYPEID |
2019 Release 1 | Added TASKID |
create
Parameters
Name | Required | Type | Description |
---|---|---|---|
TIMESHEET | Required | object | Object to create |
TIMESHEET
Name | Required | Type | Description |
---|---|---|---|
EMPLOYEEID | Required | string | Employee ID |
BEGINDATE | Required | string | Begin date in format mm/dd/yyyy |
GLPOSTDATE | Optional | string | GL posting date in format mm/dd/yyyy |
DESCRIPTION | Optional | string | Description |
SUPDOCID | Optional | string | Attachments ID |
STATE | Optional | string | Action. Use Draft or Submitted . (Default: Draft ) |
TIMESHEETENTRIES | Required | array of TIMESHEETENTRY |
Timesheet entries, must have at least 1. |
TIMESHEETENTRY
Name | Required | Type | Description |
---|---|---|---|
LINENO | Optional | integer | Line number to add entry to. |
CUSTOMERID | Optional | string | Customer ID |
ITEMID | Optional | string | Item ID |
PROJECTID | Optional | string | Project ID |
TASKID | Optional | string | Task ID. Do not use if TASKKEY is set. |
TASKKEY | Optional | integer | Task RECORDNO . Do not use if TASKID is set. |
COSTTYPEID | Optional | string | Cost type ID. Only available when PROJECTID and task are specified. (Construction subscription) |
TIMETYPE | Optional | string | Time type |
BILLABLE | Optional | boolean | Billable. Use false for No, true for Yes. |
EMPPOSITIONID | Optional | string | POSITIONID of an active employee position. |
LABORCLASSID | Optional | string | LABORCLASSID of an active labor class. |
LABORSHIFTID | Optional | string | LABORSHIFTID of an active labor shift. |
LABORUNIONID | Optional | string | LABORUNIONID of an active labor union. |
LOCATIONID | Optional | string | LOCATIONID of an active location. Required if company is multi-entity enabled. |
DEPARTMENTID | Optional | string | Department ID |
ENTRYDATE | Required | string | Entry date in format mm/dd/yyyy |
QTY | Required | number | Hours/Quantity |
DESCRIPTION | Optional | string | Description |
NOTES | Optional | string | Notes |
VENDORID | Optional | string | Vendor ID |
CLASSID | Optional | string | Class ID |
CONTRACTID | Optional | string | Contract ID |
WAREHOUSEID | Optional | string | Warehouse ID |
EXTBILLRATE | Optional | currency | External bill rate |
EXTCOSTRATE | Optional | currency | External cost rate |
EXTAMOUNT | Optional | currency | Labor amount |
EXTEMPLOYERTAXES | Optional | currency | Employer taxes |
EXTFRINGES | Optional | currency | Fringes |
EXTCASHFRINGES | Optional | currency | Cash fringes |
Custom field name | varies | varies | Custom field names and values as defined for this object. For a multi-pick-list custom field, implode multiple field values with #~# . |
Create Timesheet (Legacy)
Release | Changes |
---|---|
2022 Release 2 | Added emppositionid, laborclassid, laborshiftid, laborunionid |
2020 Release 2 | Added costtypeid |
2019 Release 4 | Added taskid |
create_timesheet
Parameters
Name | Required | Type | Description |
---|---|---|---|
employeeid | Required | string | Employee ID |
begindate | Required | object | Begin date |
glpostdate | Optional | object | GL posting date |
timesheetdescription | Optional | string | Description |
state | Optional | string | Action. Use Draft or Submitted . (Default: Submitted ) |
timesheetitems | Required | array of timesheetitem |
Timesheet entries, must have at least 1. |
begindate
glpostdate
Name | Required | Type | Description |
---|---|---|---|
year | Required | string | Year yyyy |
month | Required | string | Month mm |
day | Required | string | Day dd |
timesheetitem
Name | Required | Type | Description |
---|---|---|---|
lineno | Optional | integer | Line number to add entry to |
customerid | Optional | string | Customer ID |
itemid | Optional | string | Item ID |
projectid | Optional | string | Project ID |
taskid | Optional | string | Task ID. Only available when the parent projectid is also specified. |
costtypeid | Optional | string | Cost type ID. Only available when projectid and taskid are specified. (Construction subscription) |
taskname | Optional | string | Task name |
timetype | Optional | string | Time type |
emppositionid | Optional | string | POSITIONID of an active employee position. |
laborclassid | Optional | string | LABORCLASSID of an active labor class. |
laborshiftid | Optional | string | LABORSHIFTID of an active labor shift. |
laborunionid | Optional | string | LABORUNIONID of an active labor union. |
billable | Optional | boolean | Billable. Use false for No, true for Yes. |
locationid | Optional | string | LOCATIONID of an active location. Required if company is multi-entity enabled. |
departmentid | Optional | string | Department ID |
entrydate | Required | object | Entry date |
qty | Required | number | Hours/Quantity |
extamount | Optional | currency | Labor amount |
extemployertaxes | Optional | currency | Employer taxes |
extfringes | Optional | currency | Fringes |
extcashfringes | Optional | currency | Cash fringes |
timesheetentrydescription | Optional | string | Description |
notes | Optional | string | Notes |
vendorid | Optional | string | Vendor ID |
classid | Optional | string | Class ID |
contractid | Optional | string | Contract ID |
warehouseid | Optional | string | Warehouse ID |
extbillrate | Optional | currency | External bill rate |
extcostrate | Optional | currency | External cost rate |
customfields | Optional | array of customfield |
Custom fields |
entrydate
Name | Required | Type | Description |
---|---|---|---|
year | Required | string | Year yyyy |
month | Required | string | Month mm |
day | Required | string | Day dd |
customfield
Name | Required | Type | Description |
---|---|---|---|
customfieldname | Optional | string | Custom field ID |
customfieldvalue | Optional | varies | Custom field value. For a multi-pick-list custom field, implode multiple field values with #~# . |
Update Timesheet
Release | Changes |
---|---|
2022 Release 2 | Added EMPPOSITIONID, LABORCLASSID, LABORSHIFTID, LABORUNIONID |
2020 Release 2 | Added COSTTYPEID |
2019 Release 1 | Added TASKID |
Warning: Updating a timesheet is effectively a complete replace of the existing timesheet and all of its entries. Use with caution.
update
Parameters
Name | Required | Type | Description |
---|---|---|---|
TIMESHEET | Required | object | Object to update |
TIMESHEET
Name | Required | Type | Description |
---|---|---|---|
RECORDNO | Required | integer | Timesheet RECORDNO to update |
EMPLOYEEID | Required | string | Employee ID |
BEGINDATE | Required | string | Begin date in format mm/dd/yyyy |
GLPOSTDATE | Optional | string | GL posting date in format mm/dd/yyyy |
DESCRIPTION | Optional | string | Description |
SUPDOCID | Optional | string | Attachments ID |
STATE | Optional | string | Action. Use Draft or Submitted . |
TIMESHEETENTRIES | Required | array of TIMESHEETENTRY |
Timesheet entries, must have at least 1. |
TIMESHEETENTRY
Name | Required | Type | Description |
---|---|---|---|
LINENO | Optional | integer | Line number to add entry to |
CUSTOMERID | Optional | string | Customer ID |
ITEMID | Optional | string | Item ID |
PROJECTID | Optional | string | Project ID |
TASKID | Optional | string | Task ID. Do not use if TASKKEY is set. |
TASKKEY | Optional | integer | Task RECORDNO . Do not use if TASKID is set. |
COSTTYPEID | Optional | string | Cost type ID. Only available when PROJECTID and task are specified. (Construction subscription) |
TIMETYPE | Optional | string | Time type |
BILLABLE | Optional | boolean | Billable. Use false for No, true for Yes. |
EMPPOSITIONID | Optional | string | POSITIONID of an active employee position. |
LABORCLASSID | Optional | string | LABORCLASSID of an active labor class. |
LABORSHIFTID | Optional | string | LABORSHIFTID of an active labor shift. |
LABORUNIONID | Optional | string | LABORUNIONID of an active labor union. |
LOCATIONID | Optional | string | LOCATIONID of an active location. Required if company is multi-entity enabled. |
DEPARTMENTID | Optional | string | Department ID |
ENTRYDATE | Required | string | Entry date in format mm/dd/yyyy |
QTY | Required | number | Hours/Quantity |
DESCRIPTION | Optional | string | Description |
NOTES | Optional | string | Notes |
VENDORID | Optional | string | Vendor ID |
CLASSID | Optional | string | Class ID |
CONTRACTID | Optional | string | Contract ID |
WAREHOUSEID | Optional | string | Warehouse ID |
EXTBILLRATE | Optional | currency | External bill rate |
EXTCOSTRATE | Optional | currency | External cost rate |
EXTAMOUNT | Optional | currency | Labor amount |
EXTEMPLOYERTAXES | Optional | currency | Employer taxes |
EXTFRINGES | Optional | currency | Fringes |
EXTCASHFRINGES | Optional | currency | Cash fringes |
Custom field name | varies | varies | Custom field names and values as defined for this object. For a multi-pick-list custom field, implode multiple field values with #~# . |
Update Timesheet (Legacy)
Release | Changes |
---|---|
2022 Release 2 | Added emppositionid, laborclassid, laborshiftid, laborunionid |
2020 Release 2 | Added costtypeid |
2019 Release 4 | Added taskid |
Warning: Updating a timesheet is effectively a complete replace of the existing timesheet and all of its entries. Use with caution.
update_timesheet
Parameters
Name | Required | Type | Description |
---|---|---|---|
key | Required | integer | Timesheet RECORDNO to update |
employeeid | Required | string | Employee ID |
begindate | Required | object | Begin date |
glpostdate | Optional | object | GL posting date |
timesheetdescription | Optional | string | Description |
state | Optional | string | Action. Use Draft or Submitted . (Default: Submitted ) |
timesheetitems | Required | array of timesheetitem |
Timesheet entries, must have at least 1. |
begindate
glpostdate
Name | Required | Type | Description |
---|---|---|---|
year | Required | string | Year yyyy |
month | Required | string | Month mm |
day | Required | string | Day dd |
timesheetitem
Name | Required | Type | Description |
---|---|---|---|
lineno | Optional | integer | Line number to add entry to |
customerid | Optional | string | Customer ID |
itemid | Optional | string | Item ID |
projectid | Optional | string | Project ID |
taskid | Optional | string | Task ID. Only available when the parent projectid is also specified. |
costtypeid | Optional | string | Cost type ID. Only available when projectid and taskid are specified. (Construction subscription) |
taskname | Optional | string | Task name |
timetype | Optional | string | Time type |
emppositionid | Optional | string | POSITIONID of an active employee position. |
laborclassid | Optional | string | LABORCLASSID of an active labor class. |
laborshiftid | Optional | string | LABORSHIFTID of an active labor shift. |
laborunionid | Optional | string | LABORUNIONID of an active labor union. |
billable | Optional | boolean | Billable. Use false for No, true for Yes. |
locationid | Optional | string | LOCATIONID of an active location. Required if company is multi-entity enabled. |
departmentid | Optional | string | Department ID |
entrydate | Required | object | Entry date |
qty | Required | number | Hours/Quantity |
extamount | Optional | currency | Labor amount |
extemployertaxes | Optional | currency | Employer taxes |
extfringes | Optional | currency | Fringes |
extcashfringes | Optional | currency | Cash fringes |
timesheetentrydescription | Optional | string | Description |
notes | Optional | string | Notes |
vendorid | Optional | string | Vendor ID |
classid | Optional | string | Class ID |
contractid | Optional | string | Contract ID |
warehouseid | Optional | string | Warehouse ID |
extbillrate | Optional | currency | External bill rate |
extcostrate | Optional | currency | External cost rate |
customfields | Optional | array of customfield |
Custom fields |
entrydate
Name | Required | Type | Description |
---|---|---|---|
year | Required | string | Year yyyy |
month | Required | string | Month mm |
day | Required | string | Day dd |
customfield
Name | Required | Type | Description |
---|---|---|---|
customfieldname | Optional | string | Custom field ID |
customfieldvalue | Optional | varies | Custom field value. For a multi-pick-list custom field, implode multiple field values with #~# . |
Delete Timesheet
delete
Parameters
Name | Required | Type | Description |
---|---|---|---|
object | Required | string | Use TIMESHEET |
keys | Required | string | Comma-separated list of timesheet RECORDNO to delete |
Delete Timesheet (Legacy)
delete_timesheet
Parameters
Name | Required | Type | Description |
---|---|---|---|
key | Required | string | Timesheet RECORDNO to delete |
Timesheet Entry Object
Query and List Timesheet Entries
query
List the record number and state for each timesheet entry:
List the record number and state for each timesheet entry available for approval (in
Submitted
state):
Parameters
Name | Required | Type | Description |
---|---|---|---|
object | Required | string | Use TIMESHEETENTRY |
filter | Optional | object | Filter expression to limit the response to only objects that match the expression. Check the value of a single field using operators such as equalto/like, or multiple fields using and/or. Query fields on related objects using the dot operator (for example, VENDOR.CREDITLIMIT on APBILL). |
select | Required | sequence | The names of the fields that you want included in the response, and an optional aggregate function such as count or sum . Returning all fields is not supported. |
orderby | Optional | object | Provide an order element with a field name and choose an ascending or descending sort order, for example: <order> |
options | Optional | object | Query options:
|
pagesize | Optional | integer | Maximum number of matching objects to return in the response, between 1 and 2000 items (Default: 100 ) |
offset | Optional | integer | Point at which to start indexing into records (Default: 0 ) |
Query and List Timesheet Entries (Legacy)
readByQuery
Parameters
Name | Required | Type | Description |
---|---|---|---|
object | Required | string | Use TIMESHEETENTRY |
fields | Optional | string | Comma-separated list of fields on the object to list. For best performance and predictability, limit the number of fields. To return all fields, omit the element or provide * for the value. |
query | Required | string | SQL-like query based on fields on the object. The following operators are supported: < , > , >= , <= , = , like , not like , in , not in , IS NOT NULL , IS NULL , AND , OR . Illegal XML characters must be properly encoded, and single quotes must be escaped with backslashes ('Jane\'s Deli' ). Joins are not supported. |
pagesize | Optional | integer | Custom page size between 1 and 1000 items (Default: 100 ) |
Get a Timesheet Entry
read
Parameters
Name | Required | Type | Description |
---|---|---|---|
object | Required | string | Use TIMESHEETENTRY |
keys | Required | string | Comma-separated list of object RECORDNO to get |
fields | Optional | string | Comma-separated list of fields on the object to get. To return all fields, omit the element or provide * for the value.For best performance and predictability, limit the number of fields. |
returnFormat | Optional | string | Data format for the response body:
|
Timesheet Entry Approval Object
Query and List Timesheet Approval History
When a timesheet entry is submitted, a corresponding timesheet approval history object is created. This object tracks the state of the timesheet entry.
query
List the record numbers and states for all timesheet approval objects:
Using the timesheet approval history object, list timesheet entry record numbers and descriptions if the designated approver is
JJADAMS
and the timesheet entry is available for approval (inSubmitted
state):
Assuming that
UserID1
is sending the function call, return information about timesheet entries that are approved/approvable byUserID1
for the timesheet with record number 1:
Parameters
Name | Required | Type | Description |
---|---|---|---|
object | Required | string | Use TIMESHEETAPPROVAL |
filter | Optional | object | Filter expression to limit the response to only objects that match the expression. Check the value of a single field using operators such as equalto/like, or multiple fields using and/or. Query fields on related objects using the dot operator (for example, VENDOR.CREDITLIMIT on APBILL). |
select | Required | sequence | The names of the fields that you want included in the response, and an optional aggregate function such as count or sum . Returning all fields is not supported. |
orderby | Optional | object | Provide an order element with a field name and choose an ascending or descending sort order, for example: <order> |
options | Optional | object | Query options:
|
pagesize | Optional | integer | Maximum number of matching objects to return in the response, between 1 and 2000 items (Default: 100 ) |
offset | Optional | integer | Point at which to start indexing into records (Default: 0 ) |
Get Timesheet Approval History
read
Parameters
Name | Required | Type | Description |
---|---|---|---|
object | Required | string | Use TIMESHEETAPPROVAL |
keys | Required | string | Comma-separated list of object RECORDNO to get |
fields | Optional | string | Comma-separated list of fields on the object to get. To return all fields, omit the element or provide * for the value.For best performance and predictability, limit the number of fields. |
returnFormat | Optional | string | Data format for the response body:
|
Approve Timesheets
Release | Changes |
---|---|
2020 Release 3 | Added APPROVEDBY |
You can approve all the entries on a timesheet or approve only selected ones. Timesheet entries can be approved if they are in the Submitted
state.
approve
Approve all entries for the timesheet:
Approve two entries from the timesheet:
Approve all entries for the timesheet on behalf of a different user:
Parameters
Name | Required | Type | Description |
---|---|---|---|
TIMESHEET | Required | string | Object to approve |
TIMESHEET
Name | Required | Type | Description |
---|---|---|---|
RECORDNO | Required | string | Record number of the timesheet |
ENTRYKEYS | Optional | string | Comma-separated list of timesheet entry keys to approve. Omit this parameter to approve all the entries for the timesheet. |
APPROVEDBY | Optional | string | ID of the user on whose behalf this timesheet is approved. The specified user must be an active user with permissions to approve timesheets and must be in the approval chain (or be an unrestricted approver). The APPROVEDBY user is recorded as the user who approved the timesheet even though a different user is executing the request. |
COMMENT | Optional | string | Comments for the approval |
Decline Timesheets
Release | Changes |
---|---|
2020 Release 3 | Added DECLINEDDBY |
You can decline all the entries on a timesheet or decline only selected ones.
decline
Decline all entries for the timesheet:
Decline two entries from the timesheet:
Decline all entries for the timesheet on behalf of a different user:
Parameters
Name | Required | Type | Description |
---|---|---|---|
TIMESHEET | Required | string | Object to decline |
TIMESHEET
Name | Required | Type | Description |
---|---|---|---|
RECORDNO | Required | string | Record number of the timesheet |
ENTRYKEYS | Optional | string | Comma-separated list of timesheet entry keys to decline. Omit this parameter to decline all the entries for the timesheet. |
DECLINEDEDBY | Optional | string | ID of the user on whose behalf this timesheet is declined. The specified user must be an active user with permissions to approve timesheets and must be in the approval chain (or be an unrestricted approver). The DECLINEDBY user is recorded as the user who declined the timesheet even though a different user is executing the request. When listing or querying timesheets, a declined timesheet’s STATE is set to declined, but the field for the user that executed the function is APPROVEDBY , not DECLINEDBY . |
COMMENT | Optional | string | Comments for declined entries |