Appearance
Assign location
Assigns or removes users at one service provider location.
POST /fieldservicegateway/usermanagement/v3/user/location
Request
| Field | Type | Required | Description |
|---|---|---|---|
serviceProviderLocationNumber | number | yes | Location to update |
assignUserNumbers | number[] | one list must have a user | Users to add to the location |
unassignUserNumbers | number[] | one list must have a user | Users to remove from the location |
Example
json
{
"serviceProviderLocationNumber": 20001,
"assignUserNumbers": [1001],
"unassignUserNumbers": [1002]
}cURL
bash
curl --request POST 'https://[BASE_URL]/fieldservicegateway/usermanagement/v3/user/location' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {{x-api-key}}' \
--header 'Authorization: {{Authorization}}' \
--header 'Asurion-correlationid: correlation-id' \
--header 'Asurion-enduser: end-user' \
--header 'Asurion-sourcesystem: source-system' \
--header 'Asurion-serviceprovider: company-id' \
--header 'Asurion-client: default' \
--data '{
"serviceProviderLocationNumber": 20001,
"assignUserNumbers": [1001],
"unassignUserNumbers": [1002]
}'Response
200 OK
Each row says whether that user was updated. changed is false when the user was already in the requested state.
json
{
"success": true,
"message": "All operations completed successfully",
"data": {
"assignments": [
{
"userNumber": 1001,
"success": true,
"changed": true
}
],
"unassignments": [
{
"userNumber": 1002,
"success": true,
"changed": true
}
]
}
}If any row fails, success is false and that row includes error. The HTTP status is still 200.
Errors
| Status | Code | When |
|---|---|---|
| 400 | VALIDATION_ERROR | The location is missing, or both user lists are empty |
| 500 | INTERNAL_ERROR | Something unexpected failed |
json
{
"success": false,
"error": "At least one of assignUserNumbers or unassignUserNumbers must be non-empty",
"code": "VALIDATION_ERROR",
"details": {
"fields": []
},
"correlationId": "correlation-id",
"timestamp": "2026-10-16T00:00:00.000Z"
}