Use the Labor API to record shifts worked by team members, including the shift's start and end times, job title, pay rate, and breaks. Shift records can be used for payroll, labor cost reporting, and overtime management and to inform scheduling decisions.
Learn how to start a shift with an assigned job title and pay rate for a team member using the following steps:
- Get the ID of the shift location.
- Get the ID of the team member.
- Verify that the team member doesn't already have an open shift.
- Get wage information for the job to be done on the shift.
- Create a new shift with the start time and information you collected. This step sets the shift status to
This topic also shows how to end the shift using the following steps:
- Get the open shift.
- Update the shift with the end time. This step sets the shift status to
You need a valid access token - The steps in this topic call Square APIs in the Square Sandbox, so you can use your Sandbox access token in the requests. Square recommends testing with Sandbox credentials when possible.
Applications that use OAuth access tokens in the production environment require the
TIMECARDS_WRITEpermissions to perform these steps. When calling Square APIs in the production environment, change the base URL to
You need a team member with an assigned wage setting - To create a shift, you must provide the ID of a team member who's active at the shift location. If needed, you can create and set up a team member using the Seller Dashboard or Team API.