Revvo Vehicle API

The Vehicle API

OpenAPI Specification

revvo-vehicle-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: revvo-api Api-keys Vehicle API
  version: '0.0'
  description: Api key management (requires admin access)
tags:
- name: Vehicle
  description: The Vehicle API
paths:
  /fleet/{fleetId}/vehicle:
    put:
      tags:
      - Vehicle
      summary: Update an existing vehicle
      description: Update an existing vehicle
      operationId: updateVehicle
      parameters:
      - name: fleetId
        in: path
        description: Unique identifier for the fleet. Typically formatted as revvo-XXXX. This can be found in your admin / integrations / revvo API setup page
        required: true
        schema:
          type: string
      requestBody:
        description: Vehicle to update with details
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVehicleBody'
      responses:
        '200':
          description: Vehicle updated successfully
          content:
            application/json:
              schema:
                type: object
        '404':
          description: Vehicle not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetVehicle404Response'
        '401':
          description: Unauthorized
      security:
      - Bearer: []
      - bearerAuth: []
    post:
      tags:
      - Vehicle
      summary: Create new vehicle
      description: Create new vehicle
      operationId: vehicle
      parameters:
      - name: fleetId
        in: path
        description: Unique identifier for the fleet. Typically formatted as revvo-XXXX. This can be found in your admin / integrations / revvo API setup page
        required: true
        schema:
          type: string
      requestBody:
        description: Vehicle details to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVehicleBody'
      responses:
        '201':
          description: Created vehicle
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateVehicle201Response'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateVehicle400Response'
        '401':
          description: Unauthorized
      security:
      - Bearer: []
      - bearerAuth: []
  /fleet/{fleetId}/vehicle/{vin}:
    get:
      tags:
      - Vehicle
      summary: Get details of a specific vehicle
      description: Get details of a specific vehicle
      operationId: getVehicle
      parameters:
      - name: fleetId
        in: path
        description: Unique identifier for the fleet. Typically formatted as revvo-XXXX. This can be found in your admin / integrations / revvo API setup page
        required: true
        schema:
          type: string
      - name: vin
        in: path
        description: Vehicle identification number
        required: true
        schema:
          type: string
      responses:
        '200':
          description: A successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetVehicle200Response'
        '404':
          description: Vehicle not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetVehicle404Response'
        '401':
          description: Unauthorized
      security:
      - Bearer: []
      - bearerAuth: []
components:
  schemas:
    GetVehicle404Response:
      type: object
      properties:
        displayErrorMessage:
          type: string
          example: Unexpected error found
        internalErrorCode:
          $ref: '#/components/schemas/InternalErrorCode'
        success:
          type: boolean
          description: 'false'
          nullable: true
          example: false
      description: GetVehicle404Response
    AxleTypeApiModel:
      type: string
      enum:
      - STEER
      - DRIVE
      - TRAILER
      - RAISED
      - DEAD
    displayType:
      type: string
      description: Vehicle Display Type
      example: TRACTOR_2_4
      enum:
      - CAR
      - VAN
      - TRUCK
      - SUV
      - CARGO_VAN
      - LOADER
      - TRACTOR
      - TRACTOR_2_2
      - TRACTOR_2_4
      - TRACTOR_2_2_2
      - TRAILER
      - TANKER
      - DRY_VAN
      - REEFER
      - CONTAINER
      - BUS
      - REFUSE_TRUCK
      - FRONT_LOADER_WASTE_TRUCK
      - SIDE_LOADER_WASTE_TRUCK
      - BOX_TRUCK
      - BOX_TRUCK_BLUE
      - AMBULANCE
      - FIRE_TRUCK
      - VAN_BLUE
      - DUMP_TRUCK
    geolocation:
      type: object
      properties:
        timestamp:
          type: integer
          description: Timestamp in epoch seconds
          format: int64
          nullable: true
          example: 1577836800
        latitude:
          type: number
          description: Latitude
          nullable: true
          example: 37.5550874
        longitude:
          type: number
          description: Longitude
          nullable: true
          example: -122.3000345
      description: Geolocation
    CreateVehicle201Response:
      required:
      - value
      type: object
      properties:
        value:
          type: string
          description: Get value
        success:
          type: boolean
          description: 'true'
          example: true
      description: CreateVehicle201Response
    CreateVehicleBody:
      required:
      - assetId
      - template
      type: object
      properties:
        vin:
          type: string
          description: VIN
          nullable: true
          example: WVGBV75N19W507096
        assetId:
          type: string
          description: Vehicle asset identifier
          nullable: true
          example: Vehicle 1
        template:
          description: Template details of the vehicle
          allOf:
          - $ref: '#/components/schemas/template'
      description: CreateVehicleBody
    template:
      required:
      - axleDetails
      - displayType
      - driveType
      - fuelType
      - gatewayLocation
      - make
      - model
      - tireCountByAxle
      - year
      type: object
      properties:
        tireCountByAxle:
          type: array
          description: Number of tires per axle in order
          example:
          - 2
          - 4
          items:
            type: integer
            format: int32
        axleDetails:
          type: array
          description: List of all detailed axle specifications
          items:
            $ref: '#/components/schemas/VehicleAxleDetails'
        make:
          type: string
          description: Vehicle Manufacturer
          example: Volvo
        model:
          type: string
          description: Vehicle Model
          example: VNL
        year:
          type: string
          description: Vehicle Manufacturing Year
          example: '2024'
        series:
          type: string
          description: Vehicle Series
          nullable: true
          example: XC20
        driveType:
          type: string
          description: Drive Type
          example: 6x4
        displayType:
          description: Vehicle Display Type
          example: TRACTOR_2_4
          allOf:
          - $ref: '#/components/schemas/displayType'
        fuelType:
          description: Vehicle Fuel Type
          example: GASOLINE
          allOf:
          - $ref: '#/components/schemas/fuelType'
        gatewayLocation:
          description: Gateway Installation Locaton
          nullable: true
          example: TRUCK_FRONT_LEFT_UNDER_DASHBOARD
          allOf:
          - $ref: '#/components/schemas/gatewayLocation'
        gvwr:
          type: number
          description: Gross Vehicle Weight Rating in Pounds
          format: double
          nullable: true
          example: 9000
        overloadInLbs:
          type: number
          description: Gross Vehicle Weight Rating in Pounds
          format: double
          nullable: true
          example: 9000
      description: Template details of the vehicle
    value:
      type: object
      properties:
        vin:
          type: string
          description: VIN
          nullable: true
          example: WVGBV75N19W507096
        assetId:
          type: string
          description: Vehicle asset identifier
          nullable: true
          example: Vehicle 1
        geolocation:
          description: Get geolocation
          nullable: true
          allOf:
          - $ref: '#/components/schemas/geolocation'
        tires:
          type: array
          description: Get tires
          nullable: true
          items:
            $ref: '#/components/schemas/TireStatusListInner'
      description: VehicleStatus
    fuelType:
      type: string
      description: Vehicle Fuel Type
      example: GASOLINE
      enum:
      - CNG
      - DIESEL
      - ELECTRIC
      - ETHANOL
      - HYDROGEN
      - GASOLINE
      - NATURAL_GAS
      - PROPANE
      - NONE
    TireStatusListInner:
      type: object
      properties:
        timestamp:
          type: integer
          description: Timestamp in epoch seconds
          format: int64
          nullable: true
          example: 1577836800
        tirePosition:
          description: Get tirePosition
          nullable: true
          allOf:
          - $ref: '#/components/schemas/tirePosition_1'
        sensorId:
          type: string
          description: Get sensorId
          nullable: true
        pressure:
          type: number
          description: Pressure in PSI
          nullable: true
          example: 31.5
        temperature:
          type: number
          description: Temperature in Celsius
          nullable: true
          example: 27.2
        treadClass:
          description: Get treadClass
          nullable: true
          allOf:
          - $ref: '#/components/schemas/treadClass'
        treadInMm:
          type: number
          format: double
          nullable: true
        tireTotalKm:
          type: number
          format: double
          nullable: true
        openEvents:
          type: array
          description: Get openEvents
          nullable: true
          items:
            $ref: '#/components/schemas/EventListInner'
        resolvedEvents:
          type: array
          description: Get resolvedEvents
          nullable: true
          items:
            $ref: '#/components/schemas/EventListInner'
      description: TireStatusListInner
    gatewayLocation:
      type: string
      description: Location of the gateway installation
      example: TRUCK_FRONT_LEFT_UNDER_DASHBOARD
      enum:
      - TRUCK_FRONT_LEFT_UNDER_DASHBOARD
      - TRUCK_FRONT_CENTER_UNDER_DASHBOARD
      - TRUCK_FRONT_RIGHT_UNDER_DASHBOARD
      - TRUCK_FRONT_LEFT_BEHIND_DRIVER_SEAT
      - TRUCK_FRONT_RIGHT_BEHIND_DRIVER_SEAT
      - CAR_FRONT_LEFT_OBD2
      - CAR_FRONT_CENTER_OBD2
      - CAR_FRONT_RIGHT_OBD2
      - CAR_REAR_LEFT_TRUNK
      - CAR_REAR_CENTER_TRUNK
      - CAR_REAR_RIGHT_TRUNK
      - TRAILER_FRONT_LEFT_TOP
      - TRAILER_FRONT_CENTER_TOP
      - TRAILER_FRONT_RIGHT_TOP
      - TRAILER_REAR_LEFT_TOP
      - TRAILER_REAR_CENTER_TOP
      - TRAILER_REAR_RIGHT_TOP
      - TRAILER_MIDDLE_LEFT_UNDERSIDE
      - TRAILER_MIDDLE_CENTER_UNDERSIDE
      - TRAILER_MIDDLE_RIGHT_UNDERSIDE
      - TRAILER_REAR_LEFT_UNDERSIDE
      - TRAILER_REAR_CENTER_UNDERSIDE
      - TRAILER_REAR_RIGHT_UNDERSIDE
      - TRUCK_LEFT_SLEEPER_BERTH
      - TRUCK_CENTER_SLEEPER_BERTH
      - TRUCK_RIGHT_SLEEPER_BERTH
    InternalErrorCode:
      type: string
      description: Internal Error Code
      enum:
      - _1
      - _2
      - _3
      - _4
      x-type: String
    EventListInner:
      type: object
      properties:
        vin:
          type: string
          description: VIN
          nullable: true
          example: WVGBV75N19W507096
        tirePosition:
          nullable: true
          allOf:
          - $ref: '#/components/schemas/tirePosition_1'
        eventTime:
          type: integer
          description: Timestamp in epoch seconds
          format: int64
          nullable: true
          example: 1577836800
        type:
          description: Get type
          nullable: true
          allOf:
          - $ref: '#/components/schemas/type'
        resolutionTime:
          type: integer
          description: Timestamp in epoch seconds or null if the event is not resolved
          format: int64
          nullable: true
          example: 1577836800
      description: EventListInner
    CreateVehicle400Response:
      type: object
      properties:
        displayErrorMessage:
          type: string
          example: Unexpected error found
        internalErrorCode:
          $ref: '#/components/schemas/InternalErrorCode'
        success:
          type: boolean
          description: 'false'
          nullable: true
          example: false
      description: CreateVehicle400Response
    GetVehicle200Response:
      type: object
      properties:
        value:
          description: Get value
          nullable: true
          allOf:
          - $ref: '#/components/schemas/value'
        success:
          type: boolean
          description: 'true'
          example: true
      description: GetVehicle200Response
    VehicleAxleDetails:
      required:
      - axleTypes
      - critHighPressurePercent
      - critLowPressurePercent
      - critLowTreadIn32nds
      - highPressurePercent
      - highTreadIn32nds
      - lowPressurePercent
      - lowTreadIn32nds
      - rcip
      - tireTemplate
      type: object
      properties:
        axleNumber:
          type: integer
          description: Axle number by canonical count. 1, 2, 3, and so on. Required except for super single axle.
          format: int32
          nullable: true
          example: 1
        isSuperSingle:
          type: boolean
          description: Super Single Axle Details. Can be applied to any axle number. axleNumber can be null.
          nullable: true
          example: true
        axleTypes:
          type: array
          description: Axle type
          example:
          - RAISED
          items:
            $ref: '#/components/schemas/AxleTypeApiModel'
        critLowPressurePercent:
          type: number
          description: '% of RCIP for Critical Low Pressure Event'
          format: double
          example: 0.8
        lowPressurePercent:
          type: number
          description: '% of RCIP for Low Pressure Event'
          format: double
          example: 0.9
        rcip:
          type: number
          description: Recommended cold inflation pressure in PSI
          format: double
          example: 100
        highPressurePercent:
          type: number
          description: '% of RCIP for High Pressure Event'
          format: double
          example: 1.25
        critHighPressurePercent:
          type: number
          description: '% of RCIP for Ciritcal High Pressure Event'
          format: double
          example: 1.35
        critLowTreadIn32nds:
          type: number
          description: Threshold for Critical Low Tread Event in 32nds
          format: double
          example: 3
        lowTreadIn32nds:
          type: number
          description: Threshold for Low Tread Event in 32nds
          format: double
          example: 5
        highTreadIn32nds:
          type: number
          description: High Tread Classification Threshold in 32nds
          format: double
          example: 10
        gawr:
          type: number
          description: Gross Axle Weight Rating in Pounds
          format: double
          nullable: true
          example: 4000
        overloadInLbs:
          type: number
          description: Axle Overload Event Threshold in Pounds
          format: double
          nullable: true
          example: 8500
        tireTemplate:
          description: Tire details for axle
          allOf:
          - $ref: '#/components/schemas/tireTemplate'
      description: VehicleAxleDetails
    tireTemplate:
      required:
      - maxColdInflationPressureInPsi
      - maxTreadDepth32nds
      - tireBrand
      - tireModel
      - tireSizeCode
      type: object
      properties:
        tireBrand:
          type: string
          description: Tire Brand
          example: Hankook
        tireModel:
          type: string
          description: Tire Model
          example: Dynapro AT2 Xtreme RF12
        tireSizeCode:
          type: string
          description: Tire Size Code
          example: 215/65Rr17
        maxColdInflationPressureInPsi:
          type: number
          description: Max cold inflation pressure for tire
          format: double
          example: 120
        maxTreadDepth32nds:
          type: number
          description: Tread depth in 32nds from factory
          format: double
          example: 18
      description: Tire template to replace the tire with
    tirePosition_1:
      type: string
      description: 'Tire position on the vehicle: \[SIDE\]_\[AXLE_NUMBER\] with an optional _\[INNER/OUTER\] suffix, plus SPARE_\[N\].'
      enum:
      - LEFT_1
      - LEFT_1_INNER
      - LEFT_1_OUTER
      - RIGHT_1
      - RIGHT_1_INNER
      - RIGHT_1_OUTER
      - LEFT_2
      - LEFT_2_INNER
      - LEFT_2_OUTER
      - RIGHT_2
      - RIGHT_2_INNER
      - RIGHT_2_OUTER
      - LEFT_3
      - LEFT_3_INNER
      - LEFT_3_OUTER
      - RIGHT_3
      - RIGHT_3_INNER
      - RIGHT_3_OUTER
      - LEFT_4
      - LEFT_4_INNER
      - LEFT_4_OUTER
      - RIGHT_4
      - RIGHT_4_INNER
      - RIGHT_4_OUTER
      - LEFT_5
      - LEFT_5_INNER
      - LEFT_5_OUTER
      - RIGHT_5
      - RIGHT_5_INNER
      - RIGHT_5_OUTER
      - LEFT_6
      - LEFT_6_INNER
      - LEFT_6_OUTER
      - RIGHT_6
      - RIGHT_6_INNER
      - RIGHT_6_OUTER
      - LEFT_7
      - LEFT_7_INNER
      - LEFT_7_OUTER
      - RIGHT_7
      - RIGHT_7_INNER
      - RIGHT_7_OUTER
      - LEFT_8
      - LEFT_8_INNER
      - LEFT_8_OUTER
      - RIGHT_8
      - RIGHT_8_INNER
      - RIGHT_8_OUTER
      - LEFT_9
      - LEFT_9_INNER
      - LEFT_9_OUTER
      - RIGHT_9
      - RIGHT_9_INNER
      - RIGHT_9_OUTER
      - LEFT_10
      - LEFT_10_INNER
      - LEFT_10_OUTER
      - RIGHT_10
      - RIGHT_10_INNER
      - RIGHT_10_OUTER
      - LEFT_11
      - LEFT_11_INNER
      - LEFT_11_OUTER
      - RIGHT_11
      - RIGHT_11_INNER
      - RIGHT_11_OUTER
      - LEFT_12
      - LEFT_12_INNER
      - LEFT_12_OUTER
      - RIGHT_12
      - RIGHT_12_INNER
      - RIGHT_12_OUTER
      - SPARE_1
      - SPARE_2
      - SPARE_3
      - SPARE_4
      - SPARE_5
      - SPARE_6
      - LEFT_1_OUTER_OUTER
      - LEFT_1_OUTER_INNER
      - LEFT_1_INNER_OUTER
      - LEFT_1_INNER_INNER
      - RIGHT_1_OUTER_OUTER
      - RIGHT_1_OUTER_INNER
      - RIGHT_1_INNER_OUTER
      - RIGHT_1_INNER_INNER
      - LEFT_2_OUTER_OUTER
      - LEFT_2_OUTER_INNER
      - LEFT_2_INNER_OUTER
      - LEFT_2_INNER_INNER
      - RIGHT_2_OUTER_OUTER
      - RIGHT_2_OUTER_INNER
      - RIGHT_2_INNER_OUTER
      - RIGHT_2_INNER_INNER
      - LEFT_3_OUTER_OUTER
      - LEFT_3_OUTER_INNER
      - LEFT_3_INNER_OUTER
      - LEFT_3_INNER_INNER
      - RIGHT_3_OUTER_OUTER
      - RIGHT_3_OUTER_INNER
      - RIGHT_3_INNER_OUTER
      - RIGHT_3_INNER_INNER
      - LEFT_4_OUTER_OUTER
      - LEFT_4_OUTER_INNER
      - LEFT_4_INNER_OUTER
      - LEFT_4_INNER_INNER
      - RIGHT_4_OUTER_OUTER
      - RIGHT_4_OUTER_INNER
      - RIGHT_4_INNER_OUTER
      - RIGHT_4_INNER_INNER
      - LEFT_5_OUTER_OUTER
      - LEFT_5_OUTER_INNER
      - LEFT_5_INNER_OUTER
      - LEFT_5_INNER_INNER
      - RIGHT_5_OUTER_OUTER
      - RIGHT_5_OUTER_INNER
      - RIGHT_5_INNER_OUTER
      - RIGHT_5_INNER_INNER
      - LEFT_6_OUTER_OUTER
      - LEFT_6_OUTER_INNER
      - LEFT_6_INNER_OUTER
      - LEFT_6_INNER_INNER
      - RIGHT_6_OUTER_OUTER
      - RIGHT_6_OUTER_INNER
      - RIGHT_6_INNER_OUTER
      - RIGHT_6_INNER_INNER
      - LEFT_7_OUTER_OUTER
      - LEFT_7_OUTER_INNER
      - LEFT_7_INNER_OUTER
      - LEFT_7_INNER_INNER
      - RIGHT_7_OUTER_OUTER
      - RIGHT_7_OUTER_INNER
      - RIGHT_7_INNER_OUTER
      - RIGHT_7_INNER_INNER
      - LEFT_8_OUTER_OUTER
      - LEFT_8_OUTER_INNER
      - LEFT_8_INNER_OUTER
      - LEFT_8_INNER_INNER
      - RIGHT_8_OUTER_OUTER
      - RIGHT_8_OUTER_INNER
      - RIGHT_8_INNER_OUTER
      - RIGHT_8_INNER_INNER
      - LEFT_9_OUTER_OUTER
      - LEFT_9_OUTER_INNER
      - LEFT_9_INNER_OUTER
      - LEFT_9_INNER_INNER
      - RIGHT_9_OUTER_OUTER
      - RIGHT_9_OUTER_INNER
      - RIGHT_9_INNER_OUTER
      - RIGHT_9_INNER_INNER
      - LEFT_10_OUTER_OUTER
      - LEFT_10_OUTER_INNER
      - LEFT_10_INNER_OUTER
      - LEFT_10_INNER_INNER
      - RIGHT_10_OUTER_OUTER
      - RIGHT_10_OUTER_INNER
      - RIGHT_10_INNER_OUTER
      - RIGHT_10_INNER_INNER
      - LEFT_11_OUTER_OUTER
      - LEFT_11_OUTER_INNER
      - LEFT_11_INNER_OUTER
      - LEFT_11_INNER_INNER
      - RIGHT_11_OUTER_OUTER
      - RIGHT_11_OUTER_INNER
      - RIGHT_11_INNER_OUTER
      - RIGHT_11_INNER_INNER
      - LEFT_12_OUTER_OUTER
      - LEFT_12_OUTER_INNER
      - LEFT_12_INNER_OUTER
      - LEFT_12_INNER_INNER
      - RIGHT_12_OUTER_OUTER
      - RIGHT_12_OUTER_INNER
      - RIGHT_12_INNER_OUTER
      - RIGHT_12_INNER_INNER
      x-type: String
    type:
      type: string
      description: Event type
      enum:
      - LOW_PRESSURE
      - CRITICAL_LOW_PRESSURE
      - LOW_PRESSURE_IN_MOTION
      - CRITICAL_LOW_PRESSURE_IN_MOTION
      - LOW_TREAD
      - CRITICAL_LOW_TREAD
      - LOW_PRESSURE_FROM_TEMP
      - INVALID_SENSOR_DATA
      - DEFLATED
      - LEAK
      - HIGH_TEMPERATURE
      - HIGH_PRESSURE
      - SUSPECTED_SERVICE_FROM_DEFLATION
      - SUSPECTED_TIRE_ROTATION
      x-type: String
    treadClass:
      type: string
      description: Tread class
      enum:
      - CRITICAL_LOW
      - LOW
      - MEDIUM
      - HIGH
      - UNKNOWN
      x-type: String
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT