Applies to: Labor API | Team API | Locations API | Webhooks
Use the Labor API to record hours worked by team members.
Applications can use the Labor API to create and manage timecards. A timecard is a record of the hours worked by a team member for a single shift on a specific day, including breaks, declared cash tips, and wage information. Timecard data can be used for payroll, labor cost reporting, overtime management, and to inform scheduling decisions.
The basic steps for recording hours worked include starting a timecard for a team member (with the start time, job title, and pay rate) and then updating the timecard to add the end time.
Square API version - Square API version 2025-05-21 or later is required to call
Timecardendpoints. TheShiftobject and related endpoints, data types, and webhook events are deprecated and replaced byTimecardequivalents. For more information, see Migration notes.Valid access token - Square API requests require an
Authorizationheader with a bearer access token. The examples in this topic use the Square Sandbox, so you can test using your Sandbox access token.Applications using OAuth access tokens to authorize requests typically require the following permissions for timecard management:
MERCHANT_PROFILE_READto retrieve location information.EMPLOYEES_READto retrieve team member, job, and wage information.TIMECARDS_READandTIMECARDS_WRITEto retrieve and manage timecards (shifts).TIMECARDS_SETTINGS_READandTIMECARDS_SETTINGS_WRITEto retrieve and manage break types and workweek settings.
To call Square APIs in the production environment, change the base URL to
https://connect.squareup.comand use your production (personal) access token.A team member with an assigned wage setting - To create a timecard, you must provide the ID of a team member who's active at the timecard location. If needed, you can create and set up a team member using the Square Dashboard or Team API.
To include wage information on timecards, populate the
TeamMember.wage_settingfield during team member setup or plan to get the information from an external source.A team member can be assigned to only one
OPENtimecard at a time.
Note
The Labor API defines two types of objects; be careful not to confuse them:
- A ScheduledShift is used to manage team schedules.
- A Timecard represents a single work shift for a team member. Each
Timecardcaptures:- The actual time worked during one shift
- Information needed for payroll processing
For example, if an employee works five different shifts in a week, they will have five separate Timecard records - one for each shift.
Note: The older Shift object type is deprecated. Use Timecards instead. For information about migration, see Migration notes.
To start a timecard, first get the location ID, team member ID, and wage information and verify that the team member doesn't have an OPEN timecard. Then, create a timecard by providing the start time and the information you collected.
If needed, call ListLocations to get the ID of the location for the shift.
List locations
Call SearchTeamMembers to get active team members for the location using the location_ids and status query filters. Copy the ID of the team member who's working the shift.
Search team members
Call ListTeamMemberWages using the team_member_id query parameter to get jobs and pay rates for the team member. A team member might have multiple job assignments, so you need to find the job title and pay rate for the job to be done on the timecard.
List team member wages
Call SearchTimecards to search for an OPEN timecard for the team member using the status, team_member_ids, and location_ids query filters. A team member can have only one open timecard at a time.
Search timecards
Call CreateTimecard to create a timecard using information you collected in previous steps. Provide the location ID, team member ID, and the start timestamp in UTC or local time. For UTC timestamps, Square calculates the local time based on the timecard location.
For the wage field, provide the job title, pay rate, and tip eligibility.
Create timecard
Important
To record labor cost, you must include the wage.hourly_rate field. Otherwise, the timecard record has no associated pay amount. Job and wage information from the team member's primary job aren't used by default.
Creating a timecard triggers a labor.timecard.created webhook event.
To end a timecard, get the timecard ID and verify that all breaks are ended. Then, update the timecard with the end_at time.
Call SearchTimecards to get the open timecard for the team member using the status, team_member_ids, and location_ids query filters.
Search timecards
Check whether the timecard has a breaks field, which is added to a timecard if the team member took any breaks. If you're following the steps in this topic, you shouldn't see this field because no breaks were recorded.
If the timecard does include the breaks field, confirm that each break contains an end_at field with a valid timestamp. If the timecard has an open break, you need to end the break before you can end the timecard.
To end a timecard, call UpdateTimecard and add the Timecard.end_at field.
Note
Including the version field in the request enables optimistic concurrency control. If the specified version doesn't match the current version of the Timecard object, the update fails and you receive an error.
Update timecard
Note that you can update the wage or declared_cash_tip_money field for a timecard at any time.
Updating a timecard triggers a labor.timecard.updated webhook event.
- Learn how to add breaks to an open timecard.
- Learn how to get all completed timecards for a workweek.