Skip to main content
Quote / Variants

getVariantModels

getVariantModels

Overview

This method will list the models and its detail.

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)

Field

Format

Notes

Default Value

Mandatory

make_id

string

Make id.

No

model_code

string

Model code.

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

No

make_type

string

Make type

No

data_source_id

string

Data source id

No

profile_required_flag

string

If yes, display makes only for qt_variants with 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 are required in the list. When no, items are returned when both the qt_makes record and linked qt_variants records have an active status

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/models?model_code=Falc%25&profile_required_flag=no&include_inactive_flag=no&page=1&page_size=25 

(Successful) Output Example

{ "_links": { "self": { "href": "https://api.test.catch-e.com/qt/models/?model_code=Falc%25&profile_required_flag=no&include_inactive_flag=no&page=1&page_size=25" }, "first": { "href": "https://api.test.catch-e.com/qt/models/?model_code=Falc%25&profile_required_flag=no&include_inactive_flag=no&page_size=25" }, "last": { "href": "https://api.test.catch-e.com/qt/models/?model_code=Falc%25&profile_required_flag=no&include_inactive_flag=no&page=1&page_size=25" } }, "_embedded": { "qt_models": [ { "model_id": 100009, "make_id": 100014, "model_code": "FALCON", "description": "Falcon", "data_source_id": 100001, "status_flag": "active", "_links": { "self": { "href": "https://api.test.catch-e.com/qt/models/100009" } } } ] }, "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"}

data_source_id passed needs to be integer.

"detail": "Failed Validation"

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

make_id passed needs to be integer.

"detail": "Failed Validation"

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

model_code length should be greater than one character.