Skip to main content
Quote / Variants

getVariants

getVariants

Overview

This method will list the makes and its detail.
This method requires the QuoteVariants:Get permission to be associated with your role.
By default, only 'web_services' role is linked in [gb_role_api_permissions].

HTTP Method

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

Input Fields (Header)

  • Header should contain the 'Accept' Key with the Value = 'application/json' or 'application/vnd.catch-e-api.v1+json'.

Input Fields (Body)

Field

Format

Notes

Default Value

Mandatory

make_id

string

Make id

No

model id

string

Model id

No

variant_code

string

Variant code.

This field supports the wildcard % operator (See Wildcard % operator notes below).

No

variant_name

string

Variant name.

This field supports the wildcard % operator (See Wildcard % operator notes below).

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 that have a qt_variant_profiles record with a 'date' valid for the current invocation date.

I.e. the [qt_variant_profiles]date must be on or before the date the API is run.

yes

No

include_inactive_flag

string

Set to yes if inactive items required in the list. Defaults to 'no'

no

No

page

string

Page number. Defaults to 1

1

No

page_size

string

Page size. Defaults to 25 records per page.

25

No

Wildcard % operator notes:

If you are using "Postman" app, with the wildcard operator, the search string of either %ab% or %ba%, will give this response:

"field_name": {"isEmpty": "Value is required and can't be empty"}.

If you need to search either %ab% or %ba%, please use %25ab%25 or %25ba%25 as required to return results as expected.

Input URL Examples

https://api.test.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 Example

{ "_links": { "self": { "href": "https://api.test.catch-e.com/qt/variants/?variant_code=AUVTESL2017AEAT&page=1" }, "first": { "href": "https://api.test.catch-e.com/qt/variants/?variant_code=AUVTESL2017AEAT" }, "last": { "href": "https://api.test.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_ac_charge_outlet": "", "battery_ac_fast_charge": "240V 40A 9.6kW - 625 min", "battery_capacity": 100, "battery_charge_socket_type": "Type 2", "battery_dc_fast_charge": "Tesla Supercharger - 0-80%", "battery_warranty_kms": 0, "battery_warranty_years": 0, "body_type_id": "100006", "build_year": 2017, "cam": "", "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", "electric_engine_km_range": 0, "energy_consumption": 200, "engine_cc": 0, "engine_code": "", "engine_configuration": "", "engine_cycle": "", "engine_litres": "", "engine_type": "Electric", "external_reference": "", "front_tyre_size": "245/45 R19", "fuel_capacity": 0, "fuel_combined": 0, "fuel_country": 0, "fuel_delivery": "", "fuel_metro": 0, "fuel_type_translation_id": "100018", "gear_location": "Column", "gears": 1, "good_retail_net": 104272.73, "good_wholesale_net": 90681.82, "greenhouse_rating": 0, "induction": "", "kerb_weight": 0, "list_price_gross": 251577, "list_price_gst": 19043.54, "list_price_net": 190435.38, "make_id": "100072", "manufacturer_model_code": "", "model_id": "131148", "model_month": 7, "model_year": 2017, "overall_green_star_rating": 0, "payload": 0, "power_kw": 0, "power_plant_type_id": "11989672791877091925", "power_rpm": 0, "private_maximum": 0, "private_minimum": 0, "rear_tyre_size": "245/45 R19", "seats": 5, "series": "", "service_kms": 20000, "service_mths": 12, "service_profile_id": "0", "short_description": "TESLA MODEL S P100D SPORTBACK SEDAN AWD", "status_flag": "active", "steering": "Rack and Pinion", "torque": 0, "torque_rpm": 0, "towing_capacity": 0, "trade_maximum": 0, "trade_minimum": 0, "transmission": "Reduction Gear", "valves_per_cylinder": 0, "variant_code": "AUVTESL2017AEAT", "variant_code_next": "AUVTESL2017AEAY", "variant_code_previous": "AUVTESL2017AEAO", "variant_id": "158007", "variant_name": "P100D Sportback Sedan AWD", "variant_paints": null, "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 }, "variant_sub_name": "", "vehicle_type_id": "100006", "vfacts_class": "", "vfacts_segment": "", "warranty_kms": 80000, "warranty_years": 4, "weight": 0, "wheel_base": 2960, "_links": { "self": { "href": "https://api.test.catch-e.com/qt/variants/158007" } } } ] }, "page_count": 1, "page_size": 25, "total_items": 1, "page": 1 } 

Error Codes

Detail

Comments

401 - Unauthorized

"detail": "Unauthorized"

Login token has expired. You need to generate new token.

403 - Forbidden

"detail": "Forbidden"

You do not have permissions for this request.

Detail

Validation Messages

Comments

422 - Unprocessable Entity

"detail": "Failed Validation"

"make_id": { "notDigits": "The input must contain only digits"}

make_id passed needs to be integer.

"detail": "Failed Validation"

"model_id": { "notDigits": "The input must contain only digits"}

model_id passed needs to be integer.

"detail": "Failed Validation"

"model_year": { "notGreaterThanInclusive": "The input is not greater than or equal to '1920'" }

model_year passed cannot be less than 1920.

"detail": "Failed Validation"

"model_year": { "notLessThanInclusive": "The input is not less or equal than '2021'" }

model_year passed cannot be greater than the following year.

"detail": "Failed Validation"

"data_source_id": { "notDigits": "The input must contain only digits"}

data_source_id passed needs to be integer.

"detail": "Failed Validation"

"body_type_id": { "notDigits": "The input must contain only digits"}

body_type_id passed needs to be integer.

"detail": "Failed Validation"

"variant_name": { "stringLengthTooShort": "The input is less than 2 characters long" }

variant_name length should be greater than one character.

"detail": "Failed Validation"

"variant_code": { "stringLengthTooShort": "The input is less than 2 characters long" }

variant_code length should be greater than one character.