US Department of Transportation safetyIssues API

Recalls, Investigations, Complaints, and Manufacturer Communications

OpenAPI Specification

dot-safetyissues-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: NHTSA childSeats safetyIssues API
  version: 1.6.0
  description: Child Seat search and list endpoints
tags:
- description: Recalls, Investigations, Complaints, and Manufacturer Communications
  name: safetyIssues
paths:
  /safetyIssues:
    get:
      consumes:
      - application/json
      parameters:
      - allowEmptyValue: false
        collectionFormat: csv
        description: The maximum number of records to return
        format: int32
        in: query
        name: max
        required: false
        type: integer
      - allowEmptyValue: false
        collectionFormat: csv
        description: The offset of the records set to return for pagination.
        format: int32
        in: query
        name: offset
        required: false
        type: integer
      produces:
      - application/json
      responses:
        '200':
          description: The list of safety issues
          schema:
            items:
              $ref: '#/definitions/SafetyIssue'
            title: ArrayOfSafetyIssues
            type: array
        '400':
          description: Invalid Request
        '500':
          description: Internal Server Error
      tags:
      - safetyIssues
  /safetyIssues/byDate:
    get:
      consumes:
      - application/json
      parameters:
      - allowEmptyValue: false
        collectionFormat: csv
        description: The start date to look up safetyIssues by.
        format: date
        in: query
        name: dateStart
        required: false
        type: string
      - allowEmptyValue: false
        collectionFormat: csv
        description: The end date to look up safetyIssues by.
        format: date
        in: query
        name: dateEnd
        required: false
        type: string
      - allowEmptyValue: false
        collectionFormat: csv
        description: 'The specified issue type only: ''recall'', ''investigation''.(defaults to recall)'
        format: ''
        in: query
        name: issueType
        required: false
        type: string
      - allowEmptyValue: false
        collectionFormat: csv
        description: The maximum number of records to return
        format: int32
        in: query
        name: max
        required: false
        type: integer
      - allowEmptyValue: false
        collectionFormat: csv
        description: The offset of the records listing (for pagination).
        format: int32
        in: query
        name: offset
        required: false
        type: integer
      produces:
      - application/json
      responses:
        '200':
          description: Paginated list of SafetyIssues from within the specified date range.
          schema:
            $ref: '#/definitions/SafetyIssueAggregateWrapped'
        '400':
          description: Invalid Request
        '500':
          description: Internal Server Error
      tags:
      - safetyIssues
  /safetyIssues/byKeywords:
    get:
      consumes:
      - application/json
      parameters:
      - allowEmptyValue: false
        collectionFormat: csv
        description: The keyword[s] to search descriptions for (Only applicable to 'complaint' type). Natural language (words, spaces) is allowed.
        format: ''
        in: query
        name: keywords
        required: true
        type: string
      - allowEmptyValue: false
        collectionFormat: csv
        description: match must have all keywords. true or false. defaults to true
        format: ''
        in: query
        name: allKeywords
        required: false
        type: boolean
      - allowEmptyValue: false
        collectionFormat: csv
        description: 'Valid inputs: [vehicle], [childSeat], [tireDetails], [equipment] without brackets. Choose which product type to limit the search to.'
        format: ''
        in: query
        name: productType
        required: false
        type: string
      - allowEmptyValue: false
        collectionFormat: csv
        description: Find only products made in the specified year or later
        format: int32
        in: query
        name: productYearStart
        required: false
        type: integer
      - allowEmptyValue: false
        collectionFormat: csv
        description: Find only products made in the specified year or before
        format: int32
        in: query
        name: productYearEnd
        required: false
        type: integer
      - allowEmptyValue: false
        collectionFormat: csv
        description: Restrict query to the specified make only
        format: ''
        in: query
        name: productMake
        required: false
        type: string
      - allowEmptyValue: false
        collectionFormat: csv
        description: Restrict query to the specified model only
        format: ''
        in: query
        name: productModel
        required: false
        type: string
      - allowEmptyValue: false
        collectionFormat: csv
        description: 'Valid inputs: [recall], [manufacturerCommunication], [complaint], [investigation] without brackets. Choose which issue type to limit the search to.'
        format: ''
        in: query
        name: issueType
        required: false
        type: string
      - allowEmptyValue: false
        collectionFormat: csv
        description: The maximum number of records to return
        format: int32
        in: query
        name: max
        required: false
        type: integer
      - allowEmptyValue: false
        collectionFormat: csv
        description: The offset of the records listing (for pagination).
        format: int32
        in: query
        name: offset
        required: false
        type: integer
      produces:
      - application/json
      responses:
        '200':
          description: A list of issues containing the key word[s] in their descriptions.
          schema:
            $ref: '#/definitions/SafetyIssueAggregateWrapped'
        '400':
          description: Invalid Request
        '500':
          description: Internal Server Error
      tags:
      - safetyIssues
  /safetyIssues/byNhtsaId:
    get:
      consumes:
      - application/json
      parameters:
      - allowEmptyValue: false
        collectionFormat: csv
        description: The nhtsa id to search for.
        format: int64
        in: query
        name: nhtsaId
        required: true
        type: string
      - allowEmptyValue: false
        collectionFormat: csv
        description: 'Filter the response by the specified field. Valid inputs: [issueType]'
        format: ''
        in: query
        name: filter
        required: false
        type: string
      - allowEmptyValue: false
        collectionFormat: csv
        description: 'The value to use as a filter. Valid inputs: [recalls,complaints,investigations,manufacturerCommunications]'
        format: ''
        in: query
        name: filterValue
        required: false
        type: string
      produces:
      - application/json
      responses:
        '200':
          description: List of SafetyIssues identified by the specified nhtsaId.
          schema:
            $ref: '#/definitions/SafetyIssueAggregateWrapped'
        '400':
          description: Invalid Request
        '500':
          description: Internal Server Error
      tags:
      - safetyIssues
definitions:
  SafetyIssueAggregateWrapped:
    properties:
      meta:
        $ref: '#/definitions/Meta'
      results:
        items:
          $ref: '#/definitions/SafetyIssueAggregate'
        type: array
    type: object
  Recalls:
    properties:
      nhtsaCampaignNumber:
        type: string
      subject:
        type: string
    type: object
  Meta:
    properties:
      messages:
        items:
          $ref: '#/definitions/Message'
        type: array
      pagination:
        items:
          $ref: '#/definitions/Pagination'
        type: array
      status:
        type: integer
    type: object
  Components:
    properties:
      name:
        type: string
    type: object
  Message:
    properties:
      errorCode:
        type: string
      errorDetail:
        type: string
      errorMessage:
        type: string
      userMessage:
        type: string
    type: object
  Pagination:
    properties:
      count:
        type: integer
      currentUrl:
        type: string
      max:
        type: integer
      nextUrl:
        type: string
      offset:
        type: integer
      order:
        type: string
      previousUrl:
        type: string
      sort:
        type: string
      total:
        type: integer
    type: object
  Investigations:
    properties:
      nhtsaActionNumber:
        type: string
      subject:
        type: string
    type: object
  MFRCommunicationAggregate:
    properties:
      communicationDate:
        type: string
      components:
        items:
          $ref: '#/definitions/Components'
        type: array
      manufacturerCommunicationNumber:
        type: string
      nhtsaIdNumber:
        type: string
      subject:
        type: string
      summary:
        type: string
    type: object
  SafetyIssue:
    properties:
      artemisId:
        format: int64
        type: integer
      createDate:
        format: date
        type: string
      description:
        type: string
      id:
        format: int64
        type: integer
      issueYear:
        type: string
      subject:
        type: string
      updateDate:
        format: date
        type: string
    type: object
  SafetyIssueAggregate:
    properties:
      complaints:
        items:
          $ref: '#/definitions/ComplaintAggregate'
        type: array
      investigation:
        items:
          $ref: '#/definitions/InvestigationAggregate'
        type: array
      manufacturerCommunications:
        items:
          $ref: '#/definitions/MFRCommunicationAggregate'
        type: array
      recalls:
        items:
          $ref: '#/definitions/RecallAggregate'
        type: array
    type: object
  ComplaintAggregate:
    properties:
      city:
        type: string
      components:
        items:
          $ref: '#/definitions/Components'
        type: array
      crash:
        type: integer
      dateFiled:
        type: string
      dateOfIncident:
        type: string
      description:
        type: string
      fire:
        type: integer
      nhtsaIdNumber:
        type: string
      numberOfDeaths:
        type: integer
      numberOfInjuries:
        type: integer
      stateAbbreviation:
        type: string
      vin:
        type: string
    type: object
  InvestigationAggregate:
    properties:
      components:
        items:
          $ref: '#/definitions/Components'
        type: array
      dateClosed:
        type: string
      dateOpened:
        type: string
      nhtsaCampaignNumber:
        type: string
      recalls:
        items:
          $ref: '#/definitions/Recalls'
        type: array
      subject:
        type: string
      summary:
        type: string
      type:
        type: string
    type: object
  RecallAggregate:
    properties:
      components:
        items:
          $ref: '#/definitions/Components'
        type: array
      consequence:
        type: string
      correctiveAction:
        type: string
      investigations:
        items:
          $ref: '#/definitions/Investigations'
        type: array
      manufacturer:
        type: string
      nhtsaCampaignNumber:
        type: integer
      notes:
        type: string
      potentialNumberOfUnitsAffected:
        type: string
      reportsReceivedDate:
        type: string
      subject:
        type: string
      summary:
        type: string
    type: object