Problem in passing value to toDate parameter while fromDate accepts it without any issue in rostershift API

Hi,
I am trying to fetch roster shift data using following API and I figured out that fromDate and endDate are two required parameters to be sent in the request for fetching the Data.
_https://keypay.yourpayroll.com.au/api/v2/business/{businessId}/rostershift_

When I am sending the request as below (replaced businessId with valid value for our organization):
_https://keypay.yourpayroll.com.au/api/v2/business/{businessId}/rostershift?fromDate=2018-01-01T00:00:00&endDate=2018-03-31T00:00:00_

I am getting following error:
The request is invalid.ToDate is required

I tried to pass the Date value in following ways but nothing worked so far. The strange thing is that it complains only for ToDate and FromDate is just fine.
2018-01-01
2018-01-01T00:00:00Z
2018-01-01T00:00:00.000Z
2018-01-01T00:00:00-00:00
datetime’2018-01-01T00:00:00.000Z’

Please help me in getting this fixed.

Thanks!

Hi amitsinghal,
If you replace endDate with toDate that will return the desired results. In this instance, toDate is the required parameter, and not endDate.

https://keypay.yourpayroll.com.au/api/v2/business/{businessId}/rostershift?fromDate=2018-01-01T00:00:00&toDate=2018-03-31T00:00:00

Regards,
Ash

1 Like

Thanks Ash.
Thanks for correcting me. Yes, I was using endDate and replacing it with toDate fixed the problem. So easy it was but I just missed it to notice.
Thanks a lot.