Performs the same action as 'Bulk Insert Timesheets', but any existing timesheets for the specified employees within the specified time period (StartTime - EndTime) will be replaced with the timesheets specified. Any timesheets already included in pay runs will not be replaced.
PUT https://api.nzpayroll.co.nz/api/v2/business/{businessId}/timesheet/bulk
Parameter name | Value | Description | Additional |
---|---|---|---|
businessId | string | Required |
The request body takes a complete SubmitTimesheetsRequest resource, containing the following writable properties:
{
"approved": "boolean",
"employeeIdType": "string",
"fromDate": "date-time",
"locationIdType": "string",
"replaceExisting": "boolean",
"timesheets": {
"<key>": "array"
},
"toDate": "date-time",
"workTypeIdType": "string"
}
{
"approved": true,
"employeeIdType": "External",
"fromDate": "2017-06-01T00:00:00",
"locationIdType": "Standard",
"replaceExisting": false,
"timesheets": {
"emP3316": [
{
"attachmentId": null,
"breaks": [],
"classification": null,
"classificationId": null,
"comments": null,
"employeeId": 0,
"endTime": "2017-06-11T13:00:00",
"externalId": null,
"fullyQualifiedLocationName": null,
"hiddenComments": null,
"id": 0,
"leaveCategoryId": null,
"locationId": null,
"payCategoryId": null,
"rate": null,
"shiftConditionIds": null,
"shiftConditions": null,
"source": "None",
"startTime": "2017-06-11T10:00:00",
"status": null,
"submittedByUser": null,
"units": null,
"workType": null,
"workTypeId": null
}
],
"emP3317": [
{
"attachmentId": null,
"breaks": [
{
"endTime": "2017-06-13T12:00:00",
"startTime": "2017-06-13T11:00:00"
}
],
"classification": null,
"classificationId": null,
"comments": "Some Comments",
"employeeId": 0,
"endTime": "2017-06-13T17:00:00",
"externalId": null,
"fullyQualifiedLocationName": null,
"hiddenComments": null,
"id": 0,
"leaveCategoryId": null,
"locationId": "123456",
"payCategoryId": null,
"rate": 20,
"shiftConditionIds": null,
"shiftConditions": null,
"source": "None",
"startTime": "2017-06-13T09:00:00",
"status": null,
"submittedByUser": null,
"units": 8,
"workType": null,
"workTypeId": "WT1485"
},
{
"attachmentId": null,
"breaks": [
{
"endTime": "2017-06-15T12:00:00",
"startTime": "2017-06-15T11:00:00"
}
],
"classification": null,
"classificationId": null,
"comments": "Some Comments",
"employeeId": 0,
"endTime": "2017-06-15T17:00:00",
"externalId": null,
"fullyQualifiedLocationName": null,
"hiddenComments": null,
"id": 0,
"leaveCategoryId": null,
"locationId": "123456",
"payCategoryId": null,
"rate": 20,
"shiftConditionIds": null,
"shiftConditions": null,
"source": "None",
"startTime": "2017-06-15T09:00:00",
"status": null,
"submittedByUser": null,
"units": 8,
"workType": null,
"workTypeId": "WT1485"
}
]
},
"toDate": "2017-06-30T00:00:00",
"workTypeIdType": "External"
}
Name | Type | Description |
---|---|---|
approved | boolean | Boolean |
employeeIdType | string |
IdType
Possible values are:
|
fromDate | date-time |
Nullable |
locationIdType | string |
IdType
Possible values are:
|
replaceExisting | boolean | Boolean |
timesheets | object |
IDictionary |
timesheets.<key> | map of array |
IList |
timesheets.<key>.attachmentId | int32 |
Nullable |
timesheets.<key>.breaks[] | array | |
timesheets.<key>.breaks[].endTime | date-time |
Nullable |
timesheets.<key>.breaks[].startTime | date-time |
Nullable |
timesheets.<key>.classification | string | String |
timesheets.<key>.classificationId | string | String |
timesheets.<key>.comments | string | String |
timesheets.<key>.employeeId | int32 | Int32 |
timesheets.<key>.endTime | date-time |
Nullable |
timesheets.<key>.externalId | string | String |
timesheets.<key>.fullyQualifiedLocationName | string | String |
timesheets.<key>.hiddenComments | string | String |
timesheets.<key>.id | int32 | Int32 |
timesheets.<key>.leaveCategoryId | string | String |
timesheets.<key>.locationId | string | String |
timesheets.<key>.payCategoryId | string | String |
timesheets.<key>.rate | double |
Nullable |
timesheets.<key>.shiftConditionIds[] | array of string | |
timesheets.<key>.shiftConditions[] | array | |
timesheets.<key>.shiftConditions[].id | int32 | Int32 |
timesheets.<key>.shiftConditions[].name | string | String |
timesheets.<key>.source | string |
ExternalService
Possible values are:
|
timesheets.<key>.startTime | date-time |
Nullable |
timesheets.<key>.status | string | String |
timesheets.<key>.submittedByUser | string | String |
timesheets.<key>.units | double |
Nullable |
timesheets.<key>.workType | string | String |
timesheets.<key>.workTypeId | string | String |
toDate | date-time |
Nullable |
workTypeIdType | string |
IdType
Possible values are:
|
The following HTTP status codes may be returned, optionally with a response resource.
Status code | Description | Resource |
---|---|---|
200 | OK OK |