Skip to content
On this page

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

Module: api/endpoints/GetParts

Table of contents

Type Aliases

Functions

Type Aliases

GetPartsResults

Ƭ GetPartsResults: Object

Objects found in the Results array of GetParts endpoint response.

Type declaration

NameType
CoverLetterURLstring
LetterDatestring
ManufacturerIdnumber
ManufacturerNamestring
ModelYearFromnumber | null
ModelYearTonumber | null
Namestring
Typestring
URLstring

Defined in

api/endpoints/GetParts.ts:143

Functions

GetParts

GetParts(doFetch?, _dummy?): Promise<NhtsaResponse<GetPartsResults>>

💡 More Information

See: GetParts Documentation

GetParts provides a list of ORGs with letter date in the given range of the dates and with specified Type (params.type) of ORG.

  • Up to 1000 results will be returned at a time.
  • Get the next page by incrementing the params.page query parameter.

All query params are optional.

params.manufacturer:

  • (optional) if supplied value is a number - method will do exact match on Manufacturer's Id
  • if supplied value is a string - it will look for manufacturers whose name is LIKE the provided name
  • it accepts a partial manufacturer name as an input
  • multiple results are returned in case of multiple matches
  • manufacturer name can be a partial name, or a full name for more specificity, e.g., "988", "HONDA", "HONDA OF CANADA MFG., INC.", etc.

params.type:

  • (optional) number, 565 (Vehicle Identification Number Guidance, based on 49 CFR Part 565) or 566 (Manufacturer Identification – Reporting Requirements based on 49 CFR Part 566)

params.fromDate:

  • (optional) ORG's Letter Date should be on or after this date

params.toDate:

  • (optional) ORG's Letter Date should be on or before this date

params.page:

  • (optional) number, 1 (default) first 1000 records, 2 - next 1000 records, etc

Parameters

NameTypeDescription
doFetch?trueWhether to fetch the data or just return the URL (default: true)
_dummy?undefined-

Returns

Promise<NhtsaResponse<GetPartsResults>>

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

Defined in

api/endpoints/GetParts.ts:60

GetParts(doFetch?, _dummy?): Promise<string>

Parameters

NameType
doFetch?false
_dummy?undefined

Returns

Promise<string>

Defined in

api/endpoints/GetParts.ts:65

GetParts(params, doFetch): Promise<string>

Parameters

NameType
paramsObject
params.fromDate?string
params.manufacturer?string | number
params.page?string | number
params.toDate?string
params.type?565 | 566
doFetchfalse

Returns

Promise<string>

Defined in

api/endpoints/GetParts.ts:67

GetParts(params?, doFetch?): Promise<NhtsaResponse<GetPartsResults>>

Parameters

NameType
params?Object
params.fromDate?string
params.manufacturer?string | number
params.page?string | number
params.toDate?string
params.type?565 | 566
doFetch?true

Returns

Promise<NhtsaResponse<GetPartsResults>>

Defined in

api/endpoints/GetParts.ts:78

Released under the MIT License.