Quote & Lease Operations API: Qq Lease getQuote

API endpoints for quote (Qt_*) and lease (Qq_*) operations and fleet reports

Qq Lease getQuote

Warning: This web service has been deprecated and is no longer supported by Catch-e.
You must use getQuickQuoteWebService instead.

Does a full quote calculation for a salary packaged novated vehicle lease with ecm, and returns individually requested fields or all fields if none are requested.

How it works

The gbcontrol) qq.clientcodedefault stores the default Client Code used when calculating the quote if a specific client code is not sent. The generated quote is stored in qtquotes with a status of 'external', The same quote id is used repeatedly for storing the results unless the quote is locked by an existing calculation request.

Where the Client selected has a 'Channel', and that channel has a separate Quote template, the calculations used will be based on the Channel quote template.

Only variants with an active status in qtvariants and qtvariant_profiles are allowed to be selected.

Comprehensive insurance is calculated using the given postcode (or a state specific default postcode) and target rates specific to the vehicle value and default insurer. Where accurate rates are not available, a default monthly rate of 2.5% of the vehicle value is used. Contact Catch-e support to customize your comprehensive insurance settings.

Input Fields

Query string keyFormatNotesMandatory
1variantcode / variantidstring / integerUse a variantcode if you are storing the variant details in your system. Use a variantid if you are using the vehicle_lookup::getVariants web service.yes
2approximate_pricedecimalGross List Price obtained from web service vehiclelookup::getVariantPrice OR input by user. Note, this cannot be set if approximateonroadprice is set.no**
3approximateonroad_pricedecimalGross On Road Cost for the vehicle, including discounts, first year registration, luxury car tax (where applicable), purchase stamp duty and optional equipment. The component costs are deduced to an accuracy of +/- $0.10. Note, this cannot be set if approximate_price is set.no**
4state_registeredstringState codes, VIC, NSW, ACT, NT, TAS, WA, SA, QLD. This value is used to get the 'Insurance Location' via the gbcontrol postcodebystatedefaultyes
5annual_kilometresintegerNon zero numberyes
6lease_periodinteger1 - 60yes
7annual_salarydecimalAnnual gross salaryyes
8postcodeintegerValid for given state_registered, if not provided a default value will be usedno
9roadsideassistanceplan_codestringA valid Roadside Assistance Plan Code to turn on the RSA profile and using the Codeno
10monthlyfinancegrossdecimalGross monthly finance paymentno
11client_codestringClient code to use for insurance and financier detailsno
12paycyclecodestringPay cycle code to use for the quote output e.g. weekly, fortnightly, monthlyno
13data_sourcestringVehicle data source eg. redbook, glass, user-defined. If not set all data sources are used.no
14new_usedstringRecord if vehicle is 'new', 'used' or 'demonstrator'. If this key is not passed, the vehicle is assumed to be 'new'.no
15odometerintegerStarting odometer reading. Required for used and demonstrator vehiclesno
16contract_typestringFor selecting contract type for the quote. If not used then a quote is created using default contract type from gbcontrol) "defaultpostingmapid"no
17fbtbenefittypestringFor selecting 'Fbt Type' for the quote, one of statutory, operating or exempt. If not specified the default statutory is usedno
18fbtbusinessusestringFor entering 'Bus Use%' for the quote. If not specified the default 0% is usedno
19return[fieldname]*mixedAs many of the Field Name(s) as required prefixed with 'return_'no
20maintenanceserviceflagstringMaintenance/Service can be excluded from the quote by setting this flag to 'no'. Leaving this key out of the URL is the same as setting the value to 'yes'.no
21insurance_flagstringComprehensive Insurance can be excluded from the quote by setting this flag to 'no'. Leaving this key out of the URL is the same as setting the value to 'yes'.no
22regctpflagstringIf this key is not passed, or is set as 'yes', then the Registration business logic is used to calculate the quote's Reg and CTP. Set this as 'no' to exclude registration renewals from the quote.no
23tyres_flagstringTyres can be excluded from the quote by setting this flag to 'no'. Leaving this key out of the URL is the same as setting the value to 'yes'.no
24fuel_flagstringFuel can be excluded from the quote by setting this flag to 'no'. Leaving this key out of the URL is the same as setting the value to 'yes'.no
25dealerdeliverynetstringDealer Delivery Fee amount can be passed in URL. Leaving this out of the URL will see the default Dealer Delivery Fee amount used (comes from qtvariantprofiles). 'Please note:' This input field can be used with either 'approximateonroadprice' or 'approximateprice' however it is really only effective for use in conjunction with the 'approximate_price' input field.no
26optionalequipmentdeselect_flagstringWill remove all Options entries for the quote. Leaving this key out of the URL is the same as setting the value to 'no'. 'Please note:' This input field can be used with either 'approximateonroadprice' or 'approximateprice' however it is really only effective for use in conjunction with the 'approximate_price' input field.no
  • See Field Names below

** ** approximateprice vs. approximateonroadprice**

Either approximateprice or approximateonroadprice is required

When using approximate_price you are effectively setting the 'List Price' (gross) and building the vehicles pricing from the 'ground up'.

When using approximateonroad_price you are effectively setting the 'Total On Road Price' (gross) aka Drive Away price. The 'List Price' is then calculated using all known price parameters such as discounts, first year registration, luxury car tax (where applicable), purchase stamp duty and optional equipment.

Input URL Example

Example returns all fields;

https://yourname.catch-e.net.au/services/qq/lease/getQuote/?login=######&password=######&variant_id=115637&approximate_price=36355&state_registered=VIC&annual_kilometres=20000&lease_period=36&annual_salary=70000

Example returning selected fields;

https://yourname.catch-e.net.au/services/qq/lease/getQuote/?login=######&password=######&variant_id=115637&approximate_price=8000&state_registered=VIC&annual_kilometres=20000&lease_period=70&annual_salary=700000&return_ecm_gross_per_year&return_salary_gross_per_year&return_packaged_tax_payable

Output Fields

XML elementFormatNotesMandatory
1[field_name]*mixedField names and valuesno
  • See Field Names below

Output Example


700000.000000000000000
1732.000000
295732.99


Error Codes

Error CodesNotes
1CATCHEERRORMISSINGFIELDVARIANTIDInput field missing
2CATCHEERRORMISSINGFIELDAPPROXIMATEPRICEInput field missing, either approximateprice or approximateonroadprice needs to be provided
3CATCHEERRORAPPROXIMATEPRICE_INVALIDInput field invalid evaluates to zero
4CATCHEERRORAPPROXIMATEONROADPRICE_INVALIDInput field evaluates to zero
5CATCHEERRORONLYONEAPPROXIMATEPRICE_ALLOWEDYou have provided values for both approximateprice, and approximateonroadprice, only one at a time is allowed
6CATCHEERRORMISSINGFIELDSTATEREGISTEREDInput field missing
7CATCHEERRORMISSINGFIELDANNUALKILOMETRESInput field missing
8CATCHEERRORMISSINGFIELDLEASEPERIODInput field missing
9CATCHEERRORMISSINGFIELDANNUALGROSS_SALARYInput field missing
10CATCHEERRORVARIANTIDNOTFOUNDInput field invalid record not found
11CATCHEERRORVARIANTIDNOTACTIVEThe variant should be 'active' and a qtvariantprofiles record populated.
12CATCHEERRORSTATEREGISTERED_INVALIDInput field invalid not recognised
13CATCHEERRORANNUALKILOMETRES_INVALIDInput field invalid evaluates to zero
14CATCHEERRORLEASEPERIOD_INVALIDInput field invalid evaluates to zero
15CATCHEERRORANNUALGROSSSALARYINVALIDInput field invalid evaluates to zero
16CATCHEERRORROADSIDEASSISTANCEPLANINVALIDRoadside Assistance Plan Code not found in qtroadsideassistance_plans
17CATCHEERRORBADCLIENTCODEDEFAULTData set up issue. (Check Global Controls 'clientcodedefault' & 'postcodebystate_default').
18CATCHEERRORBADQUOTE_TEMPLATEData set up issue
19CATCHEERRORBADCONTRACTTYPEDEFAULTData set up issue. (Check gbcontrols.defaultpostingmapid)
20CATCHEERRORVARIANTCODENOTFOUNDInput field invalid. Vehicle code not recognised
21CATCHEERRORMONTHLYFINANCEGROSSINVALIDInput field invalid unrecognised as a monetary value
22CATCHEERRORCLIENTCODE_INVALIDInput field invalid unrecognised client
23CATCHEERRORVARIANTIDCODEMISMATCHInput fields refer to different vehicles
24CATCHEERRORPAYCYCLECODEINVALIDInput field invalid. Pay cycle not recognised
25CATCHEERRORMULTIPLEPRICESInput field invalid. Only one vehicle price should be provided

| 26 | CATCHEERRORQUOTEVALIDATIONFAILED | There is a data set up issue. This error returns an additional details of the error (see example below). | | CATCHEERRORQUOTEVALIDATIONFAILED Validation failed due to the following error(s): 1. Contract Term(Months) must be between 1 and 60. 2. A valid Insurance Postcode is required!

Hint: If the error returned is 1. Insurance Location is required! - check that the qtinsurerlocationsbypostcode table has the required postcode or state based entries for the default insurer. | | |
| 27 | CATCHEERRORMISSINGFIELDPOSTCODE | Input field missing and gbcontrol postcodebystatedefault not setup |
| 28 | CATCH
EERRORNEWUSEDINVALID | Input field invalid. Must be one of new, used or demonstrator |
| 29 | CATCHEERRORODOMETERINVALID | Input field invalid. Must be a numeric value |
| 30 | CATCHEERRORCONTRACTTYPENOTFOUND | Input field invalid. Must be a valid contract type |
| 31 | CATCHEERRORFBTBENEFITTYPEINVALID | Input field invalid. Must be one of statutory, operating or exempt |
| 32 | CATCHEERRORFBTBUSINESSUSEINVALID | Input field invalid. Must be a decimal value |
| 33 | CATCHEERRORFUELFLAGINVALID | Input field invalid. Expected input values are either 'yes' or 'no'. || 34 | CATCHEERRORTYRESFLAGINVALID | Input field invalid. Expected input values are either 'yes' or 'no'. |
| 35 | CATCHEERRORMAINTENANCESERVICEFLAGINVALID | Input field invalid. Expected input values are either 'yes' or 'no'. |
| 36 | CATCHEERRORREGCTPFLAGINVALID | Input field invalid. Expected input values are either 'yes' or 'no'. |
| 37 | CATCHEERRORINSURANCEFLAGINVALID | Input field invalid. Expected input values are either 'yes' or 'no'. || 38 | CATCHEERRORTOOMANYREQUESTS | Rest call requests exceeded the limit set in ). |
| | BLANK SCREEN | A blank screen will be returned if included_flag='no' and = 0. |

Error Output Example

CATCHEERRORMISSINGFIELD_POSTCODE

**Use this query to find vehicles that contain missing parameters that may cause a 'CATCHEERRORQUOTEVALIDATION_FAILED' error. **

SELECT t2.variantprofileid, t2.variantid, t2.maintenanceserviceprofileid, t2.tyreid, t2.tyresperset, t2.tyrekminterval, t2.vehicletypeid, t2.date, t2.deliverymetro, t2.deliverycountry, t2.residualadjustmentrate, t2.insurancetypeid, t2.reliefvehicle
FROM qtvariants AS t1 INNER JOIN qtvariantprofiles AS t2 ON t2.variantid = t1.variantidWHERE (t2.maintenanceserviceprofileid = * OR t2.tyreid = * OR t2.tyrekminterval = * OR t2.vehicletypeid = * OR t2.insurancetypeid = '')AND t1.statusflag = 'active';

Sample Field Names

Note these fields are examples only and may not match those used in your Quote calculations. To see a full list of your available fields run the Input URL without the "return_" parameter and view the xml results.

#Field NameNotes
1salarygrossper_year
2notpackagedtax_payable
3notpackagedmedicare_levi
4notpackagedtotalnetincome
5notpackagedvehiclecostper_year
6notpackagednetsalaryper_year
7leaseperyear
8packagedtaxablesalary_gross
9packagedtaxpayable
10packagedmedicarelevi
11packagedtotalnet_income
12ecmgrossper_year
13packagednetsalaryperyear
14packageing_benefit
15luxurychargeper_year
16ecmgstper_year

Qq Lease getQuote Setup

Set-up

Warning: This web service has been deprecated and is no longer supported by Catch-e.
You must use getQuickQuoteWebService instead.

getQuote uses a default client for quotes. The client code is stored in the gbcontrol qq / clientcode_default. Unless changed, this will be WSQ :- Web Services Quotes. Setting up a client with this code will default in various client specific quote values for the calculations. The default client can be changed or a specific client used as a parameter to the web service.

The insurer for the target client will be used for quote calculations. The insurance rates and default state locations must be configured for this insurer. Contact Catch-e support for assistance.

The getQuote web service uses state specific default postcodes for calculating insurance. Regardless of whether insurance is calculated by postcode or whether the insurer rates are used to calculate insurance, the 7 default postcodes (1 per state) need to be entered into the database. Without these records, quote calculation will fail. Contact Catch-e support to have these configured.

The gbcontrol qq / defaultpostingmapid must be set unless a value for contract_type is going to be provided with every web service call. If not, a system error will be sent to Helpdesk.

Qq Vehicle lookup getBodyTypes

Synopsis

Warning: This web service has been deprecated and is no longer supported by Catch-e.
You must use Quotes / Variants APIs instead.

Get a list of bodytypeid / body_type pairs for a given vehicle model and model year. Suitable for use in a list box.

Body Types are linked to Varaiants, and Variants are excluded if they have a status of 'pending'. So if all the Variants for a particular Body Type are at status 'pending', that Body Type will not be returned in the list.

Input Fields

Query string keyFormatNotesMandatory
1model_idintegerUnique model identifieryes
2model_yearintegerYear e.g. 2007yes
3profile_requiredyes/noIf yes only body types for variants that have an active qtvariantprofile record will be included. The default is no.no
4rownumberflagyes/noIf yes will make each node unique i.e. , … if no all nodes will be the same i.e. . The default is yes.no

Input URL Example

https://yourname.catch-e.net.au/services/qq/vehicle_lookup/getBodyTypes/?model_id= 100063&model_year=2007

Output Fields

XML elementFormatNotesMandatory
1bodytypeidintegerUnique body type identifierno
2body_typeintegerBody type name e.g. Hatchbackno

Output Example


100006

HATCHBACK


Error Codes

Error Codes
1CATCHEERRORNOMODEL_ID
2CATCHEERRORNOMODEL_YEAR
3CATCHEERRORNOBODYTYPESFOUND
4CATCHEERRORTOOMANY_REQUESTS

Error output

CATCHEERRORNOBODYTYPESFOUND