### Query Drivers API Request Example Source: https://docs.truckerpath.com/navpro.html Example of a cURL request to the /api/driver/query endpoint. Includes parameters for pagination, driver IDs, status, and date filters. Ensure to replace YOUR_SECRET_TOKEN with your actual authorization token. ```shell curl https://api.truckerpath.com/navpro/api/driver/query \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \ --data '{ \ "page": 0, \ "size": 20, \ "driver_ids": [ \ 36711, \ 87741 \ ], \ "driver_status": "ACTIVE", \ "driver_updated_after_time": "2023-05-20", \ "driver_created_after_time": "2023-05-05" \ }' ``` -------------------------------- ### Query Drivers API Response Example Source: https://docs.truckerpath.com/navpro.html Example JSON response for a successful query of driver data. It includes pagination details, total count, and a list of driver objects, each containing basic info, location, activities, loads, contact, and license details. ```json { "total": 1000, "page": 0, "data": [ { "driver_id": 12154, "basic_info": { "driver_first_name": "John", "driver_last_name": "Doe", "carrier": "Big Fleet Co.", "work_status": "IN_TRANSIT", "terminal": "Terminal A", "driver_type": "OWNER_OPERATOR_OO", "driver_phone_number": "111-222-3333", "driver_email": "johndoe@driver.com" }, "driver_location": { "last_known_location": "S Martin L King Blvd, Las Vegas, NV", "latest_update": 1681440338089, "timezone": "PDT" }, "driver_activities": [ { "time": 1681401600000, "activities": [ "John Doe joined Big Fleet Co." ] } ], "loads": { "driver_assign_loads": [ { "load_id": 9964255, "load_show_id": "15", "customer": "ATS", "revenue": 500, "origin": "GA, United States", "destination": "Aledo, IL, United States", "pickup_date": 1681844400000, "delivery_date": 1681862400000 } ], "driver_current_load": { "load_id": 9964234, "load_show_id": "10", "origin": "Pueblo, CO", "destination": "Los Angeles, CA", "pickup_date": 1680310861000, "delivery_date": 1681794989000 } }, "contact_detail_info": { "driver_street_address": "2031 Burroughs Ave", "driver_city": "New York", "driver_country": "UNITED_STATES", "driver_state": "CA", "zip_code": "12314", "emergency_contact_name": "John Doe", "emergency_contact_number": "222-222-4444", "emergency_contact_email": "janedoe@example.com" }, "license_detail_info": { "license_expiration": "2027-08-03", "license_country": "UNITED_STATES", "license_state": "AL", "license_type": "A", "restrictions": [ "E" ], "endorsements": [ "H" ] } } ], "code": 200, "success": true, "msg": "success", "page_size": 20 } ``` -------------------------------- ### POST /api/driver/query Source: https://docs.truckerpath.com/navpro.html Queries and filters drivers owned by the company based on specific criteria such as status, IDs, and creation or update dates. ```APIDOC ## POST /api/driver/query ### Description Enable filtering out all drivers owned by the company based on specific criteria. ### Method POST ### Endpoint /api/driver/query ### Parameters #### Request Body - **driver_created_after_time** (string) - Optional - After the time when the driver was invited to the company (yyyy-MM-dd). - **driver_ids** (array integer[]) - Optional - The unique IDs of the drivers. - **driver_status** (string) - Optional - The driver's state (ACTIVE, INACTIVE, PENDING). - **driver_updated_after_time** (string) - Optional - After the time when changes were made to the driver's information (yyyy-MM-dd). - **page** (integer) - Optional - Current page. - **size** (integer) - Optional - Page size (min: 1, max: 500). ### Request Example { "page": 0, "size": 20, "driver_ids": [36711, 87741], "driver_status": "ACTIVE", "driver_updated_after_time": "2023-05-20", "driver_created_after_time": "2023-05-05" } ### Response #### Success Response (200) - **total** (integer) - Total count of drivers. - **page** (integer) - Current page index. - **data** (array) - List of driver objects. - **code** (integer) - Response status code. - **success** (boolean) - Success status. - **msg** (string) - Response message. - **page_size** (integer) - Size of the page returned. #### Response Example { "total": 1000, "page": 0, "data": [ { "driver_id": 12154, "basic_info": { "driver_first_name": "John", "driver_last_name": "Doe", "carrier": "Big Fleet Co." } } ], "code": 200, "success": true, "msg": "success", "page_size": 20 } ``` -------------------------------- ### Driver APIs Source: https://docs.truckerpath.com/navpro.html The Driver API allows partners to invite drivers to a network of NavPro operators and perform various operational behaviors. ```APIDOC ## POST /api/driver/query ### Description Queries driver information. ### Method POST ### Endpoint /api/driver/query ### Request Body - **fields** (object) - Required - Fields to query. ### Request Example ```json { "fields": { "driverId": "", "firstName": "", "lastName": "", "email": "", "phone": "", "driverStatus": "", "driverType": "", "vehicleId": "", "vehicleType": "", "vehicleMake": "", "vehicleModel": "", "vehicleYear": "", "vehicleLicensePlate": "", "currentLocation": { "latitude": "", "longitude": "" }, "currentSpeed": "", "currentHeading": "", "currentOdometer": "", "currentFuelLevel": "", "currentEngineHours": "", "currentEngineStatus": "", "currentEngineOilPressure": "", "currentEngineCoolantTemperature": "", "currentBatteryVoltage": "", "currentTirePressure": "", "currentTireTemperature": "", "currentTireWear": "", "currentTirePressureAlert": "", "currentTireTemperatureAlert": "", "currentTireWearAlert": "", "currentTirePressureWarning": "", "currentTireTemperatureWarning": "", "currentTireWearWarning": "" } } ``` ### Response #### Success Response (200) - **drivers** (array) - List of drivers matching the query. - **driverId** (string) - The unique identifier for the driver. - **firstName** (string) - The first name of the driver. - **lastName** (string) - The last name of the driver. - **email** (string) - The email address of the driver. - **phone** (string) - The phone number of the driver. - **driverStatus** (string) - The current status of the driver (e.g., 'active', 'inactive'). - **driverType** (string) - The type of driver (e.g., 'employee', 'contractor'). - **vehicleId** (string) - The unique identifier for the vehicle assigned to the driver. - **vehicleType** (string) - The type of vehicle (e.g., 'truck', 'trailer'). - **vehicleMake** (string) - The make of the vehicle. - **vehicleModel** (string) - The model of the vehicle. - **vehicleYear** (string) - The manufacturing year of the vehicle. - **vehicleLicensePlate** (string) - The license plate number of the vehicle. - **currentLocation** (object) - The current geographical location of the driver. - **latitude** (string) - The latitude coordinate. - **longitude** (string) - The longitude coordinate. - **currentSpeed** (string) - The current speed of the vehicle in mph. - **currentHeading** (string) - The current heading of the vehicle in degrees. - **currentOdometer** (string) - The current odometer reading of the vehicle. - **currentFuelLevel** (string) - The current fuel level of the vehicle. - **currentEngineHours** (string) - The current engine hours of the vehicle. - **currentEngineStatus** (string) - The current engine status (e.g., 'on', 'off'). - **currentEngineOilPressure** (string) - The current engine oil pressure. - **currentEngineCoolantTemperature** (string) - The current engine coolant temperature. - **currentBatteryVoltage** (string) - The current battery voltage. - **currentTirePressure** (string) - The current tire pressure. - **currentTireTemperature** (string) - The current tire temperature. - **currentTireWear** (string) - The current tire wear percentage. - **currentTirePressureAlert** (string) - Alert status for tire pressure. - **currentTireTemperatureAlert** (string) - Alert status for tire temperature. - **currentTireWearAlert** (string) - Alert status for tire wear. - **currentTirePressureWarning** (string) - Warning status for tire pressure. - **currentTireTemperatureWarning** (string) - Warning status for tire temperature. - **currentTireWearWarning** (string) - Warning status for tire wear. #### Response Example ```json { "drivers": [ { "driverId": "d123", "firstName": "John", "lastName": "Doe", "email": "john.doe@example.com", "phone": "123-456-7890", "driverStatus": "active", "driverType": "employee", "vehicleId": "v456", "vehicleType": "truck", "vehicleMake": "Peterbilt", "vehicleModel": "579", "vehicleYear": "2022", "vehicleLicensePlate": "ABC-123", "currentLocation": { "latitude": "34.0522", "longitude": "-118.2437" }, "currentSpeed": "65", "currentHeading": "180", "currentOdometer": "150000", "currentFuelLevel": "75", "currentEngineHours": "3000", "currentEngineStatus": "on", "currentEngineOilPressure": "50", "currentEngineCoolantTemperature": "200", "currentBatteryVoltage": "12.5", "currentTirePressure": "100", "currentTireTemperature": "150", "currentTireWear": "20", "currentTirePressureAlert": "normal", "currentTireTemperatureAlert": "normal", "currentTireWearAlert": "normal", "currentTirePressureWarning": "none", "currentTireTemperatureWarning": "none", "currentTireWearWarning": "none" } ] } ``` ``` ```APIDOC ## POST /api/driver/performance/query ### Description Queries driver performance data. ### Method POST ### Endpoint /api/driver/performance/query ### Request Body - **driverId** (string) - Required - The ID of the driver. - **startDate** (string) - Required - The start date for the performance query (YYYY-MM-DD). - **endDate** (string) - Required - The end date for the performance query (YYYY-MM-DD). ### Request Example ```json { "driverId": "d123", "startDate": "2023-01-01", "endDate": "2023-01-31" } ``` ### Response #### Success Response (200) - **performanceData** (array) - List of performance metrics for the driver. - **date** (string) - The date of the performance data. - **milesDriven** (string) - The total miles driven on that date. - **hoursDriven** (string) - The total hours driven on that date. - **averageSpeed** (string) - The average speed during driving hours. - **maxSpeed** (string) - The maximum speed reached. - **hardBrakingEvents** (string) - The number of hard braking events. - **rapidAccelerationEvents** (string) - The number of rapid acceleration events. - **idleTime** (string) - The total idle time in hours. - **fuelConsumed** (string) - The total fuel consumed in gallons. #### Response Example ```json { "performanceData": [ { "date": "2023-01-15", "milesDriven": "350", "hoursDriven": "6.5", "averageSpeed": "54", "maxSpeed": "75", "hardBrakingEvents": "2", "rapidAccelerationEvents": "1", "idleTime": "1.2", "fuelConsumed": "25.5" } ] } ``` ``` ```APIDOC ## POST /api/driver/invite ### Description Invites a new driver to the NavPro network. ### Method POST ### Endpoint /api/driver/invite ### Request Body - **firstName** (string) - Required - The first name of the driver. - **lastName** (string) - Required - The last name of the driver. - **email** (string) - Required - The email address of the driver. - **phone** (string) - Optional - The phone number of the driver. - **driverType** (string) - Optional - The type of driver (e.g., 'employee', 'contractor'). ### Request Example ```json { "firstName": "Jane", "lastName": "Smith", "email": "jane.smith@example.com", "phone": "987-654-3210", "driverType": "contractor" } ``` ### Response #### Success Response (200) - **driverId** (string) - The unique identifier for the newly invited driver. - **message** (string) - A confirmation message indicating the driver has been invited. #### Response Example ```json { "driverId": "d789", "message": "Driver Jane Smith has been successfully invited." } ``` ``` ```APIDOC ## POST /api/driver/edit ### Description Edits an existing driver's information. ### Method POST ### Endpoint /api/driver/edit ### Request Body - **driverId** (string) - Required - The ID of the driver to edit. - **firstName** (string) - Optional - The updated first name of the driver. - **lastName** (string) - Optional - The updated last name of the driver. - **email** (string) - Optional - The updated email address of the driver. - **phone** (string) - Optional - The updated phone number of the driver. - **driverStatus** (string) - Optional - The updated status of the driver (e.g., 'active', 'inactive'). - **driverType** (string) - Optional - The updated type of driver (e.g., 'employee', 'contractor'). ### Request Example ```json { "driverId": "d123", "driverStatus": "inactive", "email": "john.doe.updated@example.com" } ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the driver has been updated. #### Response Example ```json { "message": "Driver d123 information has been successfully updated." } ``` ``` ```APIDOC ## DELETE /api/driver/delete/{driver_id} ### Description Deletes a driver from the NavPro network. ### Method DELETE ### Endpoint /api/driver/delete/{driver_id} ### Path Parameters - **driver_id** (string) - Required - The ID of the driver to delete. ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the driver has been deleted. #### Response Example ```json { "message": "Driver d123 has been successfully deleted." } ``` ``` -------------------------------- ### Driver API Endpoints Source: https://docs.truckerpath.com/navpro.html Overview of available operations for managing drivers via the NavPro API. These endpoints allow for querying driver data, performance, inviting new drivers, editing existing ones, and deleting drivers. ```plaintext post/api/driver/query post/api/driver/performance/query post/api/driver/invite post/api/driver/edit delete/api/driver/delete/{driver_id} ``` -------------------------------- ### Update Vehicle Status using NavPro API Source: https://docs.truckerpath.com/navpro.html Use this endpoint to update the status of a vehicle within the NavPro system. Requires authentication with a JWT token. ```shell curl -X POST \ https://api.truckerpath.com/navpro/api/vehicle/update/status \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "vehicle_id": 12345, "vehicle_status": "ACTIVE"}' ``` -------------------------------- ### POI Management APIs Source: https://docs.truckerpath.com/navpro.html Endpoints for managing company custom POIs and last-mile data. ```APIDOC ## POI Management Operations ### Endpoints - POST /api/poi/query - POST /api/poi/edit - POST /api/poi/edit/group - POST /api/poi/add - POST /api/poi/add/group - GET /api/poi/get/group - GET /api/poi/export - DELETE /api/poi/delete/{poi_id} - DELETE /api/poi/delete/group/{group_id} ``` -------------------------------- ### Trip and Routing Profile APIs Source: https://docs.truckerpath.com/navpro.html Endpoints for managing trip routes and truck routing profiles. ```APIDOC ## Trip and Routing Profile Operations ### Trip API - POST /api/trip/create ### Routing Profile API - GET /api/routing-profile/list ### Description - **Trip API**: Manage customized trip routes for fleet drivers. - **Routing Profile API**: Retrieve truck routing profiles defining dimensions and weight constraints. ``` -------------------------------- ### JWT Bearer Token Authentication Source: https://docs.truckerpath.com/navpro.html Include the JWT as a Bearer token in the Authorization header for API requests. Obtain your JWT from the NavPro platform's API Docs module. ```shell Authorization: Bearer ``` -------------------------------- ### POST /api/vehicle/update/status Source: https://docs.truckerpath.com/navpro.html Updates the current status of a specific vehicle in the fleet. ```APIDOC ## POST /api/vehicle/update/status ### Description Updates the status of a vehicle (e.g., setting it to ACTIVE). ### Method POST ### Endpoint https://api.truckerpath.com/navpro/api/vehicle/update/status ### Request Body - **vehicle_id** (integer) - Required - The unique identifier of the vehicle. - **vehicle_status** (string) - Required - The new status of the vehicle (e.g., "ACTIVE"). ### Request Example { "vehicle_id": 12345, "vehicle_status": "ACTIVE" } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.