Development Guides

Creating Representative Level Users

Purpose: This article will step through how to create Representative level users via the API, as you would via the Manage Users app in Orion Connect.  This will include how to assign the role and the Representative entity that the user should be associated with.

Simple Use Case: You would like to create Representative level logins via API.

Scope and Outputs: This would be only for Representative level login creation, with a previously created role or representative.  Please see article, Creating a New Representative if you need to create a new Representative to associate with this user. 

Process Overview: Determine the representative and role to assign the new user.  The “Profile” section of the payload will include the Representative and Role information.  You can locate this data here; GET: /Portfolio/Representatives/Simple  GET: /Security/Roles/Simple   Then you’ll POST the payload with the information for the user to create the new Login and provide the temp password.

Process Steps:

  1. If unknown GET: /Portfolio/Representatives/Simple  and/or  /Security/Roles/Simple to retrieve the Profile details for the payload. The entire “profiles” section is required. 
  2. Add new user information to “userId” section, including required data highlighted in the payload example below. 
  3. POST payload to /Security/Users?sendEmail=false  Here is a sample request for reference.
{
	"profiles": [{
		"alClientId": 1350,
		"advisorName": "Orion Integration Demo (test)",
		"entity": "Representative",
		"entityName": "Joel Hurst",
		"loginEntityId": "Representative",
		"entityId": 14,
		"isUserDefault": true,
		"isInCurrentDb": true,
		"roleId": 1423,
		"hideRole": false
	}],
	"password": null,
	"isSecureExchangeRecipient": true,
	"partnerAppId": null,
	"errorMessage": null,
	"id": 0,
	"userId": "Rep.Test.User",
	"firstName": "Rep",
	"lastName": "Test",
	"email": "TestRep@test.com",
	"isActive": true,
	"activeDate": null,
	"inactiveDate": null,
	"lastLogin": null,
	"lastPasswordChange": null,
	"isReset": null,
	"mobilePhone": "",
	"businessPhone": "(402) 555-7289",
	"businessPhoneExtension": "",
	"company": null,
	"jobTitle": null,
	"entityName": "Test, Rep"
}

Sample response:

{
  "profiles": [
    {
      "id": 5382503,
      "loginEntityId": 3,
      "entity": "Representative",
      "entityId": 14,
      "advisorName": "Orion Integration Demo (test)",
      "entityName": "Joel Hurst",
      "roleId": 1423,
      "isUserDefault": true,
      "alClientId": 1350,
      "roleName": "Representative",
      "isInCurrentDb": true
    }
  ],
  "password": "OxYyaKBHSu",
  "isSecureExchangeRecipient": true,
  "partnerAppId": null,
  "errorMessage": null,
  "id": 1036370,
  "userId": "Rep.Test.User",
  "firstName": "Rep",
  "lastName": "Test",
  "email": "TestRep@test.com",
  "isActive": true,
  "activeDate": "2022-08-25",
  "inactiveDate": null,
  "lastLogin": null,
  "lastPasswordChange": null,
  "isReset": true,
  "mobilePhone": "",
  "businessPhone": "(402) 555-7289",
  "businessPhoneExtension": "",
  "company": null,
  "jobTitle": null,
  "entityName": "Test, Rep"
}

4. Provide Temporary password returned in response to appropriate party to create permanent password.   *See below for additional password option

Process Tips or Controls:

  1. If sendEmail=true when submitting the request, an email will be sent to the email listed in the payload with a reset link to update the password.
  2. Optional fields are first name, job title, company, business phone, and mobile phone.