Learn about migrating your Labor API application code to reference team members in the Team API.
Labor API

Migrate from Employees to Team Members

This topic describes how to migrate application code from tracking Square (v2) Employees API (deprecated) Employee labor shifts to tracking shifts for Square Team API TeamMember objects.

The Labor API (version 2020-08-26) continues to support the deprecated Employee object during the deprecation period of the Employees API. Use this guide to migrate your Labor API code to using the Team API TeamMember object when making calls with the Labor API version 2020-08-26 or later.

  • Deprecation: 2020-08-26

  • Retirement: 2021-08-26

If you need help migrating to Square APIs or need more time to complete your migration, contact Developer Support, join our Slack, or reach out to your Square account manager.

The Team API and Labor API wage setting endpoints replace the employee roll endpoints in the v1 Employees API.

The Square Labor API endpoints for employee wages are deprecated and replaced with team member wage endpoints as shown in the following table:

Deprecated Labor endpointReplacement
GetEmployeeWageGetTeamMemberWage
ListEmployeeWagesListTeamMemberWages

The Team API provides wage setting objects for each team member to replace the employee wage object for an employee. These objects are returned by the endpoints noted in the previous section.

Deprecated objectReplacement
EmployeeWageTeamMemberWage

The Shift and ShiftFilter objects are updated to include team member ID fields. The employee ID fields remain in the objects to support the Employee object until it is retired.

Deprecated fieldReplacement
Shift.employee_idShift.team_member_id
ShiftFilter.employee_idsShiftFilter.team_member_ids

To update your Labor API application code, change the references of employee_id to team_member_id in each request call. No other functionalities have been affected here.

Developers must reference team_member_id in the request for the response to return team_member_id populated with the same employee ID. Note that an employee ID value can be set as the value of the team_member_id.

Example request

Labor request with Employee_id

List Employee Wages
  • 1
  • 2
  • 3
  • 4
curl https://connect.squareupsandbox.com/v2/labor/employee-wages?employee_id=EMPLOYEE_ID \
  -H 'Square-Version: 2023-05-17' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json'

Labor request with Team_member_id

List Team Member Wages
  • 1
  • 2
  • 3
  • 4
curl https://connect.squareupsandbox.com/v2/labor/team-member-wages?team_member_id=TEAM_MEMBER_ID \
  -H 'Square-Version: 2023-05-17' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json'

Example response

Labor Employee_id response

Labor Team_member_id response

The response of team member wage returns a payload with team_member_id populated.

Example request

Labor API request with Employee_id

Get Employee Wage
  • 1
  • 2
  • 3
  • 4
curl https://connect.squareupsandbox.com/v2/labor/employee-wages/{id} \
  -H 'Square-Version: 2023-05-17' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json'

Labor API request with Team_member_id

Get Team Member Wage
  • 1
  • 2
  • 3
  • 4
curl https://connect.squareupsandbox.com/v2/labor/team-member-wages/TEAM_MEMBER_ID \
  -H 'Square-Version: 2023-05-17' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json'

Example response

Labor API Employee_id response

Labor Team_member_id response

External developers can reference either employee_id or team_member_id in the request, and the response returns both employee_id and team_member_id populated with the same employee ID.

Example request

Labor request with Employee_id

Create Shift
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
curl https://connect.squareupsandbox.com/v2/labor/shifts \
  -X POST \
  -H 'Square-Version: 2023-05-17' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "shift": {
      "employee_id": "employee_id",
      "start_at": "2020-07-01T08:43:00Z",
      "location_id": "location_id"
    }
  }'

Labor request with Team_member_id

Create Shift
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
curl https://connect.squareupsandbox.com/v2/labor/shifts \
  -X POST \
  -H 'Square-Version: 2023-05-17' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "shift": {
      "team_member_id": "employee_id",
      "start_at": "2020-07-01T08:43:00Z",
      "location_id": "location_id"
    }
  }'

Example response

Regardless of which of the previous requests are made, the response has an employee_id and a team_member_id, both of which contain the same value.

Note

When the Employee API is retired, the employee_id is no longer returned.

Labor response with Team_member_id

External developers can reference either employee_id or team_member_id in the request, and the response returns both employee_id and team_member_id populated with the same employee ID.

Example request Labor request with Employee_id

Update Shift
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
curl https://connect.squareupsandbox.com/v2/labor/shifts/{id} \
  -X PUT \
  -H 'Square-Version: 2023-05-17' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "shift": {
      "employee_id": "employee_token",
      "start_at": "2020-07-01T08:43:00Z",
      "end_at": "2020-07-01T12:43:00Z",
      "location_id": "location_id"
    }
  }'

Labor request with Team_member_id

Update Shift
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
curl https://connect.squareupsandbox.com/v2/labor/shifts/{id} \
  -X PUT \
  -H 'Square-Version: 2023-05-17' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "shift": {
      "team_member_id": "employee_token",
      "start_at": "2020-07-01T08:43:00Z",
      "end_at": "2020-07-01T12:43:00Z",
      "location_id": "location_id"
    }
  }'

Example response

Regardless of which of the previous requests are made, the response has an employee_id and a team_member_id, both of which contain the same value.

The response of shift returns a payload with both employee_id and team_member_id populated.

Example responses

Regardless of which of the previous requests are made, the response has an employee_id and a team_member_id, both of which contain the same value.

We've made improvements to our docs.
Prefer the old format?