SDK Migration: Encompass SDK to REST APIs

This section is for migrating Encompass SDK to Developer Connect REST APIs for External Users.

Managing External Users

For any external system (Third party originators) that is designed to support lenders who work with External Organizations/TPO Organizations, these REST interfaces provide a seamless integration for managing the contacts/users of these external organizations. Thus allowing these users to be able to manage loans.

Just as all communications with SDK, all External user API operations pass through the External user Object. In our REST APIs, our External user object is a resource available at this endpoint: /encompass/v3/externalUsers/. The standard REST methods around this endpoint provides options to Create, Update and Delete an External user.

METHODENDPOINTACTION
GEThttps://api.elliemae.com/encompass/v3/externalUsers/Retrieve External users
PATCHhttps://api.elliemae.com/encompass/v3/externalUsers/Add/Update/Delete an External user

Retrieving an External User (GET)

As with the current SDK, External users are retrieved with a userId which is considered as a unique identifier for an External User. An External user retrieval allows a client (or) client application to view the contents of an existing External User. either orgid or tpoid can be passed on query parameter to retreive users.

Things to Note:

  • Retrieve External user is a GET method call and hence wouldn't require any request body
  • A resource id, in this case, a valid userId or tpoid is a required parameter sent as part of the URL
  • A Session object is not required for a REST API call. A Session is automatically created within the context of a REST API access token
  • Orgid and Tpoid can not be passed together
  • Logged in user need to have access to get external user

Resources:

Query Parameters

PARAMETERDESCRIPTION
orgid
string
Required if tpoid is not provided. The orgid to fetch the external users from. The default value is null.
tpoid
string
Required if orgid is not provided. The tpoid to fetch the particual user. The default value is null.
roletype
string
Optional. A valid roletype can be passed to filter result based on passed roletype. The default value is null.
isrecursive
boolean
Optional. A return result recursively for the passed tpoid or orgid. The default value is false.
includeInVisibleInTpowcSite
boolean
Optional. Includes visible users on TPO site only. The default value is false.
includeLicenseInfo
boolean
Optional. Include users license data information. The default value is false.
authorizedTradersOnly
boolean
Optional. Returns only authorizedtrader dealers. The default value is false.
start
int
Optional. Starting index of pagination.The default value is -1.
limit
int
Optional. Number of records per page. The default value is 0.

Creating an External User (PATCH)

The new REST API allows client applications to create new External Users. And enable these created users to login to TPO Connect portal and manage loans. Create External user is a PATCH method call requiring a External users object (json) as input. This API is plural and supports creating multiple users (Note: For the 22.1 release, this API is certified for only single external user).

Things to Note:

  • Unlike the current SDK call, a commit() method is not required to create the External user with the new REST API.
  • updatedBy and updatedDate are not allowed to be passed as request parameters for the new REST API.
  • Any user with access rights to create External user can create the External user with the new REST API.
  • Unlike in SKD method, if user parent info attribute is set as true and the user passes the related attributes in the request payload, the API will fail indicating that the user cannot pass these attributes when the useParentInfo is set as true.
  • If the ORG is defined with one site URL and if we create any external user, the site URL will not be inherited unless the parameter is explicitly supplied in the request payload.
  • Unlike smart client or SDK call, the API will not create the external user under root org if the ORG ID is missing in the request. If ORG ID is missing in the request, the API will fail.
  • It is important to configure Encompass server with Hazelcast Cache. Without which the API may fail due to data mismatch between the cache and the database.
  • Unlike SDK method, License status can't be a free text. Hence the API will fail if the License status is not one of the valid value.
  • If the supplied URL or Persona or SalesRep user or State license is invalid or any temporary issue with DB connection during the transaction, the external user POST API will fail unlike the Smart client where the error is thrown but the user is created in the system.
  • A new attribute 'licenseStatusType' introduces in the API contract which will accept ENUM values for license status.
  • API query parameter action will assume default value as update. Hence for Create functionality, the action parameter must be passed with value as add.

Resources:

Query Parameters

PARAMETERDESCRIPTION
orgid
string
Required. Unique identifier of the organization to create the user(s) under.
action
string
Required. To create users, the action is "add".
view
string
Optional. Possible value is "entity".
[
  {
    "useCompanyAddress": true,
    "firstName": "string",
    "middleName": "string",
    "lastName": "string",
    "suffix": "string",
    "title": "string",
    "address": "string",
    "city": "string",
    "state": "AL",
    "zipCode": "string",
    "phone": "string",
    "cellPhone": "string",
    "fax": "string",
    "email": "string",
    "nmlsId": "string",
    "nmlsCurrent": true,
    "ssn": "string",
    "useParentInfoForRateLock": true,
    "emailForRateSheet": "string",
    "faxForRateSheet": "string",
    "emailForLockInfo": "string",
    "faxForLockInfo": "string",
    "emailForLogin": "string",
    "siteUrls": [
      "string"
    ],
    "salesRep": {
      "entityId": "string",
      "entityName": "string",
      "entityUri": "string",
      "entityType": "Default"
    },
    "personas": [
      {
        "entityId": "string",
        "entityName": "string",
        "entityUri": "string",
        "entityType": "Default"
      }
    ],
    "peerLoanAccess": "Disabled",
    "accessMode": "ReadWrite",
    "licenses": [
      {
        "selected": true,
        "stateAbbrevation": "AL",
        "licenseNumber": "string",
        "issueDate": "2021-12-14T22:58:29.628Z",
        "startDate": "2021-12-14T22:58:29.628Z",
        "endDate": "2021-12-14T22:58:29.628Z",
        "licenseStatusType": "TransitionRequested",
        "statusDate": "2021-12-14T22:58:29.628Z",
        "lastChecked": "2021-12-14T22:58:29.628Z"
      }
    ],
    "notes": "string",
    }
  }
]
ATTRIBUTEDESCRIPTIONLENGTH/FORMAT
useCompanyAddress
boolean
Required. Indicates if the address of the user will be inherited from the parent company.true/false
firstName
string
Required. External user’s first name.64
middleName
string
External user’s middle name.64
lastName
string
Required. External user’s lastname.64
suffix
string
Suffix for the external user.64
title
string
External user’s professional title.64
address
string
Address of the external user. Should not be provided in the payload if useCompanyAddress is set as true.255
city
string
City of the external user. Should not be provided in the payload if useCompanyAddress is set as true.50
state
string
State of the external user. Should not be provided in the payload if useCompanyAddress is set as true.State permitted abbrev enum

AL, AK, AZ, AR, CA, CO, CT, DC, DE, FL,GA, HI, ID, IL, IN, IA, KS, KY, LA, ME,MD, MA, MI, MN, MS, MO, MT, NE, NV, NH,NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI,SC, SD, TN, TX, UT, VT, VA, WA, WV, WI,WY, VI, GU, PR
zipCode
string
Zip code of the external user. Should not be provided in the payload if useCompanyAddress is set as true.5 digits US Zip Code with optional 4 digits extension in the format #####-####.
phone
string
External user’s phone number.10 digits Phone Number with an optional 1-4 digits extension in the format ###-###-#### ####."
cellPhone
string
External user’s cell phone number.10 digits Phone Number with an optional 1-4 digits extension in the format ###-###-#### ####."
fax
string
Fax number for the external user.10 digits Phone Number with an optional 1-4 digits extension in the format ###-###-#### ####."
email
string
Required. Email of the external user. The value must be in the required format (@, .com or .org, etc...)64 in email format
nmlsId
string
License number of Nationwide Multistate Licensing System.12
nmlsCurrent
boolean
Indicates whether the external user’s NMLS is current.true/false
ssn
string
Social Security Number of the external user.9 digits Tax Id in the format ##-####### or Social Security Number in the format ###-##-####.
useParentInfoForRateLock
boolean
Required. Indicates if the details of Rate sheet and Lock info will be inherited from parent Org.true/false
emailForRateSheet
string
Email address to which the system will send the Rate Sheet.64 in email format
faxForRateSheet
string
Fax number to which the system will send the Rate Sheet.10 digits Phone Number with an optional 1-4 digits extension in the format ###-###-#### ####."
emailForLockInfo
string
Email address to which the system will send the Lock information.64 in email format
faxForLockInfo
string
Fax number to which the system will send the Lock information.10 digits Phone Number with an optional 1-4 digits extension in the format ###-###-#### ####."
emailForLogin
string
Required. Login email for TPOC portal.emailformat
siteUrls
Array[string]
URL of TPOC site where the loans will be submitted by the user.Unique non empty string array
salesRep
EntityReferenceContract
Parent Org's primary sales rep user will be inherited if the details are not passed in the payload.N/A
salesRep.entityId
string
Required.
salesRep.entityName
string
salesRep.entityUri
string
salesRep.entityType
string
User
personas
Array[EntityReferenceContract]
At least one persona is required. Personas define the access rights of the user to the TPOC site.N/A
personas.entityId
string
personas.entityName
string
personas.entityUri
string
personas.entityType
string
Persona
peerLoanAccess
string
Indicates if the user will have access to the loans created/managed by other users in the org and the orgs below in the hierarchy.
Access level to peer loans.
PeerLoanAccessType enum → Disabled, ReadOnly, ReadWrite
accessMode
string
Indicates if the user will have read only access or read write access to the loans created/managed by other users in the org and the orgs below in the hierarchy.

If passed ReadWrite PeerLoanAccess should be set as ReadWrite.
AccessModeType enum → ReadWrite, ReadOnly
licenses
Array
The user with role as Loan officer can specify the states in which he is licensed to originate loansUnique licenses
licenses.selected
boolean
true/false
stateAbbrevation
enum
Required.State permitted abbrev enum

AL, AK, AZ, AR, CA, CO, CT, DC, DE, FL,GA, HI, ID, IL, IN, IA, KS, KY, LA, ME,MD, MA, MI, MN, MS, MO, MT, NE, NV, NH,NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI,SC, SD, TN, TX, UT, VT, VA, WA, WV, WI,WY, VI, GU, PR
stateAbbrevation.licenseNumber
string
Max 50
stateAbbrevation.issueDate
DateTime
DateTime → DateFormat
stateAbbrevation.startDate
DateTime
DateTime → DateFormat
stateAbbrevation.endDate
DateTime
DateTime → DateFormat
licenseStatusType LicenseStatusTypes → TransitionRequested,
TransitionCancelled,
TransitionRejected,
PendingIncomplete,
PendingReview,
PendingDeficient,
PendingWithdrawRequested,
WithdrawnApplicationAbandoned, WithdrawnVoluntaryWithoutLicensure,
Denied,
DeniedOnAppeal,
Approved,
ApprovedConditional,
ApprovedDeficient,
ApprovedFailedToRenew,
ApprovedInactive,
ApprovedOnAppeal,
ApprovedSurrenderOrCancellationRequested,
Revoked,
RevokedOnAppeal,
Suspended,
SuspendedOnAppeal,
TemporaryCeaseAndDesist,
TemporaryExpired,
TemporaryFailedtoRenew, TerminatedOrderedToSurrender, TerminatedSurrenderedOrCancelled
licenseStatusType.statusDate DateTime → DateFormat
licenseStatusType.lastCheckedDateTime → DateFormat
Notes
string

SDK Methods That Are Replaced by This API:

  • CreateUser(String, String, String, String, ExternalUrlList)
  • CreateUser(String, String, String, String, ExternalUrlList, ExternalUser)
  • CreateUser(String, String, String, String, ExternalUrlList, User)

Updating an External User (PATCH)

A external user is updated with a userId which is considered as a unique identifier for an External User. Current API support deleting a single user at a time.

Things to Note:

  • Update External user is a PATCH method call supporting to update multiple external users in a single API call.
  • Maximum number of records supported is 100.
  • API query parameter action will assume default value as update.
  • Any user with access rights will be able to update external users.
  • If skip persona check is enabled, the user will be assumed to have all access rights.
  • If any read only attributes are passed in the request payload, the API will throw error as bad request.
  • For Personas and URLs, whatever the data that is being passed in the request will always override on the external user. Hence Even if you want to add one persona, or remove one persona, you must pass entire array of personas.
  • For updating licenses, if you want to remove any license, set the value for field licenses.selected as false.
  • For updating licenses, if you want to add only one new license, just pass only one record in licenses object in request payload.

Resources:

Deleting an External User (PATCH)

A external user is deleted with a userId which is considered as a unique identifier for an External User. Current API support deleting a single user at a time.

Things to Note:

  • Delete External user is a PATCH method call
  • Logged in user must have access to delete external user
  • API query parameter action will assume default value as update. Hence for Delete functionality, the action parameter must be passed with value as delete.

Resources:

Query Parameters

PARAMETERDESCRIPTION
orgid
string
Required. Unique identifier of the organization to delete the user(s) from.
action
string
Required. To create users, the action is "delete".
view
string
Optional. Possible value is "entity".
[
  {
    "id": "6990131318"
  },
  {
    "id": "6990131319"
  }
]
ATTRIBUTEDESCRIPTIONLENGTH/FORMAT
id
Array of external userids.
Required (with this release)64