Quote & Lease Operations API: Qt Salesforce getQuote

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

Qt Salesforce getQuote

Warning: getQuote) is no longer supported by Catch-e.
You must use the getQuoteFieldsWebService or Render Quote PDF API instead.

Synopsis

Generates a lease quote for a new vehicle.

A collection of parameters (listed below) are passed into the web service. These are used to construct a lease quotation related to a salesforce opportunity. A large collection of output fields(1) is returned in XML format.

  • A code identifying an existing Catch-e client must be passed in

  • The ID for the related opportunity record is required and is stored on the quote

  • Alpha numeric unique driver identifier is required and a new driver record(2) will be created if a driver bearing the identifier doesn't already exist

  • Driver details can be updated when creating a new quote, contact catch-e for a complete list of fields

  • When creating a second quote for any given opportunity, pass in the parentquoteid to link the two quote together

  • A default contract type is used when creating the quote, contact Catch-e to modify the default type

  • The redbook list price may be overridden using the approximate_price field

  • The return fields can be limited by specifying the field name in the parameters with the return_ prefix

If a problem occurs a Catch-e error code (listed below) will be returned with the results. If successfully created, the quote PDF can be extracted using the quote download web service.

(1) Contact Catch-e for a complete list

(2) The driver_surname field is required when creating a new driver record

Input Fields

Query string keyFormatNotesMandatory
1variant_codestringRedbook variant identifieryes
2approximate_pricedecimalNumeric dollar valueno
3state_registeredstringState codes, VIC, NSW, ACT, NT, TAS, WA, SA, QLD. This value is used to get the default 'Insurance Location'yes
4annual_kilometresintegerNon zero numberyes
5lease_periodinteger1 - 60yes
6annual_salarydecimalAnnual gross salaryyes
7postcodeintegerValid for given state_registeredyes
8client_codestringShort text string identifying the clientyes
9opportunity_idstringSalesforce opportunity idyes
10parentquoteidintQuote ID to use as the parent of the new quoteno
11driveremployeealiasstringUnique reference used to identify this driveryes
12driver_surnamestringSurname of the driveryes
13driver[fieldname]*mixedOther driver fields that are to be populated, prefixed with 'driver_'no
14return[fieldname]*mixedAs many of the Field Name(s) as required prefixed with 'return_'no
  • See Field Names below

Input URL Example

https://yourname.catch-e.net.au/services/qt/salesforce/getQuote/?variant_code=AUDI08PB&approximate_price=36355&state_registered=VIC&annual_kilometres=20000&lease_period=36&annual_salary=70000&client_code=ABC&opportunity_id=006O0000001sx9B&driver_employee_alias=PACMAN01&driver_surname=Yasin&postcode=3000&return_packageing_benefit=&return_ecm_gross_per_year=

Output Fields

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

Output Example


4000


Error Codes

Error CodesNotes
1CATCHEERRORMISSINGFIELDVARIANTIDInput field missing
2CATCHEERRORMISSINGFIELDAPPROXIMATEPRICEInput field missing
3CATCHEERRORMISSINGFIELDSTATEREGISTEREDInput field missing
4CATCHEERRORMISSINGFIELDANNUALKILOMETRESInput field missing
5CATCHEERRORMISSINGFIELDLEASEPERIODInput field missing
6CATCHEERRORMISSINGFIELDANNUALGROSS_SALARYInput field missing
7CATCHEERRORVARIANTCODENOTFOUNDInput field invalid record not found
8CATCHEERRORVARIANTCODENOTACTIVEInput field invalid record not active
9CATCHEERRORAPPROXIMATEPRICE_INVALIDInput field invalid evaluates to zero
10CATCHEERRORSTATEREGISTERED_INVALIDInput field invalid not recognised
11CATCHEERRORANNUALKILOMETRES_INVALIDInput field invalid evaluates to zero
12CATCHEERRORLEASEPERIOD_INVALIDInput field invalid evaluates to zero
13CATCHEERRORANNUALGROSSSALARYINVALIDInput field invalid evaluates to zero
14CATCHEERRORBADCLIENTCODEDEFAULTData set up issue
15CATCHEERRORBADQUOTE_TEMPLATEData set up issue
16CATCHEERRORBADCONTRACTTYPEDEFAULTData set up issue
17CATCHEERRORQUOTEVALIDATION_FAILEDData set up issue. With this Error Code, an additional element will be included called given additional details (see example below)
18CATCHEERRORMISSINGFIELDVARIANTCODEInput field missing
19CATCHEERRORVARIANTCODENOTFOUNDVariant cannot be read
20CATCHEERRORVARIANTCODENOTACTIVEVariant is inactive
21CATCHEERRORMISSINGFIELDCLIENTCODEInput field missing
22CATCHEERRORCLIENTCODE_INVALIDClient cannot be read
23CATCHEERRORMISSINGFIELDDRIVEREMPLOYEE_ALIASInput field missing
24CATCHEERRORBLANKFIELDDRIVEREMPLOYEE_ALIASInput field invalid evaluates to zero
25CATCHEERRORMISSINGFIELDDRIVERSURNAMEInput field missing
26CATCHEERRORBLANKFIELDDRIVERSURNAMEInput field invalid evaluates to zero
27CATCHEERROROPPORTUNITYID_REQUIREDInput field missing
28CATCHEERRORPARENTQUOTEIDINVALIDQuote cannot be read
29CATCHEERRORFAILEDCREATING_DRIVERDriver record insert failed
30CATCHEERRORFAILEDUPDATING_DRIVERDriver record update failed
31CATCHEERRORDRIVERWRONG_CLIENTDriver assigned to a different client
32CATCHEERRORMISSINGFIELD_POSTCODEInput field missing
33CATCHEERRORPOSTCODEINVALIDInput field not an int

Error Output Example 1

CATCHEERRORMISSINGFIELD_POSTCODE

Error Output Example 2

CATCHEERRORQUOTEVALIDATION_FAILED

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!

Field Names

ExecuteReportWebService Accidents

This API allows you to run the Accidents Report available in the Fleet / Administration / Reports menu.

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

Enable

Go to Setup / Reference Data β†’ gbcontrols) and find the "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

Use the HTTP Method 'POST' for consuming this web service.

URL Examples

https://api.test.catch-e.com/web-services/gb/reporting/executeReport

Body (JSON)

JSON FieldFormatNotesMandatory
Query
report_pathstringThe coded path that determines which report is run. For "Accidents" use: "/core/fleet/reports/pdf_accidents.phpo"yes
report_formatstringThis will determine the format the report is created with. The following format is available for this report. PDF - will create PDF report. This is the default Text(CSV) - will create a CSV report ExcelXml - will create an Excel(xlsx) reportyes
Parameters
date_filterdateOnly contracts commencing on or prior to this date will be included and contracts suspended on or prior to this date will be excluded.yes
t11.user_loginstringThis is represented in the Fleet Reports screen by the "Manager" field. Select a user login to filter by the nominated user, else use "--All--" to return an unfiltered result.yes
t6.clientgroupcodestringThis is represented in the Fleet Reports screen by the "Group" field. Nominate one to limit the report selection to the selected "Client Group", else use "--All--" to return an unfiltered result.yes
t3.client_codestringThis is represented in the Fleet Reports screen by the "Client" field. Nominate one to limit the report selection to the selected "Client", else use "--All--" to return an unfiltered result.yes
t12.cost_centrestringThis is represented in the Fleet Reports screen by the "Cost Centre" field. Nominate one to limit the report selection to the selected "Cost Centre", else use "--All--" to return an unfiltered result.yes
t5.postingmapcodestringThis is represented in the Fleet Reports screen by the "Contract Type" field. Nominate one to limit the report selection to the selected "Contract Type", else use "--All--" to return an unfiltered result.yes
filtersuspenddatedateEnter date as "00/00/0000". This parameter is conditional to operate the "date_filter" result.yes
Arguments
usesuppliedreportpathflagstringno

JSON Example

{ "report_path": "/core/fleet/reports/pdf_accidents.phpo", "report_format": "Text(CSV)", "parameters": { "date_filter": "02/12/2024", "t11.user_login": "--All--", "t6.client_group_code": "--All--", "t3.client_code": "ABC", "t12.cost_centre": "--All--", "t5.posting_map_code": "--All--", "filter_suspend_date": "00/00/0000" }, "arguments": { "use_supplied_report_path_flag": "no" }}

Response Details

Validation MessagesComments
201 Success
A successful response returns all fields in the nominated format.
422 Unprocessable Content
{ "validation_messages": { "report_path": { "notInArray": "Unsupported report path specified" }, "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 422, "detail": "Failed Validation"}

| Incorrect "report_path" has been entered. | |

{ "validation_messages": { "report_format": { "notInArray": "The input was not found in the haystack" }, "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 422, "detail": "Failed Validation"

| The "report_path" entered is not in the allowable list of options. | |

{ "validation_messages": { "web_service_error": { "CATCH_E_ERROR_NOTHING_TO_REPORT": "" } }, "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 422, "detail": "Failed Validation"}|

| A Parameter is missing, or an incorrect value has been entered. | |

{ "validation_messages": { "web_service_error": { "CATCH_E_ERROR_AUTHENTICATION_FAILED": "" } }, "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 422, "detail": "Failed Validation"}|

| This response could be due to incorrect authentication credentials, or your authentication token has timed out. If you are consistently receiving this error, please raise a ticket with your Account Manager. Please supply the complete Request & Response payloads. [Warning:] Please remember to NEVER send user login credentials when sending a ticket request. Catch-e staff have our own credentials we can use to de-bug these tickets. |
| 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. |