DriveSmart API: Personal Profile



About Our Personal Profile API

Our Personal Profile API posts a profile of a retail personal customer for our lease or buy API.

For a business profile click on this link.

Using {GET} the personal profile passes a dataset to our server to prepare for an analysis of the costs and cash-flows of leasing a vehicle vs buying on finance.

You can read more about the analysis by clicking on this link.

The customer profile is conditional and the data submitted depends on whether the customer has the ability to pay cash for the car or requires finance. The profile therefore covers:

  • The customer's ability to pay in cash
  • The customer's priority for repayments
  • Dependent: Return on investment if the customer can pay in cash but chooses finance
  • Dependent: Place of tax residence
  • Dependent: Personal tax rate
  • Dependent: Net return on investment aftet tax

Dataset

When a completed profile is submitted a return dataset is provided to verify the submission.

The dataset can be provided in 'JSON' or 'XML' format and you can choose the type of data returned in your HTTPS request by declaring 'json' or 'xml' in the 'd_Type' element of the request string.

JSON is the default type for the dataset if no 'd_Type' is set.

Our Demo

Our demonstrator provides an illustration of how the Personal Profile API delivers an analysis for cars using XML.

To obtain an analysis:

  • create a profile for the customer by selecting the apporpriate responses to prompts;
  • click on the 'POST' button.

We will display the relative HTTPS {GET} requests for relevant stages of creating the profile; you can copy and paste the sample request strings into a browser address bar to see the raw XML data returned for the request (right click on the browser page displayed and you will see the XML dataset).

You can also substitute XML for JSON when you perform the 'copy|paste' exercise.

{GET} and {POST} Requirements

The {GET} and {POST} requests follow standard HTTPS key:value pair protocols. No response will be given for an HTTP request.

All requests must have a valid session token attached as a cookie otherwise the request will become orphaned (see below).

Security

A session token is created on initial login and must be included as a cookie with all HTTPS requests or the request will fail.

If the user's browser does not allow functional cookies then the {GET} request will become orphaned and the request cannot be linked to any other requests in the same session.

If the session token is not included then the session will be terminated, any data created in the session may be erased at the server and the user may need to re-authenticate with a new session.

For security reasons the HTTPS protocol must be used for all {GET} requests so that all data passed between the browser and the server is encrypted, including the session token.

Pair:Value Summary

All
d_type: xml or json for the required return data type (json if not specified)
Profile Dependent p_cash: the customer's ability to pay for the car in cash - a string variable 'Yes' or 'No' p_pri: the customer's priority for finance repayments - a string variable from the following:

  • Cost - The total cost of the finance
  • Payment - The monthly payment
  • Investment - The investment adjusted cost of finance or cash

p_irr: a 'double' type variable for the rate of return the customer might get from investing their own cash if they use finance for a car (e.g. 5.5 - this will be returned as a decimal in the verification dataset)
p_tr_zone: a string variable for the customer's place of tax residence ('UKIS' for taxpayers resident in Scotland, 'UKOS' for those resident in the rest of the UK as different personal tax rates apply to Scotland)
p_tr: a double type variable for the customer's highest rate of tax
p_irr_net: a double type variable for the net of tax rate of return the customer would enjoy by using finance for the car purchase

You can see an example below of the required {POST} requests for a profile.



 

Create A Personal Profile ...



  About The Customer

To get started we need some information about the customer.



Do you have funds available to pay the full purchase price of your new car?