Skip to content

Assign location ​

Assigns or removes users at one service provider location.

POST /fieldservicegateway/usermanagement/v3/user/location

Request ​

FieldTypeRequiredDescription
serviceProviderLocationNumbernumberyesLocation to update
assignUserNumbersnumber[]one list must have a userUsers to add to the location
unassignUserNumbersnumber[]one list must have a userUsers 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 ​

StatusCodeWhen
400VALIDATION_ERRORThe location is missing, or both user lists are empty
500INTERNAL_ERRORSomething 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"
}