Integration Guide

Use the Team API to automate creating and configuring team members. Team members can be used in Square labor shifts, appointment scheduling, cash drawer shifts, and payroll. The Team API allows for individual and bulk updates to team members, including setting wage levels and job descriptions.

Link to section

Set up a new team member

Setting up a new team member includes the following tasks:

  1. Creating a TeamMember assigned to specified seller locations.
  2. Setting a wage rate and job assignment for the team member.
  3. Granting Square account permissions to the new team member.

Important

Team member permissions can only be set by using the Seller Dashboard. Permissions can't be set using a Square API.

EMPLOYEES_WRITE OAuth permission must be granted to your application for these operations.

After you create a new team member, the team member can be assigned to a Labor API Shift record to track worked hours or CashDrawerShift to associate the cash drawer connected to the Square POS with the team member.

Link to section

Step 1: Create a team member

The CreateTeamMember endpoint is used to create a single team member. You can limit a team member's access to a defined set of seller locations by setting the assigned_locations.assignment_type request to EXPLICIT_LOCATIONS and adding IDs for the locations.

Note

Use the ListLocations endpoint to get all locations for a seller.

If the new team member has access to all of a seller's locations, set the assignment_type to ALL_CURRENT_AND_FUTURE_LOCATIONS. This allows the team member to automatically be assigned to any new location created on the account. With this assignment type, the location_ids field is optional and any location IDs that are set are ignored.

The email address that you assign is used by Square to invite the team member to create their Square account after you've assigned them permissions in the Seller Dashboard. It can't be an address that Square has already registered to a different team member. If the address has already been registered, the CreateTeamMember call fails with a CONFLICT error code and the following message: "The email address has already been registered to one of your team members".

The following example creates a new team member who can sign in to the two locations specified by the location_ids array:

Create team member

Note

If you don't provide an assigned_locations object, Square still creates the team member but assigns them to the seller's default location and the assignment_type of "EXPLICIT_LOCATIONS".

The following response contains the new team member with a unique ID that's used when assigning the team member to a wage level created in a subsequent operation:

{ "team_member": { "id": "K6JiNAakLUf5lUYmfjn", "given_name": "Joe", "family_name": "Doe", "status": "ACTIVE", "assigned_locations": { "location_ids": [ "{LOCATION_ID 1}", "{LOCATION_ID 2}" ], "assignment_type": "EXPLICIT_LOCATIONS" }, "email_address": "[email protected]" } }

After the team member is created, you assign a wage and job assignment to the team member.

Important

The Team API doesn't send an email inviting the new TeamMember to create a Square account. To generate this email invitation, use the Team application in the Seller Dashboard to assign permissions and create a passcode for the team member. Square sends the invitation after you've saved the team member permissions as shown in the image in step 3.

Link to section

Step 2: Assign a job title and wage

With the Team API, you can now assign, update, and retrieve wages and job titles for a team member. WageSetting is considered a subresource of TeamMember because a WageSetting can't exist as a standalone entity. It always exists in the context of a team member.

Link to section

Standardize your job titles

The job title and job ID fields in the WageSetting object are backed by a job record kept by Square. When you provide a new job title (that is, a title that has never been used in the seller's Square account), Square creates a new job record with a unique ID. That job can now be assigned to any team member by updating their job assignments with that exact job title.

Be sure to assign a standard title to all team members who have the same job. For example, use "Bartender" for all of the seller's bartenders. Your UI should provide an enumerated list of job titles for team members to choose from. If a team member provides a job title using an entry field, Square adds a job for each variation of the spelling of "Bartender" that's entered when a team member is created.

Assigning a job title and wage to a team member consists of the following tasks:

  1. Creating or updating a set of JobAssignment objects.
  2. Setting an overtime exempt status.

Note

EMPLOYEES_WRITE OAuth permission must be granted to your application for these operations.

The UpdateWageSetting endpoint is used to assign and update job titles and wages for each team member. To assign a wage, the job title entity must be set in the JobAssignment. If the job title doesn't exist, you can specify a new job title within a new JobAssignment. Each job assignment has only one wage and either an hourly or salary pay type. You can also specify whether the team member is exempt from overtime.

The following example assigns a wage to a team member:

Update wage setting

The following response contains the team member overtime_exempt status and a list of ordered job assignments with corresponding wages:

Link to section

Step 3: Assign permissions

  1. In the left pane of the Seller Dashboard, choose Team.
  2. In the left pane, choose Team Members, and then choose a team member from the Name list.
  3. In the Permissions section, choose Edit.
  4. Choose the Permission set to apply to the team member.
  5. Set a Personal Passcode for the team member.
  6. Choose Save.

squareup.com dashboard team team-members permissions

Square sends an email message to the team member with an invitation to sign in to their Square account using the personal passcode assigned.

Link to section

Update job assignments

The list of job assignments in a wage_setting is treated as a single object that is created or updated as a whole. If you want to add an additional job assignment to the first (primary) job assignment, the update request body must contain a job assignments list that includes the existing job assignment and any new or updated job assignments. If you want to reorder existing job assignments to make a different job assignment the primary assignment, send a wage setting update request with the full set of reordered job assignments.

Important

wage_setting objects are optionally versioned for optimistic concurrency. If optimistic concurrency is important for your application, retrieve the object to be updated and then use that object version number in your subsequent update request.

Link to section

Change a job title

If you want to change the title of an existing job, you must use the Team application in the Seller Dashboard.

  1. In the left pane of the Seller Dashboard, choose Team.

  2. In the left pane, choose Team Members, and then choose a team member from the Name list.

  3. In the Job and compensation section, choose Edit job.

  4. Update the job title, and then choose save.

  5. Repeat these steps for each person's job title you want to change.

    All job assignments with this ID (for any team member) and Labor API shifts with this job ID are updated to show the new job title.

When you use the UpdateWageSetting endpoint, you can only assign existing jobs to a team member or create new jobs (a new job record). You can't change the title of a job record using the Team API. Assign a job to a team member by providing a job title that exactly matches an existing job. If the title that you updated the wage setting with doesn't already exist, a new job is created with that title and a new ID.

Link to section

Retrieve a wage setting for a team member

The RetrieveWageSetting operation returns the wages and job titles of a single team member based on the ID provided in the request.

EMPLOYEES_READ OAuth permission must be granted to your application for this operation.

Retrieve wage setting

The response contains the team member overtime_exempt status and a list of ordered job assignments with corresponding wages. The first job assignment in job_assignments is the primary job assignment.

If you're using the optional versioning feature of wage settings, you need to get the current version number of a wage setting to be updated before issuing the update request. The response contains the version number of the wage setting, which in this case is 2.

If the specified team member or wage setting doesn't exist, an empty wage_setting object is returned.

Note

If you don't want to version wage settings, don't include a version field in your request. In that case, optimistic concurrency isn't enforced and Square blindly overwrites the previous version of the wage setting for the team member.

In the following update requests, the version number from the retrieve request is used. After each update request, use the version number in the response for a subsequent update request.

Link to section

Update an existing job assignment

The following request replaces the job assignment of Manager with Supervisor:

Update wage setting

If "Supervisor" is an existing job title, its job ID and title are set in the WageSetting by Square. Otherwise, a new job is created and associated with the WageSetting.

Link to section

Add another job assignment

The following request adds the job assignment of Bookkeeper:

Update wage setting

Link to section

Reorder job assignments

The following request makes Bookkeeper the primary job assignment:

Update wage setting

Link to section

Update a team member

Use the UpdateTeamMember endpoint to activate or deactivate a team member, set or clear assigned locations, add an email address, or make other updates to a TeamMember object.

Important

The TeamMember that represents the Square account owner can't be updated using the Team API. Instead, it must be updated using the Seller Dashboard.

Updating a team member involves the following tasks:

  1. Retrieving the team member to be updated if you don't have the team member ID. Use the SearchTeamMembers endpoint to get a list of team members by location ID.

  2. Declaring a TeamMember object whose field list includes values to be updated and values to be cleared. The id field is read-only and identifies the team member to be updated.

In the following example, team member Bob is being deactivated:

Update team member

The following response provides an updated TeamMember object for Bob:

Link to section

Bulk create team members

Bulk operations are non-atomic. The failure of one create operation doesn't prevent other create operations from succeeding. Errors from failed operations are returned in results and keyed by the idempotency key assigned in the request.

Important

Bulk actions are limited to 25 operations per request.

Setting up new team members in a bulk operation involves the following tasks:

  1. Creating a set of team members with a specified location.

  2. Wrapping the set of team members with associated operation idempotency keys in a BulkCreateTeamMembersRequest object.

    { "team_members": { "Cf634970-17a0-403c-9c3b-21c399d2b6ea" : { // team_member_1 goes here }, "40468e44-41f2-48e9-887e-60b0d52c8630" : { //team_member_2 goes here } } }

    The BulkCreateTeamMembersRequest object is a map of application-defined idempotency keys and CreateTeamMemberRequest objects representing individual create operations.

    EMPLOYEES_WRITE OAuth permission must be granted to your application for these operations.

    Bulk create team members

    The response provides a BulkCreateTeamMembersResponse map. The map keys identify the requested operations and TeamMember or error objects represent the result of each operation.

Link to section

Bulk update team members

Use the BulkUpdateTeamMembers operation to activate or deactivate a group of team members or to set or clear their locations. You can also use the operation to batch a set of individual and unrelated team member update operations.

Bulk operations are non-atomic. The failure of one operation doesn't prevent other operations from succeeding. Errors from failed operations are returned in results and keyed by the idempotency key assigned in the request.

Important

Bulk actions are limited to 25 operations per request.

Updating team members in a bulk operation involves the following tasks:

  1. Declaring a set of TeamMember objects whose field list includes values to be updated and values to be cleared.

    { "team_member": { "given_name": "Bob", "status": "INACTIVE" } }
  2. Wrapping the set of team members in a BulkUpdateTeamMembersRequest object. EMPLOYEES_WRITE OAuth permission must be granted to your application for these operations.

    The BulkUpdateTeamMembersRequest object is a map of team member IDs and UpdateTeamMemberRequest objects representing individual create operations.

    In this operation, the first team member is getting assigned to all seller locations and the last name is being updated. The second team member is getting assigned to specific locations and removing the email address.

    Bulk update team members

    The response provides a BulkUpdateTeamMembersResponse map. The map keys identify the requested operations and TeamMember or error objects represent the result of each operation.

Link to section

List or search for team members

Use the SearchTeamMembers endpoint to get a list of team members by location ID and status. EMPLOYEES_READ OAuth permission must be granted to your application for this operation. To return all team members, don't specify any query filters.

The following example asks for a list of all active team members whose location assignment includes location ID "{LOCATION_ID 2}":

Search team members

Note

The default limit in search results is 25. If you don't specify a limit, the resulting page of team members is 25 or the number of team members who pass the filter.

The response includes two active employees, one of whom is assigned to multiple locations, including the filtered location.

Link to section

Retrieve a team member

The RetrieveTeamMember endpoint returns a single TeamMember value based on the ID provided in the request.

EMPLOYEES_READ OAuth permission must be granted to your application for this operation.

Retrieve team member

The response provides the requested TeamMember value.

{ "team_member": { "id": "4O2xVQah-8Ql2MJKpS9I", "given_name": "Harper", "family_name": "Smith", "status": "ACTIVE", "assigned_locations": { "location_ids": ["CHQV7VKNFR3SV"], "assignment_type": EXPLICIT_LOCATIONS }, "email_address": "[email protected]", "created_at": "2020-02-05T19:09:37+00:00", "updated_at": "2020-02-06T19:09:37+00:00" } }