Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

3.12.0

The User Bulk Import REST API is used to update a collection of mobile technicians in a single API call. The collection can contain any combination of new users, updates to existing users and deleting of users. The CUD property determines what operation to be performed for the user. 

The valid values for CUD attribute are:

  • 1 - The user object should be inserted.
  • 2 - The user object should be updated. If the user does not exists it will be added. 
  • 3 - The user object should be deleted.

Notes:

  • If the Roles property is not specified then the current roles will be left unmodified
  • If the Password property is not specified then the current password will be left unmodified 
  • If the RestPassword property is true, then the system will ignore the Password property if provided and automatically generate a new password and email it to the user.
  • Deleting a user that no does not exists will generate a soft warning

Resource URL

/seiapi/v3/bulk/Users?customerid=xxxx&customercode=xxxx

Common Parameters

ParameterDescription
customerid

Identifies the unique customer id assigned by ServicePower. This value will never change.

(warning) This property is being deprecated in favor of JSON Web Token support via the x-access-token HTTP header.

customercode

Identifies the unique customer code associated with the Customer and assigned by ServicePower. The Customer should keep this code confidential. If required, such as an IT employee being released from the Customer's organization, a new customer code can be requested.

(warning) This property is being deprecated in favor of JSON Web Token support via the x-access-token HTTP header.

Supported HTTP Methods

MethodDescription
POSTSubmits a collection of user objects to be added, updated, or deleted.

HTTP Headers

This API uses the default ServiceMobility HTTP Headers.

HTTP Body

The body contains a collection of user objects to be processed. 

JSON Format
{
	"Users" : [
		// Collection of User Objects
	]
}

 

HTTP Response

Response Codes

HTTP CodeDescription

200

OK. Request was processed successfully.

(info) Even though the request may return a successful code of 200, the body may still contain warning details.

400

Syntax error in request. The response body will provide more details on the specific reason. Verify the URI, its parameters, and request body.

401

Unauthorized. The credentials are incorrect, please verify and try again.

404

Not Found. The URL is incorrect, please verify and try again.

405

The specified HTTP method is not supported for this resource.

409

Conflict. This error usually occurs when attempting to overwrite an existing object that can not be replaced.

410

The specified object does not exists. Please verify the URI.

500

An error has occurred within ServiceMobility. Please review the error message details and if necessary, contact customer support.

Response Body

{
    "code": 400,
    "detail": {
        "message": "",
        "params": {
            "value": ""
        },
        "dataPath": ""
    }
}

Response Object Properties

PropertyTypeDescription
codeintegerThe HTTP response code.
detailobject

This object provides additional details the system provided while processing the transactions. Usually the details provide additional information on why an error occurred. However, it may also provide warning details even when the requests was successful. For example, the request may have returned a response of 200=OK, but included warnings in the response body of properties that are still being used that are marked for deprecation.

PropertyTypeDescription
messagestringA human readable message related to the processing of the request.
paramscollectionA collection of additional key/value pairs that contain the values that caused the warning/error condition.
dataPathstringIdentifies the location within the request body the message refers to.

  • No labels