RESTful Service Documentation
The RESTful service allows you to supply vehicle information and receive an HTML formatted finance calculation based on these details.
Each of the Routing Options given below will require a prefix of one of the following server addresses: ~
http://embedded.yourcarloan.co.uk (Live)
http://demo.embedded.yourcarloan.co.uk (UAT)
All example routes shown below are working demonstrations that when clicked will display an example finance calculation.
All routing options require a DealerName that will be supplied by us, on request.
Output Formats
It is possible to return the calculation in a number of formats. Specifiying the format is optional and if no format is specified the result is returned as HTML.
You can specify HTML explicitly if needed. The other option is XML. In the examples below the first block of example URLs will return HTML, and the second block returns XML.
HTML
XML
Routing Options
There are several methods available for receiving a calculation through the RESTful service, by using one of the following URL structures, which are shown in the following format:
Calculator Path/{Required Parameter}/{Optional Parameter}
Non-RV Based Calculation
Hire Purchase Calculation With Finance Options
/{Format}/Calculator.mvc/CalculateWithFinanceOptions
/{DealerName}/{CashPrice}/{RegistrationDate}/{Deposit}/{TermLength}/{RateType}/{Rate}
* The HTML is designed for use in ajax calls - does not return configuration options or styling
Parameter Value Formatting Information
RV Based Calculation
Basic Residual Value And Hire Purchase Calculation
/{Format}/Calculator.mvc/CalculateWithRV
/{DealerName}/{CashPrice}/{RegistrationDate}/{CurrentMileage}/{CapCode}/{RateType}/{Rate}
The CapCode parameter of this route accepts either the vehicle CapCode or CapId.
By supplying the vehicle Registration Number it will allow the customer to apply online for finance.
If Rate Type and Rate are not specified then a default of £0 Commission will be used.
Parameter Value Formatting Information
Residual Value And Hire Purchase Calculation With Registration Number
By supplying the vehicle Registration Number it will allow the customer to apply online for finance.
/{Format}/Calculator.mvc/CalculateWithRVAndRegNumber
/{DealerName}/{CashPrice}/{RegistrationDate}/{CurrentMileage}/{CapCode}/{RegistrationNumber}
/{RateType}/{Rate}
The CapCode parameter of this route accepts either the vehicle CapCode or CapId.
By supplying the vehicle Registration Number it will allow the customer to apply online for finance.
If Rate Type and Rate are not specified then a default of £0 Commission will be used.
Parameter Value Formatting Information
Residual Value And Hire Purchase Calculation With Finance Options
/{Format}/Calculator.mvc/CalculateWithRV
/{DealerName}/{CashPrice}/{RegistrationDate}/{CurrentMileage}/{CapCode}/{Deposit}
/{AnnualMileage}/{TermLength}/{RateType}/{Rate}
* The HTML is designed for use in ajax calls - does not return configuration options or styling
The CapCode parameter of this route accepts either the vehicle CapCode or CapId.
By supplying the vehicle Registration Number it will allow the customer to apply online for finance.
If Rate Type and Rate are not specified then a default of £0 Commission will be used.
Parameter Value Formatting Information
Residual Value And Hire Purchase Calculation With Registration Number And Finance Options
/{Format}/Calculator.mvc/CalculateWithRVAndRegNumber
/{DealerName}/{CashPrice}/{RegistrationDate}/{CurrentMileage}/{CapCode}/{RegistrationNumber}
/{Deposit}/{AnnualMileage}/{TermLength}/{RateType}/{Rate}
* The HTML is designed for use in ajax calls - does not return configuration options or styling
The CapCode parameter of this route accepts either the vehicle CapCode or CapId.
By supplying the vehicle Registration Number it will allow the customer to apply online for finance.
If Rate Type and Rate are not specified then a default of £0 Commission will be used.
Parameter Value Formatting Information
Cash Price
This needs to be a valid numeric value between 100000 and 100000000 (exclusive) expressed
in pence (i.e. £1,000 - £1,000,000) with no currency signs, commas or decimals (£ or , or .)
599900 (i.e. £5,999.00)
Registration Date
This needs to a valid numeric value of 8 digits in length, in the SortableDateFormat known as ISO
8601, typically defined as yyyyMMdd.
20081225 (i.e. Christmas 2008)
Current Mileage
This needs to a valid numeric value between 0 and 1000000 (exclusive)
Cap Code
This needs to be either a valid 14-20 digit CapCode or a valid numeric CapId between 1000 and 1000000 (exclusive)
BYCG60W122CPTA4
25094
Registration Number
This needs to be a valid alphanumeric registration number of length 2-7 characters with an option of having one space. Case-insensitive.
PJ56HLE
PJ56 HLE
A1
t3st
Deposit
This needs to be a valid numeric value between 0 and 1000000 (exclusive) expressed in pence with no currency
signs, commas or decimals (£ or , or .)
125000 (i.e. £1,250.00)
Annual Mileage
This needs to be a valid numeric value between 6000 and 30000 rounded to the nearest thousand
Term Length
This needs to be a valid numeric value, expressed in months, between 24 and 60 inclusive.
Rate Type
This is optional (unless Rate is supplied). If not supplied the default type will be used of Commission.
If supplied it needs to be one of the following valid integers.
0 - APR
1 - Commission
2 - Customer Rate
Rate
This is optional. If not supplied the default of 0 will be used. If supplied this value will need to
reflect either a commission or percentage depending on the selected
option above. The value needs to be a valid numeric value with
currency signs, commas and percentage signs (£ or , or %)
removed. Also the value cannot contain decimals so please multiply the
intended value by 100 (i.e. £100 commission would be 10000 and an APR
of 7.9% would be 790).
10000 (i.e. commission of £100)
790 (i.e. 7.9% or £7.90 dependant on rate type)
Some routes have been designed to allow you not to specify certain parameters. In these cases the following default values are used:
Desposit: £1,000
Annual Mileage: 10000
Term Length: 48
Rate Type: Commission
Rate: 0