Variants & Vehicles API: Get photos for a specific variant

API endpoints for vehicle variants, makes, models, and equipment

Get photos for a specific variant

This method will return photo URI of selected variants.

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:Get

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)

FieldFormatNotesMandatory
variant_idstringVariant idYes
photo_typearray[string]Option to do multiple select on: rear, front, interior, side and engine options.No

Input URL Examples

https://api.test.catch-e.com/qt/variants/photos?variant_id=167353&photo_type=front,rear,interior,side,engine

(Successful) Output Example

{ "_links": { "self": { "href": "https://api.test.catch-e.com/qt/variants/photos?variant_id=167353&photo_type=front,rear,interior,side,engine&page=1" }, "first": { "href": "https://api.test.catch-e.com/qt/variants/photos?variant_id=167353&photo_type=front,rear,interior,side,engine" }, "last": { "href": "https://api.test.catch-e.com/qt/variants/photos?variant_id=167353&photo_type=front,rear,interior,side,engine&page=1" } }, "_embedded": { "qt_variant_photos": [ { "photo_id": 283862, "variant_id": 167353, "photo_type": "front", "photo_uri": "https://demo.test.catch-e.net.au/core/services/Redbook/photos/AUS/S0005LLJ.jpg", "photo_code": "S0005LLJ", "description": "", "data_source_id": 100001 }, { "photo_id": 283863, "variant_id": 167353, "photo_type": "rear", "photo_uri": "https://demo.test.catch-e.net.au/core/services/Redbook/photos/AUS/S0005LLK.jpg", "photo_code": "S0005LLK", "description": "", "data_source_id": 100001 } ] }, "page_count": 1, "page_size": 25, "total_items": 2, "page": 1}

Error Codes

DetailComments
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.
DetailValidation MessagesComments
422 - Unprocessable Entity
"detail": "Failed Validation""variant_id": { "notDigits": "The input must contain only digits" }variant_id passed needs to be integer.

Get variant optional equipment by variant id

This method will list all optional equipment for selected variant with a status_flag of 'active'.

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:Get

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)

FieldFormatNotesMandatory
variant_idstringVariant idYes
pagestringPage number. Defaults to 1No
page_sizestringPage size. Defaults to 25 records per page.No

Input URL Examples

https://api.test.catch-e.com/qt/variants/167353/optional-equipment?page=1&page_size=5

(Successful) Output Example

{ "_links": { "self": { "href": "https://api.test.catch-e.com/qt/variants/167353/optional-equipment?page=1" }, "first": { "href": "https://api.test.catch-e.com/qt/variants/167353/optional-equipment" }, "last": { "href": "https://api.test.catch-e.com/qt/variants/167353/optional-equipment?page=15" }, "next": { "href": "https://api.test.catch-e.com/qt/variants/167353/optional-equipment?page=2" } }, "_embedded": { "qt_variant_optional_equipment": [ { "optional_equipment_id": 109836, "variant_id": 167353, "supplier_id": 0, "list_price_net": 1181.82, "list_price_gst": 118.18, "cost_price_net": 1181.82, "option_type": "dealer", "dealer_fit": "yes", "include_by_default_flag": "no", "equipment_code": "", "description": "16\" Alloy Wheels", "fbt_exempt_flag": "no", "data_source_id": 100001 }, { "optional_equipment_id": 109837, "variant_id": 167353, "supplier_id": 0, "list_price_net": 1272.73, "list_price_gst": 127.27, "cost_price_net": 1272.73, "option_type": "dealer", "dealer_fit": "yes", "include_by_default_flag": "no", "equipment_code": "", "description": "17\" Alloy Wheels", "fbt_exempt_flag": "no", "data_source_id": 100001 }, { "optional_equipment_id": 109838, "variant_id": 167353, "supplier_id": 0, "list_price_net": 1636.36, "list_price_gst": 163.64, "cost_price_net": 1636.36, "option_type": "dealer", "dealer_fit": "yes", "include_by_default_flag": "no", "equipment_code": "", "description": "18\" Alloy Wheels", "fbt_exempt_flag": "no", "data_source_id": 100001 }, { "optional_equipment_id": 109839, "variant_id": 167353, "supplier_id": 0, "list_price_net": 1818.18, "list_price_gst": 181.82, "cost_price_net": 1818.18, "option_type": "dealer", "dealer_fit": "yes", "include_by_default_flag": "no", "equipment_code": "", "description": "19\" Alloy Wheels", "fbt_exempt_flag": "yes", "data_source_id": 100001 }, { "optional_equipment_id": 100000, "variant_id": 167353, "supplier_id": 0, "list_price_net": 0, "list_price_gst": 0, "cost_price_net": 0, "option_type": "dealer", "dealer_fit": "yes", "include_by_default_flag": "no", "equipment_code": "1ST", "description": "1st Aid Kit", "fbt_exempt_flag": "no", "data_source_id": 100000 } ] }, "page_count": 15, "page_size": 5, "total_items": 73, "page": 1}

Error Codes

DetailComments
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.
404 - Not Found
"detail": nullEntered variant_id cannot be found.

Get variant standard equipment by variant id

This method will list all standard equipment for selected variant.

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:Get

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)

FieldFormatNotesMandatory
variant_idstringVariant idYes
pagestringPage number. Defaults to 1No
page_sizestringPage size. Defaults to 25 records per page.No

Input URL Examples

https://api.test.catch-e.com/qt/variants/167353/standard-equipment?page=1&page_size=5

(Successful) Output Example

{ "_links": { "self": { "href": "https://api.test.catch-e.com/qt/variants/167353/standard-equipment?page=1" }, "first": { "href": "https://api.test.catch-e.com/qt/variants/167353/standard-equipment" }, "last": { "href": "https://api.test.catch-e.com/qt/variants/167353/standard-equipment?page=30" }, "next": { "href": "https://api.test.catch-e.com/qt/variants/167353/standard-equipment?page=2" } }, "_embedded": { "qt_variant_standard_equipment": [ { "standard_equipment_id": 131171, "description": "12V Socket(s) - Auxiliary" }, { "standard_equipment_id": 100142, "description": "18\" Alloy Wheels" }, { "standard_equipment_id": 100039, "description": "8 Speaker Stereo" }, { "standard_equipment_id": 100001, "description": "ABS (Antilock Brakes)" }, { "standard_equipment_id": 100511, "description": "Active Torque Transfer System" } ] }, "page_count": 30, "page_size": 5, "total_items": 148, "page": 1}

Error Codes

DetailComments
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.
404 - Not Found
"detail": nullEntered variant_id cannot be found.

Get a list of Variant Profiles

This method gets a list of Variant Profiles.

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

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:Get

HTTP Method

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

URL Examples

https://api.catch-e.com/qt/variant-profiles/

Input Fields (Body)

FieldFormatNotesMandatory
variant_idstringInclude the Variant ID if you want to limit the results to its matching record.No
pagestringPage number. Defaults to 1No
page_sizestringPage size. Defaults to 25 records per page.No

Input URL Examples

https://api.test.catch-e.com/qt/variant-profiles?variant_id=100000&page=1&page_size=5

(Successful) Output Example

{ "_links": { "self": { "href": "https://api.test.catch-e.com/qt/variant-profiles/?variant_id=100000&page=1" }, "first": { "href": "https://api.test.catch-e.com/qt/variant-profiles/?variant_id=100000" }, "last": { "href": "https://api.test.catch-e.com/qt/variant-profiles/?variant_id=100000&page=1" } }, "_embedded": { "items": [ { "variant_profile_id": "104693", "variant_id": "100000", "maintenance_service_profile_id": "100000", "tyre_id": "100523", "tyres_per_set": 4, "tyre_km_interval": 40000, "vehicle_type_id": "100001", "date": "2007-01-21", "delivery_metro": 600, "delivery_country": 800, "residual_adjustment_rate": 0, "insurance_type_id": "100001", "relief_vehicle": 10, "_links": { "self": { "href": "https://api.test.catch-e.com/qt/variant-profiles/104693" } } } ] }, "page_count": 1, "page_size": 25, "total_items": 1, "page": 1}

Glass Data FTP Only

Import Glasses data to create new variants and update existing variants where required.
The process looks for files with a date in the next month first, and then if not present, files with a date in the current month are used. E.g. if today is 25/02/2021, the process will look for the Mar21 files first, if they are not available then it will look for the Feb21 files.

The standard process is to set up a scheduler job for qt / glasses / importVehicleData.
This job polls your Glasses FTP folder and picks up new files for processing.

Warning: Import Glasses data is a legacy function that uses an FTP connection. This function was deprecated in September 2024.
Use the Import Glass Data function instead. It uses an SFTP connection and is more secure.

Import File Access

To access import files directly, set-up software such as FileZilla and use the login provided by Glasses to access their hosted FTP folder.

Set Up

Populate the following gb_controls:

modulenameValue
qtglassftpconnection
Hostas advised by Glasses
Portas advised by Glasses
Usernameas advised by Glasses
Passwordas advised by Glasses
gbdatasourcedefaultglass
gbquotesdatasource_overrideglass

Useful Queries

select af.table_name, af.field_name, ai.record_id, ai.timestamp, ai.value_before, ai.value_afterfrom gb_audit_import as aiinner join gb_audit_fields as af on af.audit_field_id = ai.audit_field_idlimit 10;

Import Glass Data

Protected fields in

When a new file would update existing fields that are populated in a record back to zero or blank, those updates are skipped to leave the fields populated.
Fields that are protected in this way are listed below:

  • weight
  • payload
  • towing_capacity
  • kerb_weight
  • fuel_metro
  • fuel_country
  • fuel_combined
  • warranty_years
  • warranty_kms
  • service_kms
  • service_mths

Preserve data in

You can nominate specific fields where where data should be preserved and changes that would be made from an import file will be ignored. I.e. data would only be populated into your records if the target fields are currently stored as zero or blank.
Use this to keep specific data and ignore the values imported by Glasses.
Contact Catch-e if you want to nominate any fields to apply this business rule to.

Audit Records

The records that are created or changed by this process are recorded in the table. Reports and queries can be run over this file using the timestamp of each import to identify new records created and existing records updated. Contact Catch-e for the sample queries named:

  • Variants created and updated
  • Variant residuals updated
  • Other tables updated

Validation

The import process will validate the 'NVIC' code for each row in each file. NVIC codes must be 6 characters. If any of the NVIC code fields are not 6 characters long the file will fail. No vehicles will be imported in this instance. Catch-e support will be notified.

Required files in Glass archive

Key:

CVG = Commercial Vehicles up to 10 years old includes 4WDs and vans with a load carrying capacity of less than 3510kg.

PVG = Passenger Vehicles up to 10 years old inclusive

HCV = Heavy / Commercial Vehicles.

N12 = Contains only new vehicles and prices released in the current year with NVIC and contains no alphanumeric prices.

U12 = Contains all vehicles with second hand prices with no alphanumeric prices and contains NVIC.

Same rules apply to PVG, HCV and CVG files. OCG AND OLC prefixes are NOT used.

In some circumstances a client's Glass's ftp site may contain both Service 11 and Service 14 data files.
Service 11 files with the file extension .U12 contain used vehicle values.
Service 14 files with the file extension .U12 do not contain used vehicle values.
Where both files are present the Catch-e default is to import Service 11 .U12 data.

Below is a list of each Filename and a description about it's function.
Only the files prefixed with 'CVG' a shown, but the same suite of files is required for PVG and HCV vehicles if that data is included in your data feed.
E.g. if you subscribe to all three datasets (CVG, PVG & HCV), you will need CVG11xxx.N12, PVG11xxx.N12 & HCV11xxx.N12 and so on.

Required files

  • CVG11xxx.N12 — Required if client wants new vehicles and pricing Required (if neither CVG14xxx.N12 or CVG14xxx.U12 included)
  • CVG14xxx.N12 — Required if client wants new vehicles and no pricing Required (if neither CVG11xxx.N12 or CVG14xxx.U12 included)
  • CVG14xxx.U12 — Required if client wants all vehicles and no pricing Required (if neither CVG14xxx.N12 or CVG11xxx.N12 included)
  • CVG73xxx.GRN — CO2 Emission Data Pack. Glasses advise that this file is not available for Heavy Commercials (HCV73xxx.GRN) as they are not provided with CO2 data for these by any OEM. In this case, the values of these fields will be set to 0. Required
  • CVG78xxx.FUE — Fuel code long description Required
  • CVG78xxx.STR — Steering code long description Required
  • CVG83xxx.OCD — Optional equipment Required
  • CVG86xxx.SPE — Vehicle Specifications e.g. RELEASE, DISCON, DRV, TORQUE, KW etc Required
  • CVG87xxx.SPE — Vehicle Specifications e.g. VEHICLE SEGMENT, COUNTRY OF, ORIGIN, FUEL H/WAY, FUEL CITY etc Required
  • CVG89xxx.OPT — Standard equipment Required
  • CVG93xxx.SUS — Suspension Required
  • CVG99xxx.BDY — Body code long description Required
  • CVG99xxx.MAK — qt_makes Required
  • CVG11xxx.U12 — Optional - all vehicles and second-hand pricing Optional
  • CVG75xxx.SPE — Vehicle Specifications e.g. KWRPM, NMRPM, No. OF DOORS, GRD CLEARANCE etc Optional
  • CVG78xxx.SUS — not currently imported Optional