/api/p/v{version}/drivers/search

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:

Parameter

Type

Required

Description

page

Integer

No

The page number to retrieve.

pageSize

Integer

Yes

The number of results per page. PageSize must be greater than 0.

status

Array of Strings

Conditionally

A list of statuses to filter by. This field is required if the other conditionally required fields are left empty.

name

String

Conditionally

The name of the driver to search for. This field is required if the other conditionally required fields are left empty.

employeeId

String

Conditionally

The employee ID of the driver to search for. This field is required if the other conditionally required fields are left empty.

fleetName

String

Conditionally

The fleet name associated with the driver. This field is required if the other conditionally required fields are left empty.

isActive

Boolean

Conditionally

Whether 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:

ParameterTypeDescription
pageIntegerThe current page number of the results.
pageSizeIntegerThe number of results per page.
totalIntegerThe total number of matching drivers.
idStringThe unique identifier of the driver.
employeeIdStringThe employee ID of the driver.
phoneNumberStringThe phone number of the driver.
userIdStringThe user ID associated with the driver.
emailStringThe email address of the driver.
nameStringThe name of the driver.
typeStringThe type of driver (e.g., Full-time, Part-time).
subsidiaryIdStringThe subsidiary ID to which the driver belongs.
addressObjectThe address details of the driver.
address.streetStringThe street address of the driver.
address.cityStringThe city of the driver's address.
address.stateStringThe state of the driver's address.
address.zipCodeStringThe zip code of the driver's address.
statusStringThe current status of the driver (e.g., Active, Inactive).
isActiveBooleanIndicates if the driver is currently active.
licenseNumStringThe driver's license number.
licenseStateStringThe state that issued the driver's license.
licenseExpiresAtString (Date-Time)The expiration date of the driver's license.
medicalExpiresAtString (Date-Time)The expiration date of the driver's medical certificate.
hiredAtString (Date-Time)The date when the driver was hired.
terminatedAtString (Date-Time)The date when the driver was terminated, if applicable.
notesArrayAn optional list of notes related to the driver.
notes.idStringThe unique identifier of the note.
notes.descriptionStringThe description of the note.
notes.noteTypeStringThe type of the note.
notes.timeString (Date-Time)The time the note was created.
notes.userStringThe user who created the note.
fleetObjectThe fleet information associated with the driver.
fleet.idStringThe unique identifier of the fleet.
fleet.nameStringThe name of the fleet.
createdAtString (Date-Time)The 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!