PatchQuote
API endpoints for patching and updating quotes
PatchQuote
Allows you to edit a Quote via API. This feature will be built up over time, initially supporting limited functionality. All text fields must only contain characters found in CHARSET=latin1 (ISO 8859-1) character set.
This page reflects tab order on Quote screens. Each section notes fields that can be updated via patchQuote. A single patchQuote request can include one or all fields regardless of which screen the fields reside.
Supplementary SWAGGER documentation: api.catch-e.com/docs/#/Quotes/patchQuote
Note: Pass blank body in patchQuote request to recalculate quote using existing stored variables.
Permissions
Note: This permission and API not available by default. Contact your Account Manager to get access. This API is not configured for external use.
To run this API, the nominated 'web-services' role needs permission.
If not actively using, leave off for better security.
Go to Roles / APIs and check on Quotes:Update.
Authentication
Authenticate with the API before running this API.
HTTP Method
PATCH
URL
https://api.catch-e.com/qt/quotes/{quote_id} https://api.catch-e.com/qt/quotes/100000 Path Variables
Headers
Body (JSON)
Nested Objects
carbon_emissions_offset
fuel
inclusion_plans (array)
insurance
insurance_loading_types
lti
maintenance_service
optional_equipment (array)
reg_ctp
relief_vehicle
roadside_assistance
small_damage_repairs
tyres
tyre_rim_insurance
vehicle_maintenance_program
walkaway
bespoke_field_values
Response - 200 OK
{ "accepted_count": 0, "accident_management_fee": null, "advance_arrears": "advance", "after_hours_assistance_flag": "no", "allowances": 0, "annual_salary": 90000, "application_collection_date": "0000-00-00", "application_date": "0000-00-00 00:00:00", "application_reference": "", "application_status": "", "application_status_flag": "", "arrears_interest": 0, "ato_loan_flag": "no", "base_rate": 0.052, "base_residual_rate": 0, "billing_periods": 36, "bonus_amount_gst": 0, "bonus_amount_net": 0, "broker_fee": 0, "broker_rate": 0, "budgets": { "CEO": { "posting_class_id": "100065", "amount_net": 12.03, "amount_gst": 1.2, "total_amount_net": 433.08, "total_amount_gst": 43.2, "notes": "Included" }, "T": { "posting_class_id": "100021", "amount_net": 0, "amount_gst": 0, "total_amount_net": 0, "total_amount_gst": 0, "notes": "Excluded" }, "VMP": { "posting_class_id": "100087", "amount_net": 7.78, "amount_gst": 0.78, "total_amount_net": 280.08, "total_amount_gst": 28.08, "notes": "Included" } }, "budgets_financed": 0, "cancelled": "0000-00-00 00:00:00", "capitalised_interest": 0, "carbon_emissions_offset": { "included_flag": "yes" }, "claimable_gst": 5521.18, "variant_id": "173561", "vehicle_maintenance_program": { "included_flag": "yes" }, "_links": { "self": { "href": "https://api.catch-e.com/fm/drivers/101151" } }, "quote_links": { "self": { "href": "https://api.catch-e.com/qt/quotes/132654" } } } Successful request. Response includes full calculated quote with all budgets and pricing. (Note: full response contains hundreds of rows; abbreviated here.)
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
Quote ID does not exist:
{ "quote_id": { "noRecordFound": "No record matching the input was found" } } Pass valid Quote ID.
client_name too long:
{ "client_name": { "stringLengthTooLong": "The input is more than 100 characters long" } } client_name must be 100 characters or less.
Invalid fuel usage_type:
{ "fuel": { "usage_type": { "notInArray": "Unsupported value" }, "included_flag": { "fuelDetailsRequired": "Required fuel details not supplied" } } } usage_type is case-sensitive and must be one of: metro, country, combined.
Negative VMP amount (warning):
{ "vehicle_maintenance_program": { "monthly_amount_net": { "inputAmountNegative": "Maintenance program budget contains negative values" } } } Negative amount input. This is warning. Override by passing override_warnings_flag = 'yes'.
Amount outside allowable range:
{ "vehicle_maintenance_program": { "monthly_amount_net": { "notBetween": "The input is not between '-99999999' and '99999999', inclusively" } } } Invalid amount outside allowable range.
Finance exceeds cover limit:
{ "validation_messages": { "quote_id": { "ericQuoteError": "OccurredAt='2022-09-08T06:10:57.4193528Z', Code='QM11', Description='The amount financed, $166,704.20, exceeds the limit for the cover type: NEWTYWHM12 (Product code: TYW)'\n\nQuotation Number: c709ec9f-1c9a-4cbd-93ba-2d400e9836fa" } } } Amount financed exceeds limit for cover type.
Negative Client Margin:
{ "validation_messages": { "client_margin_rate": { "clientMarginRateCannotBeNegative": "Client Margin must be 0 or positive number." } } } Negative Client Margin rejected based on gb_controls client_margin_allow_negative_flag = 'no'.
Response - 423 Locked
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Locked", "status": 423, "detail": { "locked_by": { "user_id": "10000", "user_login": "user_login", "full_name": "Full Name of user" } } } Quote being edited. Try again once quote no longer in use. patchQuote attempts to obtain lock 10 times with random 500-1000ms delay between attempts. If lock cannot be obtained, 423 results.
Response - 500 Internal Server Error
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Internal Server Error", "status": 500, "detail": "Unknown value for gb_control->luxury_charge_depreciation_method. Aborting..." } Quote's Effective Date earlier than control effective date shown in error. Update control effective date to be earlier than any quotes.