User Registration

This API service provides the ability to create a new user ahead of a user logging into the platform.

POST Method

Resource URL

POST /campusm/v1/cmrest/registerUser/<org_code>/registerUser?apikey=<API key>

URL Parameters

ParameterTypeRequiredDescription
org_codestringRequiredThe organisation  code as specified in the app configuration in the settings page of App Manager

 

Query string Parameters

ParameterTypeRequiredDescription
apiKeystringRequiredSupplied by Ex Libris as part of the implementation

Body Parameters

Parameter Type Required Description 
orgCodeint Required Supplied by Ex Libris as part of the implementation.
emailstring  Required  Email address of the user to be created. Must match the email address returned for the user by the Identity Management system when authenticating
firstNamestring  Required  First name of the user to be created
lastNamestringRequired  Last name of the user to be created

Enter the parameters as

as raw text in the body of the request: 

{
"orgCode": orgCode,
"email": userEmail,
"firstName": firstName,
"lastName": lastName
}

Example

URL –
https://api-eu.hosted.exlibrisgroup.com/campusm/v1/cmrest/registerUser /{orgCode}/ registerUser?apikey=<API key>

Body –

{
"orgCode": 12345,
"email": “john.smith@email.com”,
"firstName": “John”,
"lastName": “Smith”
}

Output 

The service returns a success message or an error message in case of failure.

Examples:

{
"success": true,
"message": "User <personId> created successfully."
}

If the user already exists, you will see:

{
"success": false,
"message": "User already exists."
}

If the user does not exist, but the email is also associated with another user, you will see:

{
"success": false,
"message": "Error creating user, Email already exists."
}

If the email is invalid, you will see:

{
"success": false,
"message": "Error creating user,Invalid email address found."
}

If the email suffix is not permitted, you will see:

{
"success": false,
"message": "Error creating user, Email address suffix not permitted for this app."
}

If parameters are missing, you will see:

{
"success": false,
"message": "Bad request."
}