20.03.07 Timesheet

The Timesheet Object

Object PropertyRequiredObject TypeDescriptionMax Character Length
YearYesIntegerYear Of Timesheet4
MonthYesIntegerMonth Of Timesheet2
DayYesIntegerDay Of Timesheet2
AccountProjectIdYesIntegerProject Id Of Timesheet10
AccountProjectTaskIdYesIntegerTask Id Of Timesheet10
TotalTimeYesStringTotal Time Of Timesheet5
DescriptionYesStringDescription Of Timesheet100
StartTimeNoStringStart Time Of Timesheet5
EndTimeNoStringEnd Time Of Timesheet5
AccountWorkTypeIdNoIntegerWork Type Id Of Timesheet10
AccountCostCenterIdNoIntegerCost Center Id Of Timesheet10
LatitudeNoDoubleLatitude Of Employee10
LongitudeNoDoubleLongitude Of Employee10
IPAddressNoStringIPAddress Of Employee15
CustomField1NoStringCustomField 1 Of Timesheet2000
CustomField2NoStringCustomField 2 Of Timesheet2000
CustomField3NoStringCustomField 3 Of Timesheet2000
CustomField4NoStringCustomField 4 Of Timesheet2000
CustomField5NoStringCustomField 5 Of Timesheet2000
CustomField6NoStringCustomField 6 Of Timesheet2000
CustomField7NoStringCustomField 7 Of Timesheet2000
CustomField8NoStringCustomField 8 Of Timesheet2000
CustomField9NoStringCustomField 9 Of Timesheet2000
CustomField10NoStringCustomField 10 Of Timesheet2000
CustomField11NoStringCustomField 11 Of Timesheet2000
CustomField12NoStringCustomField 12 Of Timesheet2000
CustomField13NoStringCustomField 13 Of Timesheet2000
CustomField14NoStringCustomField 14 Of Timesheet2000
CustomField15NoStringCustomField 15 Of Timesheet2000

Create a Timesheet Entry

Creates a Timesheet Entry in your UNItekTIME account and returns the Response Message.
POST /API/Timesheets
Object PropertyRequiredObject TypeDescriptionMax Character Length
YearYesIntegerYear Of Timesheet4
MonthYesIntegerMonth Of Timesheet2
DayYesIntegerDay Of Timesheet2
AccountEmployeeIdYesIntegerEmployee Id Of Timesheet10
AccountProjectIdYesIntegerProject Id Of Timesheet10
AccountProjectTaskIdYesIntegerTask Id Of Timesheet10
TotalTimeYesStringTotal Time Of Timesheet5
DescriptionYesStringDescription Of Timesheet100

Example Request

curl "https://demo.unitektime.com/api/Timesheets" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X POST \
      -H "Content-Type: application/json" \
      -d "{'AccountProjectId':00001,'TimesheetName':'Demo Timesheet','Year':2018,'Month':1,'Day':1,'AccountEmployeeId':00001,'AccountProjectTaskId':00001,'TotalTime':'01:00','Description':'Demo Description'}"

Example Response

[            
      {
          "id": "00001",
          "message": "Time entry Add  Successfully."
      }            
]

Update a Timesheet Entry

Update a Timesheet Entry in your UNItekTIME account and returns the Response Message.
POST /API/Timesheets/{Timesheet_ID}

Example Request

curl "https://demo.unitektime.com/api/Timesheets/00001" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X POST \
      -H "Content-Type: application/json" \
      -d "{'AccountProjectId':00001,'TimesheetName':'Demo Timesheet','Year':2018,'Month':1,'Day':1,'AccountEmployeeId':00001,'AccountProjectTaskId':00001,'TotalTime':'01:00'}"

Example Response

[            
      {
          "id": "00001",
          "message": "Time entry Update Successfully."
      }            
]

Delete a Timesheet Entry

Delete a Timesheet Entry. Returns a 200 OK response code if the call succeeded.
DELETE /API/Timesheets/{Timesheet_ID}

Example Request

curl "https://demo.unitektime.com/api/Timesheets/00003" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X DELETE \
      -H "Content-Type: application/json"

Example Response

[
  {
    "id": "00003",
    "message": "Deleted Successfully"
  }
]

Get Timesheet Entries By Employee and Date Range

Display Timesheet Entries. Returns a 200 OK response code if the call succeeded.
GET /API/Timesheets/{Employee_ID}/{Start_Date}/{End_Date}

Example Request

curl "https://demo.unitektime.com/api/Timesheets/TimeEntriesByEmployeeIdAndDateRange/00001/2018-01-01/2018-01-31" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X GET \
      -H "Content-Type: application/json"

Example Response

[
    {
        "TimeEntryDate": "2018-01-01T00:00:00+00:00",
        "TotalTime": "2018-01-01T02:03:00+00:00",
        "ProjectName": "Demo Project",
        "ProjectCode": "DP",
        "TaskName": "Demo Task",
        "IsBillable": false,
        "TaskCode": "DT",
        "PartyName": "Demo Client",
        "PartyNick": "DC",
        "EmployeeName": "User 01",
        "EmployeeCode": "U-1",
        "MilestoneDescription": "Default Milestone",
        "AccountEmployeeType": "Administrator",
        "DepartmentName": "Admin Department",
        "AccountWorkType": "Standard",
        "AccountCostCenter": null,
        "ServiceItemName": null,
        "AccountProjectId": 00001,
        "AccountProjectTaskId": 00001,
        "TimeEntryDescription": "",
        "TaskDescription": "",
        "IsVendor": false,
        "AccountEmployeeId": 00001,
        "AccountWorkTypeId": 00001,
        "AccountCostCenterId": null,
        "AccountPartyId": 00001,
        "AccountEmployeeTimeEntryId": 00001,
        "AccountTaskTypeId": 00001,
        "TaskType": "Task",
        "EmployeeManager": "",
        "ApprovalStatus": "Not Submitted",
        "Submitted": false,
        "ProjectType": "Marketing",
        "Approved": false,
        "Rejected": false
    }
]

Get Timesheet Entries By Timesheet Period Id

Display Timesheet Entries of specific Timesheet Period Id. Returns a 200 OK response code if the call succeeded.
GET /API/Timesheets/{Timesheet_Period_Id}

Example Request

curl "https://demo.unitektime.com/api/Timesheets/00000000-0000-0000-0000-000000000000" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X GET \
      -H "Content-Type: application/json"

Example Response

{
    "Timesheets": {
        "ID": "00000000-0000-0000-0000-000000000000",
        "EmployeeId": 00001,
        "EmployeeName": "User 01",
        "StartDate": "2018-01-01T00:00:00",
        "EndDate": "2018-01-31T00:00:00",
        "TimesheetType": "Weekly",
        "Status": "Submitted",
        "SubmittedDate": "",
        "TotalHours": 2,
        "TotalMinutes": 120,
        "TotalSeconds": 7200,
        "ApprovalDate": "",
        "TimeEntryRows": [
            {
                "ID": 1,
                "TimeEntryDate": "2018-01-01T00:00:00",
                "ProjectId": 00001,
                "ProjectName": "Demo Project",
                "TaskId": 00001,
                "TaskName": "Demo Task",
                "StartTime": null,
                "EndTime": null,
                "TotalTime": "2018-01-01T01:00:00",
                "Minutes": 60,
                "Hours": 1,
                "Description": "",
                "ClientId": 00001,
                "ClientName": "Demo Client",
                "BillingType": "Hourly",
                "IsBillable": false,
                "BillingRate": 0,
                "EmployeeRate": 50,
                "CustomField1": null,
                "CustomField2": null,
                "CustomField3": null,
                "CustomField4": null,
                "CustomField5": null,
                "CustomField6": null,
                "CustomField7": null,
                "CustomField8": null,
                "CustomField9": null,
                "CustomField10": null,
                "CustomField11": null,
                "CustomField12": null,
                "CustomField13": null,
                "CustomField14": null,
                "CustomField15": null
            },
            {
                "ID": 2,
                "TimeEntryDate": "2018-01-10T00:00:00",
                "ProjectId": 00002,
                "ProjectName": "Sample Project",
                "TaskId": 00002,
                "TaskName": "Sample Task",
                "StartTime": null,
                "EndTime": null,
                "TotalTime": "2018-01-10T01:00:00",
                "Minutes": 60,
                "Hours": 1,
                "Description": null,
                "ClientId": 00002,
                "ClientName": "Client 2",
                "BillingType": "Hourly",
                "IsBillable": false,
                "BillingRate": 0,
                "EmployeeRate": 50,
                "CustomField1": null,
                "CustomField2": null,
                "CustomField3": null,
                "CustomField4": null,
                "CustomField5": null,
                "CustomField6": null,
                "CustomField7": null,
                "CustomField8": null,
                "CustomField9": null,
                "CustomField10": null,
                "CustomField11": null,
                "CustomField12": null,
                "CustomField13": null,
                "CustomField14": null,
                "CustomField15": null
            }
        ]
    }
}

Get Timesheet Period From Date

Display Time Period of specific Date. Returns a 200 OK response code if the call succeeded.
GET /API/Timesheets/GetTimesheetPeriod/{ Year }/{ Month }/{ Day }

Example Request

curl "https://demo.unitektime.com/api/Timesheets/GetTimesheetPeriod/2018/01/01" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X GET \
      -H "Content-Type: application/json"

Example Response

{
    "StartDate": "2018-01-01T00:00:00+00:00",
    "EndDate": "2018-01-07T00:00:00+00:00",
    "TimesheetPeriodType": "Weekly",
    "TimesheetPeriodId": "00000000-0000-0000-0000-000000000000",
    "TimesheetStatus": "Not Submitted",
    "DisableTimeEntry": "No"
}

Get All Timesheet Entries by Date Range

Display Timesheet Entries within Date Range. Returns a 200 OK response code if the call succeeded.
GET /API/Timesheets/GetAllTimeEntriesByDateRange/{Start_Date}/{End_Date}

Example Request

curl "https://demo.unitektime.com/api/Timesheets/GetAllTimeEntriesByDateRange/2018-01-01/2018-01-02" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X GET \
      -H "Content-Type: application/json"

Example Response

[
    {
        "TimeEntryDate": "2018-01-01T00:00:00+00:00",
        "TotalTime": "2018-01-01T01:00:00+00:00",
        "ProjectName": "Demo Project",
        "ProjectCode": "DP",
        "TaskName": "Demo Task",
        "TaskCode": "DT",
        "AccountClientName": "Demo Client",
        "AccountClientNick": "DC",
        "EmployeeName": "User 01",
        "EmployeeCode": "U-1",
        "MilestoneDescription": "Default Milestone",
        "AccountEmployeeType": "Administrator",
        "DepartmentName": "Admin Department",
        "AccountWorkType": "Standard",
        "AccountCostCenter": "Default Cost Center",
        "ServiceItemName": null,
        "AccountProjectId": 00001,
        "AccountProjectTaskId": 00001,
        "TimeEntryDescription": "Sample Time Entry Description",
        "TaskDescription": "Sample Task Description",
        "AccountEmployeeId": 00001,
        "AccountWorkTypeId": 00001,
        "AccountCostCenterId": 0001,
        "AccountPartyId": 00001,
        "AccountEmployeeTimeEntryId": 00001,
        "AccountTaskTypeId": 00001,
        "TaskType": "Task",
        "EmployeeManager": "",
        "ApprovalStatus": "Not Submitted",
        "ProjectType": "Marketing",
        "IsBillable": "No",
        "IsVendor": "No",
        "Submitted": "No",
        "Approved": "No",
        "Rejected": "No"
    },
    {
        "TimeEntryDate": "2018-01-02T00:00:00+00:00",
        "TotalTime": "2018-01-01T01:00:00+00:00",
        "ProjectName": "Demo Project",
        "ProjectCode": "DP",
        "TaskName": "Demo Task",
        "TaskCode": "DT",
        "AccountClientName": "Demo Client",
        "AccountClientNick": "DC",
        "EmployeeName": "User 01",
        "EmployeeCode": "U-1",
        "MilestoneDescription": "Default Milestone",
        "AccountEmployeeType": "Administrator",
        "DepartmentName": "Admin Department",
        "AccountWorkType": "Standard",
        "AccountCostCenter": "Default Cost Center",
        "ServiceItemName": null,
        "AccountProjectId": 00001,
        "AccountProjectTaskId": 00001,
        "TimeEntryDescription": "Sample Time Entry Description",
        "TaskDescription": "Sample Task Description",
        "AccountEmployeeId": 00001,
        "AccountWorkTypeId": 00001,
        "AccountCostCenterId": 0001,
        "AccountPartyId": 00001,
        "AccountEmployeeTimeEntryId": 00001,
        "AccountTaskTypeId": 00001,
        "TaskType": "Task",
        "EmployeeManager": "",
        "ApprovalStatus": "Not Submitted",
        "ProjectType": "Marketing",
        "IsBillable": "No",
        "IsVendor": "No",
        "Submitted": "No",
        "Approved": "No",
        "Rejected": "No"
    }
]

Get All Timesheet WorkDays with Hours by Week of Specific Date

Display Timesheet WorkDays and Hours by Week of Specific Date. Returns a 200 OK response code if the call succeeded.
GET /API/Timesheets/GetTimesheetWorkingDaysWithHours/{ Year }/{ Month }/{ Day }

Example Request

curl "https://demo.unitektime.com/api/Timesheets/GetTimesheetWorkingDaysWithHours/2018/08/01" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X GET \
      -H "Content-Type: application/json"

Example Response

[
    {
        "TimeEntryDate": "2018-01-01T00:00:00+00:00",
        "TotalHours": "01:00",
        "ShowClientInTimesheet": "No",
        "ShowWorkTypeInTimesheet": "No",
        "ShowClockStartEnd": "No",
        "ShowCostCenterInTimesheet": "No"
    },
    {
        "TimeEntryDate": "2018-01-02T00:00:00+00:00",
        "TotalHours": "01:00",
        "ShowClientInTimesheet": "No",
        "ShowWorkTypeInTimesheet": "No",
        "ShowClockStartEnd": "No",
        "ShowCostCenterInTimesheet": "No"
    }
]

Get Timesheet Entry Details of Specific Date

Display Timesheet Entry Details of Specific Date. Returns a 200 OK response code if the call succeeded.
GET /API/Timesheets/GetTimeEntryDetail/{ Year }/{ Month }/{ Day }

Example Request

curl "https://demo.unitektime.com/api/Timesheets/GetTimeEntryDetail/2018/08/01" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X GET \
      -H "Content-Type: application/json"

Example Response

[
    {
        "AccountEmployeeTimeEntryID": 00001,
        "AccountProjectID": 00001,
        "AccountProjectTaskID": 00001,
        "ProjectName": "Demo Project",
        "TaskName": "Demo Task",
        "Description": "Sample Time Entry Description",
        "StartTime": "01/01/2018 1:00:00 PM",
        "EndTime": "01/01/2018 4:00:00 PM",
        "TotalHours": "03:00",
        "ShowClientInTimesheet": "No",
        "ShowWorkTypeInTimesheet": "No",
        "ShowCostCenterInTimesheet": "No",
        "ShowClockStartEnd": "No",
        "AccountClientId": 00001,
        "ClientName": "Demo Client",
        "WorkTypeName": "Standard",
        "AccountWorkTypeID": 0001,
        "TaskTypeID": 00001,
        "TaskType": "Task"
    },
    {
        "AccountEmployeeTimeEntryID": 00002,
        "AccountProjectID": 00001,
        "AccountProjectTaskID": 00001,
        "ProjectName": "Demo Project",
        "TaskName": "Demo Task",
        "Description": "Sample Time Entry Description",
        "StartTime": "01/01/2018 9:00:00 AM",
        "EndTime": "01/01/2018 11:00:00 AM",
        "TotalHours": "02:00",
        "ShowClientInTimesheet": "No",
        "ShowWorkTypeInTimesheet": "No",
        "ShowCostCenterInTimesheet": "No",
        "ShowClockStartEnd": "No",
        "AccountClientId": 00001,
        "ClientName": "Demo Client",
        "WorkTypeName": "Standard",
        "AccountWorkTypeID": 0001,
        "TaskTypeID": 00001,
        "TaskType": "Task"
    }
]

Get Types of Timesheet Approvals

Display Approvals of Time Sheet. Returns a 200 OK response code if the call succeeded.
GET /API/Timesheets/GetTimesheetApprovalTypes

Example Request

curl "https://demo.unitektime.com/api/Timesheets/GetTimesheetApprovalTypes" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X GET \
      -H "Content-Type: application/json"

Example Response

[
    {
        "AccountApprovalTypeId": 00001,
        "ApprovalTypeName": "Team Lead --> Project Manager",
        "IsTimeOffApprovalTypes": "No"
    },
    {
        "AccountApprovalTypeId": 00002,
        "ApprovalTypeName": "Team Lead",
        "IsTimeOffApprovalTypes": "No"
    }
]

Get a List of Submitted Timesheets Who are Not Approved Yet

Display Approvable Time Sheet. Returns a 200 OK response code if the call succeeded.
GET /API/Timesheets/GetTimesheetApprovals

Example Request

curl "https://demo.unitektime.com/api/Timesheets/GetTimesheetApprovals" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X GET \
      -H "Content-Type: application/json"

Example Response

[
    {
        "AccountEmployeeTimeEntryPeriodId": "00000000-0000-0000-0000-000000000000",
        "TimeEntryAccountEmployeeId": 00001,
        "TimeEntryStartDate": "2018-01-01T00:00:00+00:00",
        "TimeEntryEndDate": "2018-01-07T00:00:00+00:00",
        "TimeEntryViewType": "Weekly",
        "EmployeeName": "Employee 01",
        "TotalMinutes": 120,
        "TimeEntryDate": "2018-01-01T00:00:00+00:00",
        "BillableTotalMinutes": 60,
        "NonBillableTotalMinutes": 60,
        "EMailAddress": "someone@example.com",
        "AccountProjectId": 00001,
        "Percentage": 50,
        "SystemApproverTypeId": 1
    }
]

Get Timesheet Period of Specific Employee by Date

Display Timesheet Period for the Week by Date of Employee. Returns a 200 OK response code if the call succeeded.
GET /API/Timesheets/GetTimesheetPeriodByEmployeeId/{Employee_Id}/{ Year }/{ Month }/{ Day }

Example Request

curl "https://demo.unitektime.com/api/Timesheets/GetTimesheetPeriodByEmployeeId/00001/2018/01/01" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X GET \
      -H "Content-Type: application/json"

Example Response

[
    {
        "StartDate": "2018-01-01T00:00:00+00:00",
        "EndDate": "2018-01-07T00:00:00+00:00",
        "TimesheetPeriodType": "Weekly",
        "TimesheetPeriodId": "00000000-0000-0000-0000-000000000000",
        "TimesheetStatus": "Not Submitted",
        "DisableTimeEntry": "No"
    }
]

POST Submit Timesheet Of Employee

Submit Timesheet for specific PeriodId of Employee. Returns a 200 OK response code if the call succeeded.
POST /API/Timesheets/SubmitTimesheetByEmployeeId/{Employee_Id}/{AccountEmployeeTimeEntryPeriod_Id}

Example Request

curl "https://demo.unitektime.com/api/Timesheets/SubmitTimesheetByEmployeeId/00001/00000000-0000-0000-0000-000000000000" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X POST \
      -H "Content-Type: application/json"

Example Response

[
    {
        "Message": "Record Updated"
    }
]

Post Submit Own Timesheet

Submit Own Timesheet for specific PeriodId. Returns a 200 OK response code if the call succeeded.
POST /API/Timesheets/SubmitTimesheetByEmployeeId/{ AccountEmployeeTimeEntryPeriodId }

Example Request

curl "https://demo.unitektime.com/api/Timesheets/SubmitTimesheetByEmployeeId/00000000-0000-0000-0000-000000000000" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X POST \
      -H "Content-Type: application/json"

Example Response

[
    {
        "Message": "Record Updated"
    }
]

Approve or Reject Timesheet

Approve or Reject Timesheet for specific PeriodId. Returns a 200 OK response code if the call succeeded. Valid Values for Status are “Approve” or “Reject”
POST /API/Timesheets/ApproveTimeSheet

Example Request

curl "https://demo.unitektime.com/api/Timesheets/ApproveTimeSheet" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X POST \
      -H "Content-Type: application/json" \
      -d "{'TimeEntryPeriodId':'00000000-0000-0000-0000-000000000000','Status':'Approve'}"

Example Response

[
    {
        "Message": "TimeEntryPeriod Approved Successfully"
    }
]

Get Timesheet Periods by Date Range

Display a list of Timesheet Periods by Date range. Returns a 200 OK response code if the call succeeded.
ParametersRequiredInput StyleDescriptionDefault Value
Start DateYesMM-DD-YYYYStart Date for Period List
End DateYesMM-DD-YYYYEnd Date for Period List
OutputTypeNoDigitPeriod List Output Type range as 1=Entered, 2=Both, 3=Not Entered1
ApprovalStatusNoDigitPeriod List Approval Status range as 0=All Timesheet Periods, 1=All Open Timesheet Periods, 2=Not Submitted, 3=Submitted,4=Approved, 5=Rejected1
POST /API/Timesheets/TimeEntryPeriodList/{Start Date}/{End Date}?OutputType={Output Type}&ApprovalStatus={Approval Status}

Example Request

curl "https://demo.unitektime.com/api/Timesheets/TimeEntryPeriodList/11-1-2018/11-30-2018?OutputType=1&ApprovalStatus=1" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X POST \
      -H "Content-Type: application/json" \

Example Response

[
    {
        "TimeEntryStartDate": "2018-10-29T00:00:00+00:00",
        "TimeEntryEndDate": "2018-11-04T00:00:00+00:00",
        "TimeEntryViewType": "Weekly",
        "AccountEmployeeTimeEntryPeriodId": "00000000-0000-0000-0000-000000000000",
        "AccountId": 1,
        "AccountEmployeeId": 1,
        "EmployeeName": "Demo Employee",
        "IsEntered": "No",
        "Submitted": false,
        "Approved": false,
        "Rejected": false,
        "InApproval": false,
        "SubmittedDate": null,
        "ApprovedOn": null,
        "ApprovedByEmployeeId": null,
        "RejectedOn": null,
        "RejectedByEmployeeId": null,
        "TotalHours": 0,
        "TotalMinutes": 0
    }
]

Get Timesheet Entries Of Employee By Date Range with Timesheet Entry Status

Display Timesheet Entries. Returns a 200 OK response code if the call succeeded.
Parameter PropertyObject TypeDefault Value
ApprovedBooleanFalse
RejectedBooleanFalse
SubmittedBooleanFalse
GET /API/Timesheets/GetTimeEntries/{Employee_ID}/{Start_Date}/{End_Date}?Approved={Boolean_Value}&Rejected={Boolean_Value}&Submitted={Boolean_Value}

Example Request of Approved and Rejected Timesheet Entries

curl "https://demo.unitektime.com/api/Timesheets/GetTimeEntries/81388/2018-01-01/2019-01-29?Approved=True&Rejected=True&Submitted=False" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X GET \
      -H "Content-Type: application/json"

Example Response

[
    {
        "TimeEntryDate": "2019-03-01T00:00:00+00:00",
        "TotalTime": "2019-03-01T01:00:00+00:00",
        "Description": "Sample Time Entry",
        "AccountEmployeeTimeEntryId": 123,
        "Status": "Pending Approval",
        "AccountProjectId": 123,
        "AccountProjectTaskId": 123,
        "AccountEmployeeId": 123,
        "AccountCostCenterId": null,
        "AccountWorkTypeId": 123,
        "ProjectName": "Demo Project",
        "ProjectDescription": "Demo Project Description",
        "ProjectCode": "DP-1",
        "IsDisabled": false,
        "IsTemplate": false,
        "IsProject": true,
        "IsDeleted": true,
        "TaskName": "Demo Task",
        "TaskDescription": "Demo Task Description",
        "IsParentTask": false,
        "IsBillable": false,
        "TaskCode": "",
        "ClientName": "Demo Client",
        "ClientCode": " ",
        "EmployeeName": "Demo Employee",
        "AccountId": 001,
        "EmployeeCode": "DE-01",
        "MilestoneDescription": "Default Milestone",
        "AccountWorkType": "Standard",
        "AccountCostCenter": null,
        "AccountEmployeeType": "Full-time Hourly",
        "IsVendor": false,
        "AccountClientId": 123,
        "AccountTaskTypeId": 123,
        "TaskType": "Task",
        "EmployeeManager": " ",
        "CustomField1": "",
        "CustomField2": "",
        "CustomField3": "",
        "CustomField4": "",
        "CustomField5": "",
        "CustomField6": "",
        "CustomField7": "",
        "CustomField8": "",
        "CustomField9": "",
        "CustomField10": "",
        "CustomField11": "",
        "CustomField12": "",
        "CustomField13": "",
        "CustomField14": "",
        "CustomField15": ""
    }
]

Get Timesheet Entry by Time Entry Id

Display Timesheet Entry. Returns a 200 OK response code if the call succeeded.
GET /API/Timesheets/TimeEntry/{Time_Entry_ID}

Example Request of Approved and Rejected Timesheet Entries

curl "https://demo.unitektime.com/api/Timesheets/TimeEntry/1" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X GET \
      -H "Content-Type: application/json"

Example Response

[
    {
        "EmployeeName": "Demo Employee",
        "ProjectName": "Demo Project",
        "TaskName": "Demo Task",
        "TotalTime": "2020-09-14T03:00:00+00:00",
        "Approved": true,
        "AccountEmployeeId": 1,
        "AccountProjectId": 1,
        "TeamLeadApproved": null,
        "ProjectManagerApproved": null,
        "AdministratorApproved": null,
        "AccountEmployeeTimeEntryId": 1,
        "StartTime": null,
        "EndTime": null,
        "TimeEntryDate": "2020-09-14T00:00:00+00:00",
        "Description": null,
        "AccountId": 1,
        "TotalMinutes": 180,
        "WeekDay": 2,
        "AccountClientId": 1,
        "ClientName": "Demo Client",
        "AccountProjectTaskId": 1,
        "BillingType": "Hourly",
        "LeaderEmployeeId": 1,
        "ProjectManagerEmployeeId": 1,
        "TimeSheetApprovalTypeId": null,
        "ExpenseApprovalTypeId": null,
        "IsBillable": false,
        "Rejected": false,
        "BillingRate": 0.0,
        "ProjectBillingRateTypeId": 1,
        "EmployeeCode": "",
        "AccountDepartmentId": 1,
        "DepartmentName": "Default Department",
        "EstimatedCost": 0.0,
        "EstimatedTimeSpent": 0.0,
        "Submitted": true,
        "AccountWorkType": "Billable",
        "EMailAddress": "User@Example.com",
        "AccountLocation": "Default Location",
        "AccountCostCenter": "Default Cost Center",
        "AccountCostCenterCode": "Default",
        "AccountWorkTypeCode": "Bill",
        "ProjectCode": "DP",
        "TaskCode": "DP-1",
        "AccountLocationId": 1,
        "Comments": null,
        "BillingRateCurrencyId": 0,
        "EmployeeRateCurrencyId": 1,
        "BillingRateExchangeRate": 0.0,
        "EmployeeRateExchangeRate": 1,
        "AccountBaseCurrencyId": 1,
        "AccountTaskTypeId": 1,
        "TaskStatusId": 1,
        "AccountPriorityId":1,
        "AccountProjectMilestoneId": 1,
        "DepartmentCode": "Default",
        "ClientCode": "",
        "EstimatedCurrencyId": 1,
        "ApprovedOn": null,
        "EmployeeRate": 1.0,
        "AccountRoleId": 1,
        "Role": "Administrator",
        "AccountProjectTypeId": 1,
        "ProjectDescription": " ",
        "TaskDescription": "Demo Description",
        "AccountTimeExpenseBillingTimesheetId": null,
        "Billed": null,
        "AccountEmployeeTimeEntryApprovalProjectId": "00000000-0000-0000-0000-000000000000",
        "AccountEmployeeTimeEntryPeriodId": "00000000-0000-0000-0000-000000000000",
        "SubmittedHours": 3.0,
        "ApprovedHours": 3.0,
        "RejectedHours": null,
        "TimeEntryStartDate": "2020-09-14T00:00:00+00:00",
        "TimeEntryEndDate": "2020-09-20T00:00:00+00:00",
        "TimeEntryViewType": "Weekly",
        "ClientContactName": null,
        "ClientDepartmentCode": null,
        "ClientDepartmentName": null,
        "ClientDepartmentLocation": null,
        "AccountWorkTypeId": 1,
        "IsTimeOff": false,
        "Hours": 3.0,
        "AccountTimeOffTypeId": null,
        "AccountEmployeeTimeOffRequestId": null,
        "Percentage": 0,
        "CustomField1": null,
        "CustomField2": null,
        "CustomField3": null,
        "CustomField4": null,
        "CustomField5": null,
        "CustomField6": null,
        "CustomField7": null,
        "CustomField8": null,
        "CustomField9": null,
        "CustomField10": null,
        "CustomField11": null,
        "CustomField12": null,
        "CustomField13": null,
        "CustomField14": null,
        "CustomField15": null,
        "ApprovalStatus": "Approved",
        "PeriodSubmitted": true,
        "FirstName": "Admin",
        "LastName": "Demo",
        "Prefix": "",
        "PeriodApproved": true,
        "PeriodRejected": false,
        "PeriodSubmittedDate": "2020-09-15T11:33:18.14+00:00",
        "PeriodApprovedOn": "2020-09-15T00:00:00+00:00",
        "SubmittedBy": 1,
        "createdon": "2020-09-15T11:33:18.56+00:00",
        "modifiedOn": "2020-09-15T11:33:18.56+00:00",
        "IsProjectDeleted": false
    }
]

Get Timesheet Entry with TimeOff by Employee Id and Date Range

Display Timesheet Entry with TimeOff. Returns a 200 OK response code if the call succeeded.
GET /API/Timesheets/TimeOff/{Employee_Id}/{Start_Date}/{End_Date}

Example Request of Timesheet Entry with TimeOff

curl "https://demo.unitektime.com/api/Timesheets/TimeOff/001/2020-9-1/2020-9-30" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X GET \
      -H "Content-Type: application/json"

Example Response

[
     {
        "AccountEmployeeTimeEntryId": 1,
        "AccountEmployeeId": 1,
        "TimeEntryDate": "2020-09-14T00:00:00+00:00",
        "StartTime": null,
        "EndTime": null,
        "TotalTime": "2020-09-14T03:00:00+00:00",
        "AccountProjectId": 1,
        "AccountProjectTaskId": 1,
        "Description": null,
        "TimeSheetApprovalPathId": null,
        "Approved": true,
        "TeamLeadApproved": null,
        "ProjectManagerApproved": null,
        "AdministratorApproved": null,
        "CreatedOn": "2020-09-15T11:33:18.56+00:00",
        "ModifiedOn": "2020-09-15T11:33:18.56+00:00",
        "Rejected": false,
        "BillingRate": 0.0,
        "IsApproved": null,
        "IsReject": null,
        "Submitted": true,
        "AccountWorkTypeId": 1,
        "ClientName": "Demo Client",
        "AccountClientId": 1,
        "ClientCode": "",
        "ProjectName": "Demo Project",
        "TaskName": "Demo Task",
        "IsTimeOff": false,
        "Hours": 3.0,
        "AccountTimeOffTypeId": null,
        "AccountEmployeeTimeOffRequestId": null,
        "AccountEmployeeTimeEntryApprovalProjectId": "00000000-0000-0000-0000-000000000000",
        "AccountEmployeeTimeEntryPeriodId": "00000000-0000-0000-0000-000000000000",
        "AccountCostCenterId": 1,
        "ApprovedByEmployeeId": null,
        "AccountCostCenter": "Default Cost Center",
        "AccountWorkType": "Billable",
        "ApprovedOn": null,
        "Percentage": 0,
        "CustomField1": "None",
        "CustomField2": null,
        "CustomField3": null,
        "CustomField4": null,
        "CustomField5": null,
        "CustomField6": null,
        "CustomField7": null,
        "CustomField8": null,
        "CustomField9": null,
        "CustomField10": null,
        "CustomField11": null,
        "CustomField12": null,
        "CustomField13": null,
        "CustomField14": null,
        "CustomField15": null,
        "TotalMinutes": 180,
        "PeriodDescription": "",
        "AccountTimeOffType": null
    }
]

Create a TimeOff Entry

Creates a TimeOff Entry in your UNItekTIME account and returns the Response Message.
POST /API/TimeSheets/TimeOff
Object PropertyRequiredObject TypeDescriptionMax Character Length
YearYesIntegerYear Of TimeOff4
MonthYesIntegerMonth Of TimeOff2
DayYesIntegerDay Of TimeOff2
AccountEmployeeIdYesIntegerEmployee Id Of TimeOff10
AccountTimeOffTypeIdYesGuidTimeOff Type Id Of TimeOff32
TotalTimeYesStringTotal Time Of TimeOff5
DescriptionYesStringDescription Of TimeOff100

Example Request

curl "https://demo.unitektime.com/api/TimeSheets/TimeOff" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X POST \
      -H "Content-Type: application/json" \
      -d "{'Year':2018,'Month':1,'Day':1,'AccountEmployeeId':00001,'AccountTimeOffTypeId':00000000-0000-0000-0000-000000000000,'TotalTime':'01:00','Description':'Demo Description'}"

Example Response

[            
      {
          "id": "00001",
          "message": "Time Off  Add  Successfully."
      }            
]

Update a TimeOff Entry

Update a TimeOff Entry in your UNItekTIME account and returns the Response Message.
POST /API/TimeSheets/TimeOff/{TimeOff_ID}

Example Request

curl "https://demo.unitektime.com/api/TimeSheets/TimeOff/00001" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X POST \
      -H "Content-Type: application/json" \
      -d "{'Year':2018,'Month':1,'Day':1,'AccountEmployeeId':00001,'AccountTimeOffTypeId':00000000-0000-0000-0000-000000000000,'TotalTime':'01:00','Description':'Demo Description'}"

Example Response

[            
      {
          "id": "00001",
          "message": "Time Off Update Successfully."
      }            
]

Delete a TimeOff Entry

Delete a TimeOff Entry. Returns a 200 OK response code if the call succeeded.
DELETE /API/TimeSheets/TimeOff/{TimeOff_ID}

Example Request

curl "https://demo.unitektime.com/api/TimeSheets/TimeOff/00003" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X DELETE \
      -H "Content-Type: application/json"

Example Response

[
  {
    "id": "00003",
    "message": "Time off entry Deleted successfully"
  }
]

Get TimeOff Entries By Employee and Time Off Type

Display TimeOff Entries. Returns a 200 OK response code if the call succeeded.
GET /API/TimeSheets/TimeOff/{Employee_ID}/{AccountTimeOffType_Id}

Example Request

curl "https://demo.unitektime.com/api/TimeSheets/TimeOff/TimeEntriesByEmployeeIdAndDateRange/00001/00000000-0000-0000-0000-000000000000" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X GET \
      -H "Content-Type: application/json"

Example Response

[
    {
        "AccountEmployeeTimeEntryId": 00001,
        "AccountEmployeeId": 00001,
        "TimeEntryDate": "2020-06-01T00:00:00+00:00",
        "StartTime": null,
        "EndTime": null,
        "TotalTime": "2020-06-01T08:00:00+00:00",
        "AccountProjectId": null,
        "AccountProjectTaskId": null,
        "Description": "Demo Description",
        "TimeSheetApprovalPathId": null,
        "Approved": true,
        "TeamLeadApproved": null,
        "ProjectManagerApproved": null,
        "AdministratorApproved": null,
        "CreatedOn": "2020-05-18T15:30:31.263+00:00",
        "ModifiedOn": "2020-05-18T15:30:31.263+00:00",
        "Rejected": false,
        "BillingRate": 0.0,
        "IsApproved": null,
        "IsReject": null,
        "Submitted": true,
        "AccountWorkTypeId": null,
        "ClientName": null,
        "AccountClientId": null,
        "ClientCode": null,
        "ProjectName": null,
        "TaskName": null,
        "IsTimeOff": true,
        "Hours": 8.0,
        "AccountTimeOffTypeId": "00000000-0000-0000-0000-000000000000",
        "AccountEmployeeTimeOffRequestId": "00000000-0000-0000-0000-000000000000",
        "AccountEmployeeTimeEntryApprovalProjectId": null,
        "AccountEmployeeTimeEntryPeriodId": "00000000-0000-0000-0000-000000000000",
        "AccountCostCenterId": null,
        "ApprovedByEmployeeId": null,
        "AccountCostCenter": null,
        "AccountWorkType": null,
        "ApprovedOn": null,
        "Percentage": 0.0,
        "CustomField1": "",
        "CustomField2": "",
        "CustomField3": "",
        "CustomField4": "",
        "CustomField5": "",
        "CustomField6": "",
        "CustomField7": "",
        "CustomField8": "",
        "CustomField9": "",
        "CustomField10": "",
        "CustomField11": "",
        "CustomField12": "",
        "CustomField13": "",
        "CustomField14": "",
        "CustomField15": "",
        "TotalMinutes": 480,
        "PeriodDescription": "",
        "AccountTimeOffType": "Holiday"
    }
]