GET api/Brokerage/FinanceCalculator/{brokerageId}/{term}/{price}

Retrieve a list of finance products, based on provided term and price. Available for PL broker users. Does not require authentication.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
brokerageId

globally unique identifier

Required

term

integer

Required

price

decimal number

Required

Body Parameters

None.

Response Information

Resource Description

Possible error responses: 1. {"BrokerageId", "ErrorMessage": "Brokerage with id = {guid} does not exist in the database."}, 2. {"Term", "ErrorMessage": "The term field has to be a positive integer."}, 3. {"Price", "ErrorMessage": "The price field has to be a positive number."}

BrokerageResponse
NameDescriptionTypeAdditional information
SelectedProductId

globally unique identifier

None.

Products

Collection of BrokerageFinanceCalculatorProductViewModel

None.

Response Formats

application/json, text/json

Sample:
{
  "SelectedProductId": "efcbd72b-a541-4f5a-8f0d-e77f3007ae73",
  "Products": [
    {
      "Id": "51286203-47b4-4ed2-ae31-8345e632daa1",
      "APR": 2.1,
      "MonthlyCost": 3.0,
      "TotalRepayment": 4.0,
      "Term": 5,
      "InterestRate": 6.0
    },
    {
      "Id": "51286203-47b4-4ed2-ae31-8345e632daa1",
      "APR": 2.1,
      "MonthlyCost": 3.0,
      "TotalRepayment": 4.0,
      "Term": 5,
      "InterestRate": 6.0
    }
  ]
}

text/html

Sample:
{"SelectedProductId":"efcbd72b-a541-4f5a-8f0d-e77f3007ae73","Products":[{"Id":"51286203-47b4-4ed2-ae31-8345e632daa1","APR":2.1,"MonthlyCost":3.0,"TotalRepayment":4.0,"Term":5,"InterestRate":6.0},{"Id":"51286203-47b4-4ed2-ae31-8345e632daa1","APR":2.1,"MonthlyCost":3.0,"TotalRepayment":4.0,"Term":5,"InterestRate":6.0}]}

application/xml, text/xml

Sample:
<BrokerageResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OmniPort.API.Services.APIResponses.FinanceCalculatorResponses">
  <Products xmlns:d2p1="http://schemas.datacontract.org/2004/07/OmniPort.ViewModel">
    <d2p1:BrokerageFinanceCalculatorProductViewModel>
      <d2p1:APR>2.1</d2p1:APR>
      <d2p1:Id>51286203-47b4-4ed2-ae31-8345e632daa1</d2p1:Id>
      <d2p1:InterestRate>6</d2p1:InterestRate>
      <d2p1:MonthlyCost>3</d2p1:MonthlyCost>
      <d2p1:Term>5</d2p1:Term>
      <d2p1:TotalRepayment>4</d2p1:TotalRepayment>
    </d2p1:BrokerageFinanceCalculatorProductViewModel>
    <d2p1:BrokerageFinanceCalculatorProductViewModel>
      <d2p1:APR>2.1</d2p1:APR>
      <d2p1:Id>51286203-47b4-4ed2-ae31-8345e632daa1</d2p1:Id>
      <d2p1:InterestRate>6</d2p1:InterestRate>
      <d2p1:MonthlyCost>3</d2p1:MonthlyCost>
      <d2p1:Term>5</d2p1:Term>
      <d2p1:TotalRepayment>4</d2p1:TotalRepayment>
    </d2p1:BrokerageFinanceCalculatorProductViewModel>
  </Products>
  <SelectedProductId>efcbd72b-a541-4f5a-8f0d-e77f3007ae73</SelectedProductId>
</BrokerageResponse>