Skip to content

Onboarding ​

Creates or updates a user in one call: profile, role assignment, service-provider or location assignment, and technician setup when a technician role is included.

POST /fieldservicegateway/usermanagement/v3/onboarding

Send one user object, or an array of up to 10 users.

Asurion-serviceprovider values New and system are normalized before the call continues. Other headers are standard.

Request ​

The body is one user object or an array of user objects.

User object ​

FieldTypeRequiredDescription
firstNamestringyes1–100 characters
lastNamestringyes1–100 characters
middleNamestringnoUp to 100 characters
contactobjectyesMust include email
contact.emailarrayyesAt least one email
contact.email[].typestringyesPERSONAL, WORK, or DEFAULT
contact.email[].addressstringyesEmail address
contact.email[].primarybooleanyesWhether this email is primary
contact.phonearraynoPhone numbers
contact.phone[].typestringyes, when phone is sentHOME, MOBILE, or WORK
contact.phone[].numberstringyes, when phone is sentPhone number
contact.phone[].countryCodestringyes, when phone is sentCountry calling code
contact.phone[].primarybooleanyes, when phone is sentWhether this phone is primary
rolesstring[]yesAt least one role, each in Application:RoleName form
serviceProviderNumberstringone of these is requiredService provider to assign
serviceProviderLocationNumbersstring[]one of these is requiredLocation numbers to assign
addressesarraynoHome address only (type is HOME)
addresses[].addressLine1stringyes, when an address is sentStreet line 1
addresses[].addressLine2stringnoStreet line 2
addresses[].citystringyes, when an address is sentCity
addresses[].statestringyes, when an address is sentState
addresses[].postalCodestringyes, when an address is sentPostal code
addresses[].countrystringyes, when an address is sentCountry
profilePictureUrlstringnoProfile image URL
employeeIdstringnoEmployee id
externalReferenceNumberstringnoExternal reference
sbUsernamestringnoServiceBench username
userAttributesarraynoExtra attributes. Each item needs name (1–50 characters) and value

password is not accepted.

Example ​

json
{
  "firstName": "Ada",
  "lastName": "Lovelace",
  "contact": {
    "email": [
      {
        "type": "WORK",
        "address": "user@example.com",
        "primary": true
      }
    ],
    "phone": [
      {
        "type": "MOBILE",
        "number": "5550100",
        "countryCode": "1",
        "primary": true
      }
    ]
  },
  "roles": ["Honeycomb:Technician"],
  "serviceProviderNumber": "10001",
  "serviceProviderLocationNumbers": ["20001"]
}

cURL ​

bash
curl --request POST 'https://[BASE_URL]/fieldservicegateway/usermanagement/v3/onboarding' \
  --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 '{
    "firstName": "Ada",
    "lastName": "Lovelace",
    "contact": {
      "email": [
        {
          "type": "WORK",
          "address": "user@example.com",
          "primary": true
        }
      ],
      "phone": [
        {
          "type": "MOBILE",
          "number": "5550100",
          "countryCode": "1",
          "primary": true
        }
      ]
    },
    "roles": ["Honeycomb:Technician"],
    "serviceProviderNumber": "10001",
    "serviceProviderLocationNumbers": ["20001"]
  }'

A batch request is a JSON array of the same object. Maximum size is 10.

Response ​

The body is always:

json
{
  "results": []
}

Each item:

FieldTypeDescription
indexnumberPosition in the request, starting at 0
emailstringPrimary email used for that user
successbooleanWhether that user completed onboarding
userNumbernumberPresent when a user record exists
isNewUserbooleantrue when the user row was created on this call
errorstringPresent when success is false

201 Created ​

Every user succeeded.

json
{
  "results": [
    {
      "index": 0,
      "email": "user@example.com",
      "success": true,
      "userNumber": 1001,
      "isNewUser": true
    }
  ]
}

207 Multi-Status ​

At least one user failed. Successful and failed items are returned together. The same status is used when every item fails.

json
{
  "results": [
    {
      "index": 0,
      "email": "user@example.com",
      "success": false,
      "userNumber": 1001,
      "error": "User exists and is deactivated"
    }
  ]
}

Item-level failures include:

errorWhen
Email is requiredNo primary email was found
Service provider not foundserviceProviderNumber does not exist
Service provider location(s) not found: ...A location number does not exist
roleName must be in format "Application:RoleName"A role string is not Application:RoleName
Role '<role>' does not existThe role is not defined
User exists and is deactivatedThe email or employee id matches an inactive user
User with this email already exists with a different employee IDThe email belongs to another employee id
Employee ID is already associated with a different userThe employee id belongs to a different active user

An existing active user with the same email and employee id is updated and returned as success.

Errors ​

Schema and unexpected failures use this body:

FieldTypeDescription
successbooleanfalse
errorstringError message
codestringStable error code
details.fieldsarrayField errors, when the failure is a validation error
details.fields[].fieldstringField name
details.fields[].messagestringWhat is wrong
details.fields[].codestringField error code
correlationIdstringRequest correlation id
timestampstringISO-8601 time

400 Bad Request ​

The body is not a user object or an array of 1–10 users, or a required field is missing or the wrong type.

json
{
  "success": false,
  "error": "One or more onboarding reference validations failed",
  "code": "VALIDATION_ERROR",
  "details": {
    "fields": [
      {
        "field": "roles",
        "message": "Invalid role format: technician",
        "code": "INVALID_FORMAT"
      }
    ]
  },
  "correlationId": "correlation-id",
  "timestamp": "2026-10-15T00:00:00.000Z"
}

An empty array, or an array larger than 10, returns 400 with { "results": [] }.

500 Internal Server Error ​

json
{
  "success": false,
  "error": "Internal server error",
  "code": "INTERNAL_ERROR",
  "correlationId": "correlation-id",
  "timestamp": "2026-10-15T00:00:00.000Z"
}