Trip Inspection

Retrieve trip inspections

Retrieves a list of trip inspections with optional filtering and pagination metadata

get/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

Query parameters

limitinteger

Number of trip inspections to return (1-50)

pagestring

Deprecated. Use cursorId instead. Offset-based page number (0 or greater); page * limit must not exceed 500.

cursorIdstring

Object id from meta.nextCursor of the previous response. Returns the next page after this id (exclusive).

vehicleUnitIdstring

Filter by vehicle unit ID (spaces should be URL encoded as %20 or +)

driverIdstring

Filter by driver ID

startmillisinteger

Filter by inspection date (start) in milliseconds since epoch

endmillisinteger

Filter by inspection date (end) in milliseconds since epoch

sort'asc' | 'desc'

Sort order for dateTime. Options: "asc" (ascending) or "desc" (descending). Defaults to "desc".

debug'true' | 'false'

Enable debug logging for development

Response

Trip inspections retrieved successfully

Example response

{
  "data": [
    {
      "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"
    }
  ],
  "meta": {
    "count": 25,
    "limit": 25,
    "hasMore": true,
    "nextCursor": "abc123XYZ0",
    "previousCursor": "abc123XYZ0",
    "warning": "The \"cursor\" query parameter is deprecated; use \"cursorId\" instead."
  }
}

Changes

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