Bulk create team members
Creates multiple TeamMember
objects.
The created TeamMember
objects will be returned on successful creates.
This process is non-transactional and will process as much of the request as is possible. If one of the creates 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 create.
Learn about Troubleshooting the Teams API.
Name | Description |
---|---|
team_
Required
|
The data which will be used to create the |
Response Fields
Name | Description |
---|---|
team_
|
The successfully created |
errors
|
The errors that occurred during the request. |
Examples
- cURL
- Ruby
- Python
- C#
- Java
- PHP
- Node.js
curl https://connect.squareup.com/v2/team-members/bulk-create \
-X POST \
-H 'Square-Version: 2021-03-17' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"team_members": {
"idempotency-key-1": {
"team_member": {
"given_name": "Joe",
"family_name": "Doe",
"email_address": "joe_doe@gmail.com",
"reference_id": "reference_id_1",
"phone_number": "+14159283333",
"assigned_locations": {
"location_ids": [
"YSGH2WBKG94QZ",
"GA2Y9HSJ8KRYT"
],
"assignment_type": "EXPLICIT_LOCATIONS"
}
}
},
"idempotency-key-2": {
"team_member": {
"given_name": "Jane",
"family_name": "Smith",
"email_address": "jane_smith@gmail.com",
"reference_id": "reference_id_2",
"phone_number": "+14159223334",
"assigned_locations": {
"assignment_type": "ALL_CURRENT_AND_FUTURE_LOCATIONS"
}
}
}
}
}'
{
"team_members": {
"idempotency-key-1": {
"team_member": {
"id": "ywhG1qfIOoqsHfVRubFV",
"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": {
"assignment_type": "EXPLICIT_LOCATIONS",
"location_ids": [
"GA2Y9HSJ8KRYT",
"YSGH2WBKG94QZ"
]
}
}
},
"idempotency-key-2": {
"team_member": {
"id": "IF_Ncrg7fHhCqxVI9T6R",
"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"
}
}
}
}
}