• Example searches: “transaction”, “CreateOrder”, “/v2/locations”, “inventory”, “delete customer”

You are viewing an old version of the API
Bulk update team members

POST /v2/team-members/bulk-update

Updates multiple TeamMember objects.

The updated TeamMember objects will be returned on successful updates. This process is non-transactional and will process as much of the request as is possible. If one of the updates in the request cannot be successfully processed, the request will NOT be marked as failed, but the body of the response will contain explicit error information for this particular update. Learn about Troubleshooting the Teams API.


Permissions
EMPLOYEES_WRITE
Guide
Bulk update team members
Try in API Explorer
Name Description
team_members
Map<string, UpdateTeamMemberRequest>

Required

The data which will be used to update the TeamMember objects. Each key is the team_member_id that maps to the UpdateTeamMemberRequest.

Response Fields

Name Description
team_members
Map<string, UpdateTeamMemberResponse>

The successfully updated TeamMember objects. Each key is the team_member_id that maps to the UpdateTeamMemberRequest.

errors
Error [ ]

The errors that occurred during the request.

Examples

You are viewing an old version of the API
POST /v2/team-members/bulk-update
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
  • Node.js
curl https://connect.squareup.com/v2/team-members/bulk-update \
  -X POST \
  -H 'Square-Version: 2021-03-17' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "team_members": {
      "fpgteZNMaf0qOK-a4t6P": {
        "team_member": {
          "reference_id": "reference_id_1",
          "is_owner": false,
          "status": "ACTIVE",
          "given_name": "Joe",
          "family_name": "Doe",
          "email_address": "joe_doe@gmail.com",
          "phone_number": "+14159283333",
          "assigned_locations": {
            "location_ids": [
              "YSGH2WBKG94QZ",
              "GA2Y9HSJ8KRYT"
            ],
            "assignment_type": "EXPLICIT_LOCATIONS"
          }
        }
      },
      "AFMwA08kR-MIF-3Vs0OE": {
        "team_member": {
          "reference_id": "reference_id_2",
          "is_owner": false,
          "status": "ACTIVE",
          "given_name": "Jane",
          "family_name": "Smith",
          "email_address": "jane_smith@gmail.com",
          "phone_number": "+14159223334",
          "assigned_locations": {
            "assignment_type": "ALL_CURRENT_AND_FUTURE_LOCATIONS"
          }
        }
      }
    }
  }'
Response JSON
{
  "team_members": {
    "fpgteZNMaf0qOK-a4t6P": {
      "team_member": {
        "id": "fpgteZNMaf0qOK-a4t6P",
        "reference_id": "reference_id_1",
        "is_owner": false,
        "status": "ACTIVE",
        "given_name": "Joe",
        "family_name": "Doe",
        "email_address": "joe_doe@gmail.com",
        "phone_number": "+14159283333",
        "created_at": "2020-06-11T22:46:57.095Z",
        "assigned_locations": {
          "assignment_type": "EXPLICIT_LOCATIONS",
          "location_ids": [
            "GA2Y9HSJ8KRYT",
            "YSGH2WBKG94QZ"
          ]
        }
      }
    },
    "AFMwA08kR-MIF-3Vs0OE": {
      "team_member": {
        "id": "AFMwA08kR-MIF-3Vs0OE",
        "reference_id": "reference_id_2",
        "is_owner": false,
        "status": "ACTIVE",
        "given_name": "Jane",
        "family_name": "Smith",
        "email_address": "jane_smith@gmail.com",
        "phone_number": "+14159223334",
        "created_at": "2020-06-11T22:46:57.001Z",
        "assigned_locations": {
          "assignment_type": "ALL_CURRENT_AND_FUTURE_LOCATIONS"
        }
      }
    }
  }
}

Share Feedback

Thanks for visiting the Square API documentation. What's on your mind?