Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Endpoints

TimesheetAttendanceApi

[Description]

/api/TimesheetAttendanceApi

Operation

Logged in User

Parameters

Overview

Provides access to Workbench Timesheet data.

Endpoints

The resources available in this module.

TimesheetListApi

Provides API access to the Daily Desktop Timesheets (#/Timesheets/List.aspx) Web Workbench screen.

/api/TimesheetListApi

Method

Performed As

Request Query

Request Body

Response

POST

TimesheetDefaultsApi

[Description]

Models

TimesheetApiModel

/api/TimesheetDefaultsApi

Operation

Retrieve a filtered list of the User’s Timesheets.

GridRequestParametersApi.IntValue, if specified; otherwise Logged in User.

Parameters

-

Body

Response

GET
Retrieves timesheet default values for client side, calculation by PersonID and JobCode

jobTranId
personId
finCoCode
jobCode
activityCode
workCentreCode
activityType
activitySubType
timeCode
costType
costRate
gstRate
profileId
statusFlag
tranDate
employeeClass

TimesheetDetailApi

Note: In order to create a Timesheet Line, please use POST with {Workbench.Mvc4.Areas.Api.Controllers.TimesheetDefaultsApiController} TimesheetDefaultsApi.

/api/TimesheetDetailApi

Operation

Logged in User

Parameters

Body

Response

GET
Returns or update a detail timesheet with lines.

personId
timesheetDate

POST
Update or create a new timesheet if not available.

TimesheetListApi - here

[Description]

/api/TimesheetListApi

Operation

Logged in User

Parameters

Body

Response

POST
Returns a list of timesheets. If IntValue is specified, then the list of Timesheet is filtered by this PersonID.

TimesheetDetailApi

Provides API access to the Daily Timesheet Detail (#/Timesheets/Daily.aspx) Web Workbench screen.

/api/TimesheetDetailApi

Method

Performed As

Request Query

Request Body

Response

GET
Retrieve a specific Timesheet.

Admin User

TimesheetKey

-

TimesheetApiModel

POST
Update an existing, or create a new Timesheet.

TimesheetApiModel.Form.Key.PersonId

-

TimesheetApiModel

TimesheetApiModel

TimesheetDefaultsApi

Provides API access to the default line logic on the Daily Timesheet Detail (#/Timesheets/Daily.aspx) Web Workbench screen.

/api/TimesheetDefaultsApi

Method

Performed As

Request Query

Request Body

Response

GET
Retrieves Timesheet Line default values for a given line key.

Admin User

TimesheetDetailKey

-

TimesheetDefaultLineApiModel

TimesheetAttendanceApi

Provides readonly API access to the Attendance Dialog on the Daily Desktop Timesheets (#/Timesheets/List.aspx) Web Workbench screen.

/api/TimesheetAttendanceApi

Method

Performed As

Request Query

Request Body

Response

POST

Retrieve the attendance data a specific Timesheet.

Admin User

-

GridRequestParametersApi (IntValue and DateValue are required: they are the Person ID and Timesheet Date of the Timesheet respectively)

GridResult<AttendanceLine>

Models

The definitions of models specific to endpoints in this module.

TimesheetKey

Property

Data Type

Description

Day1Complete

PersonId

Boolean

Day2Complete

Boolean

Day3Complete

Boolean

Day4Complete

Boolean

Day5Complete

Boolean

Day6Complete

Boolean

Day7Complete

Boolean

AttendanceFields

TimesheetApiAttendanceFields

Form

TimesheetsTimesheetFormResult

Rows

Array [TimesheetsDailyDetailLine]

ReadonlyMessages

Array [Tuple_String]

ValidationErrors

Array [MvcValidationError]

WarningMessage

String

SuccessMessage

String

ErrorMessage

String

Integer

The ID of the Person this Timesheet is for.

TimesheetDate

DateTime

The Timesheet Date.

⬆️ Back to top

TimesheetsAttendanceKey

TimesheetLine

Property

Data Type

Description

Action

PersonId

Integer

Person id

Key

String

= ['FirstIn', 'FirstOut', 'SecondIn', 'SecondOut']

TimesheetKey

The unique key for the line.

PersonName

CellData

The Person this Timesheet if for.

TimesheetDate

String

The Timesheet

date

Rows

GridResult_TimesheetsAttendanceLine

⬆️ Back to top

TimesheetsAttendanceKey

Property

Data Type

Description

Action

String

=['FirstIn', 'FirstOut', 'SecondIn', 'SecondOut']

PersonId

Integer

TimesheetDate

String

Date, formatted.

⬆️ Back to top

TimesheetApiAttendanceFields

Property

Data Type

Description

Entered

CellData

The total hours entered on the Timesheet.

Standard

CellData

The number of hours expected on the Timesheet.

Variance

CellData

The difference between Entered and Standard.

Completed

Boolean

The Completed flag on the Timesheet.

Approved

Boolean

The Approved flag on the Timesheet.

UpdatedDate

DateTime

The date the Timesheet was last modified.

⬆️ Back to top

TimesheetsAttendanceLine

TimesheetApiModel

Property

Data Type

Description

LineNo

Form

String

Line number

TimesheetForm

The general data associated withe the Timesheet.

ShiftNo

Rows

String

Shift number.

Shift

String

Shift work.

Day1

CellData

Day 1 in the week.

Day2

CellData

Day 2 in the week.

Day3

CellData

Day 3 in the week.

Day4

CellData

Day 4 in the week.

Day5

CellData

Day 5 in the week.

Day6

CellData

Day 6 in the week.

Day7

CellData

Day 7 in the week.

ReadonlyFlag

Integer

Read Only status.

ReadonlyMessage

String

Read Only message.

OriginalKey

TimesheetsAttendanceKey

CurrentKey

TimesheetsAttendanceKey

Key

TimesheetsAttendanceKey

Index

Integer

⬆️ Back to top

TimesheetsDetailDefaults

Array<TimesheetDetailLine>

The Timesheet Lines.

AttendanceFields.Rows

Array<TimesheetAttendanceLine>

The Timesheet Attendance Lines.

Day1Complete

Boolean

A flag to indicate if the first day of the Timesheet is complete.

Day2Complete

Boolean

A flag to indicate if the second day of the Timesheet is complete.

Day3Complete

Boolean

A flag to indicate if the third day of the Timesheet is complete.

Day4Complete

Boolean

A flag to indicate if the fourth day of the Timesheet is complete.

Day5Complete

Boolean

A flag to indicate if the fifth day of the Timesheet is complete.

Day6Complete

Boolean

A flag to indicate if the sixth day of the Timesheet is complete.

Day7Complete

Boolean

A flag to indicate if the seventh day of the Timesheet is complete.

SuccessMessage

String

A message indicating the update was successful.

WarningMessage

String

A warning message about the Timesheet.

ValidationErrors

Array<MvcValidationError>

A list of specific validation errors if the save was unsuccessful.

⬆️ Back to top

TimesheetForm

Property

Data Type

Description

keys

Key

TimesheetsDetailDefaultsKey

⬆️ Back to top

TimesheetsDetailDefaultsKey

Property

Data Type

Description

FinCoCode

String

Financial company code.

ActivityCode

CellData

Activity code.

ActivityType

String

Activity type.

ActivitySubType

String

Activity sub type.

CostRate

Number

Cost rate.

CostType

String

Cost type.

GstRate

Number

Tax rate.

WorkCentreCode

CellData

Work Centre code.

TimeCode

CellData

Time code.

TimesheetDate

String

Timesheet date.

EmployeeClass

String

Employee class.

⬆️ Back to top

TimesheetsDetailKey

TimesheetKey

The unique key for the line.

ApprovalOnHoldField

BoolViewData

The Approval On Hold flag on the Timesheet.

ApprovedField

BoolViewData

The Approved flag on the Timesheet.

CompletedField

BoolViewData

The Completed flag on the Timesheet.

VarianceNotes

StringViewData

The Variance notes on the Timesheet.

ToilJobBalance

DecimalViewData

The User’s Time Off In Lieu balance.

⬆️ Back to top

TimesheetDetailKey

Property

Data Type

Description

JobTranId

Integer

The unique ID of the Timesheet Line.

PersonId

Integer

The Person idID.

FinCoCode

String

The Financial company codeCompany Code.

JobCode

String

The Job codeCode.

ActivityCode

String

The Activity code Code.

WorkCentreCode

String

The Work Centre code Code.

ActivityType

String

The Activity type Type.

ActivitySubType

String

The Activity sub type Sub Type.

TimeCode

String

The Time codeCode.

CostType

String

Cost type.

CostRate

Number

Cost rate

GstRate

Number

Tax rate.

ProfileId

Integer

User profile id.

StatusFlag

Integer

Status.

TranDate

String

EmployeeClass

String

Employee class.

The Cost Type of the Activity and Time Code.

⬆️ Back to top

TimesheetsDailyDetailLine

TimesheetDetailLine

Property

Data Type

Description

Key

TimesheetDetailKey

The unique key for the line.

TranDate

String

The transaction date.

FinCoCode

String

Code of financial company.

FileAttachment

CellData

File attachment.

The Financial Company Code on the transaction.

JobCode

CellData

The Job codeon the transaction.

Action

CellData

The Action on the transaction.

LogHeader

CellData

The Log headeron the transaction.

WorkCentreCodeActivityCode

CellDataWork Centre code

The Activity on the transaction.

ProfileActivityType

CellData

ActivityCode

CellData

Activity codeString

The Type of Activity.

AllowanceTimeCode

CellData

AllowanceThe Time Code on the transaction.

ActivityTypeWorkCentreCode

String

Activity typeCellData

The Work Centre on the transaction.

TimeCodeProfile

CellDataTime code.

The Employee Profile on the transaction

StartTime

CellData

The Start timeTime on the transaction.

EndTime

CellData

The End timeTime on the transaction.

Breaks

CellData

The Breaks value on the transaction.

Quantity

CellData

Quantity of hoursThe hours Quantity, and Notes, on the transaction.

QuantityOnly

CellData

The hours Quantity on the transaction.

NoteOnly

CellData

Details

String

Duplicate

CellData

Delete

CellData

PlantIssues

CellData

Plant issue if applied.

Payroll

CellData

JobManagerApproved

Boolean

PlantIssuesCount

Integer

StockIssuesCount

Integer

SourceID

Integer

SourceIDSpecified

Boolean

TimesheetRef1

CellData

TimesheetRef2

CellDataThe Notes on the transaction.

JobManagerApproved

Boolean

The flag to indicate if the transaction has been approved.

PlantIssuesCount

Integer

The number of Plant Issues on the transaction.

PlantIssuesData.data

Array<PlantIssueLine>

The Plant Issues on the transaction.

StockIssuesCount

Integer

The number of Stock transactions on the transaction.

SourceID

Integer

The Source ID on the transaction.

SourceIDSpecified

Boolean

The flag to indicate if the transaction has a source.

TimesheetRef1

CellData

The TimesheetRef1 details on the transaction.

TimesheetRef2

CellData

The TimesheetRef2 details on the transaction.

EmployeeClass

String

The Employee classClass on the transaction.

EmployeeClassValue

CellData

The Employee classClass on the transaction.

PlantIssuesData

WebGridDataModel_TimesheetsPlantIssueKey

Status

String

Status.

ReadonlyFlag

Integer

Read Only status.

ReadonlyMessage

String

Read Only message.

OriginalKey

TimesheetsDetailKey

CurrentKey

TimesheetsDetailKey

Key

TimesheetsDetailKey

Index

Integer

⬆️ Back to top

TimesheetsKey

Property

Data Type

Description

PersonId

Integer

Person id.

TimesheetDate

String

Timesheet date

⬆️ Back to top

PlantIssueKey

Property

Data Type

Description

JobTranID

Integer

The unique ID of the Plant Issue.

ItemId

Integer

The ID of the Plant Item.

JobCode

String

The Job Code.

WorkCentreCode

String

The Work Centre Code.

ActivityCode

String

The Activity Code.

RateCode

String

The Plant Rate Code.

TranDate

String

The Date of the Plant Issue.

⬆️ Back to top

TimesheetsListItem

PlantIssueLine

Property

Data Type

Description

PersonName

Key

CellData

Person name

PlantIssueKey

The unique key for the line.

TimesheetDate

Selected

String

Timesheet date.

Entered

CellData

Standard

CellData

Variance

CellData

Completed

Boolean

Completed status.

Approved

Boolean

Approved status.

ExpenseClaim

CellData

Expense claim.

UpdatedDate

String

Updated date.

Status

String

Status.

ReadonlyFlag

Integer

Read Only status.

ReadonlyMessage

String

Read Only message.

OriginalKey

TimesheetsKey

CurrentKey

TimesheetsKey

Key

TimesheetsKey

Index

Integer

CellData

A flag to indicate the Plant Issue is being edited.

PlantCode

CellData

The Plant Item on the Plant Issue.

RateCode

CellData

The Plant Rate on the Plant Issue.

UnitCode

CellData

The Unit on the Plant Issue.

ActivityCode

CellData

The Activity on the Plant Issue.

WorkCentreCode

CellData

The Work Centre on the Plant Issue.

DefaultQuantity

CellData

The Default Quantity on the Plant Issue.

ActualQuantity

CellData

The Actual Quantity on the Plant Issue.

Note

CellData

The Note on the Plant Issue.

Delete

CellData

A flag to indicate the Plant Issue is being deleted.

Status

String

Either "from-database" if pre-existing, or "generated-line" if pre-populated by default.

⬆️ Back to top

TimesheetDefaultLineApiModel

Property

Data Type

Description

keys

TimesheetDefaultLine

The default values for the Timesheet Line.

⬆️ Back to top

TimesheetsPlantIssueKey

TimesheetDefaultLine

Property

Data Type

Description

Selected

CellData

PlantCode

CellData

Plant code.

RateCode

CellData

Rate code.

UnitCode

CellData

Unit code.

ActivityCode

CellData

Activity code

Property

Data Type

Description

JobTranID

Integer

ItemId

Integer

Item id.

JobCode

String

Job code.

WorkCentreCode

String

Work Centre code.

RateCode

String

Rate code.

TranDate

String

NewRow

String

PlantCode

String

Plant code

TimeWorkCentreCode

String

⬆️ Back to top

TimesheetsPlantIssuesLine

TimesheetsTimesheetFormResult

FinCoCode

String

The default Financial Company Code.

ActivityCode

CellData

The default Activity.

ActivityType

String

The Type of the Activity.

ActivitySubType

String

The Sub Type of the Activity.

CostRate

Number

The Cost Rate of the Activity.

CostType

String

The Cost Type of the Activity.

GstRate

Number

The GST Rate of the Activity.

WorkCentreCode

CellData

The default Work Centre

code

.

DefaultQuantity

TimeCode

CellData

ActualQuantity

CellData

Note

CellData

Note.

Delete

CellData

Status

String

Status.

ReadonlyFlag

Integer

Read Only status.

ReadonlyMessage

String

Read Only message.

OriginalKey

TimesheetsPlantIssueKey

CurrentKey

TimesheetsPlantIssueKey

Key

TimesheetsPlantIssueKey

Index

Integer

⬆️ Back to top

The default Time Code.

TimesheetDate

String

the default Timesheet Date.

⬆️ Back to top

AttendanceKey

Property

Data Type

Description

Action

String

Must be one of the following: 'FirstIn' (start of first shift), 'FirstOut' (end of first shift), 'SecondIn' (start of second shift), 'SecondOut' (end of second shift).

PersonId

Integer

The Person ID on the Timesheet.

TimesheetDate

String

The Timesheet Date.

⬆️ Back to top

AttendanceLine

Property

Data Type

Description

Key

TimesheetsKey

ApprovalOnHoldField

BoolViewData

ApprovedField

BoolViewData

Value of Approval field.

CompletedField

BoolViewData

Value of Completed field.

NoEditMessage

String

TimesheetDate

String

Timesheet date,

TimesheetNew

Boolean

VarianceNotes

StringViewData

The difference between total and standard hours.

ToilJobBalance

DecimalViewData

Time Off In Lieu balance

⬆️ Back to top

WebGridDataModel_TimesheetsPlantIssueKey

Property

Data Type

Description

data

Array [TimesheetsPlantIssuesLine]

⬆️ Back to top

Example

V

Expand
titleClick to view

Request

Code Block
languagejson

Response

Code Block
languagejson

Response sample

Code Block
languagejson
⬆️ Top of page

AttendanceKey

The unique key for the line.

LineNo

String

The integer representation of the Action ('0' for ‘FirstIn’, ‘1' for ‘’, ‘2' for ‘SecondIn’, ‘3’ for 'SecondOut’).

ShiftNo

String

The shift number: either ‘1' for first shift, or '2’ for second shift.

Shift

String

Either ‘Start’ or ‘End’.

Day1

CellData

Day 1 Attendance time.

Day2

CellData

Day 2 Attendance time.

Day3

CellData

Day 3 Attendance time.

Day4

CellData

Day 4 Attendance time.

Day5

CellData

Day 5 Attendance time.

Day6

CellData

Day 6 Attendance time.

Day7

CellData

Day 7 Attendance time.

⬆️ Back to top

Table of Contents
minLevel1
maxLevel2
outlinefalse
typelist
separatorbrackets
printablefalse