Update Users in Bulk

Lets you assign the multiple users to a team.

  • You must pass at least one condition in the Conditions node.
  • You must pass the Attribute parameter as TeamId and the Value parameter as the value of the team Id (you can find it using the Get Teams API).

 

API URL

POST
https://{host}/v2/UserManagement.svc/User/Bulk/Update?accessKey=AccessKey&secretKey=SecretKey
Copy URL

Request

JSON Body/Payload

Content-Type: application/json

{ 
   "Conditions":[ 
      { 
         "Condition":[ 
            { 
               "LookupName":"AssociatedPhoneNumbers",
               "Operator":"lik",
               "LookupValue":"23",
               "ConditionOperator":"OR"
            },
            { 
               "LookupName":"FirstName",
               "Operator":"lik",
               "LookupValue":"Bo",
               "ConditionOperator":null
            }
         ],
         "GroupOperator":null
      }
   ],
   "Attribute":"{{Attribute}}",
   "Value":"{{Value}}"
}

JSON Properties

Parameter Description
Conditions

You can create one or more condition groups. You can set multiple conditions inside each condition group.

Condition

LookupName – The user attribute you want to search by (FirstName, LastName etc.)

Operator – The following operators are permitted –
eq – equals
neq – not equal to
lik – like
nlik – not like
lik_s – starts with
lik_e – ends with
n – null
nn – not null

LookupValue – The value of the user attribute you passed in LookupName.

ConditionOperator – “AND” or “OR”. You can add multiple conditions with a condition group. When you’re adding the next condition, you must specify its relationship with the previous condition here. You must use the same operator between conditions within a group (Condition 1 AND Condition to AND Condition 3 or Condition 1 OR Condition 2 OR Condition 3)

GroupOperator
If you’re including multiple condition groups in the request, you must specify a group operator to define the relationship between the groups. It could be “AND” or “OR”.
Attribute

The attribute you want to bulk update.

Note: Currently only TeamId is supported.

Value

The new value you want to update the attribute to.

Response

200 OK

Content-Type: application/json

{ 
   "Status":"Success",
   "Message":{ 
      "AffectedRows":72,
      "IsSuccessful":true
   }
}

HTTP Response Code

Code Description
200 OK

This is the status code for successful API call.

401 Unauthorized

The API call was made with invalid access credentials. Check your AccessKey and SecretKey.

400 Bad Request

The message body on the request is not as per API specification. Make sure that content type is set to “application/json” and the JSON body has correct attribute names and structure.

404 Not Found

The API could not be found. Please check the API signature.

429 Too Many Requests

API calls exceeded the limit of 25 in 5 second(s)

500 Internal Server Error

The API called failed. There could be many reasons for it. Check the exception message to get more details.