Integration
Introduction
For first phase of integrating MRE into MyCRM, we've decided to:
- Add a way to open MRE (iframe or new tab) from MyCRM with ready loaded data for generating a report
- MyCRM will communicate to MRE data (inputs) required to calculate a specific case via an endpoint provided by MRE - httpsEngineCreateSession
- Data is stored in "sessions" which can be loaded by passing a session ID as URL parameter to BlackFin hosted frontend of MRE tool - https://mre.blackfin.tools/
API
Server to server API
Mortgage Recommendation Engine exposes JSON RESTful API which uses standard HTTP response codes, authentication, and verbs.
Endpoint is hosted on Firebaseenvironment-specific -domains:
- Development:
Platform,https://api.mre.test.blackfin.tools/ - Live:
endpointTBA
API byendpoints itsare unique function name which is passedrepresented as apaths pathappended afterto the base URL. For example, create a session endpoint URL that identifies the environment/location where the function is hosted.
For example:
https://us-central1-mortgage-rec-engine-dev-msec.cloudfunctions.net/is:httpsEngineCreateSession
mortgage-rec-engine-dev-msechttps://api.mre.test.blackfin.tools/sessions/create is the name of the environmenthttpsEngineCreateSession is the name of the endpoint
When storing reference to the endpoint, always store the full URL.
Authentication
API uses Bearer token authentication method. That means HTTP Header Header Authorization should contain string:
Bearer <API_KEY>
Where Where <API_KEY> is replaced by an API key issued by BlackFin.
Environments
At the time of writing, API for MyCRM use is available only on our development environment for multiple securities feature release: mortgage-rec-engine-dev-msec. This environment is not production ready and should be used sparingly.