Skip to main content
Quote / Variants

createVariants

createVariants

Overview

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

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 Examples

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

Headers

Key

Format

Notes

Mandatory

Audit-User-Id

string

Pass a user_id here to create audit records with this user's details.

This can only be done if the authenticated API user has Roles / Apis checked for the permission Audit:UserIdOverride

No

Time-Zone

string

Request will be processed in the specified timezone. The timezone value can be given in several formats, none of which are case sensitive:

  • As a named time zone, such as 'Europe/Helsinki', 'US/Eastern', or 'MET'.

  • As a string indicating an offset from UTC of the form [H]H:MM, prefixed with a + or -, such as '+10:00', '-6:00', or '+05:30'.

A leading zero can optionally be used for hours values less than 10; Default value: UTC

No

Body (JSON)

JSON Field

Format

Notes

Mandatory

model_id

string

See getVariantModels

Yes

model_year

number

Yes

variant_code

string

Must be unique

Yes

model_month

number

no

build_year

number

Yes

description

string

Yes

short_description

string

no

series

string

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

no

variant_name

string

no

variant_sub_name

string

no

transmission

string

no

gears

number

no

gear_location

string

no

doors

number

no

seats

number

no

engine_cc

number

no

engine_litres

string

no

cylinders

number

no

valves_per_cylinder

number

no

drive_type

string

no

engine_cycle

string

no

engine_type

string

no

engine_configuration

string

no

fuel_delivery

string

no

cam

string

no

steering

string

no

induction

string

no

fuel_type_translation_id

string

See getFuelTypeTranslations

no

power_kw

number

no

power_rpm

number

no

torque

number

no

torque_rpm

number

no

wheel_base

number

no

weight

number

no

payload

number

no

towing_capacity

number

no

kerb_weight

number

no

country

string

no

fuel_capacity

number

no

front_tyre_size

string

no

rear_tyre_size

string

no

engine_code

string

no

power_plant_type_id

string

no

manufacturer_model_code

string

no

acceleration

number

no

battery_capacity

string

no

battery_charge_socket_type

string

no

battery_ac_charge_outlet

string

no

battery_ac_fast_charge

string

no

battery_dc_fast_charge

string

no

battery_warranty_years

string

no

battery_warranty_kms

string

no

electric_engine_km_range

string

no

energy_consumption

string

no

trade_minimum

string

no

fuel_metro

number

no

fuel_country

number

no

fuel_combined

number

no

co2_emissions

number

no

warranty_years

number

no

warranty_kms

number

no

service_kms

number

no

service_mths

number

no

list_price_gross

number

no

list_price_net

number

no

list_price_gst

number

no

average_wholesale_net

number

no

average_retail_net

number

no

good_wholesale_net

number

no

good_retail_net

number

no

greenhouse_rating

number

no

air_pollution_rating

number

no

overall_green_star_rating

number

no

ancap_rating

number

no

vfacts_class

string

no

vfacts_segment

string

no

current_vehicle_flag

string

Y or N

no

variant_code_previous

string

no

variant_code_next

string

no

external_reference

string

no

data_source_id

string

Yes

status_flag

string

no

Variant Profile section (optional but highly recommended).

JSON Field

Format

Notes

Mandatory

variant_profile {

No

maintenance_service_profile_id

string

Yes if variant_profile section included in request.

variant_code

string

Must be unique

Yes

tyre_id

string

Yes if variant_profile section included in request.

tyres_per_set

number

Yes if variant_profile section included in request.

tyre_km_interval

number

Yes if variant_profile section included in request.

vehicle_type_id

string

no

date

date

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

no

delivery_metro

number

no

delivery_country

number

no

residual_adjustment_rate

number

no

insurance_type_id

string

no

relief_vehicle

number

no

}

Input Fields (JSON)

[ { "model_id": "string", "model_year": 0, "variant_code": "string", "model_month": 0, "build_year": 0, "description": "string", "short_description": "string", "series": "string", "service_profile_id": "string", "vehicle_type_id": "string", "body_type_id": "string", "configuration": "string", "variant_name": "string", "variant_sub_name": "string", "transmission": "string", "gears": 0, "gear_location": "string", "doors": 0, "seats": 0, "engine_cc": 0, "engine_litres": "string", "cylinders": 0, "valves_per_cylinder": 0, "drive_type": "string", "engine_cycle": "string", "engine_type": "string", "engine_configuration": "string", "fuel_delivery": "string", "cam": "string", "steering": "string", "induction": "string", "fuel_type_translation_id": "string", "power_kw": 0, "power_rpm": 0, "torque": 0, "torque_rpm": 0, "wheel_base": 0, "weight": 0, "payload": 0, "towing_capacity": 0, "kerb_weight": 0, "country": "string", "fuel_capacity": 0, "front_tyre_size": "string", "rear_tyre_size": "string", "engine_code": "string", "power_plant_type_id": "string", "manufacturer_model_code": "string", "acceleration": 0, "fuel_metro": 0, "fuel_country": 0, "fuel_combined": 0, "co2_emissions": 0, "warranty_years": 0, "warranty_kms": 0, "service_kms": 0, "service_mths": 0, "list_price_gross": 0, "list_price_net": 0, "list_price_gst": 0, "average_wholesale_net": 0, "average_retail_net": 0, "good_wholesale_net": 0, "good_retail_net": 0, "greenhouse_rating": 0, "air_pollution_rating": 0, "overall_green_star_rating": 0, "ancap_rating": 0, "vfacts_class": "string", "vfacts_segment": "string", "current_vehicle_flag": "N", "variant_code_previous": "string", "variant_code_next": "string", "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 }, "external_reference": "string", "data_source_id": "string", "status_flag": "pending" } ]

Response Details

201 Created

{ "_links": { "self": { "href": "https://api.test.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.test.catch-e.com/qt/variants/182511" } } } ] }, "total_items": 1 }

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

422 Unprocessable Entity

{ "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

|"detail": "Forbidden"

You do not have permissions for this request.