Now that the structure of the request and the concept of grace period has been covered, it’s time to put it all together.
These requests will need to be made to the 7shifts API at the of a user clocking in. This is what a simple flow would look like, for example, if an employee is clocking in exactly at the scheduled shift start time:
- User clocks in on your system
- Your system makes a request to the /shifts/scheduled endpoint
- The response you receive contains a shift
- Employee’s clock-in action is completed on your system
You may also want to build failure logic for times when your system isn’t able to reach the 7shifts API, as this schedule enforcement integration won’t be effective in that event.
For such cases, you may want to mark any clock-ins that happened with an incomplete schedule enforcement in some way within your system to denote the admin/manager that schedule enforcement did not take place for that clock-in.