Bulk Timesheet Push API error


#1

Hey Paul,

I want to push timesheet to keypay using bulk timesheet API, below is the Json Parameter which i am posting :

{
“FromDate”:“2015-09-10”,“ToDate”:“2015-09-16”,“Approved”:true,“EmployeeIdType”:“Standard”,“LocationIdType”:“Standard”,
“WorkTypeIdType”:“Standard”,“Timesheets”:
{“40753”:[
{
“employeeId”:40753,
“startTime”:“2015-09-12T15:00:00”,
“endTime”:“2015-09-12T18:00:00”,
“units”:null,
“workTypeId”:2557,
“locationId”:8028,
“comments”:"",
“breaks”:[],
“status”:“Approved”,
“leaveCategoryId”:0,
“payCategoryId”:0,
“classificationId”:0

            }
    ]

}

}

i have checked EmployeesID and other details which seems to be proper
but still i am getting ‘An error occurred’ exception , am i missing any parameter?


#2

Hi Hardik,

I think the request looks fine. The reason that it is failing is that there is a timesheet from the time&attendance kiosk for that employee from that date range that you specified (10/9/15 - 16/9/15) and when you send through a PUT request it is trying to replace all timesheets in that period.

We should handle that scenario however we currently don’t. It will be fixed in the next couple of days.

cheers,
Paul.


#3

heyy paul,

{
“FromDate”:“2015-09-11T00:00:00”,“ToDate”:“2015-09-17T00:00:00”,“Approved”:true,“EmployeeIdType”:“Standard”,“LocationIdType”:“Standard”,
“WorkTypeIdType”:“Standard”,“Timesheets”:
{“117549”:[
{
“employeeId”:117549,
“startTime”:“2015-09-12T15:00:00”,
“endTime”:“2015-09-12T18:00:00”,
“units”:3,
“workTypeId”:2557,
“locationId”:8028,
“comments”:"",
“breaks”:[],
“status”:“Approved”,
“leaveCategoryId”:0,
“payCategoryId”:0,
“classificationId”:0

            }
    ]

}

}

this is the another employee id i am passing using post request using bulk insert timesheet i am getting same error

Regards,
Hardik


#4

Hi there Hardik,

Apologies for not replying sooner - i’m going to be away for a couple of days but if you could please try your API request again and then if/when it fails, contact support@yourpayroll.com.au and let them know what time you did it, they should be able to check the errors and let you know what has happened.

thanks,
Paul.


#5

Hey paul ,

i have sent an email containing issue discription

Regards,
Hardik


#6

Hi Hardik,

In your request it looks like you’re specifying a paycategoryId, leavecategoryId and classificationId of 0, these should be null values, rather than 0.

Regards
Phil