ProductAPI Overview
The ProductAPI is organised in modules - Lenders, Products, Attributes and Config. Client can fully manage Products and Lenders modules, whereas the Attributes and Config modules are read-only.
This API Reference describes how to consume the service and outlines the details of each API operation.
Authentication
URL
POST https://api-link.newton.ca/productmatch/token
Headers
Content-Type:application/x-www-form-urlencoded
Upon successful authentication, the API responds with a 200 OK status and returns the following JSON object with the access token (Bearer Token) and time in seconds until the token expires.
Authentication Response
{
"access_token": "ie7JIONyQC8EdP4LCaJXn9HkkxnMt-VQ9D3a4SghfhCXITf_WoFop7tNnwu7-6SxViCQX...",
"token_type": "bearer",
"expires_in": 43199
}
When working with the ProductAPI, clients (users or applications) will need to be authenticated and authorized to use API operations.
The API uses OAuth authentication method. Upon successful authentication, the client will be presented with a bearer token that will need to be provided when making API calls. Bearer tokens have a default expiration period of 1 hour, but can be configured separately for individual users.
Errors
Error Response
{
"Code": "XXNN",
"Message": "Request is invalid."
}
All API calls that completed intended operation sucessfully, will respond with a 200 OK status and a JSON object containing requested data, or a 204 No Content status, if no data is returned.
If the API does not understand the request, then it will respond with a 400 Bad Request status and return a JSON object containing the error code and message.
Lender
The Lender module of the ProductAPI lets clients Search, Create, Update and Delete lenders.
Lender search
GET https://api-link.newton.ca/productmatch/lender
Code sample
const headers = {
'Accept':'application/json'
};
fetch('/lender', {
method: 'GET',
headers: headers
}).then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/lender";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
GET /lender HTTP/1.1
Accept: application/json
Sample Response
{
"total": 0,
"lenders": [
{
"id": "8fe8ed13-5fa2-e811-9f78-fcf8ae649424",
"code": 1000,
"name": "Newton Lender",
"lenderType": "private",
"lenderBusinessType": [
"alternative"
],
"prime": 2.75,
"province": [
"on"
],
"createdAt": "2019-01-10T09:03:40Z",
"updatedAt": "2020-08-24T14:15:22Z"
}
]
}
Lender Search returns a full list of lenders that match requested parameter criteria and includes all lender details (excluding Products). Search parameters are expected in request URL. By default, lender search returns 25 lenders at a time (per page). To return a different number of matching lenders at a time (per page), request URL must specify a ?perpage=X parameter. To return a specific search result page, request URL must specify a ?page=X parameter.
Query Parameters
Name | Type | Description |
---|---|---|
id optional | string | Comma separated list of unique lender identifiers (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). |
code optional | string | Comma separated list of unique lender codes (numbers between 1000 and 9999). |
name optional | string | Lender name. |
lendertype optional | string | Comma separated list of lender types (ie. bank, credit-union, etc). |
lenderbusinesstype optional | string | Comma separated list of lender business types (ie. prime, alternative, etc). |
province optional | string | Comma separated list of provinces (ie. ab, bc, on, etc). |
incarchived optional | boolean | Include archived products. |
page optional 1 |
integer(int32) | |
perpage optional 25 |
integer(int32) |
Responses
Status | Schema |
---|---|
200 OK | ProductMatch.API.Models.LenderSearchResponse |
400 Bad Request | ProductMatch.API.Models.Error |
404 Not Found | ProductMatch.API.Models.Error |
Errors
Status | Code | Message | Details |
---|---|---|---|
400 Bad Request | LR02 | Lender ID requested is invalid (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). | A lender ID from the requested list is not in the right format. |
400 Bad Request | LR08 | Lender Code requested is invalid (XXXX). | A lender code from the requested list is not numeric, below 1000 or above 9999. |
400 Bad Request | AT01 | Invalid XXX requested (xxx) | Lender attribute is invalid (ie. lender type or province). |
Create new lender
POST https://api-link.newton.ca/productmatch/lender
Code sample
const inputBody = '{
"code": 1001,
"name": "Newton Test Lender",
"lenderType": "private",
"lenderBusinessType": [
"alternative"
],
"prime": 2.45,
"province": [
"bc",
"on"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('/lender', {
method: 'POST',
body: inputBody,
headers: headers
}).then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/lender";
string json = @"{
""code"": 1001,
""name"": ""Newton Test Lender"",
""lenderType"": ""private"",
""lenderBusinessType"": [
""alternative""
],
""prime"": 2.45,
""province"": [
""bc"",
""on""
]
}";
ProductMatch.API.Models.Lender content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(ProductMatch.API.Models.Lender content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(ProductMatch.API.Models.Lender content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
POST /lender HTTP/1.1
Content-Type: application/json
Accept: application/json
Sample Request
{
"code": 1001,
"name": "Newton Test Lender",
"lenderType": "private",
"lenderBusinessType": [
"alternative"
],
"prime": 2.45,
"province": [
"bc",
"on"
]
}
Sample Response
{
"id": "8fe8ed13-5fa2-e811-9f78-fcf8ae649424",
"code": 1001,
"name": "Newton Test Lender",
"lendertype": "private",
"lenderbusinesstype": [
"alternative"
],
"prime": 2.45,
"province": [
"bc",
"on"
],
"createdAt": "2019-01-10T09:03:40",
}
Lenders can be added to the system using Create operation. Newly added lenders are immediately available in search results.
To create a new lender, only Name and LenderBusinessType are required. If the operation is successful, unique lender identifier (ID) will be automatically generated and returned together with all other lender details. If lender code was not provided in the request, then a number between 1000 and 9999 will be automatically assigned and returned as well.
Body Parameters
Type | Description |
---|---|
ProductMatch.API.Models.Lender | Lender details |
Responses
Status | Schema |
---|---|
200 OK | ProductMatch.API.Models.Lender |
400 Bad Request | ProductMatch.API.Models.Error |
404 Not Found | ProductMatch.API.Models.Error |
409 Conflict | ProductMatch.API.Models.Error |
Errors
Status | Code | Message | Details |
---|---|---|---|
400 Bad Request | LR01 | Lender information is required. | No information provided in the request. |
400 Bad Request | LR12 | Lender ID should not be specified. | It is possible to specify lender ID parameter in the request to this operation, but it is not expected. |
400 Bad Request | LR09 | Lender Code must be between 1000 and 9999. | |
400 Bad Request | LR04 | Lender Name is required. | |
400 Bad Request | LR06 | Lender Name must be between 1 and 100 characters long. | |
400 Bad Request | LR14 | Lender Business Type is required. | |
409 Conflict | LR10 | Lender with Code XXXX already exists. | Lender codes are checked for duplciates. Names are not. |
500 Internal Server Error | LR11 | Unable to generate Lender Code. | |
400 Bad Request | AT01 | Invalid XXX requested (xxx) | Lender type or province is invalid. |
400 Bad Request | AT03 | Requested XXX (xxx) below absolute minimum (xxx). | Lender prime rate must be positive |
Update a lender
PUT https://api-link.newton.ca/productmatch/lender
Code sample
const inputBody = '{
"id": "8fe8ed13-5fa2-e811-9f78-fcf8ae649424",
"code": 1000,
"name": "Newton Lender",
"lenderType": "private",
"lenderBusinessType": [
"alternative"
],
"prime": 3.45,
"province": [
"ab",
"bc",
"on"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('/lender', {
method: 'PUT',
body: inputBody,
headers: headers
}).then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePutRequest()
{
string url = "/lender";
string json = @"{
""id"": ""8fe8ed13-5fa2-e811-9f78-fcf8ae649424"",
""code"": 1000,
""name"": ""Newton Lender"",
""lenderType"": ""private"",
""lenderBusinessType"": [
""alternative""
],
""prime"": 3.45,
""province"": [
""ab"",
""bc"",
""on""
]
}";
ProductMatch.API.Models.Lender content = JsonConvert.DeserializeObject(json);
var result = await PutAsync(id, content, url);
}
/// Performs a PUT Request
public async Task PutAsync(int id, ProductMatch.API.Models.Lender content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute PUT request
HttpResponseMessage response = await Client.PutAsync(url, jsonContent);
//Return response
return await DeserializeObject(response);
}
/// Serialize an object to Json
private StringContent SerializeObject(ProductMatch.API.Models.Lender content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
PUT /lender HTTP/1.1
Content-Type: application/json
Accept: application/json
Sample Request
{
"id": "8fe8ed13-5fa2-e811-9f78-fcf8ae649424",
"code": 1000,
"name": "Newton Lender",
"lenderType": "private",
"lenderBusinessType": [
"alternative"
],
"prime": 3.45,
"province": [
"ab",
"bc",
"on"
]
}
Sample Response
{
"id": "8fe8ed13-5fa2-e811-9f78-fcf8ae649424",
"code": 1000,
"name": "Newton Lender",
"lenderType": "private",
"lenderBusinessType": [
"alternative"
],
"prime": 3.45,
"province": [
"ab",
"bc",
"on"
],
"CreatedAt": "2019-01-10T09:03:40Z",
"UpdatedAt": "2020-09-01T14:37:59Z"
}
If the details of a lender that is already in the system need to be modified, it can be done with the lender Update operation. However, since ID is the unique lender identifier, it is not updatable through this opereration.
Update operation fully replaces the lender properties that were previously created (product are not affected). Some properties cannot be removed as they are always required on Create and Update (ie. lender type), while others will be removed if not provided in the Update request. Lender Code is an exception, and will remain unchanged if not specified in the request.
Parameters
Name | In | Type | Description |
---|---|---|---|
id | path | string(uuid) | Unique lender identifier (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). |
body | ProductMatch.API.Models.Lender | Lender details |
Responses
Status | Schema |
---|---|
200 OK | ProductMatch.API.Models.Lender |
400 Bad Request | ProductMatch.API.Models.Error |
404 Not Found | ProductMatch.API.Models.Error |
409 Conflict | ProductMatch.API.Models.Error |
Errors
Status | Code | Message | Details |
---|---|---|---|
400 Bad Request | LR01 | Lender information is required. | No information provided in the request. |
400 Bad Request | LR03 | Invalid or no Lender ID specified. | |
404 Not Found | LR13 | Lender not found. (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | |
400 Bad Request | LR09 | Lender Code must be between 1000 and 9999. | |
400 Bad Request | LR04 | Lender Name is required. | |
400 Bad Request | LR06 | Lender Name must be between 1 and 100 characters long. | |
400 Bad Request | LR05 | Lender Type is required. | |
409 Conflict | LR10 | Lender with Code XXXX already exists. | Lender codes are checked for duplciates. Names are not. |
400 Bad Request | AT01 | Invalid XXX requested (xxx) | Lender type or province is invalid. |
400 Bad Request | AT03 | Requested XXX (xxx) below absolute minimum (xxx). | Lender prime rate must be positive |
Delete a lender
DELETE https://api-link.newton.ca/productmatch/lender
Code sample
const headers = {
'Accept':'application/json'
};
fetch('/lender', {
method: 'DELETE',
headers: headers
}).then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeDeleteRequest()
{
int id = 1;
string url = "/lender";
await DeleteAsync(id, url);
}
/// Performs a DELETE Request
public async Task DeleteAsync(int id, string url)
{
//Execute DELETE request
HttpResponseMessage response = await Client.DeleteAsync(url + $"/{id}");
//Return response
await DeserializeObject(response);
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
DELETE /lender HTTP/1.1
Accept: application/json
This operation archives requested lender in the system along with all lender's products. Since the lender is archived and not deleted, a new lender with the same lender code can never be created. Upon successful deletion, the API responds with a 204 No Content status and returns no data.
Query Parameters
Name | Type | Description |
---|---|---|
id | string | Comma separated list of unique lender identifiers (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). |
Responses
Status | Schema |
---|---|
204 No Content | - |
400 Bad Request | ProductMatch.API.Models.Error |
404 Not Found | ProductMatch.API.Models.Error |
Product
The Product module of the ProductAPI lets clients Search, Create, Update and Delete lender products.
Product Search
GET https://api-link.newton.ca/productmatch/product
Code sample
const headers = {
'Accept':'application/json'
};
fetch('/product', {
method: 'GET',
headers: headers
}).then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/product";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
GET /product HTTP/1.1
Accept: application/json
Sample Response
{
"total": 2,
"products": [
{
"id": "c51441c5-9dcc-e811-9105-000c294b7299",
"lender": {
"id": "8fe8ed13-5fa2-e811-9f78-fcf8ae649424",
"code": 1000,
"name": "Newton Lender",
"lenderBusinessType": ["prime"],
"prime": 3.95,
"province": [
"ab",
"bc",
"on"
]
},
"code": "2YRFX",
"name": "2 YR",
"compounding": "annual",
"loanType": "mortgage",
"rate": {
"netRate": 3.1,
"primeOffset": -0.85,
"updatedAt": "2019-03-01T15:02:37"
},
"rateType": "variable",
"term": 24,
"createdAt": "2019-01-11T11:34:08",
"updatedAt": "2019-03-01T15:02:37"
},
{
"id": "3ebc0673-a0d0-e811-9106-000c294b7299",
"lender": {
"id": "8fe8ed13-5fa2-e811-9f78-fcf8ae649424",
"code": 1000,
"name": "Newton Lender",
"lenderBusinessType": ["prime"],
"prime": 3.95,
"province": [
"ab",
"bc",
"on"
]
},
"name": "Limited Feature Value-Flex Variable",
"applicationType": [
"approval",
"pre-approval"
],
"compensation": 80,
"compounding": "semi-annual",
"downPaymentSource": [
"existing-equity",
"gift",
"grants",
"liquid-assets",
"other",
"personal-cash",
"rrsp",
"sale-of-property",
"sweat-equity"
],
"employmentType": [
"clerical",
"homemaker",
"management",
"other",
"professional",
"retired",
"tradesperson"
],
"insurance": [
"insurable",
"insured",
"uninsurable"
],
"loanPurpose": [
"equity-takeout",
"purchase",
"refinance",
"switch-transfer"
],
"loanToValue": {
"min": 65
},
"loanType": "mortgage",
"mortgagePosition": [
"first"
],
"occupancy": [
"owner-occupied",
"rental-one",
"rental-two-four"
],
"rate": {
"netRate": 2.95,
"primeOffset": -1
},
"rateType": "variable",
"term": 12,
"createdAt": "2019-01-11T11:37:40"
}
]
}
Product Search returns a list of products that match requested parameter criteria, that are to be specified in the request URL. The product information returned by the API includes all product details - properties and attributes.
Query Parameters
Name | Type | Description |
---|---|---|
id optional | string | Comma separated list of unique product identifiers (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). |
lenderid optional | string | Comma separated list of unique lender identifiers (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). |
lendercode optional | string | Comma separated list of lender codes. |
code optional | string | Comma separated list of product codes. |
firm optional | string | Firm code |
active optional true |
boolean | Filter for active products |
future optional | boolean | Filter for future products (effective date in future) |
expired optional | boolean | Filter for expired products |
archive optional | boolean | Filter for archived products |
special optional | boolean | Filter for "Special" products |
expiringin optional | integer(int32) | Filter for product expiring in the next N days. |
order optional | string | none |
page optional 1 |
integer(int32) | none |
perpage optional 25 |
integer(int32) | none |
Product Search also accepts product attributes as query parameters. To get a list of attributes, list values and possible ranges, refer to Attribute module.
Search parameter's list items are separated by a "," character. If a parameter specifies a range of values, the min and the max values are separated by a ":" character (range with single value means min equals max) and are inclusive in the search. If a search parameter list contains more than one item, then the product's property/attribute must match each item (aka AND search). If product's property or attribute does not have any values specified, that means that any request for that attribute will always match the product (ie. no product attribute specified means ANY value matches or not restricted).
Query Parameters
Name | Type | Description |
---|---|---|
weight optional 100 |
integer(int32) | none |
limit optional | number(double) | none |
exact optional | string | none |
Responses
Status | Schema |
---|---|
200 OK | ProductMatch.API.Models.Product |
400 Bad Request | ProductMatch.API.Models.Error |
404 Not Found | ProductMatch.API.Models.Error |
Errors
Status | Code | Message | Details |
---|---|---|---|
400 Bad Request | PT10 | Product ID requested is invalid (XXX). | Invalid Product ID specified. |
400 Bad Request | PT13 | Lender ID requested is invalid (XXX). | Invalid Lender ID specified. |
400 Bad Request | PT31 | Requested attribute for exact match is invalid. (xxx) | Invalid attribute name specified. |
400 Bad Request | AT01 | Invalid XXX requested (xxx) | Invalid attribute value requested. |
400 Bad Request | AT02 | Requested XXX range is invalid (xxx). | Requested attribute range contains more than one : character OR min/max is not a number. |
400 Bad Request | AT03 | Requested XXX (xxx) below absolute minimum (xxx). | Requested attribute range minimum is below absolute minimum defined in the system for this filter. |
400 Bad Request | AT04 | Requested XXX (xxx) above absolute maximum (xxx). | Requested attribute range maximum is above absolute maximum defined in the system for this filter. |
400 Bad Request | AT05 | Requested XXX minimum is above requested maximum (xxx to xxx). | Requested attribute range minimum is above maximum. |
Relevant product search
Product search always does a relevant search, but unless otherwise speicifed, returns products that are a 100% match. To get products that are not a 100% match to what was requested, "?weight=X" parameter must be specified in the request, with a number between 0 and 100 inclusive. In this case all products that are a N% match or above will be returned.
If a relevant search is requested, the response will include "ExactTotal" attribute indicating how many of the matched products were a 100% match, and "Weight" attribute with each product indicating the match percentage.
Also, "?limit=X" request parameter can be specified to limit the Total number of products returned in the results (not the same as "?perpage=X" !). If the limit specified is 1 or above, than that's the maximum number or products that will be returned in the search results and the Total attribute. If the limit specified is between 0 and 1, then a percentage of the matching results will be returned (ie. ?limit=0.7 returns top 70% of the results).
The search results are always sorted by the product weight first, before any other sorting is applied.
Create new product
POST https://api-link.newton.ca/productmatch/product
Code sample
const inputBody = '{
"lenderId": "8fe8ed13-5fa2-e811-9f78-fcf8ae649424",
"name": "5yr fixed HELOC Component",
"amortization": 35,
"compounding": "monthly",
"creditScore": {
"min": 685,
"max": 700
},
"insurance": [
"uninsurable"
],
"loanPurpose": [
"switch-transfer"
],
"loanType": "loc",
"loanToValue": {
"min": 65.01,
"max": 74.99
},
"lumpSum": 20000,
"mortgagePosition": [
"first"
],
"previousBankruptcy": "no",
"productBusinessType": "alterntive",
"propertyEnvironmentalHazard": "no",
"propertySewage": [
"municipal"
],
"propertyTenure": [
"condo"
],
"grossDebtRatio": {
},
"totalDebtRatio": null,
"rate": {
"netRate": 3
},
"rateHold": 60,
"rateType": "fixed",
"term": 60
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('/product', {
method: 'POST',
body: inputBody,
headers: headers
}).then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/product";
string json = @"{
""lenderId"": ""8fe8ed13-5fa2-e811-9f78-fcf8ae649424"",
""name"": ""5yr fixed HELOC Component"",
""amortization"": 35,
""compounding"": ""monthly"",
""creditScore"": {
""min"": 685,
""max"": 700
},
""insurance"": [
""uninsurable""
],
""loanPurpose"": [
""switch-transfer""
],
""loanType"": ""loc"",
""loanToValue"": {
""min"": 65.01,
""max"": 74.99
},
""lumpSum"": 20000,
""mortgagePosition"": [
""first""
],
""previousBankruptcy"": ""no"",
""productBusinessType"": ""alterntive"",
""propertyEnvironmentalHazard"": ""no"",
""propertySewage"": [
""municipal""
],
""propertyTenure"": [
""condo""
],
""grossDebtRatio"": {
},
""totalDebtRatio"": null,
""rate"": {
""netRate"": 3
},
""rateHold"": 60,
""rateType"": ""fixed"",
""term"": 60
}";
ProductMatch.API.Models.Product content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(ProductMatch.API.Models.Product content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(ProductMatch.API.Models.Product content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
POST /product HTTP/1.1
Content-Type: application/json
Accept: application/json
Sample Request
{
"lenderId": "8fe8ed13-5fa2-e811-9f78-fcf8ae649424",
"name": "5yr fixed HELOC Component",
"amortization": 35,
"compounding": "monthly",
"creditScore": {
"min": 685,
"max": 700
},
"insurance": [
"uninsurable"
],
"loanPurpose": [
"switch-transfer"
],
"loanType": "loc",
"loanToValue": {
"min": 65.01,
"max": 74.99
},
"lumpSum": 20000,
"mortgagePosition": [
"first"
],
"previousBankruptcy": "no",
"productBusinessType": "alterntive",
"propertyEnvironmentalHazard": "no",
"propertySewage": [
"municipal"
],
"propertyTenure": [
"condo"
],
"grossDebtRatio": {
},
"totalDebtRatio": null,
"rate": {
"netRate": 3
},
"rateHold": 60,
"rateType": "fixed",
"term": 60
}
Sample Response
{
"id": "8fe8ed13-5fa2-e811-9f78-fcf8ae649424",
"lenderId": "8fe8ed13-5fa2-e811-9f78-fcf8ae649424",
"name": "5yr fixed HELOC Component",
"amortization": 35,
"compounding": "monthly",
"creditScore": {
"min": 685,
"max": 700
},
"insurance": [
"uninsurable"
],
"loanPurpose": [
"switch-transfer"
],
"loanToValue": {
"min": 65.01,
"max": 74.99
},
"loanType": "loc",
"lumpSum": 20000,
"mortgagePosition": [
"first"
],
"previousBankruptcy": "no",
"productBusinessType": "alterntive",
"propertyEnvironmentalHazard": "no",
"propertySewage": [
"municipal"
],
"propertyTenure": [
"condo"
],
"rate": {
"netRate": 3
},
"rateHold": 60,
"rateType": "fixed",
"term": 60,
"createdAt": "2019-01-12T11:37:44"
}
Lender products can be added to the system using Create operation. If the newly added product is active (ie. today is between effective and expiration date) then it is immediately available in search results.
If the operation is successful, unique product identifier (ID) will be automatically generated and returned together with all other product details.
Parameters
Name | In | Type | Description |
---|---|---|---|
body | ProductMatch.API.Models.Product | Product details |
Responses
Status | Schema |
---|---|
200 OK | ProductMatch.API.Models.Product |
400 Bad Request | ProductMatch.API.Models.Error |
404 Not Found | ProductMatch.API.Models.Error |
Errors
Status | Code | Message | Details |
---|---|---|---|
400 Bad Request | PT01 | Product information is required. | No information provided in the request. |
400 Bad Request | PT12 | Product ID should not be specified. | Product ID can be provided in the request, but is not expected. |
400 Bad Request | PT03 | Lender ID is required. | |
404 Not Found | PT18 | Lender not found. (XXX) | |
400 Bad Request | PT14 | Product Code must be between 1 and 10 characters long. | |
400 Bad Request | PT04 | Product Name is required. | |
400 Bad Request | PT15 | Product Name must be between 1 and 60 characters long. | |
400 Bad Request | PT27 | Product Description must not be longer than 4000 characters long. | |
400 Bad Request | PT30 | Product Location is outside Lender's province(s) of business. | |
400 Bad Request | PT05 | Product Term is required. | (HELOCs excluded) |
400 Bad Request | PT06 | Product Rate is required. | |
400 Bad Request | PT07 | Product Rate Type is required. | |
400 Bad Request | PT08 | Product Loan Type is required. | |
400 Bad Request | PT09 | Product Compounding frequency is required. | |
400 Bad Request | PT22 | Product rate Prime Offset is required for Variable product. | |
400 Bad Request | PT23 | Product Net Rate should not be specified for Variable product. | |
400 Bad Request | PT20 | Product Net Rate is required for Fixed product. | |
400 Bad Request | PT21 | Product rate Prime Offset should not be specified for Fixed product. | |
400 Bad Request | AT01 | Invalid XXX requested (xxx) | Product attribute is invalid |
400 Bad Request | AT02 | Requested XXX range is invalid (xxx). | |
400 Bad Request | AT03 | Requested XXX (xxx) below absolute minimum (xxx). | |
400 Bad Request | AT04 | Requested XXX (xxx) above absolute maximum (xxx). | |
400 Bad Request | AT05 | Requested XXX minimum is above requested maximum (xxx to xxx). |
Update a product
PUT https://api-link.newton.ca/productmatch/product
Code sample
const inputBody = '{
"id": "8fe8ed13-5fa2-e811-9f78-fcf8ae649424",
"lenderId": "8fe8ed13-5fa2-e811-9f78-fcf8ae649424",
"name": "5yr fixed HELOC Component",
"amortization": 35,
"compounding": "semi-annual",
"loanToValue": {
"max": 80
},
"loanType": "loc",
"rate": {
"netRate": 3.29
},
"rateHold": 120,
"rateType": "fixed",
"term": 60
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('/product', {
method: 'PUT',
body: inputBody,
headers: headers
}).then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePutRequest()
{
int id = 1;
string url = "/product";
string json = @"{
""id"": ""8fe8ed13-5fa2-e811-9f78-fcf8ae649424"",
""lenderId"": ""8fe8ed13-5fa2-e811-9f78-fcf8ae649424"",
""name"": ""5yr fixed HELOC Component"",
""amortization"": 35,
""compounding"": ""semi-annual"",
""loanToValue"": {
""max"": 80
},
""loanType"": ""loc"",
""rate"": {
""netRate"": 3.29
},
""rateHold"": 120,
""rateType"": ""fixed"",
""term"": 60
}";
ProductMatch.API.Models.Product content = JsonConvert.DeserializeObject(json);
var result = await PutAsync(id, content, url);
}
/// Performs a PUT Request
public async Task PutAsync(int id, ProductMatch.API.Models.Product content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute PUT request
HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);
//Return response
return await DeserializeObject(response);
}
/// Serialize an object to Json
private StringContent SerializeObject(ProductMatch.API.Models.Product content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
PUT /product HTTP/1.1
Content-Type: application/json
Accept: application/json
Sample Request
{
"id": "8fe8ed13-5fa2-e811-9f78-fcf8ae649424",
"lenderId": "8fe8ed13-5fa2-e811-9f78-fcf8ae649424",
"name": "5yr fixed HELOC Component",
"amortization": 35,
"compounding": "semi-annual",
"loanToValue": {
"max": 80
},
"loanType": "loc",
"rate": {
"netRate": 3.29
},
"rateHold": 120,
"rateType": "fixed",
"term": 60
}
Sample Response
{
"id": "8fe8ed13-5fa2-e811-9f78-fcf8ae649424",
"lenderId": "8fe8ed13-5fa2-e811-9f78-fcf8ae649424",
"name": "5yr fixed HELOC Component",
"amortization": 35,
"compounding": "semi-annual",
"loanToValue": {
"max": 80
},
"loanType": "loc",
"rate": {
"netRate": 3.29
},
"rateHold": 120,
"rateType": "fixed",
"term": 60
}
If the details of a product that is already in the system need to be modified, it can be done with the product Update operation. All product properties / attributes can be modified except ID, which is the product unique identifier.
The Update operation completely replaces the existing product with the details in the request. Hence, if a property / attribute was not provided in the request, it will be removed from the product if it previously had that property / attribute.
Parameters
Name | In | Type | Description |
---|---|---|---|
body | ProductMatch.API.Models.Product | Product details |
Responses
Status | Schema |
---|---|
200 OK | ProductMatch.API.Models.Product |
400 Bad Request | ProductMatch.API.Models.Error |
404 Not Found | ProductMatch.API.Models.Error |
Errors
Status | Code | Message | Details |
---|---|---|---|
400 Bad Request | PT01 | Product information is required. | No information provided in the request. |
400 Bad Request | PT11 | Invalid or no Product ID specified. | |
400 Bad Request | PT03 | Lender ID is required. | |
404 Not Found | PT18 | Lender not found. (XXX) | |
404 Not Found | PT19 | Product not found. (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | |
400 Bad Request | PT14 | Product Code must be between 1 and 10 characters long. | |
400 Bad Request | PT04 | Product Name is required. | |
400 Bad Request | PT15 | Product Name must be between 1 and 60 characters long. | |
400 Bad Request | PT27 | Product Description must not be longer than 4000 characters long. | |
400 Bad Request | PT30 | Product Location is outside Lender's province(s) of business. | |
400 Bad Request | PT05 | Product Term is required. | |
400 Bad Request | PT06 | Product Rate is required. | |
400 Bad Request | PT07 | Product Rate Type is required. | |
400 Bad Request | PT08 | Product Loan Type is required. | |
400 Bad Request | PT09 | Product Compounding frequency is required. | |
400 Bad Request | PT22 | Product rate Prime Offset is required for Variable product. | |
400 Bad Request | PT23 | Product Net Rate should not be specified for Variable product. | |
400 Bad Request | PT20 | Product Net Rate is required for Fixed product. | |
400 Bad Request | PT21 | Product rate Prime Offset should not be specified for Fixed product. | |
400 Bad Request | AT01 | Invalid XXX requested (xxx) | Product attribute is invalid |
400 Bad Request | AT02 | Requested XXX range is invalid (xxx). | |
400 Bad Request | AT03 | Requested XXX (xxx) below absolute minimum (xxx). | |
400 Bad Request | AT04 | Requested XXX (xxx) above absolute maximum (xxx). | |
400 Bad Request | AT05 | Requested XXX minimum is above requested maximum (xxx to xxx). |
Delete a product
DELETE https://api-link.newton.ca/productmatch/product
Code sample
const headers = {
'Accept':'application/json'
};
fetch('/product', {
method: 'DELETE',
headers: headers
}).then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeDeleteRequest()
{
int id = 1;
string url = "/product";
await DeleteAsync(id, url);
}
/// Performs a DELETE Request
public async Task DeleteAsync(int id, string url)
{
//Execute DELETE request
HttpResponseMessage response = await Client.DeleteAsync(url + $"/{id}");
//Return response
await DeserializeObject(response);
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
DELETE /product HTTP/1.1
Accept: application/json
This operation archives requested products. Upon successful deletion, the API responds with a 204 No Content status and returns no data.
Query Parameters
Name | In | Type | Description |
---|---|---|---|
id optional | string | Comma separated list of unique product identifiers (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). | |
lenderid optional | string | Comma separated list of unique lender identifiers (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). |
Responses
Status | Schema |
---|---|
204 No Content | - |
400 Bad Request | ProductMatch.API.Models.Error |
404 Not Found | ProductMatch.API.Models.Error |
Errors
Status | Code | Message | Details |
---|---|---|---|
400 Bad Request | PT01 | Product information is required. | No information provided in the request. |
404 Not Found | PT24 | Invalid or no Lender ID specified. | |
400 Bad Request | PT13 | Lender ID requested is invalid (XXX). | |
404 Not Found | PT18 | Lender not found. (XXX) | |
400 Bad Request | PT11 | Invalid or no Product ID specified. | |
400 Bad Request | PT10 | Product ID requested is invalid (XXX). | |
404 Not Found | PT19 | Product not found. (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) |
Attribute
The Attribute module of the ProductAPI lets clients retrieve a list of available attribute values and ranges that define lender and product properties.
Attribute Search
GET https://api-link.newton.ca/productmatch/attribute
Code sample
const headers = {
'Accept':'application/json'
};
fetch('/attribute', {
method: 'GET',
headers: headers
}).then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/attribute";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
GET /attribute HTTP/1.1
Accept: application/json
Sample Response
[
{
"name": "Amortization",
"description": "Amortization",
"type": "product",
"multiple": false,
"range": {
"min": 0,
"max": 40
}
},
{
"name": "ApplicationType",
"description": "Application Type",
"type": "product",
"multiple": true,
"list": [
{
"code": "approval",
"description": "Approval"
},
{
"code": "pre-approval",
"description": "Pre-Approval"
}
]
},
{
"name": "CreditScore",
"description": "Credit Score",
"type": "product",
"multiple": true,
"range": {
"min": 300,
"max": 900
}
}
]
Attribute search returns a list of availbale lender and product attributes that can be used to create, update and search for a lender or a product.
Attributes can be of two differen kinds:
- List - Predefined list of values.
- Range - Predefined absolute minimum and/or maximum values.
Attributes can be of two differen types:
- Lender - The attribute is only applicable to a lender.
- Product - The attribute is only applicable to a product.
Also, attributes can be "multiple" or "single":
- Multiple = True
- List attribute - multiple values can specified (ie. LoanPurpose)
- Range attribute - range spanning multiple values can be specified (ie. LTV)
- Multiple = False
- List attribute - only one value can be specified (ie. LenderType, RateType)
- Range attribute - only one value can be specified, usually a Max (ie. Amortization, RateHold)
Parameters
Name | In | Type | Description |
---|---|---|---|
name optional | query | string | Comma separated list of attribute ids. This parameter takes up multiple lines. |
Responses
Status | Schema |
---|---|
200 OK | Inline |
400 Bad Request | ProductMatch.API.Models.Error |
404 Not Found | ProductMatch.API.Models.Error |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [ProductMatch.API.Models.Attribute] | false | ||
» name | string¦null | false | ||
» description | string¦null | false | ||
» type | string¦null | false | ||
» multiple | boolean | false | ||
» list | [ProductMatch.API.Models.AttributeValue]¦null | false | ||
»» name | string¦null | false | ||
»» code | string¦null | false | ||
»» description | string¦null | false | ||
» range | ProductMatch.API.Models.Range | false | ||
»» min | number(double)¦null | false | ||
»» max | number(double)¦null | false | ||
»» isEmpty | boolean | false | read-only |
Config
The Config module of the ProductAPI lets clients retrieve a list of available config values.
Config search
GET https://api-link.newton.ca/productmatch/config
Code sample
const headers = {
'Accept':'application/json'
};
fetch('/config', {
method: 'GET',
headers: headers
}).then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/config";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
GET /config HTTP/1.1
Accept: application/json
Sample Response
[
{
"name": "Prime",
"description": "Bank of Canada Prime rate",
"value": "2.95"
}
]
Config search currently only returns the "Bank of Canada Prime rate" value.
Query Parameters
Name | Type | Description |
---|---|---|
name optional | string | none |
Responses
Status | Schema |
---|---|
200 OK | Inline |
400 Bad Request | ProductMatch.API.Models.Error |
404 Not Found | ProductMatch.API.Models.Error |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [ProductMatch.API.Models.Config] | false | ||
» name | string¦null | false | ||
» description | string¦null | false | ||
» value | string¦null | false |
Schemas
ProductMatch.API.Models.Lender
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"code": 0,
"name": "string",
"lenderType": "string",
"lenderBusinessType": [
"string"
],
"prime": 0,
"province": [
"string"
],
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"restoredAt": "2019-08-24T14:15:22Z",
"archivedAt": "2019-08-24T14:15:22Z",
"archived": true,
"test": true,
"discovery": true,
"connected": true
}
Properties
Name | Type | Required | Description |
---|---|---|---|
id | string(uuid)¦null | false | none |
code | integer(int32)¦null | false | none |
name | string | true | none |
lenderType | string¦null | false | none |
lenderBusinessType | [string] | true | none |
prime | number(double)¦null | false | none |
province | [string]¦null | false | none |
createdAt | string(date-time)¦null | false | none |
updatedAt | string(date-time)¦null | false | none |
restoredAt | string(date-time)¦null | false | none |
archivedAt | string(date-time)¦null | false | none |
archived | boolean¦null | false | none |
test | boolean¦null | false | none |
discovery | boolean¦null | false | none |
connected | boolean¦null | false | none |
ProductMatch.API.Models.LenderSearchResponse
{
"total": 0,
"lenders": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"code": 0,
"name": "string",
"lenderType": "string",
"lenderBusinessType": [
"string"
],
"prime": 0,
"province": [
"string"
],
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"restoredAt": "2019-08-24T14:15:22Z",
"archivedAt": "2019-08-24T14:15:22Z",
"archived": true,
"test": true,
"discovery": true,
"connected": true
}
]
}
Properties
Name | Type | Required | Description |
---|---|---|---|
total | integer(int32) | false | none |
lenders | [ProductMatch.API.Models.Lender]¦null | false | none |
ProductMatch.API.Models.Product
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"lenderID": "eb3d1e9c-4e51-413e-9fd1-647680d7f4c5",
"lender": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"code": 0,
"name": "string",
"lenderType": "string",
"lenderBusinessType": [
"string"
],
"prime": 0,
"province": [
"string"
],
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"restoredAt": "2019-08-24T14:15:22Z",
"archivedAt": "2019-08-24T14:15:22Z",
"archived": true,
"test": true,
"discovery": true,
"connected": true
},
"exclusive": [
{
"network": "string",
"province": "string",
"firms": [
"string"
]
}
],
"code": "string",
"name": "string",
"description": "string",
"special": true,
"amortization": 0,
"applicationType": [
"string"
],
"buydown": 0,
"cashback": 0,
"compensation": 0,
"compounding": "string",
"creditScore": 0,
"downPaymentSource": [
"string"
],
"employmentType": [
"string"
],
"grossDebtService": 0,
"incentive": 0,
"incomeType": [
"string"
],
"insurance": [
"string"
],
"livingSpace": {
"min": 0,
"max": 0,
"isEmpty": true
},
"loanPurpose": [
"string"
],
"loanToValue": {
"min": 0,
"max": 0,
"isEmpty": true
},
"loanType": "string",
"lotSize": {
"min": 0,
"max": 0,
"isEmpty": true
},
"lumpSum": 0,
"mortgagePosition": [
"string"
],
"numberOfUnits": {
"min": 0,
"max": 0,
"isEmpty": true
},
"occupancy": [
"string"
],
"prepayment": 0,
"previousBankruptcy": "string",
"productBusinessType": "string",
"propertyEnvironmentalHazard": "string",
"propertyLocation": [
"string"
],
"propertySewage": [
"string"
],
"propertyTenure": [
"string"
],
"propertyWaterType": [
"string"
],
"propertyZoning": [
"string"
],
"rate": {
"netRate": 0,
"primeOffset": 0,
"note": "string",
"updatedAt": "2019-08-24T14:15:22Z",
"verifiedAt": "2019-08-24T14:15:22Z"
},
"rateHold": 0,
"rateType": "string",
"term": 0,
"totalDebtService": 0,
"effective": "2019-08-24T14:15:22Z",
"expiration": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"verifiedAt": "2019-08-24T14:15:22Z",
"archivedAt": "2019-08-24T14:15:22Z",
"restoredAt": "2019-08-24T14:15:22Z",
"archived": true,
"weight": 0
}
Properties
Name | Type | Required | Description |
---|---|---|---|
id | string(uuid)¦null | false | none |
lenderID | string(uuid)¦null | false | none |
lender | ProductMatch.API.Models.Lender | false | none |
exclusive | [ProductMatch.API.Models.ProductExclusive]¦null | false | none |
code | string¦null | false | none |
name | string¦null | false | none |
description | string¦null | false | none |
special | boolean¦null | false | none |
amortization | integer(int32)¦null | false | none |
applicationType | [string]¦null | false | none |
buydown | integer(int32)¦null | false | none |
cashback | integer(int32)¦null | false | none |
compensation | integer(int32)¦null | false | none |
compounding | string¦null | false | none |
creditScore | integer(int32)¦null | false | none |
downPaymentSource | [string]¦null | false | none |
employmentType | [string]¦null | false | none |
grossDebtService | number(double)¦null | false | none |
incentive | number(double)¦null | false | none |
incomeType | [string]¦null | false | none |
insurance | [string]¦null | false | none |
livingSpace | ProductMatch.API.Models.Range | false | none |
loanPurpose | [string]¦null | false | none |
loanToValue | ProductMatch.API.Models.Range | false | none |
loanType | string¦null | false | none |
lotSize | ProductMatch.API.Models.Range | false | none |
lumpSum | number(double)¦null | false | none |
mortgagePosition | [string]¦null | false | none |
numberOfUnits | ProductMatch.API.Models.Range | false | none |
occupancy | [string]¦null | false | none |
prepayment | integer(int32)¦null | false | none |
previousBankruptcy | string¦null | false | none |
productBusinessType | string¦null | false | none |
propertyEnvironmentalHazard | string¦null | false | none |
propertyLocation | [string]¦null | false | none |
propertySewage | [string]¦null | false | none |
propertyTenure | [string]¦null | false | none |
propertyWaterType | [string]¦null | false | none |
propertyZoning | [string]¦null | false | none |
rate | ProductMatch.API.Models.ProductRate | false | none |
rateHold | integer(int32)¦null | false | none |
rateType | string¦null | false | none |
term | integer(int32)¦null | false | none |
totalDebtService | number(double)¦null | false | none |
effective | string(date-time)¦null | false | none |
expiration | string(date-time)¦null | false | none |
createdAt | string(date-time)¦null | false | none |
updatedAt | string(date-time)¦null | false | none |
verifiedAt | string(date-time)¦null | false | none |
archivedAt | string(date-time)¦null | false | none |
restoredAt | string(date-time)¦null | false | none |
archived | boolean¦null | false | none |
weight | number(double)¦null | false | none |
ProductMatch.API.Models.ProductExclusive
{
"network": "string",
"province": "string",
"firms": [
"string"
]
}
Properties
Name | Type | Required | Description |
---|---|---|---|
network | string¦null | false | none |
province | string¦null | false | none |
firms | [string]¦null | false | none |
ProductMatch.API.Models.ProductRate
{
"netRate": 0,
"primeOffset": 0,
"note": "string",
"updatedAt": "2019-08-24T14:15:22Z",
"verifiedAt": "2019-08-24T14:15:22Z"
}
Properties
Name | Type | Required | Description |
---|---|---|---|
netRate | number(double)¦null | false | none |
primeOffset | number(double)¦null | false | none |
note | string¦null | false | none |
updatedAt | string(date-time)¦null | false | none |
verifiedAt | string(date-time)¦null | false | none |
ProductMatch.API.Models.Attribute
{
"name": "string",
"description": "string",
"type": "string",
"multiple": true,
"list": [
{
"name": "string",
"code": "string",
"description": "string"
}
],
"range": {
"min": 0,
"max": 0,
"isEmpty": true
}
}
Properties
Name | Type | Required | Description |
---|---|---|---|
name | string¦null | false | none |
description | string¦null | false | none |
type | string¦null | false | none |
multiple | boolean | false | none |
list | [ProductMatch.API.Models.AttributeValue]¦null | false | none |
range | ProductMatch.API.Models.Range | false | none |
ProductMatch.API.Models.AttributeValue
{
"name": "string",
"code": "string",
"description": "string"
}
Properties
Name | Type | Required | Description |
---|---|---|---|
name | string¦null | false | none |
code | string¦null | false | none |
description | string¦null | false | none |
ProductMatch.API.Models.Range
{
"min": 0,
"max": 0,
"isEmpty": true
}
Properties
Name | Type | Required | Description |
---|---|---|---|
min | number(double)¦null | false | none |
max | number(double)¦null | false | none |
isEmpty | boolean | false | none |
ProductMatch.API.Models.Config
{
"name": "string",
"description": "string",
"value": "string"
}
Properties
Name | Type | Required | Description |
---|---|---|---|
name | string¦null | false | none |
description | string¦null | false | none |
value | string¦null | false | none |
ProductMatch.API.Models.Error
{
"code": "string",
"message": "string"
}
Properties
Name | Type | Required | Description |
---|---|---|---|
code | string¦null | false | none |
message | string¦null | false | none |