Bulk Add Location Groups to Users
POST
/api/v1/users/bulk-location-groups
Token needs the update ability.
About tokens
Appends location groups to many users in one request (append semantics — existing groups are preserved). Requires the update ability and the MANAGE_USERS permission.
Request body application/json
-
assignmentsarray of object required-
userstring (uuid) requiredUser UUID. -
location_group_idsarray of string required
-
Responses
-
-
totalinteger -
success_countinteger -
error_countinteger -
resultsarray of object-
indexinteger -
userstringUser email. -
statusstring -
groups_addedinteger -
total_groupsinteger
-
-
-
-
messagestring
-
-
-
messagestring
-
-
-
messagestring -
errorsobject
-
curl -X POST "https://app.franchisesee.com/api/v1/users/bulk-location-groups" \
-H "Authorization: Bearer $FRANCHISESEE_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"assignments": [
{
"user": "6e2b9d41-8c7a-4f3e-b1d5-9a0c2e4f6b81",
"location_group_ids": [
"9d3f6b2e-5a41-4c7e-9a0b-2f1c8e7d4a63"
]
}
]
}'
Response
{
"total": 2,
"success_count": 2,
"error_count": 0,
"results": [
{
"index": 0,
"user": "jordan.rivera@example.com",
"status": "success",
"groups_added": 1,
"total_groups": 2
}
]
}