Retrieve trip inspections
Retrieves a list of trip inspections with optional filtering and pagination metadata
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
Number of trip inspections to return (1-50)
Deprecated. Use cursorId instead. Offset-based page number (0 or greater); page * limit must not exceed 500.
Object id from meta.nextCursor of the previous response. Returns the next page after this id (exclusive).
Filter by vehicle unit ID (spaces should be URL encoded as %20 or +)
Filter by driver ID
Filter by inspection date (start) in milliseconds since epoch
Filter by inspection date (end) in milliseconds since epoch
Sort order for dateTime. Options: "asc" (ascending) or "desc" (descending). Defaults to "desc".
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.