Trip Inspection

Create a trip inspection

Creates a new trip inspection. Accepts driverId, vehicleUnitId, and optional trailer unit IDs instead of nested objects.

post/v2/tripInspections

Request

  • Base URL: https://api.onswitchboard.com
  • URL: https://api.onswitchboard.com/v2/tripInspections
  • Auth: API key in header x-api-id and API key in header x-api-key

Request body

type1 | 2 | 3 required

Type of inspection: 1 = Pre-trip, 2 = Post-trip, 3 = CTPAT

dateTimestring date-time required

Date and time when the inspection was performed

driverIdstring required

Driver objectId who performed the inspection

vehicleUnitIdstring required

Vehicle unit ID being inspected

trailerFirstUnitIdstring

First trailer unit ID (optional)

trailerSecondUnitIdstring

Second trailer unit ID (optional)

notesstring

Additional notes about the inspection

Example request

{
  "type": 1,
  "dateTime": "2023-01-15T10:30:00Z",
  "driverId": "H4JiiZRggX",
  "vehicleUnitId": "jocar",
  "trailerFirstUnitId": "jotrailer",
  "trailerSecondUnitId": "202",
  "notes": "Inspection completed successfully"
}

Response

Successfully performed operation

idstring

Unique identifier for the trip inspection record

type1 | 2 | 3 required

Type of inspection: 1 = Pre-trip, 2 = Post-trip, 3 = CTPAT

dateTimestring date-time required

Date and time when the inspection was performed

notesstring

Additional notes about the inspection

Example response

{
  "id": "2ntvSpRGIK",
  "type": 1,
  "dateTime": "2023-01-15T10:30:00Z",
  "driver": {
    "id": "abc123",
    "name": "John Doe"
  },
  "vehicle": {
    "id": "veh123",
    "unitId": "101"
  },
  "trailerFirst": {
    "id": "trail123",
    "unitId": "201"
  },
  "trailerSecond": {
    "id": "trail456",
    "unitId": "202"
  },
  "defects": [
    {
      "typeDescription": "Brake system defect",
      "equipment": "vehicle",
      "severity": 1,
      "description": "Brake pads need replacement",
      "fixedNotes": "Replaced brake pads",
      "vehicleUnitId": "101"
    }
  ],
  "notes": "Inspection completed successfully"
}

Changes

No recorded changes to this operation across all 1 revision of this API.