GetQuickQuoteWebService

This API allows you to run the legacy web service getQuickQuote, which has been deprecated and is no longer supported by Catch-e.

Supplementary SWAGGER documentation is available here: api.catch-e.com/docs/#/Web%20Services/getQuickQuoteWebService

Setup

Go to Setup / Reference Data and find the gbcontrols "apiwebserviceswrapper_login" control. Populate this control with a 'web_services' user login and password. This user will be used to run the API from within code.

Permissions

To run this API, the nominated 'web-services' role needs to be given permission.

If you are not actively using the API, leave the permission off for better security.

Go to Roles / APIs and check on WebServices.

Authentication

Authenticate with the API before running this API.

HTTP Method

GET

URL

https://api.catch-e.com/web-services/qq/lease/getQuote? 

Query Parameters

#

Parameter

Format

Notes

Mandatory

1

variant_code / variant_id

string / integer

Use variant_code if storing variant details in your system. Use variant_id if using vehicle_lookup::getVariants web service. Only include one.

Yes

2

approximate_price

decimal

Gross List Price from vehiclelookup::getVariantPrice or user input. Cannot be set if approximate_on_road_price is set.

No*

3

approximate_on_road_price

decimal

Gross On Road Cost including discounts, first year registration, luxury car tax, purchase stamp duty, optional equipment. Deduced to +/- $0.10 accuracy. Cannot be set if approximate_price is set.

No*

4

state_registered

string

State codes: VIC, NSW, ACT, NT, TAS, WA, SA, QLD. Used to get Insurance Location via gbcontrol postcodebystatedefault

Yes

5

annual_kilometres

integer

Non-zero number

Yes

6

lease_period

integer

1 to 60

Yes

7

annual_salary

decimal

Annual gross salary

Yes

8

postcode

integer

Valid for given state_registered. Default value used if not provided.

No

9

roadside_assistance_plan_code

string

Valid Roadside Assistance Plan Code to turn on RSA profile

No

10

monthly_finance_gross

decimal

Gross monthly finance payment

No

11

client_code

string

Client code for insurance and financier details

No

12

pay_cycle_code

string

Pay cycle code for quote output (e.g. weekly, fortnightly, monthly)

No

13

data_source

string

Vehicle data source (redbook, glass, user-defined). All data sources used if not set.

No

14

new_used

string

Purchase condition: new, used, or demonstrator

No

15

odometer

integer

Starting odometer reading. Required for used and demonstrator vehicles.

No

16

contract_type

string

For selecting contract type. Default from gbcontrol defaultpostingmapid if not provided.

No

17

fbt_benefit_type

string

FBT Type: statutory, operating, or exempt. Default: statutory if not specified.

No

18

fbt_business_use

string

Business Use percentage for quote. Default: 0% if not specified.

No

19

maintenance_service_flag

string

Exclude Maintenance/Service by setting to 'no'. Default: 'yes'

No

20

insurance_flag

string

Exclude Comprehensive Insurance by setting to 'no'. Default: 'yes'

No

21

reg_ctp_flag

string

Exclude Registration Renewal by setting to 'no'. Default: 'yes'

No

22

tyres_flag

string

Exclude Tyres by setting to 'no'. Default: 'yes'

No

23

fuel_flag

string

Exclude Fuel by setting to 'no'. Default: 'yes'

No

24

dealer_delivery_net

string

Dealer Delivery Fee amount. Default from qtvariantprofiles if not provided. Effective with approximate_price.

No

25

optional_equipment_deselect_flag

string

Remove all Options entries by setting to 'yes'. Default: 'no'. Effective with approximate_price.

No

26

fields

string

Return subset of fields separated by comma without spaces (e.g. quote_id,fbt_type_text,contract_type_name)

No

approximate_price vs. approximate_on_road_price

Either approximate_price or approximate_on_road_price is required.

When using approximate_price, you set the List Price (gross) and build vehicle pricing from ground up.

When using approximate_on_road_price, you set the Total On Road Price (gross) aka Drive Away price. List Price is calculated using all known price parameters: discounts, first year registration, luxury car tax, purchase stamp duty, optional equipment.

Input Example

https://api.catch-e.com/web-services/qq/lease/getQuote?variant_id=115637&approximate_price=36355&state_registered=VIC&annual_kilometres=20000&lease_period=36&annual_salary=70000&fields=quote_id,fbt_type_text,contract_type_name 

Response - 200 OK

{ "quote_id": 100000, "driver_email": "", "quote_date": "10-Mar-2022", "client": "Test Client", "valid_until": "09-Apr-2022" } 

The request was successful. This is a subset of results.

Response - 401 Unauthorized

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unauthorized", "status": 401, "detail": "Unauthorized" } 

You have not authenticated or your token_timeout has passed. Authenticate again.

Response - 403 Forbidden

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Forbidden", "status": 403, "detail": "Forbidden" } 

You do not have permissions. Go to System Roles, enter 'web_services', navigate to Roles / APIs and check permissions.

Response - 418 Invalid Credentials

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Invalid Credentials", "status": 418, "detail": "Web services API wrapper credentials have not been configured" } 

Web Services setup required. Go to Setup / Reference Data and find apiwebserviceswrapper_login control. Populate with 'web_services' user login and password.

Response - 422 Unprocessable Entity

Missing annual_kilometres:

{ "annual_kilometres": { "isEmpty": "Value is required and can't be empty" } } 

Missing variant_id:

{ "variant_id": { "isEmpty": "Value is required and can't be empty", "noRecordFound": "No record matching the input was found" } } 

Quote validation failed:

{ "web_service_error": { "CATCH_E_ERROR_QUOTE_VALIDATION_FAILED": "Validation failed due to the following error(s):1. Vehicle make is required.2. Vehicle model is required.3. Vehicle model year is required.4. Vehicle variant is required." } } 

Selected variant has payload over allowable limit. Check Contract Types / Details "Quote Payload Maximum". Either remove restriction or limit variants.

422 Error Codes

Error Code

Notes

CATCH_E_ERROR_MISSING_FIELD_APPROXIMATE_PRICE

Either approximate_price or approximate_on_road_price required

CATCH_E_ERROR_APPROXIMATE_PRICE_INVALID

Field evaluates to zero

CATCH_E_ERROR_APPROXIMATE_ON_ROAD_PRICE_INVALID

Field evaluates to zero

CATCH_E_ERROR_ONLY_ONE_APPROXIMATE_PRICE_ALLOWED

Both approximate_price and approximate_on_road_price provided, only one allowed

CATCH_E_ERROR_MISSING_FIELD_STATE_REGISTERED

Field missing

CATCH_E_ERROR_MISSING_FIELD_ANNUAL_KILOMETRES

Field missing

CATCH_E_ERROR_MISSING_FIELD_LEASE_PERIOD

Field missing

CATCH_E_ERROR_MISSING_FIELD_ANNUAL_GROSS_SALARY

Field missing

CATCH_E_ERROR_VARIANT_ID_NOT_FOUND

Invalid record not found

CATCH_E_ERROR_VARIANT_ID_NOT_ACTIVE

Variant should be 'active' with qtvariantprofiles record populated

CATCH_E_ERROR_STATE_REGISTERED_INVALID

Field invalid, not recognised

CATCH_E_ERROR_ANNUAL_KILOMETRES_INVALID

Field invalid, evaluates to zero

CATCH_E_ERROR_LEASE_PERIOD_INVALID

Field invalid, evaluates to zero

CATCH_E_ERROR_ANNUAL_GROSS_SALARY_INVALID

Field invalid, evaluates to zero

CATCH_E_ERROR_ROADSIDE_ASSISTANCE_PLAN_INVALID

Roadside Assistance Plan Code not found

CATCH_E_ERROR_BAD_CLIENT_CODE_DEFAULT

Data setup issue (check Global Controls clientcodedefault, postcodebystatedefault)

CATCH_E_ERROR_BAD_QUOTE_TEMPLATE

Data setup issue

CATCH_E_ERROR_BAD_CONTRACT_TYPE_DEFAULT

Data setup issue (check gbcontrols.defaultpostingmapid)

CATCH_E_ERROR_VARIANT_CODE_NOT_FOUND

Vehicle code not recognised

CATCH_E_ERROR_MONTHLY_FINANCE_GROSS_INVALID

Field invalid, unrecognised monetary value

CATCH_E_ERROR_CLIENT_CODE_INVALID

Field invalid, unrecognised client

CATCH_E_ERROR_VARIANT_ID_CODE_MISMATCH

Input fields refer to different vehicles

CATCH_E_ERROR_PAY_CYCLE_CODE_INVALID

Pay cycle not recognised

CATCH_E_ERROR_MULTIPLE_PRICES

Only one vehicle price allowed

CATCH_E_ERROR_QUOTE_VALIDATION_FAILED

Data setup issue with additional error details. Hint: If "Insurance Location is required" error returned, check qtinsurerlocationsbypostcode has required postcode or state-based entries for default insurer.

CATCH_E_ERROR_MISSING_FIELD_POSTCODE

Postcode missing and gbcontrol postcodebystatedefault not setup

CATCH_E_ERROR_NEW_USED_INVALID

Must be one of: new, used, demonstrator

CATCH_E_ERROR_ODOMETER_INVALID

Must be numeric value

CATCH_E_ERROR_CONTRACT_TYPE_NOT_FOUND

Must be valid contract type

CATCH_E_ERROR_FBT_BENEFIT_TYPE_INVALID

Must be one of: statutory, operating, exempt

CATCH_E_ERROR_FBT_BUSINESS_USE_INVALID

Must be decimal value

CATCH_E_ERROR_FUEL_FLAG_INVALID

Expected values: 'yes' or 'no'

CATCH_E_ERROR_TYRES_FLAG_INVALID

Expected values: 'yes' or 'no'

CATCH_E_ERROR_MAINTENANCE_SERVICE_FLAG_INVALID

Expected values: 'yes' or 'no'

CATCH_E_ERROR_REG_CTP_FLAG_INVALID

Expected values: 'yes' or 'no'

CATCH_E_ERROR_INSURANCE_FLAG_INVALID

Expected values: 'yes' or 'no'

CATCH_E_ERROR_TOO_MANY_REQUESTS

Rest call requests exceeded limit

BLANK SCREEN

Returned if included_flag='no' and field = 0

Response - 424 Failed Dependency

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Failed Dependency", "status": 424, "detail": "Upstream service temporarily unavailable. Please retry." } 

API cannot run at this time. Service resource limits exceeded or system in maintenance mode.


GetQuoteEvent

Returns details for a single Quote Event.

Permissions

To run this API, the nominated 'web-services' role needs to be given permission.

If you are not actively using the API, leave the permission off for better security.

Go to Roles / APIs and check on QuoteEvents:Get.

Authentication

Authenticate with the API before running this API.

HTTP Method

GET

URL

https://api.catch-e.com/qt/quote-events/{quote_event_id} 

Path Variables

Key

Format

Notes

Mandatory

quote_event_id

string

Quote Event ID

Required

Response - 200 OK

{ "quote_event_id": "100096", "quote_id": "132580", "quote_event_code_id": "100001", "event_date": "2022-11-09", "description": "Re-Test#2: Event Code: Notes (API)", "event_amount": 1.02, "quote_event_action_id": "100001", "due_date": "2022-11-11", "completed_flag": "yes", "attachment_id": null, "user_id_edit": "11212", "last_edit": "2022-11-13 23:28:59", "status_flag": "active", "_links": { "self": { "href": "https://api.catch-e.com/qt/quote-events/100096" } }, "_embedded": { "quote_event_code": { "quote_event_code_id": "100001", "quote_event_code": "Notes", "name": "Notes", "description": "Quote Note", "template_id": "0", "status_flag": "active" }, "quote_event_action": { "quote_event_action_id": "100001", "name": "Request Docs" } } } 

The request was successful.

Response - 401 Unauthorized

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unauthorized", "status": 401, "detail": "Unauthorized" } 

You have not authenticated or your token_timeout has passed. Authenticate again.

Response - 403 Forbidden

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Forbidden", "status": 403, "detail": "Forbidden" } 

You do not have permissions. Go to System Roles, enter 'web_services', navigate to Roles / APIs and check permissions.

Response - 422 Unprocessable Entity

{ "validation_messages": { "quote_event_id": { "noRecordFound": "No record matching the input was found" } }, "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 422, "detail": "Failed Validation" } 

Quote Event ID not found.