Update Quote Endpoints: PatchQuote - Lease tab — Budgets: Part 1
API endpoints for patching and updating quotes
Budgets
Each budget that you can update using patchQuote is listed in a separate section below.
If a budget does not need changes, you can leave the related bracket out of the API.
If a budget is being removed, only the field that identifies the budget needs to be passed to update the budget.
If a budget is being added or modified, the Mandatory column will be marked as 'Yes' for the fields that are required for an update.
| Budget |
| --- |
This section is not available via patchQuote yet.
| Profiles Exc. GST |
|---|
Maintenance (MAINT)
| JSON Field | Format | Notes | Mandatory |
|---|---|---|---|
| maintenance_service | string | Include when you want to update the quote's Contracts / Lease Maintenance (MAINT) profile. Visit the Maintenance (MAINT) profile page to review the calculation rules that are applied. | Yes |
| included_flag | string | If 'yes', the Maintenance profile will be added to the quote. If 'no', the Maintenance profile will be removed from the quote. | Yes |
| maintenanceserviceprofile_id | string | Enter a maintenanceserviceprofileid to override the default maintenanceserviceprofileid (if profiled). To obtain a list of maintenanceserviceprofile_id's use the getMaintenanceServiceProfiles API. | no |
| service_mths | number | Enter the service_mths (Interval Months) to override the default value (if profiled). | no |
| service_kms | number | Enter the service_kms (Interval KMs) to override the default value (if profiled). | no |
| monthlyamountnet | number | Enter the monthlyamountnet to override the calculated value. | no |
Tyres (T)
| JSON Field | Format | Notes | Mandatory |
|---|---|---|---|
| tyres | string | Include when you want to update the quote's Contracts / Lease Tyres (T)) profile. Visit the Tyres (T)) profile page to review the calculation rules that are applied. | Yes |
| included_flag | string | If 'yes', the Tyres profile will be added to the quote. If 'no', the Tyres profile will be removed from the quote. | Yes |
| tyre_id | string | Enter a tyreid to override the default tyreid (if profiled). To obtain a list of tyre_id's use the GetTyres API. | no |
| tyresperset | number | Enter the tyresperset to override the default value (if profiled). | no |
| tyrekminterval | number | Enter the tyrekminterval to override the default value (if profiled). | no |
| unitcostnet | number | Enter the unitcostnet to override the default value (if profiled). | no |
| limit_flag | string | Enter 'yes' or 'no'. Default 'no'. This is a report only field. This is not used in any system processes or calculations. | no |
| tyres_estimated | number | Enter the tyres_estimated to override the default value (if profiled). | no |
| monthlyamountnet | number | Enter the monthlyamountnet to override the calculated value. | no |
Carbon Emissions Offset (CEO)
| JSON Field | Format | Notes | Mandatory |
|---|---|---|---|
| carbonemissionsoffset | string | Include when you want to update the quote's Contracts / Lease Carbon Emissions Offset) profile. Visit the Carbon Emissions Offset) profile page to review the calculation rules that are applied. | Yes |
| included_flag | string | If 'yes', the Carbon Emissions Offset profile will be added to the quote or recalculated using the current variables. If 'no', the Carbon Emissions Offset profile will be removed from the quote. | Yes |
Fuel (F)
| JSON Field | Format | Notes | Mandatory |
|---|---|---|---|
| fueltypeid | string | If a Fuel Type cannot be system calculated, use getFuelTypes to obtain a fueltypeid and include it here. Fuel Types are stored on the Variants screen. | No |
| costperlitre | number | If a Cost per Litre cannot be system calculated (it is linked to the Fuel Type), include it here. Cost per litre is stored in the table for each Fuel Type. | No |
| usage_type | string | System Calculated value sourced from Global Control qtfuelusage. One of metro, country or combined. This field is case sensitive. | No |
| litresper100km | number | Include when you want to update the quote's Contracts / Lease Fuel profile. Visit the Fuel profile section to review the calculation rules that are applied. | Yes |
| monthlyamountnet | number | Include this field to over-ride the system calculation. | No |
| included_flag | string | If 'yes', the Fuel profile will be added to the quote or recalculated using the current variables. If 'no', the Fuel profile will be removed from the quote. | Yes |
Comprehensive Insurance (INS)
| JSON Field | Format | Notes | Mandatory |
|---|---|---|---|
| The following fields should all be contained within the insurance braces {}. Additional fields relevant for Insurance Premium calculation are found below. Refer to Insurance JSON example below. | |||
| insurance | string | Include when you want to update the quote's Contracts / Lease Comprehensive Insurance profile. Visit the Comprehensive Insurance profile page to review the calculation rules that are applied. | Yes |
| included_flag | string | Set as 'yes’, to add Comprehensive Insurance profile to the quote. Set as 'no’, to remove the Comprehensive Insurance profile from the quote. | Yes |
| supplier_id | string | Adds the "Insurer". If a “Policy Owner” cannot link to stored insurance rates , supplierid is mandatory along with one of {annualinsurance} or {monthlyamountnet} | Maybe |
| insurancetypeid | string | Stored in qtvariantprofiles. This is a factor in calculating insurance premiums in qtinsurancerates. You can lookup your Insurance Types here. | No |
| billing_type | string | This defaults to 'Monthly'. 'Reimbursement' and 'Excluded' can also be used here | No |
| claim_excess | number | This defaults from the table for stored insurance rates. This amount can be over-written. | No |
| lockcomprehensiveinsurance_flag | string | Include this field to lock Annual Ins. Defaults to no. | no |
| annual_insurance | number | Include this field to over-ride the system calculation. If both annualinsurance & monthlyamountnet are included in your input fields, monthlyamount_net will be ignored. | no |
| fund1styear_flag | string | “Fund 1st Year?” is out of scope as it will rely on the ability for a future API for recalculating a Quote. Leave this input field out of your request or set value to 'no'. | No |
| monthlyamountnet | number | Include this field to over-ride the system calculation. If both annualinsurance & monthlyamountnet are included in your input fields, monthlyamount_net will be ignored. | No |
| The following Insurance fields may be required. Refer to Insurance JSON example below. | |||
| policyownertype | string | Select who will be responsible for managing and paying for the Comprehensive Insurance of this contract. A default entry may come from the Clients / Quote Defaults "Policy Owner" field if recorded, otherwise it will default to 'Driver Policy'. Choose from 'insurer_internal', 'client' or 'driver'. | No |
| insurerlocationid | string | When stored rates are found for the chosen “Policy Owner”, one of {insurerlocationid} or {insurerlocationpostcode} depending on Global Control insurancelocationbypostcodeflag. Use the API getInsurerLocations to look up your Insurer Locations. | No |
| insurerlocationpostcode | string | When stored rates are found for the chosen “Policy Owner”, one of {insurerlocationid} or {insurerlocationpostcode} depending on Global Control insurancelocationbypostcodeflag. | No |
| insurancelosslicence_flag | string | This report only field does not impact the Insurance Premium calculation. Choose from 'yes' or 'no'. | No |
| insuranceatfault_flag | string | Triggers an adjustment to the Insurance Premium. Refer to Global Controls) 'insuranceatfault_rate' and visit the Insurance Premium Setup page for further details of this feature. | No |
| insuranceconvictionflag | string | This report only field does not impact the Insurance Premium calculation. Choose from 'yes' or 'no'. | No |
| The following fields should all be contained within the insuranceloadingtypes braces {}. Refer to Insurance JSON example below. | |||
| insuranceloadingtypes | string | Include one, two or three of the insurance loading types as applicable. A list of Insurance Loading Types can be obtained by calling the API getInsuranceLoadingTypes. | No |
| past_claims | string | Include the relevant insurance loading code found in Details on how to look up relevant Loading Types can be found here. Use only if insurance loading is part of your Insurance Premium Setup. | No |
| licence | string | Include the relevant insurance loading code found in Details on how to look up relevant Loading Types can be found here. Use only if insurance loading is part of your Insurance Premium Setup. | No |
| driver_restriction | string | Include the relevant insurance loading code found in Details on how to look up relevant Loading Types can be found here. Use only if insurance loading is part of your Insurance Premium Setup. | No |
patchQuote will always attempt to recalculate the Insurance budget except in the following scenarios:
- If the = yes
and/or - If the patchQuote payload contains the input parameter “lockcomprehensiveinsurance_flag”: “yes”
or - If neither of the above are true, and the recalculation of the Comprehensive Insurance Policy resolves to a $0.00 annual premium, and the Quote already contains an Annual Premium, the existing Annual Premium will be used.
In all other cases, the insurance validation rules will be enforced and may result in the following error:
{ "validation_messages": { "insurance": { "annual_insurance": { "invalidAmount": "Annual insurance must be greater than 0.00" } } }, "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 422, "detail": "Failed Validation"}Registration & CTP (REG/CTP)
| JSON Field | Format | Notes | Mandatory |
|---|---|---|---|
| reg_ctp | string | Include when you want to update the quote's Contracts / Lease Registration (REG/CTP) profile. Visit the Registration (REG/CTP) profile page to review the calculation rules that are applied. | Yes |
| included_flag | string | If 'yes’, the Registration & CTP profile will be added to the quote or recalculated using the current variables. If ’no’, the Registration & CTP profile will be removed from the quote. | Yes |
| annual_reg | number | Include this if you want to override the system calculated value. | No |
| annual_ctp | number | Include this if you want to override the system calculated value. | No |
| annual_plates | number | Include this if you want to override the system calculated value. | No |
| renewals | number | Include this if you want to override the system calculated value. | No |
| monthlyamountnet | number | Include this if you want to override the system calculated value. | No |
Roadside Assistance (RSA)
| JSON Field | Format | Notes | Mandatory |
|---|---|---|---|
| roadside_assistance | string | Include when you want to update the quote's Contracts / Lease Roadside Assistance (RSA) profile. Visit the Roadside Assistance (RSA) profile page to review the calculation rules that are applied. | Yes |
| included_flag | string | If 'yes’, the Roadside Assistance profile will be added to the quote or recalculated using the current variables. If ’no’, the Roadside Assistance profile will be removed from the quote. | Yes |
| roadsideassistanceplan_id | string | Include this to override the default RSA Supplier. See also getRoadsideAssistancePlans. | No |
| premium | number | Include this if you want to override the system calculated value. | No |
| cost | number | Include this if you want to override the system calculated value. | No |
| monthlyamountnet | number | Include this if you want to override the system calculated value. If both premium and monthlyamountnet are included, monthlyamountnet is ignored. | No |
Small Damage Repairs (SDR)
| JSON Field | Format | Notes | Mandatory |
|---|---|---|---|
| When changing Term on a Quote via patchQuote, the Contract Term is used to update the SDR premium term ("months" from if there is one that matches. If no match is found, use the next match by rounding up the Term. For example, if Quote Term = 40, use the = 48 record (where Quote Date is >= . | |||
| included_flag | string | If 'yes', the Small Damage Repairs profile will be added to the quote. See Small Damage Repairs (SDR) for system default behaviour. If 'no', the Small Damage Repairs profile will be removed from the quote. | Yes |
| smalldamagerepairs_id | string | This field is linked to the "Years" listbox for this profile. You can override default behaviour by including this parameter. | No |
| premium | number | You can override default behaviour by including this parameter. | No |
| monthlyamountnet | string | You can override default behaviour by including this parameter if GB Control smalldamagerepairstype = 'userdefined'. | No |
Loan Termination Insurance (LTI)
| JSON Field | Format | Notes | Mandatory |
|---|---|---|---|
| lti | string | Include when you want to update the quote's Contracts / Lease Loan Termination Insurance (LTI) profile. Visit the Loan Termination Insurance (LTI) profile to review the calculation rules that are applied. | Yes |
| included_flag | string | Set as 'yes’, to add LTI profile to the quote. Set as 'no’, to remove the LTI profile from the quote. | Yes |
| ltitopupbenefitid | string | Add the "Top Up Benefit" ID. Visit the Loan Termination Insurance (LTI) profile to learn more. Visit the PatchQuote Supporting APIs to learn how to obtain a valid ltitopupbenefitid. | Yes |
| retailpricegross | string | Include this input field in your JSON to over-ride the system calculation. | No |
Vehicle Maintenance Program (VMP)
| JSON Field | Format | Notes | Mandatory |
|---|---|---|---|
| vehiclemaintenanceprogram | string | Include when you want to update the quote's Contracts / Lease Maintenance Program) profile. Visit the Maintenance Program) profile to review the calculation rules that are applied. | Yes |
| included_flag | string | Set as 'yes’, to add the Maintenance Program profile to the quote. Set as 'no’, to remove the Maintenance Program) profile from the quote. | Yes |
| monthlyamountnet | string | Include this input field in your JSON to over-ride the system calculation. | No |
| Inclusions |
|---|
Excess KM Charge
| JSON Field | Format | Notes | Mandatory |
|---|---|---|---|
| This section is not available via patchQuote yet. |
Redundancy Insurance
| JSON Field | Format | Notes | Mandatory |
|---|---|---|---|
| included_flag | string | If 'yes', the Redundancy Insurance profile will be added to the quote. If 'no', the Redundancy Insurance profile will be removed from the quote. | Yes |
Walkaway (WALK)
| JSON Field | Format | Notes | Mandatory |
|---|---|---|---|
| included_flag | string | If 'yes', the Walkaway profile will be added to the quote. If 'no', the Walkaway profile will be removed from the quote. | Yes |
| walkawayplanid | string | You can override default behaviour by including this parameter. See also getWalkawayPlans. | No |
Tyre And Rim Insurance (T&R)
| JSON Field | Format | Notes | Mandatory |
|---|---|---|---|
| included_flag | string | If 'yes', the Tyre and Rim Insurance profile will be added to the quote. If 'no', the Tyre and Rim Insurance profile will be removed from the quote. | Yes |
| tyreriminsuranceplanid | string | You can override default behaviour by including this parameter. See also getTyreRimInsurancePlans. | No |
Lease Inclusion Plans
"inclusion_plans": [ { "inclusion_code": "INCL_CODE1", "inclusion_plan_code": "INCL_PLAN1", "included_flag": "yes" }, { "inclusion_code": "INCL_CODE2", "inclusion_plan_code": "INCL_PLAN2", "included_flag": "yes" } ],Input rules for:
- Default Lease Inclusion Plans,
- Excluding selected Lease Inclusion Plans
- Pricing of Plans etc
can be found on the Lease Inclusion Plans page.
All of these rules and logic are applied to the patchQuote functionality.
| JSON Field | Format | Notes | Mandatory |
|---|---|---|---|
| inclusion_plans | string | Include when you want to update one or more of the Quotes / Lease → Lease Inclusion Plans. This header is expressed as an array [], because you can have multiple plans. Each plan needs to be passed as a separate bracket {} within the Lease Inclusion Plans array []. | Yes |
| inclusion_code | string | Include the Inclusion Code here. Optional if inclusionplancode_qualified is used. | Maybe |
| inclusionplancode | string | Required only if inclusioncode has been passed and there are multiple active plans to choose from. It is not required if there is only one active plan you have passed inclusionplancodequalified instead | Maybe |
| inclusionplancode_qualified | string | Use this if you want to target a specific inclusionplancodequalified record. If inclusioncode and/or inclusionplancode are also passed and there is a conflict, inclusionplancodequalified will be ignored. Note: effective date validations are not run when inclusionplancodequalified is used. | Maybe |
| included_flag | string | Set as 'yes’, to add a Lease Inclusion Plan to the quote. Set as 'no’, to remove the Lease Inclusion Plan from the quote. | No |
| retailpricegross | string | Allows you to override system calculated “Retail” price however the overridden retailpricegross value will only be used if the corresponding = ‘yes’. | No |
| JSON Field | Format | Notes | Mandatory |
|---|