CreateQuoteWebService
Setup
Go to Setup / Reference Data > gb_controls and find the "api_web_services_wrapper_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
Use the HTTP Method 'POST' for consuming this web service.
URL
https://api.test.catch-e.com/web-services/qt/salesforce/createQuote Body (JSON)
Contract
Client Details
Driver Details
Other
Vehicle
Input Example
{ "variant_id": "167317", "user_id_client_manager": "10000", "term": "36", "annual_kilometres": "10000", "state_registered": "VIC", "client_code": "MATT", "driver_annual_salary": "77777.77", "driver_surname": "TestSurname", "inclusions": [ { "inclusion_code": "IC1", "inclusion_plan_code": "IPC1" }, { "inclusion_code": "IC2", "inclusion_plan_code": "IPC2" } ], "insurance_loading_type_driver_restriction": "all_drivers", "insurance_loading_type_licence": "loss_in_0_to_3_years", "insurance_loading_type_past_claims": "3_or_more_claims_in_0_to_5_years", "insurer_location_postcode": "3000", "product_lti_plan_code": "LTIMP", "status_flag": "draft" } Response Details
200 OK
The request was successful.
{ "quote_id": 132657 } 401 Unauthorized
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unauthorized", "status": 401, "detail": "Unauthorized" } You have not authenticated before running this API, or the token_timeout of the current session has passed. You need to authenticate again.
403 Forbidden
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Forbidden", "status": 403, "detail": "Forbidden" } You do not have permissions for this request. Go to System Roles and enter 'web_services'. Navigate to the Roles / APIs tab to make sure the permission is checked.
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" } You need to enable Web Services. Go to Setup / Reference Data > gb_controls and find the "api_web_services_wrapper_login" control. Populate with 'web_services' user login and password.
422 Unprocessable Entity
Missing annual_kilometres:
{ "annual_kilometres": { "isEmpty": "Value is required and can't be empty" } } Input field annual_kilometres is missing.
Missing or invalid variant_id:
{ "variant_id": { "isEmpty": "Value is required and can't be empty", "noRecordFound": "No record matching the input was found" } } Variant ID is missing from request.
Invalid employer_fbt_type:
{ "employer_fbt_type": { "notInArray": "The input was not found in the haystack" } } Unknown input. This error may be returned for various fields.
Invalid fbt_benefit_type:
{ "web_service_error": { "CATCH_E_ERROR_FBT_BENEFIT_TYPE_INVALID": "" } } Invalid benefit type.
Missing fields:
Invalid values:
Setup issues:
Quote validation failures:
Term must be greater than months deferred:
{ "web_service_error": { "CATCH_E_ERROR_QUOTE_VALIDATION_FAILED": "Validation failed due to the following error(s): 1. Term must be greater than Months Deferred." } } Procurement fee setup issue:
{ "web_service_error": { "CATCH_E_ERROR_QUOTE_VALIDATION_FAILED": "Validation failed due to the following error(s): 1. Procurement fee must contain a value." } } There is a data setup issue for procurement. The default='0' but procurement_flag='no'. To fix, update to contain a value or set procurement_flag='no' or remove from call.
Missing insurance postcode:
{ "web_service_error": { "CATCH_E_ERROR_QUOTE_VALIDATION_FAILED": "Validation failed due to the following error(s): 1. A valid Insurance Postcode is required!" } } Data setup issue. The qt_insurer_locations_by_postcode table should be populated with all locations. Insurance Type may not be set for variant.
Missing insurance location:
{ "web_service_error": { "CATCH_E_ERROR_QUOTE_VALIDATION_FAILED": "Validation failed due to the following error(s): 1. Insurance Location is required!" } } Data setup issue. When product_comprehensive_insurance_flag='yes', the qt_insurer_location table MUST be populated with minimum dataset for each Australian State/Territory.
Invalid cost_centre:
{ "cost_centre": { "noRecordFound": "No record matching the input was found" } } The cost_centre is not stored for the Client.
Invalid division:
{ "division": { "noRecordFound": "No record matching the input was found" } } The division is not stored for the Client.
Invalid plate_year:
{ "plate_year": { "invalidPlateYear": "Not within valid range 1900-2099" } } The plate_year is invalid.
Invalid employer_fbt_type:
{ "client_code": { "quoteException": "Quote employer_fbt_type must be 'concessional-30000-exempt' or 'full-fbt-payable'" } } The employer_fbt_type is not valid. The validation message returns the types valid for this client. Visit the Employer FBT Type page for required conditions.
Operating FBT type not allowed:
{ "fbt_benefit_type": { "operatingFbtTypeNotAllowed": "Operating FBT type is not allowed due to client configuration" } } If Clients / Quote Defaults "Allow Operating FBT Type" unchecked, 'operating' not valid. Choose different FBT type or update client settings.
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." } The API cannot run at this time. This can happen for various reasons: service resource limits exceeded, system in maintenance mode.
Troubleshooting
The Financier used for this service will default from the Clients / Quote Defaults "Financier" record.
This Financier must have all of the following table records present (if not the Financier will be blank):
Populated when creating a new Suppliers record.
Populated when creating a new Suppliers record and the Supplier Type is 'Financier'.
Go to Reference Data screen to create/edit these records.