@shaggytools/nhtsa-api-wrapper - v3.0.4 / Exports / api/endpoints/GetModelsForMakeIdYear
Module: api/endpoints/GetModelsForMakeIdYear
Table of contents
Type Aliases
Functions
Type Aliases
GetModelsForMakeIdYearResults
Ƭ GetModelsForMakeIdYearResults: Object
Objects found in the Results
array of GetModelsForMakeIdYear
endpoint response.
Type declaration
Name | Type |
---|---|
Make_ID | number |
Make_Name | string |
Model_ID | number |
Model_Name | string |
Defined in
api/endpoints/GetModelsForMakeIdYear.ts:152
Functions
GetModelsForMakeIdYear
▸ GetModelsForMakeIdYear(params
, doFetch?
): Promise
<NhtsaResponse
<GetModelsForMakeIdYearResults
>>
💡 More Information
GetModelsForMakeIdYear
returns the Models in the vPIC dataset for a specified Model Year and Make whose name is LIKE the Make in the vPIC Dataset.
params.makeId
is an integer and is required.
A minimum of one of the following are also required (or a combination of both):
params.modelYear
year you want to search for (years >= 1995 are supported according to NHTSA docs)params.vehicleType
can be a partial name, or a full name for more specificity, e.g., "Vehicle", "Moto", "Low Speed Vehicle", etc.
You can get makeID
s via MAKE_ID
key in Results objects of the following endpoints:
GetAllMakes
endpointGetMakeForManufacturer
endpointGetModelsForMake
endpointGetModelsForMakeYear
endpoint
You can get makeID
s via MakeID
key in Results objects of the following endpoints:
DecodeVinValues
DecodeVinValuesBatch
You can get makeID
s via ValueId
key in Results objects of the following endpoints. One of the objects in the Results
array will contain both Variable: "Make"
and VariableId: 26
. The ValueId
key in that same object is the makeID
for use in this endpoint.
DecodeVin
DecodeVinExtended
NOTE: This endpoint requires special handling of the params object, such that none of the params are used in the query string and are instead used as part of the URL path for the endpoint. To account for this, we pass the params object to the createUrl
function as the path
, after encoding the params object key:values into a url path string.
Parameters
Name | Type | Description |
---|---|---|
params | Object | Object of Query Search names and values to append to the URL as a query string |
doFetch? | true | Whether to fetch the data or just return the URL (default: true ) |
Returns
Promise
<NhtsaResponse
<GetModelsForMakeIdYearResults
>>
- Api Response
object
-or- urlstring
ifdoFetch = false
Defined in
api/endpoints/GetModelsForMakeIdYear.ts:61
▸ GetModelsForMakeIdYear(params
, doFetch
): Promise
<string
>
Parameters
Name | Type |
---|---|
params | Object |
doFetch | false |
Returns
Promise
<string
>