Skip to main content

Next shift

GET /nextshift

Retrieves the next shift for a specified worker from a given date and time.
All three parameters are mandatory and case-sensitive (CarerId, Date and Time are rejected). A missing or malformed parameter returns HTTP 200 with an error object such as {"status":"error","message":"Error: carerId is required"}.
Example: GET /nextshift?carerId=1096&date=2025-01-01&time=12:00 Parameters: Response: a single shift object, not an array.
Response fields:

Previous shift

GET /prevshift

Retrieves the previous shift for a specified worker from a given date and time.
All three parameters are mandatory and case-sensitive (CarerId, Date and Time are rejected). A missing or malformed parameter returns HTTP 200 with an error object such as {"status":"error","message":"Error: carerId is required"}.
Example: GET /prevshift?carerId=1096&date=2025-01-01&time=12:00 Parameters: Response: a single shift object, not an array.
Response fields: Same as Next shift.