Skip to content
On this page

@shaggytools/nhtsa-api-wrapper - v3.0.4 / Exports / api/endpoints/GetEquipmentPlantCodes

Module: api/endpoints/GetEquipmentPlantCodes ​

Table of contents ​

Type Aliases ​

Functions ​

Type Aliases ​

GetEquipmentPlantCodesParams ​

Ƭ GetEquipmentPlantCodesParams: Object

Query String Parameters for this endpoint

Type declaration ​

NameType
equipmentType"1" | "3" | "13" | "16" | 1 | 3 | 13 | 16
reportType"New" | "Updated" | "Closed" | "All" | "new" | "updated" | "closed" | "all"
yearstring | number

Defined in ​

api/endpoints/GetEquipmentPlantCodes.ts:105


GetEquipmentPlantCodesResults ​

Ƭ GetEquipmentPlantCodesResults: Object

Objects found in the Results array of GetEquipmentPlantCodes endpoint response.

Type declaration ​

NameType
Addressstring | null
Citystring | null
Countrystring
DOTCodestring
Namestring
OldDotCodestring
PostalCodestring | null
StateProvincestring | null
Statusstring | null

Defined in ​

api/endpoints/GetEquipmentPlantCodes.ts:122

Functions ​

GetEquipmentPlantCodes ​

▸ GetEquipmentPlantCodes(params, doFetch?): Promise<NhtsaResponse<GetEquipmentPlantCodesResults>>

💡 More Information

See: GetEquipmentPlantCodes Documentation

GetEquipmentPlantCodes returns assigned Equipment Plant Codes. Can be filtered by Year, Equipment Type and Report Type.

ALL parameters are required and endpoint will return 404 if there are any undefined keys and/or values in the query string.

params.equipmentType:

  • 1 (Tires)
  • 3 (Brake Hoses)
  • 13 (Glazing)
  • 16 (Retread)

params.reportType:

  • 'New' (The Equipment Plant Code was assigned during the selected year)
  • 'Updated' (The Equipment Plant data was modified during the selected year)
  • 'Closed' (The Equipment Plant is no longer Active)
  • 'All' (All Equipment Plant Codes regardless of year, including their status (active or closed))

params.year:

  • year >= 2016
  • NOTE: It seems API will still respond with years < 2016 but api docs state only years >= 2016 are supported

Parameters ​

NameTypeDescription
paramsGetEquipmentPlantCodesParamsObject of Query Search names and values to append to the URL as a query string
doFetch?trueWhether to fetch the data or just return the URL (default: true)

Returns ​

Promise<NhtsaResponse<GetEquipmentPlantCodesResults>>

  • Api Response object -or- url string if doFetch = false

Defined in ​

api/endpoints/GetEquipmentPlantCodes.ts:47

▸ GetEquipmentPlantCodes(params, doFetch): Promise<string>

Parameters ​

NameType
paramsGetEquipmentPlantCodesParams
doFetchfalse

Returns ​

Promise<string>

Defined in ​

api/endpoints/GetEquipmentPlantCodes.ts:52

Released under the MIT License.