Hello! Hope to get a bit of help on this.
The Search Shifts endpoint at /v2/labor/shifts/search is working as-expected in the API Explorer. I’m able to set various parameters using the workday filter, or the start and end filters, and get only the shifts within a specific date range or timestamp range.
When I mimic this API call through a JavaScript fetch() request or in Postman (which I’ve been able to do for every other request I’ve tried, but haven’t tried others in the Labor-API), the API returns all shifts, ignoring the time filter, starting with the most current one, and going back for the maximum amount and provides a cursor to continue.
For instance, I want a specific pay period, so I add the 2 timestamps or dates to the request. In the API Explorer, I get the handful of staff I’ve selected, at the location I’ve selected, with shifts only in that timeframe.
When I copy the same query as presented in the node.js example, and convert the query data to JSON instead of a JavaScript object, I get the unbounded results. Whether through Postman, or my server-side fetch() function call.
From what I can tell, I’m afraid the API itself has a bug.
Any tips, duplication of the issue, or acknowledgement of a bug I could get would be great. Thanks!