PatchVariantProfile

PatchVariantProfile

Edit variant profile. Embedded section within PatchVariant API.

Requires QuoteVariants:Update permission.

Go to Roles / APIs and check on QuoteVariants:Update.

Note: Not configured for external use. Contact Account Manager to discuss access.

Supplementary SWAGGER documentation: api.catch-e.com/docs/#/Quote%20%2F%20Variants/patchVariants

HTTP Method

PATCH

URL Examples

https://api.catch-e.com/qt/variants/{variant_id} 

Headers

Key

Format

Notes

Mandatory

Audit-User-Id

string

Pass user_id to create audit records. Requires Audit:UserIdOverride permission.

No

Time-Zone

string

Named zones (Europe/Helsinki, US/Eastern) or offset (+10:00, -6:00, +05:30). Default: UTC

No

Body Fields (JSON)

Field

Format

Notes

Mandatory

variant_profile.variant_profile_id

string

Must match existing record for {variant_id} in URL

No

variant_profile.maintenance_service_profile_id

string

No

variant_profile.tyre_id

string

No

variant_profile.tyres_per_set

number

No

variant_profile.tyre_km_interval

number

No

variant_profile.vehicle_type_id

string

No

variant_profile.date

date

Format: yyyy-mm-dd. Defaults to 0000-00-00.

No

variant_profile.delivery_metro

number

No

variant_profile.delivery_country

number

No

variant_profile.residual_adjustment_rate

number

No

variant_profile.insurance_type_id

string

No

variant_profile.relief_vehicle

number

No

Input Example

{ "variant_profile": { "maintenance_service_profile_id": "string", "tyre_id": "string", "tyres_per_set": 0, "tyre_km_interval": 0, "vehicle_type_id": "string", "date": "2023-04-20", "delivery_metro": 0, "delivery_country": 0, "residual_adjustment_rate": 0, "insurance_type_id": "string", "relief_vehicle": 0 } } 

Response - 200 OK

Successful response returns all fields in qt_variants and qt_variant_profiles tables.

{ "acceleration": 5.7, "air_pollution_rating": 6.1, "ancap_rating": 5, "average_retail_net": 50000.77, "average_wholesale_net": 40000.77, "body_type_id": "100006", "build_year": 1970, "cam": "DOHC", "co2_emissions": 177, "configuration": "Config", "country": "Aussie", "current_vehicle_flag": "Y", "cylinders": 8, "data_source_id": "100000", "description": "An oldie but a good vehicle nonetheless", "doors": 5, "drive_type": "Rear Wheel Drive", "engine_cc": 2777, "engine_code": "ENGINECODE", "engine_configuration": "in-line", "engine_cycle": "MP1970V01", "engine_litres": "7", "engine_type": "Piston", "external_reference": "ExtReference2", "front_tyre_size": "235/60 R22", "fuel_capacity": 77, "fuel_combined": 9.1, "fuel_country": 8.1, "fuel_delivery": "MPI", "fuel_metro": 10.1, "fuel_type_translation_id": "100033", "gear_location": "Floor", "gears": 8, "good_retail_net": 55000.77, "good_wholesale_net": 45000.77, "greenhouse_rating": 5.1, "induction": "Aspirated", "kerb_weight": 2377, "list_price_gross": 77770.77, "list_price_gst": 7770.08, "list_price_net": 69930.69, "manufacturer_model_code": "MPTST1970", "model_id": "100569", "model_month": 12, "model_year": 1981, "overall_green_star_rating": 7.1, "payload": 477, "power_kw": 444, "power_plant_type_id": "11989672791877091928", "power_rpm": 4444, "rear_tyre_size": "235/60 R22", "seats": 5, "series": "One", "service_kms": 15000, "service_mths": 12, "service_profile_id": "0", "short_description": "An oldie but a goody", "status_flag": "active", "steering": "Rack & Pinion", "torque": 277, "torque_rpm": 4777, "towing_capacity": 3577, "transmission": "Automatic", "valves_per_cylinder": 4, "variant_code": "MPAU1980APIVARIANT1", "variant_code_next": "NOT Applicable", "variant_code_previous": "", "variant_id": "182511", "variant_name": "GoGo Gone", "variant_profiles": { "variant_profile_id": "181180", "variant_id": "182511", "maintenance_service_profile_id": "100012", "tyre_id": "100001", "tyres_per_set": 4, "tyre_km_interval": 45001, "vehicle_type_id": "100001", "date": "1971-01-01", "delivery_metro": 777.77, "delivery_country": 888.88, "residual_adjustment_rate": 0.5, "insurance_type_id": "100004", "relief_vehicle": 0 }, "variant_sub_name": "Faster", "vehicle_type_id": "100001", "vfacts_class": "Medium", "vfacts_segment": "Medium2", "warranty_kms": 200000, "warranty_years": 5, "weight": 1077, "wheel_base": 2777, "_links": { "self": { "href": "https://api.catch-e.com/qt/variants/182511" } } } 

Response - 422 Unprocessable Entity

Variant Profile not linked to Variant:

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

Variant Profile not linked to Variant ID.

Response - 403 Forbidden

"detail": "Forbidden" 

You do not have permissions for this request.


Get List of Variants

List makes and variant details with filtering.

Requires QuoteVariants:Get permission. Default: web_services role.

HTTP Method

GET

Input - Header

Header should contain 'Accept' key with value = 'application/json' or 'application/vnd.catch-e-api.v1+json'.

Input - Body

Field

Format

Notes

Mandatory

make_id

string

Make ID

No

model_id

string

Model ID

No

variant_code

string

Supports wildcard % operator

No

variant_name

string

Supports wildcard % operator

No

body_type_id

string

Body type ID

No

data_source_id

string

Data source ID

No

profile_required_flag

string

If yes, display variants with qt_variant_profiles record with date valid for current invocation date (on or before run date)

No

include_inactive_flag

string

Set to yes for inactive items. Default: no

No

page

string

Page number (default: 1)

No

page_size

string

Records per page (default: 25)

No

Wildcard % Operator Notes

In Postman, wildcard searches (%ab% or %ba%) may return "isEmpty" error.

Use %25ab%25 or %25ba%25 instead for proper encoding.

URL Example

https://api.catch-e.com/qt/variants?make_id=100009&model_id=100157&model_year=2001&profile_required_flag=no&include_inactive_flag=no&page=1&page_size=5 

Successful Output

{ "_links": { "self": { "href": "https://api.catch-e.com/qt/variants/?variant_code=AUVTESL2017AEAT&page=1" }, "first": { "href": "https://api.catch-e.com/qt/variants/?variant_code=AUVTESL2017AEAT" }, "last": { "href": "https://api.catch-e.com/qt/variants/?variant_code=AUVTESL2017AEAT&page=1" } }, "_embedded": { "qt_variants": [ { "acceleration": 2.7, "air_pollution_rating": 0, "ancap_rating": 5, "average_retail_net": 95818.18, "average_wholesale_net": 83636.36, "battery_capacity": 100, "body_type_id": "100006", "build_year": 2017, "co2_emissions": 0, "configuration": "", "country": "UNITED STATES", "current_vehicle_flag": "N", "cylinders": 0, "data_source_id": "100001", "description": "P100D Sportback Sedan 5dr Reduction Gear 1sp AWD AC450kW", "doors": 5, "drive_type": "Four Wheel Drive", "engine_type": "Electric", "external_reference": "", "front_tyre_size": "245/45 R19", "fuel_type_translation_id": "100018", "gears": 1, "good_retail_net": 104272.73, "good_wholesale_net": 90681.82, "list_price_gross": 251577, "list_price_gst": 19043.54, "list_price_net": 190435.38, "make_id": "100072", "model_id": "131148", "model_month": 7, "model_year": 2017, "seats": 5, "service_kms": 20000, "service_mths": 12, "short_description": "TESLA MODEL S P100D SPORTBACK SEDAN AWD", "status_flag": "active", "transmission": "Reduction Gear", "variant_code": "AUVTESL2017AEAT", "variant_code_next": "AUVTESL2017AEAY", "variant_code_previous": "AUVTESL2017AEAO", "variant_id": "158007", "variant_name": "P100D Sportback Sedan AWD", "variant_profiles": { "variant_profile_id": "156712", "variant_id": "158007", "maintenance_service_profile_id": "100015", "tyre_id": "0", "tyres_per_set": 4, "tyre_km_interval": 45000, "vehicle_type_id": "100001", "date": "0000-00-00", "delivery_metro": 600, "delivery_country": 800, "residual_adjustment_rate": 0, "insurance_type_id": "0", "relief_vehicle": 0 }, "vehicle_type_id": "100006", "warranty_kms": 80000, "warranty_years": 4, "wheel_base": 2960, "_links": { "self": { "href": "https://api.catch-e.com/qt/variants/158007" } } } ] }, "page_count": 1, "page_size": 25, "total_items": 1, "page": 1 } 

Error - 401 Unauthorized

"detail": "Unauthorized" 

Login token expired. Generate new token.

Error - 403 Forbidden

"detail": "Forbidden" 

You do not have permissions for this request.

Error - 422 Unprocessable Entity

Validation

Notes

make_id: notDigits

make_id must be integer

model_id: notDigits

model_id must be integer

model_year: notGreaterThanInclusive

Cannot be less than 1920

model_year: notLessThanInclusive

Cannot be greater than following year

data_source_id: notDigits

data_source_id must be integer

body_type_id: notDigits

body_type_id must be integer

variant_name: stringLengthTooShort

Must be greater than 1 character

variant_code: stringLengthTooShort

Must be greater than 1 character


Get Variant by Variant ID

Return requested variant details.

Requires QuoteVariants:Get permission.

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

HTTP Method

GET

Input - Header

Header should contain 'Accept' key with value = 'application/json' or 'application/vnd.catch-e-api.v1+json'.

Input - Body

Field

Format

Notes

Mandatory

variant_id

string

Variant ID

Yes

URL Example

https://api.catch-e.com/qt/variants/100000 

Successful Output

{ "_links": { "self": { "href": "https://api.catch-e.com/qt/variants/?variant_code=AUVTESL2017AEAT&page=1" }, "first": { "href": "https://api.catch-e.com/qt/variants/?variant_code=AUVTESL2017AEAT" }, "last": { "href": "https://api.catch-e.com/qt/variants/?variant_code=AUVTESL2017AEAT&page=1" } }, "_embedded": { "qt_variants": [ { "acceleration": 2.7, "air_pollution_rating": 0, "ancap_rating": 5, "average_retail_net": 95818.18, "average_wholesale_net": 83636.36, "battery_capacity": 100, "body_type_id": "100006", "build_year": 2017, "co2_emissions": 0, "configuration": "", "country": "UNITED STATES", "current_vehicle_flag": "N", "cylinders": 0, "data_source_id": "100001", "description": "P100D Sportback Sedan 5dr Reduction Gear 1sp AWD AC450kW", "doors": 5, "drive_type": "Four Wheel Drive", "engine_type": "Electric", "external_reference": "", "front_tyre_size": "245/45 R19", "fuel_type_translation_id": "100018", "gears": 1, "good_retail_net": 104272.73, "good_wholesale_net": 90681.82, "list_price_gross": 251577, "list_price_gst": 19043.54, "list_price_net": 190435.38, "make_id": "100072", "model_id": "131148", "model_month": 7, "model_year": 2017, "seats": 5, "service_kms": 20000, "service_mths": 12, "short_description": "TESLA MODEL S P100D SPORTBACK SEDAN AWD", "status_flag": "active", "transmission": "Reduction Gear", "variant_code": "AUVTESL2017AEAT", "variant_code_next": "AUVTESL2017AEAY", "variant_code_previous": "AUVTESL2017AEAO", "variant_id": "158007", "variant_name": "P100D Sportback Sedan AWD", "variant_profiles": { "variant_profile_id": "156712", "variant_id": "158007", "maintenance_service_profile_id": "100015", "tyre_id": "0", "tyres_per_set": 4, "tyre_km_interval": 45000, "vehicle_type_id": "100001", "date": "0000-00-00", "delivery_metro": 600, "delivery_country": 800, "residual_adjustment_rate": 0, "insurance_type_id": "0", "relief_vehicle": 0 }, "vehicle_type_id": "100006", "warranty_kms": 80000, "warranty_years": 4, "wheel_base": 2960, "_links": { "self": { "href": "https://api.catch-e.com/qt/variants/158007" } } } ] }, "page_count": 1, "page_size": 25, "total_items": 1, "page": 1 } 

Error - 401 Unauthorized

"detail": "Unauthorized" 

Login token expired. Generate new token.

Error - 403 Forbidden

"detail": "Forbidden" 

You do not have permissions for this request.

Error - 404 Not Found

"detail": "Invalid variant id" 

Entered variant_id cannot be found.