NAV

Introduction

The VelocityAPI allows a brokerage or broker to submit either a Deal Application or Contact Lead into Velocity. The VelocityAPI is a RESTful API that accepts JSON data.

The base URL for all calls is: https://api-velocity.newton.ca

Authentication

When working with the VelocityAPI, clients (users or applications) will need to be authenticated and authorized to use API operations.

An API key is required for all POST requests, example:
https://api-velocity.newton.ca/api/forms/v1/deals/deal?apiKey=YOUR_API_KEY_GOES_HERE​

An API key can be requested from within your Velocity settings page. API keys are intended to be private and should not be exposed through client facing code.

Deal

Create Deal

POST https://api-velocity.newton.ca/api/forms/v1/deals/deal

Code sample

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 = "https://api-velocity.newton.ca/api/forms/v1/deals/deal";

      string json = @"{
  ""closingDate"": ""2019-08-24T14:15:22Z"",
  ""purchasePrice"": 0,
  ""subjectProperty"": {
    ""unitNumber"": ""string"",
    ""streetNumber"": ""string"",
    ""streetName"": ""string"",
    ""streetType"": 10,
    ""streetDirection"": 1,
    ""city"": ""string"",
    ""province"": 0,
    ""postalCode"": ""string"",
    ""intendedUse"": 1
  },
  ""mortgageRequest"": {
    ""purpose"": 10,
    ""mortgages"": [
      {
        ""amount"": 0
      }
    ]
  },
  ""borrowers"": [
    {
      ""salutation"": 1,
      ""firstName"": ""string"",
      ""middleName"": ""string"",
      ""lastName"": ""string"",
      ""suffix"": 1,
      ""email"": ""user@example.com"",
      ""caslOptIn"": true,
      ""homePhone"": ""string"",
      ""cellPhone"": ""string"",
      ""businessPhone"": ""string"",
      ""dateOfBirth"": ""2019-08-24T14:15:22Z"",
      ""socialInsuranceNumber"": ""string"",
      ""maritalStatus"": 1,
      ""contactPreference"": 1,
      ""residentType"": 1,
      ""correspondenceLanguage"": 1,
      ""firstTimeBuyer"": true,
      ""numOfDependents"": 0,
      ""relationshipToPrimary"": 1,
      ""addresses"": [
        {
          ""unitNumber"": ""string"",
          ""streetNumber"": ""string"",
          ""streetName"": ""string"",
          ""streetType"": 10,
          ""streetDirection"": 1,
          ""city"": ""string"",
          ""provinceOrState"": 0,
          ""country"": 1,
          ""postalCode"": ""string"",
          ""yearsAtAddress"": 0,
          ""monthsAtAddress"": 0,
          ""dwellingStatus"": 1,
          ""rentalPayment"": 0
        }
      ],
      ""employmentHistory"": [
        {
          ""isCurrent"": true,
          ""companyName"": ""string"",
          ""selfEmployment"": {
            ""companyType"": ""string"",
            ""operatingAs"": ""string"",
            ""grossRevenue"": 0
          },
          ""jobTitle"": ""string"",
          ""jobType"": 1,
          ""yearsAt"": 0,
          ""monthsAt"": 0,
          ""employmentType"": 1,
          ""industrySector"": 1,
          ""incomeType"": 1,
          ""incomePeriod"": 1,
          ""income"": 0,
          ""yearsInIndustry"": 0,
          ""monthsInIndustry"": 0,
          ""phoneNumber"": ""string"",
          ""unitNumber"": ""string"",
          ""streetNumber"": ""string"",
          ""streetName"": ""string"",
          ""streetType"": 10,
          ""streetDirection"": 1,
          ""city"": ""string"",
          ""provinceOrState"": 0,
          ""country"": 1,
          ""postalCode"": ""string""
        }
      ],
      ""otherIncomes"": [
        {
          ""type"": 1,
          ""incomePeriod"": 1,
          ""amount"": 0,
          ""description"": ""string""
        }
      ],
      ""assets"": [
        {
          ""type"": 1,
          ""value"": 0,
          ""description"": ""string"",
          ""downPaymentAmount"": 0
        }
      ],
      ""properties"": [
        {
          ""occupancy"": 1,
          ""value"": 0,
          ""originalPurchaseDate"": ""2019-08-24T14:15:22Z"",
          ""originalPrice"": 0,
          ""annualTaxes"": 0,
          ""condoFees"": 0,
          ""includesHeat"": true,
          ""heatingFee"": 0,
          ""propertyEquity"": 0,
          ""futureStatus"": 1,
          ""rentalDetails"": {
            ""income"": 0,
            ""hydroExpense"": 0,
            ""managementExpense"": 0,
            ""insuranceExpense"": 0,
            ""repairsExpense"": 0,
            ""interestExpense"": 0,
            ""otherExpense"": 0
          },
          ""unitNumber"": ""string"",
          ""streetNumber"": ""string"",
          ""streetName"": ""string"",
          ""streetType"": 10,
          ""streetDirection"": 1,
          ""city"": ""string"",
          ""provinceOrState"": 0,
          ""country"": 1,
          ""postalCode"": ""string"",
          ""mortgages"": [
            {
              ""balance"": 0,
              ""maturityDate"": ""2019-08-24T14:15:22Z"",
              ""paymentFrequency"": 1,
              ""payment"": 0,
              ""payoffType"": 1,
              ""lender"": ""string"",
              ""rateType"": 1,
              ""interestRate"": 0,
              ""blendedAmortization"": true,
              ""termType"": 1,
              ""mortgageNumber"": ""string"",
              ""insured"": true,
              ""insuranceAccount"": ""string"",
              ""insurer"": 10,
              ""originalPurchaseAmount"": 0
            }
          ]
        }
      ]
    }
  ],
  ""notes"": [
    {
      ""text"": ""string""
    }
  ],
  ""referral"": {
    ""firstName"": ""string"",
    ""lastName"": ""string"",
    ""companyName"": ""string"",
    ""email"": ""user@example.com"",
    ""type"": 1,
    ""otherTypeDescription"": ""string""
  }
}";
      Deal content = JsonConvert.DeserializeObject(json);
      await PostAsync(content, url);


    }

    /// Performs a POST Request
    public async Task PostAsync(Deal 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(Deal 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);
    }
}

const inputBody = '{
  "closingDate": "2019-08-24T14:15:22Z",
  "purchasePrice": 0,
  "subjectProperty": {
    "unitNumber": "string",
    "streetNumber": "string",
    "streetName": "string",
    "streetType": 10,
    "streetDirection": 1,
    "city": "string",
    "province": 0,
    "postalCode": "string",
    "intendedUse": 1
  },
  "mortgageRequest": {
    "purpose": 10,
    "mortgages": [
      {
        "amount": 0
      }
    ]
  },
  "borrowers": [
    {
      "salutation": 1,
      "firstName": "string",
      "middleName": "string",
      "lastName": "string",
      "suffix": 1,
      "email": "user@example.com",
      "caslOptIn": true,
      "homePhone": "string",
      "cellPhone": "string",
      "businessPhone": "string",
      "dateOfBirth": "2019-08-24T14:15:22Z",
      "socialInsuranceNumber": "string",
      "maritalStatus": 1,
      "contactPreference": 1,
      "residentType": 1,
      "correspondenceLanguage": 1,
      "firstTimeBuyer": true,
      "numOfDependents": 0,
      "relationshipToPrimary": 1,
      "addresses": [
        {
          "unitNumber": "string",
          "streetNumber": "string",
          "streetName": "string",
          "streetType": 10,
          "streetDirection": 1,
          "city": "string",
          "provinceOrState": 0,
          "country": 1,
          "postalCode": "string",
          "yearsAtAddress": 0,
          "monthsAtAddress": 0,
          "dwellingStatus": 1,
          "rentalPayment": 0
        }
      ],
      "employmentHistory": [
        {
          "isCurrent": true,
          "companyName": "string",
          "selfEmployment": {
            "companyType": "string",
            "operatingAs": "string",
            "grossRevenue": 0
          },
          "jobTitle": "string",
          "jobType": 1,
          "yearsAt": 0,
          "monthsAt": 0,
          "employmentType": 1,
          "industrySector": 1,
          "incomeType": 1,
          "incomePeriod": 1,
          "income": 0,
          "yearsInIndustry": 0,
          "monthsInIndustry": 0,
          "phoneNumber": "string",
          "unitNumber": "string",
          "streetNumber": "string",
          "streetName": "string",
          "streetType": 10,
          "streetDirection": 1,
          "city": "string",
          "provinceOrState": 0,
          "country": 1,
          "postalCode": "string"
        }
      ],
      "otherIncomes": [
        {
          "type": 1,
          "incomePeriod": 1,
          "amount": 0,
          "description": "string"
        }
      ],
      "assets": [
        {
          "type": 1,
          "value": 0,
          "description": "string",
          "downPaymentAmount": 0
        }
      ],
      "properties": [
        {
          "occupancy": 1,
          "value": 0,
          "originalPurchaseDate": "2019-08-24T14:15:22Z",
          "originalPrice": 0,
          "annualTaxes": 0,
          "condoFees": 0,
          "includesHeat": true,
          "heatingFee": 0,
          "propertyEquity": 0,
          "futureStatus": 1,
          "rentalDetails": {
            "income": 0,
            "hydroExpense": 0,
            "managementExpense": 0,
            "insuranceExpense": 0,
            "repairsExpense": 0,
            "interestExpense": 0,
            "otherExpense": 0
          },
          "unitNumber": "string",
          "streetNumber": "string",
          "streetName": "string",
          "streetType": 10,
          "streetDirection": 1,
          "city": "string",
          "provinceOrState": 0,
          "country": 1,
          "postalCode": "string",
          "mortgages": [
            {
              "balance": 0,
              "maturityDate": "2019-08-24T14:15:22Z",
              "paymentFrequency": 1,
              "payment": 0,
              "payoffType": 1,
              "lender": "string",
              "rateType": 1,
              "interestRate": 0,
              "blendedAmortization": true,
              "termType": 1,
              "mortgageNumber": "string",
              "insured": true,
              "insuranceAccount": "string",
              "insurer": 10,
              "originalPurchaseAmount": 0
            }
          ]
        }
      ]
    }
  ],
  "notes": [
    {
      "text": "string"
    }
  ],
  "referral": {
    "firstName": "string",
    "lastName": "string",
    "companyName": "string",
    "email": "user@example.com",
    "type": 1,
    "otherTypeDescription": "string"
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/octet-stream'
};

fetch('https://api-velocity.newton.ca/api/forms/v1/deals/deal', {
  method: 'POST',
  body: inputBody,
  headers: headers
}).then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST https://api-velocity.newton.ca/api/forms/v1/deals/deal HTTP/1.1
Host: api-velocity.newton.ca
Content-Type: application/json
Accept: application/octet-stream

Sample Request

{
  "closingDate": "2019-08-24T14:15:22Z",
  "purchasePrice": 0,
  "subjectProperty": {
    "unitNumber": "string",
    "streetNumber": "string",
    "streetName": "string",
    "streetType": 10,
    "streetDirection": 1,
    "city": "string",
    "province": 0,
    "postalCode": "string",
    "intendedUse": 1
  },
  "mortgageRequest": {
    "purpose": 10,
    "mortgages": [
      {
        "amount": 0
      }
    ]
  },
  "borrowers": [
    {
      "salutation": 1,
      "firstName": "string",
      "middleName": "string",
      "lastName": "string",
      "suffix": 1,
      "email": "user@example.com",
      "caslOptIn": true,
      "homePhone": "string",
      "cellPhone": "string",
      "businessPhone": "string",
      "dateOfBirth": "2019-08-24T14:15:22Z",
      "socialInsuranceNumber": "string",
      "maritalStatus": 1,
      "contactPreference": 1,
      "residentType": 1,
      "correspondenceLanguage": 1,
      "firstTimeBuyer": true,
      "numOfDependents": 0,
      "relationshipToPrimary": 1,
      "addresses": [
        {
          "unitNumber": "string",
          "streetNumber": "string",
          "streetName": "string",
          "streetType": 10,
          "streetDirection": 1,
          "city": "string",
          "provinceOrState": 0,
          "country": 1,
          "postalCode": "string",
          "yearsAtAddress": 0,
          "monthsAtAddress": 0,
          "dwellingStatus": 1,
          "rentalPayment": 0
        }
      ],
      "employmentHistory": [
        {
          "isCurrent": true,
          "companyName": "string",
          "selfEmployment": {
            "companyType": "string",
            "operatingAs": "string",
            "grossRevenue": 0
          },
          "jobTitle": "string",
          "jobType": 1,
          "yearsAt": 0,
          "monthsAt": 0,
          "employmentType": 1,
          "industrySector": 1,
          "incomeType": 1,
          "incomePeriod": 1,
          "income": 0,
          "yearsInIndustry": 0,
          "monthsInIndustry": 0,
          "phoneNumber": "string",
          "unitNumber": "string",
          "streetNumber": "string",
          "streetName": "string",
          "streetType": 10,
          "streetDirection": 1,
          "city": "string",
          "provinceOrState": 0,
          "country": 1,
          "postalCode": "string"
        }
      ],
      "otherIncomes": [
        {
          "type": 1,
          "incomePeriod": 1,
          "amount": 0,
          "description": "string"
        }
      ],
      "assets": [
        {
          "type": 1,
          "value": 0,
          "description": "string",
          "downPaymentAmount": 0
        }
      ],
      "properties": [
        {
          "occupancy": 1,
          "value": 0,
          "originalPurchaseDate": "2019-08-24T14:15:22Z",
          "originalPrice": 0,
          "annualTaxes": 0,
          "condoFees": 0,
          "includesHeat": true,
          "heatingFee": 0,
          "propertyEquity": 0,
          "futureStatus": 1,
          "rentalDetails": {
            "income": 0,
            "hydroExpense": 0,
            "managementExpense": 0,
            "insuranceExpense": 0,
            "repairsExpense": 0,
            "interestExpense": 0,
            "otherExpense": 0
          },
          "unitNumber": "string",
          "streetNumber": "string",
          "streetName": "string",
          "streetType": 10,
          "streetDirection": 1,
          "city": "string",
          "provinceOrState": 0,
          "country": 1,
          "postalCode": "string",
          "mortgages": [
            {
              "balance": 0,
              "maturityDate": "2019-08-24T14:15:22Z",
              "paymentFrequency": 1,
              "payment": 0,
              "payoffType": 1,
              "lender": "string",
              "rateType": 1,
              "interestRate": 0,
              "blendedAmortization": true,
              "termType": 1,
              "mortgageNumber": "string",
              "insured": true,
              "insuranceAccount": "string",
              "insurer": 10,
              "originalPurchaseAmount": 0
            }
          ]
        }
      ]
    }
  ],
  "notes": [
    {
      "text": "string"
    }
  ],
  "referral": {
    "firstName": "string",
    "lastName": "string",
    "companyName": "string",
    "email": "user@example.com",
    "type": 1,
    "otherTypeDescription": "string"
  }
}

Parameters

Deal

NameRequiredTypeDescription
closingDateFalsedate-timenullable;
purchasePriceFalsenumbernullable; Range(0.0, 1000000000.0);
subjectPropertyFalseSubjectPropertynullable; SubjectProperty;
mortgageRequestTrueMortgageRequestMortgageRequest;
borrowersTruearrayarrayType: Borrower;
notesFalsearraynullable; arrayType: Note;
referralFalseReferralnullable; Referral;

SubjectProperty

NameRequiredTypeDescription
unitNumberFalsestringnullable; maxLength(10);
streetNumberFalsestringnullable; maxLength(10);
streetNameFalsestringnullable; maxLength(26);
streetTypeFalseAddressStreetTypesnullable; AddressStreetTypes;
streetDirectionFalseAddressStreetDirectionsnullable; AddressStreetDirections;
cityFalsestringnullable; maxLength(20);
provinceFalseintegernullable;
postalCodeFalsestringnullable;
intendedUseFalsePropertyIntendedUsesnullable; PropertyIntendedUses;

MortgageRequest

NameRequiredTypeDescription
purposeFalseMortgageRequestPurposesMortgageRequestPurposes;
mortgagesFalsearraynullable; arrayType: MortgageRequestMortgage;

MortgageRequestMortgage

NameRequiredTypeDescription
amountFalsenumbernullable; Range(0.0, 1000000000.0);

Borrower

NameRequiredTypeDescription
salutationFalseContactSalutationsnullable; ContactSalutations;
firstNameTruestringmaxLength(20);
middleNameFalsestringnullable; maxLength(20);
lastNameTruestringmaxLength(40);
suffixFalseContactSuffixesnullable; ContactSuffixes;
emailTruestring
caslOptInFalseboolean
homePhoneFalsestringnullable;
cellPhoneFalsestringnullable;
businessPhoneFalsestringnullable;
dateOfBirthFalsedate-timenullable;
socialInsuranceNumberFalsestringnullable;
maritalStatusFalseContactMaritalStatusesnullable; ContactMaritalStatuses;
contactPreferenceFalseContactPreferencesnullable; ContactPreferences;
residentTypeFalseContactResidentTypesnullable; ContactResidentTypes;
correspondenceLanguageFalseContactCorrespondenceLanguagesnullable; ContactCorrespondenceLanguages;
firstTimeBuyerFalsebooleannullable;
numOfDependentsFalseintegernullable;
relationshipToPrimaryFalseBorrowerRelationshipOptionsnullable; BorrowerRelationshipOptions;
addressesFalsearraynullable; arrayType: BorrowerAddress;
employmentHistoryFalsearraynullable; arrayType: BorrowerEmployment;
otherIncomesFalsearraynullable; arrayType: BorrowerOtherIncome;
assetsFalsearraynullable; arrayType: BorrowerAsset;
propertiesFalsearraynullable; arrayType: BorrowerProperty;

BorrowerAddress

NameRequiredTypeDescription
unitNumberFalsestringnullable; maxLength(10);
streetNumberFalsestringnullable; maxLength(10);
streetNameFalsestringnullable; maxLength(26);
streetTypeFalseAddressStreetTypesnullable; AddressStreetTypes;
streetDirectionFalseAddressStreetDirectionsnullable; AddressStreetDirections;
cityFalsestringnullable; maxLength(20);
provinceOrStateFalseintegernullable;
countryFalseAddressCountriesnullable; AddressCountries;
postalCodeFalsestringnullable;
yearsAtAddressFalseintegernullable;
monthsAtAddressFalseintegernullable;
dwellingStatusFalseBorrowerAddressDwellingStatusesBorrowerAddressDwellingStatuses;
rentalPaymentFalsenumbernullable; Range(0.0, 1000000000.0);

BorrowerEmployment

NameRequiredTypeDescription
isCurrentFalseboolean
companyNameFalsestringnullable;
selfEmploymentFalseSelfEmploymentDetailsnullable; SelfEmploymentDetails;
jobTitleFalsestringnullable;
jobTypeFalseEmploymentJobTypesnullable; EmploymentJobTypes;
yearsAtFalseintegernullable;
monthsAtFalseintegernullable;
employmentTypeFalseEmploymentTypesnullable; EmploymentTypes;
industrySectorFalseEmploymentIndustrySectornullable; EmploymentIndustrySector;
incomeTypeFalseEmploymentIncomeTypesnullable; EmploymentIncomeTypes;
incomePeriodFalseEmploymentIncomePeriodsnullable; EmploymentIncomePeriods;
incomeFalsenumbernullable; Range(0.0, 1000000000.0);
yearsInIndustryFalseintegernullable;
monthsInIndustryFalseintegernullable;
phoneNumberFalsestringnullable;
unitNumberFalsestringnullable;
streetNumberFalsestringnullable;
streetNameFalsestringnullable;
streetTypeFalseAddressStreetTypesnullable; AddressStreetTypes;
streetDirectionFalseAddressStreetDirectionsnullable; AddressStreetDirections;
cityFalsestringnullable;
provinceOrStateFalseintegernullable;
countryFalseAddressCountriesnullable; AddressCountries;
postalCodeFalsestringnullable;

SelfEmploymentDetails

NameRequiredTypeDescription
companyTypeFalsestringnullable;
operatingAsFalsestringnullable;
grossRevenueFalsenumbernullable;

BorrowerOtherIncome

NameRequiredTypeDescription
typeFalseOtherIncomeTypesOtherIncomeTypes;
incomePeriodFalseOtherIncomePeriodsnullable; OtherIncomePeriods;
amountFalsenumbernullable; Range(0.0, 1000000000.0);
descriptionFalsestringnullable;

BorrowerAsset

NameRequiredTypeDescription
typeFalseBorrowerAssetTypesBorrowerAssetTypes;
valueFalsenumbernullable; Range(0.0, 1000000000.0);
descriptionFalsestringnullable;
downPaymentAmountFalsenumbernullable; Range(0.0, 1000000000.0);

BorrowerProperty

NameRequiredTypeDescription
occupancyFalsePropertyOccupancyOptionsnullable; PropertyOccupancyOptions;
valueFalsenumbernullable; Range(0.0, 1000000000.0);
originalPurchaseDateFalsedate-timenullable;
originalPriceFalsenumbernullable; Range(0.0, 1000000000.0);
annualTaxesFalsenumbernullable; Range(0.0, 1000000000.0);
condoFeesFalsenumbernullable; Range(0.0, 1000000000.0);
includesHeatFalseboolean
heatingFeeFalsenumbernullable; Range(0.0, 1000000000.0);
propertyEquityFalsenumbernullable; Range(0.0, 1000000000.0);
futureStatusFalsePropertyFutureStatusesnullable; PropertyFutureStatuses;
rentalDetailsFalsePropertyRentalDetailsnullable; PropertyRentalDetails;
unitNumberFalsestringnullable;
streetNumberFalsestringnullable;
streetNameFalsestringnullable;
streetTypeFalseAddressStreetTypesnullable; AddressStreetTypes;
streetDirectionFalseAddressStreetDirectionsnullable; AddressStreetDirections;
cityFalsestringnullable;
provinceOrStateFalseintegernullable;
countryFalseAddressCountriesnullable; AddressCountries;
postalCodeFalsestringnullable;
mortgagesFalsearraynullable; arrayType: PropertyMortgage;

PropertyRentalDetails

NameRequiredTypeDescription
incomeFalsenumbernullable;
hydroExpenseFalsenumbernullable;
managementExpenseFalsenumbernullable;
insuranceExpenseFalsenumbernullable;
repairsExpenseFalsenumbernullable;
interestExpenseFalsenumbernullable;
otherExpenseFalsenumbernullable;

PropertyMortgage

NameRequiredTypeDescription
balanceFalsenumbernullable; Range(0.0, 1000000000.0);
maturityDateFalsedate-timenullable;
paymentFrequencyFalsePropertyMortgagePaymentFrequenciesnullable; PropertyMortgagePaymentFrequencies;
paymentFalsenumbernullable; Range(0.0, 1000000000.0);
payoffTypeFalsePropertyMortgagePayoffTypesnullable; PropertyMortgagePayoffTypes;
lenderFalsestringnullable;
rateTypeFalsePropertyMortgageRateTypesnullable; PropertyMortgageRateTypes;
interestRateFalsenumbernullable; Range(0.0, 100.0);
blendedAmortizationFalseboolean
termTypeFalsePropertyMortgageTermTypesnullable; PropertyMortgageTermTypes;
mortgageNumberFalsestringnullable;
insuredFalseboolean
insuranceAccountFalsestringnullable;
insurerFalsePropertyMortgageInsurersnullable; PropertyMortgageInsurers;
originalPurchaseAmountFalsenumbernullable;

Note

NameRequiredTypeDescription
textFalsestringnullable;

Referral

NameRequiredTypeDescription
firstNameFalsestringnullable;
lastNameFalsestringnullable;
companyNameFalsestringnullable;
emailFalsestringnullable;
typeFalseReferralTypesnullable; ReferralTypes;
otherTypeDescriptionFalsestringnullable;

Sample Response

200 Response

Responses

StatusSchema
200 OKstring

Get Sample Deal

GET https://api-velocity.newton.ca/api/forms/v1/deals/deal/sample

Code sample

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 = "https://api-velocity.newton.ca/api/forms/v1/deals/deal/sample";
      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);
    }
}


const headers = {
  'Accept':'application/octet-stream'
};

fetch('https://api-velocity.newton.ca/api/forms/v1/deals/deal/sample', {
  method: 'GET',
  headers: headers
}).then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET https://api-velocity.newton.ca/api/forms/v1/deals/deal/sample HTTP/1.1
Host: api-velocity.newton.ca
Accept: application/octet-stream

Sample Response

200 Response

Responses

StatusSchema
200 OKstring

Contact

Create Contact

POST https://api-velocity.newton.ca/api/forms/v1/contacts/contact

Code sample

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 = "https://api-velocity.newton.ca/api/forms/v1/contacts/contact";

      string json = @"{
  ""salutation"": 1,
  ""firstName"": ""string"",
  ""middleName"": ""string"",
  ""lastName"": ""string"",
  ""suffix"": 1,
  ""email"": ""user@example.com"",
  ""caslOptIn"": true,
  ""homePhone"": ""string"",
  ""cellPhone"": ""string"",
  ""businessPhone"": ""string"",
  ""dateOfBirth"": ""2019-08-24T14:15:22Z"",
  ""socialInsuranceNumber"": ""string"",
  ""maritalStatus"": 1,
  ""contactPreference"": 1,
  ""residentType"": 1,
  ""correspondenceLanguage"": 1,
  ""firstTimeBuyer"": true,
  ""numOfDependents"": 0
}";
      Contact content = JsonConvert.DeserializeObject(json);
      await PostAsync(content, url);


    }

    /// Performs a POST Request
    public async Task PostAsync(Contact 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(Contact 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);
    }
}

const inputBody = '{
  "salutation": 1,
  "firstName": "string",
  "middleName": "string",
  "lastName": "string",
  "suffix": 1,
  "email": "user@example.com",
  "caslOptIn": true,
  "homePhone": "string",
  "cellPhone": "string",
  "businessPhone": "string",
  "dateOfBirth": "2019-08-24T14:15:22Z",
  "socialInsuranceNumber": "string",
  "maritalStatus": 1,
  "contactPreference": 1,
  "residentType": 1,
  "correspondenceLanguage": 1,
  "firstTimeBuyer": true,
  "numOfDependents": 0
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/octet-stream'
};

fetch('https://api-velocity.newton.ca/api/forms/v1/contacts/contact', {
  method: 'POST',
  body: inputBody,
  headers: headers
}).then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST https://api-velocity.newton.ca/api/forms/v1/contacts/contact HTTP/1.1
Host: api-velocity.newton.ca
Content-Type: application/json
Accept: application/octet-stream

Sample Request

{
  "salutation": 1,
  "firstName": "string",
  "middleName": "string",
  "lastName": "string",
  "suffix": 1,
  "email": "user@example.com",
  "caslOptIn": true,
  "homePhone": "string",
  "cellPhone": "string",
  "businessPhone": "string",
  "dateOfBirth": "2019-08-24T14:15:22Z",
  "socialInsuranceNumber": "string",
  "maritalStatus": 1,
  "contactPreference": 1,
  "residentType": 1,
  "correspondenceLanguage": 1,
  "firstTimeBuyer": true,
  "numOfDependents": 0
}

Parameters

NameRequiredTypeDescription
salutationFalseContactSalutationsnullable; ContactSalutations;
firstNameFalsestringnullable; maxLength(20);
middleNameFalsestringnullable; maxLength(20);
lastNameFalsestringnullable; maxLength(40);
suffixFalseContactSuffixesnullable; ContactSuffixes;
emailFalsestringnullable;
caslOptInFalseboolean
homePhoneFalsestringnullable;
cellPhoneFalsestringnullable;
businessPhoneFalsestringnullable;
dateOfBirthFalsedate-timenullable;
socialInsuranceNumberFalsestringnullable;
maritalStatusFalseContactMaritalStatusesnullable; ContactMaritalStatuses;
contactPreferenceFalseContactPreferencesnullable; ContactPreferences;
residentTypeFalseContactResidentTypesnullable; ContactResidentTypes;
correspondenceLanguageFalseContactCorrespondenceLanguagesnullable; ContactCorrespondenceLanguages;
firstTimeBuyerFalsebooleannullable;
numOfDependentsFalseintegernullable;

Sample Response

200 Response

Responses

StatusSchema
200 OKstring

Get Sample Contact

GET https://api-velocity.newton.ca/api/forms/v1/contacts/contact/sample

Code sample

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 = "https://api-velocity.newton.ca/api/forms/v1/contacts/contact/sample";
      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);
    }
}


const headers = {
  'Accept':'application/octet-stream'
};

fetch('https://api-velocity.newton.ca/api/forms/v1/contacts/contact/sample', {
  method: 'GET',
  headers: headers
}).then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET https://api-velocity.newton.ca/api/forms/v1/contacts/contact/sample HTTP/1.1
Host: api-velocity.newton.ca
Accept: application/octet-stream

Sample Response

200 Response

Responses

StatusSchema
200 OKstring

Enumerations

AddressStreetTypes

10 Abbey

20 Acres

30 Allée

40 Alley

50 Autoroute

60 Avenue

70 Bay

80 Beach

90 Bend

100 Boulevard

110 ByPass

120 Byway

130 Campus

140 Cape

150 Carré

160 Carrefour

170 Centre

180 Cercle

190 Chase

200 Chemin

210 Circle

220 Circuit

230 Close

240 Common

250 Concession

260 Corners

270 Côte

280 Cour

290 Cours

300 Court

310 Cove

320 Crescent

330 Croissant

340 Crossing

350 CulDeSac

360 Dale

370 Dell

380 Diversion

390 Downs

400 Drive

410 Échangeur

420 End

430 Esplanade

440 Estates

450 Expressway

460 Extension

470 Farm

480 Field

490 Forest

500 Freeway

510 Front

520 Gardens

530 Gate

540 Glade

550 Glen

560 Green

570 Grounds

580 Grove

590 Harbour

600 Heath

610 Heights

620 Highlands

630 Highway

640 Hill

650 Hollow

660 Ile

670 Impasse

680 Inlet

690 Island

700 Key

710 Knoll

720 Landing

730 Lane

740 Limits

750 Line

760 Link

770 Lookout

780 Loop

790 Mall

800 Manor

810 Maze

820 Meadow

830 Meadows

840 Mews

850 Montée

860 Moor

870 Mount

880 Mountain

890 Orchard

900 Parade

910 Parc

920 Park

930 Parkway

940 Passage

950 Path

960 Pathway

970 Pines

980 Place

990 Plateau

1000 Plaza

1010 Point

1020 Pointe

1030 Port

1040 Private

1050 Promenade

1060 Quay

1070 Ramp

1080 Rang

1090 Range

1100 Ridge

1110 Rise

1120 Road

1130 RondPoint

1140 Route

1150 Row

1160 Rue

1170 Ruelle

1180 Run

1190 Sentier

1200 Square

1210 Street

1220 Subdivision

1230 Terrace

1240 Terrasse

1250 Thicket

1260 Towers

1270 Townline

1280 Trail

1290 Turnabout

1300 Vale

1310 Via

1320 View

1330 Village

1340 Villas

1350 Vista

1360 Voie

1370 Walk

1380 Way

1390 Wharf

1400 Wood

1410 Wynd

AddressStreetDirections

1 North

2 NorthEast

3 East

4 SouthEast

5 South

6 SouthWest

7 West

8 NorthWest

PropertyIntendedUses

1 OwnerOccupied

2 OwnerOccupiedAndRental

3 Rental

4 SecondHome

MortgageRequestPurposes

10 Purchase

20 Refinance

30 Renew

ContactSalutations

1 Mr

2 Mrs

3 Ms

4 Dr

5 Rev

6 Miss

7 Judge

ContactSuffixes

1 Sr

2 Jr

ContactMaritalStatuses

1 CommonLaw

2 Divorced

3 Married

4 Separated

5 Single

6 Widowed

ContactPreferences

1 HomePhone

2 CellPhone

3 Email

4 WorkPhone

ContactResidentTypes

1 LandedImmigrant

2 WorkVisa

3 CanadianCitizen

4 Other

ContactCorrespondenceLanguages

1 English

2 French

BorrowerRelationshipOptions

1 Spouse

2 CommonLaw

3 RelatedFamilyMember

4 Parent

5 Sibling

6 Child

7 Grandchild

8 Grandparent

9 Other

AddressCountries

1 Canada

2 UnitedStates

BorrowerAddressDwellingStatuses

1 CurrentlyOwn

2 LiveWithParents

3 PreviouslyOwned

4 Rent

5 Other

EmploymentJobTypes

1 Clerical

2 LabourTradesperson

3 Management

4 Professional

5 Retired

6 SelfEmployed

7 Unemployed

8 Homemaker

9 Other

EmploymentTypes

1 FullTime

2 PartTime

3 Seasonal

EmploymentIndustrySector

1 BankingOrFinance

2 Construction

3 Education

4 FarmingOrNaturalResources

5 Government

6 Health

7 HighTech

8 LeisureOrEntertainment

9 Manufacturing

10 RetailSales

11 Services

12 Transportation

13 Varies

14 Other

EmploymentIncomeTypes

1 Commissions

2 Hourly

3 HourlyPlusCommissions

4 Salary

5 SelfEmployed

6 Other

EmploymentIncomePeriods

1 Annual

2 BiWeekly

3 Monthly

4 Quarterly

5 SemiAnnual

6 SemiMonthly

7 Weekly

OtherIncomeTypes

1 Alimony

2 ChildSupport

3 InterestIncome

4 Pension

5 Other

OtherIncomePeriods

1 Annual

2 BiWeekly

3 Monthly

4 Quarterly

5 SemiAnnual

6 SemiMonthly

7 Weekly

BorrowerAssetTypes

1 DepositOnPurchase

2 Gift

3 HouseholdGoods

4 LifeInsurance

5 MutualFundOrStockOrBonds

6 RRSP

7 Savings

8 Vehicle

9 Other

PropertyOccupancyOptions

1 OwnerOccupied

2 OwnerOccupiedAndRental

3 Rental

4 SecondHome

PropertyFutureStatuses

1 Selling

2 NotSelling

3 Renting

PropertyMortgagePaymentFrequencies

1 BiWeekly

2 BiWeeklyAcc

3 Monthly

4 SemiMonthly

5 Weekly

6 WeeklyAcc

PropertyMortgagePayoffTypes

1 FromProceeds

2 PriorToAdvance

PropertyMortgageRateTypes

1 Adjustable

2 Buydown

3 CappedVariable

4 Fixed

5 Variable

PropertyMortgageTermTypes

1 Closed

2 Convertible

3 Open

PropertyMortgageInsurers

10 CanadaGuaranty

20 CMHC

30 Genworth

ReferralTypes

1 Builder

2 Realtor

3 Client

4 Other