The Search Drivers API endpoint allows you to search for drivers within the Alvys TMS system based on various criteria such as status, name, employee ID, fleet name, and active status.

This endpoint provides detailed information about each driver that matches the search criteria, facilitating efficient management and retrieval of driver records. The endpoint requires specifying the API version in the URL path. This ensures that your application interacts with the correct version of the API, providing stability and compatibility as the API evolves. For more information on how versioning works and how to include it in your requests, please refer to the Versioning page.

Request Parameters

The following parameter is required in the URL path:

ParameterTypeRequiredDescription
versionStringYesThe API version to use.

Body Request

The following fields can be included in the request body to filter the search results:

ParameterTypeRequiredDescription
pageIntegerNoThe page number to retrieve.
pageSizeIntegerYesThe number of results per page.
PageSize must be greater than 0.
statusArray of StringsConditionallyA list of statuses to filter by. This field is required if the other conditionally required fields are left empty.
nameStringConditionallyThe name of the driver to search for. This field is required if the other conditionally required fields are left empty.
employeeIdStringConditionallyThe employee ID of the driver to search for. This field is required if the other conditionally required fields are left empty.
fleetNameStringConditionallyThe fleet name associated with the driver. This field is required if the other conditionally required fields are left empty.
isActiveBooleanNoWhether to filter by active drivers.

Example CURL request

Use the Current API version number and make sure to replace the Authorization header value with your actual Bearer token for the request:

curl --location 'https://integrations.alvys.com/api/p/v1/drivers/search' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkplA' \
--header 'Content-Type: application/json' \
--data '{
  "page": 0,
  "pageSize": 50,
  "status": [
    "OFF DUTY"
  ],
  "name": "",
  "employeeId": "",
  "fleetName": "",
  "isActive": true
}'

Response Parameters

The following table lists the parameters included in the response for driver search requests:

ParameterTypeRequiredDescription
pageIntegerYesThe current page number of the results.
pageSizeIntegerYesThe number of results per page.
totalIntegerYesThe total number of matching drivers.
itemsArray of ObjectsYesThe list of driver records matching the search criteria.
items.idStringYesThe unique identifier of the driver.
items.employeeIdStringNoThe employee ID of the driver.
items.phoneNumberStringNoThe phone number of the driver.
items.userIdStringNoThe user ID associated with the driver.
items.emailStringNoThe email address of the driver.
items.nameStringNoThe name of the driver.
items.typeStringNoThe type of driver (e.g., Full-time, Part-time).
items.subsidiaryIdStringNoThe subsidiary ID to which the driver belongs.
items.addressObjectNoThe address details of the driver.
items.address.streetStringNoThe street address of the driver.
items.address.cityStringNoThe city of the driver's address.
items.address.stateStringNoThe state of the driver's address.
items.address.zipCodeStringNoThe zip code of the driver's address.
items.statusStringNoThe current status of the driver (e.g., Active, Inactive).
items.licenseNumStringNoThe driver's license number.
items.licenseStateStringNoThe state that issued the driver's license.
items.licenseExpiresAtString (Date-Time)NoThe expiration date of the driver's license.
items.medicalExpiresAtString (Date-Time)NoThe expiration date of the driver's medical certificate.
items.hiredAtString (Date-Time)NoThe date when the driver was hired.
items.terminatedAtString (Date-Time)NoThe date when the driver was terminated, if applicable.
items.notesArrayNoAn optional list of notes related to the driver.
items.notes.idStringNoThe unique identifier of the note.
items.notes.descriptionStringNoThe description of the note.
items.notes.noteTypeStringNoThe type of the note.
items.notes.timeString (Date-Time)NoThe time the note was created.
items.notes.userStringNoThe user who created the note.
items.fleetObjectNoThe fleet information associated with the driver.
items.fleet.idStringNoThe unique identifier of the fleet.
items.fleet.nameStringNoThe name of the fleet.
items.createdAtString (Date-Time)YesThe date and time when the driver was created in Alvys.

Example Response

On the right side, you can see examples of different error codes by clicking "Example" and selecting the response code.

Rate Limits

All endpoints are subject to rate limits to protect the API from traffic spikes. For detailed information on rate limits, please refer to the Rate Limits section.

This page is interactive, allowing you to try a request by specifying the API version in the URL path. As you fill out the parameters, the Curl command on the right side of the page will be automatically updated. Alternatively, you can directly edit the Curl command. Make sure to authorize yourself before trying a request.

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!