This method creates a Variant and Variant Profile (optional).

Supplementary SWAGGER documentation is available here: https://api.catch-e.com/docs/#/Quote%20%2F%20Variants/createVariants

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 QuoteVariants:Create

Note: This API is not configured for external use. Contact your Account Manager to discuss access to this API.

HTTP Method

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

URL

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

Headers

Key

Format

Notes

Mandatory

Audit-User-Id

string

Pass a user_id to create audit records with this user's details. Only if authenticated API user has Roles / APIs checked for Audit:UserIdOverride permission

No

Time-Zone

string

Request processed in specified timezone. Can be named (e.g. 'Europe/Helsinki', 'US/Eastern', 'MET') or offset from UTC (e.g. '+10:00', '-6:00', '+05:30'). Default: UTC

No

Body (JSON)

Field

Format

Notes

Mandatory

model_id

string

See getVariantModels

Yes

model_year

number

Model year

Yes

variant_code

string

Must be unique

Yes

model_month

number

Model month

No

build_year

number

Build year

Yes

description

string

Variant description

Yes

short_description

string

Short description

No

series

string

Series

No

service_profile_id

string

Used for 1link Interface

No

vehicle_type_id

string

See getVehicleTypes

Yes

body_type_id

string

See getVehicleBodyTypes

Yes

configuration

string

Configuration

No

variant_name

string

Variant name

No

variant_sub_name

string

Variant sub name

No

transmission

string

Transmission type

No

gears

number

Number of gears

No

gear_location

string

Gear location

No

doors

number

Number of doors

No

seats

number

Number of seats

No

engine_cc

number

Engine cubic centimeters

No

engine_litres

string

Engine litres

No

cylinders

number

Number of cylinders

No

valves_per_cylinder

number

Valves per cylinder

No

drive_type

string

Drive type

No

engine_cycle

string

Engine cycle

No

engine_type

string

Engine type

No

engine_configuration

string

Engine configuration

No

fuel_delivery

string

Fuel delivery

No

cam

string

Camshaft type

No

steering

string

Steering type

No

induction

string

Induction type

No

fuel_type_translation_id

string

See getFuelTypeTranslations

No

power_kw

number

Power in kilowatts

No

power_rpm

number

Power RPM

No

torque

number

Torque

No

torque_rpm

number

Torque RPM

No

wheel_base

number

Wheel base

No

weight

number

Weight

No

payload

number

Payload capacity

No

towing_capacity

number

Towing capacity

No

kerb_weight

number

Kerb weight

No

country

string

Country

No

fuel_capacity

number

Fuel capacity

No

front_tyre_size

string

Front tyre size

No

rear_tyre_size

string

Rear tyre size

No

engine_code

string

Engine code

No

power_plant_type_id

string

Power plant type ID

No

manufacturer_model_code

string

Manufacturer model code

No

acceleration

number

Acceleration

No

battery_capacity

string

Battery capacity (EV)

No

battery_charge_socket_type

string

Battery charge socket type (EV)

No

battery_ac_charge_outlet

string

Battery AC charge outlet (EV)

No

battery_ac_fast_charge

string

Battery AC fast charge (EV)

No

battery_dc_fast_charge

string

Battery DC fast charge (EV)

No

battery_warranty_years

string

Battery warranty years (EV)

No

battery_warranty_kms

string

Battery warranty km (EV)

No

electric_engine_km_range

string

Electric engine km range (EV)

No

energy_consumption

string

Energy consumption (EV)

No

trade_minimum

string

Trade minimum

No

fuel_metro

number

Fuel consumption metro

No

fuel_country

number

Fuel consumption country

No

fuel_combined

number

Fuel consumption combined

No

co2_emissions

number

CO2 emissions

No

warranty_years

number

Warranty years

No

warranty_kms

number

Warranty kilometers

No

service_kms

number

Service kilometers interval

No

service_mths

number

Service months interval

No

list_price_gross

number

List price gross

No

list_price_net

number

List price net

No

list_price_gst

number

List price GST

No

average_wholesale_net

number

Average wholesale net

No

average_retail_net

number

Average retail net

No

good_wholesale_net

number

Good wholesale net

No

good_retail_net

number

Good retail net

No

greenhouse_rating

number

Greenhouse rating

No

air_pollution_rating

number

Air pollution rating

No

overall_green_star_rating

number

Overall green star rating

No

ancap_rating

number

ANCAP rating

No

vfacts_class

string

VFACTS class

No

vfacts_segment

string

VFACTS segment

No

current_vehicle_flag

string

Y or N

No

variant_code_previous

string

Previous variant code

No

variant_code_next

string

Next variant code

No

external_reference

string

External reference

No

data_source_id

string

See getVariantDataSources

Yes

status_flag

string

Defaults to 'pending'

No

Variant Profile Section (Optional but Recommended)

Field

Format

Notes

Mandatory

variant_profile

object

Container for variant profile details

No

maintenance_service_profile_id

string

Maintenance service profile ID

Yes if variant_profile included

tyre_id

string

Tyre ID

Yes if variant_profile included

tyres_per_set

number

Tyres per set

Yes if variant_profile included

tyre_km_interval

number

Tyre km interval

Yes if variant_profile included

vehicle_type_id

string

Vehicle type ID

No

date

date

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

No

delivery_metro

number

Delivery metro cost

No

delivery_country

number

Delivery country cost

No

residual_adjustment_rate

number

Residual adjustment rate

No

insurance_type_id

string

Insurance type ID

No

relief_vehicle

number

Relief vehicle flag

No

Input Example

[ { "model_id": "string", "model_year": 1980, "variant_code": "MPAU1980APIVARIANT1", "model_month": 12, "build_year": 1980, "description": "Another oldie but a good vehicle nonetheless 1980", "short_description": "An oldie but a goody 1980", "series": "Two", "service_profile_id": "string", "vehicle_type_id": "100001", "body_type_id": "100006", "configuration": "Config", "variant_name": "GoGo Gone", "variant_sub_name": "Fasterer", "transmission": "Automatic", "gears": 8, "gear_location": "Floor", "doors": 5, "seats": 5, "engine_cc": 2777, "engine_litres": "7", "cylinders": 8, "valves_per_cylinder": 4, "drive_type": "Rear Wheel Drive", "engine_cycle": "MP1970V01", "engine_type": "Piston", "engine_configuration": "in-line", "fuel_delivery": "MPI", "cam": "DOHC", "steering": "Rack & Pinion", "induction": "Aspirated", "fuel_type_translation_id": "100033", "power_kw": 444, "power_rpm": 4444, "torque": 277, "torque_rpm": 4777, "wheel_base": 2777, "weight": 1077, "payload": 477, "towing_capacity": 3577, "kerb_weight": 2377, "country": "Aussie", "fuel_capacity": 77, "front_tyre_size": "235/60 R22", "rear_tyre_size": "235/60 R22", "engine_code": "ENGINECODE", "power_plant_type_id": "11989672791877091928", "manufacturer_model_code": "MPTST1970", "acceleration": 5.7, "fuel_metro": 10.1, "fuel_country": 8.1, "fuel_combined": 9.1, "co2_emissions": 177, "warranty_years": 5, "warranty_kms": 200000, "service_kms": 15000, "service_mths": 12, "list_price_gross": 77770.77, "list_price_net": 69930.69, "list_price_gst": 7770.08, "average_wholesale_net": 40000.77, "average_retail_net": 50000.77, "good_wholesale_net": 45000.77, "good_retail_net": 55000.77, "greenhouse_rating": 5.1, "air_pollution_rating": 6.1, "overall_green_star_rating": 7.1, "ancap_rating": 5, "vfacts_class": "Medium", "vfacts_segment": "Medium2", "current_vehicle_flag": "Y", "variant_code_previous": "", "variant_code_next": "", "variant_profile": { "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 }, "external_reference": "ExtReference", "data_source_id": "100000", "status_flag": "active" } ] 

Response Details

201 Created

A successful response returns all fields in the qt_variants and qt_variant_profiles tables.

{ "_links": { "self": { "href": "https://api.catch-e.com/qt/variants/" } }, "_embedded": { "qt_variants": [ { "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": 1980, "cam": "DOHC", "co2_emissions": 177, "configuration": "Config", "country": "Aussie", "current_vehicle_flag": "Y", "cylinders": 8, "data_source_id": "100000", "description": "Another oldie but a good vehicle nonetheless 1980", "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": "ExtReference", "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": 1980, "overall_green_star_rating": 7.1, "payload": 477, "power_kw": 444, "power_plant_type_id": "11989672791877091928", "power_rpm": 4444, "private_maximum": 0, "private_minimum": 0, "rear_tyre_size": "235/60 R22", "seats": 5, "series": "Two", "service_kms": 15000, "service_mths": 12, "service_profile_id": "0", "short_description": "An oldie but a goody 1980", "status_flag": "active", "steering": "Rack & Pinion", "torque": 277, "torque_rpm": 4777, "towing_capacity": 3577, "trade_maximum": 0, "transmission": "Automatic", "valves_per_cylinder": 4, "variant_code": "MPAU1980APIVARIANT1", "variant_code_next": "", "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": "Fasterer", "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" } } } ] }, "total_items": 1 } 

422 Unprocessable Entity

Variant code already exists:

{ "validation_messages": [ { "variant_code": { "recordFound": "A record matching the input was found" } } ], "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 422, "detail": "Failed Validation" } 

It looks like this Variant Code already exists.

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.