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

The Search Trips API endpoint allows users to search for trips within the Alvys system based on various criteria such as trip number, status, load number, and date ranges for pickup and delivery.

This endpoint provides detailed information about each trip that matches the search criteria, enabling efficient management and retrieval of trip records.

Request Parameters

The following parameter is required in the URL path:

ParameterTypeRequiredDescription
versionStringYesThe API version to use.

Request Body Parameters

The following parameters are required in the request body:

ParameterTypeRequiredDescription
pageIntegerNoThe page number to retrieve.
pageSizeIntegerYesThe number of items per page. PageSize must be greater than 0.
statusArray of StringsConditionallyThe status(es) of the trips to filter by. This field is required if the other conditionally required fields are left empty.
loadNumbersArray of StringsConditionallyThe load number(s) associated with the trips. This field is required if the other conditionally required fields are left empty.
tripNumbersArray of StringsConditionallyThe trip number(s) to search for. This field is required if the other conditionally required fields are left empty.
pickupDateRangeObjectNoThe range of pickup dates to filter by.
pickupDateRange.startString (Date-Time)NoThe start date of the pickup range.
pickupDateRange.endString (Date-Time)NoThe end date of the pickup range.
deliveryDateRangeObjectNoThe range of delivery dates to filter by.
deliveryDateRange.startString (Date-Time)NoThe start date of the delivery range.
deliveryDateRange.endString (Date-Time)NoThe end date of the delivery range.
updatedAtRangeObjectNoThe range of update timestamps to filter by.
updatedAtRange.startString (Date-Time)NoThe start date of the updatedAt range.
updatedAtRange.endString (Date-Time)NoThe end date of the updatedAt range.
updatedByStringConditionallyThe user who last updated the trips.This field is required if the other conditionally required fields are left empty.

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/trips/search' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ...' \
--header 'Content-Type: application/json' \
--data '{ 
  "page": 0,
  "pageSize": 100,
  "status": [
          "Covered"
             ],
  "updatedBy" : "0d00f000-1b85-4ed8-000-6a000d1111db",
  "updatedAtRange": {
      "start": "2024-09-09T13:09:30.788Z",
      "end": "2024-10-19T13:09:30.788Z"
  },   
  "loadNumbers": [
              "123456789"
               ],
  "tripNumbers": [
              "123456789"
               ],
  "pickupDateRange": {
       "start": "2025-07-23T10:45:56.477Z",
       "end": "2025-07-23T10:45:56.477Z"
               },
  "deliveryDateRange": {
       "start": "2025-07-23T10:45:56.477Z",
        "end": "2025-07-23T10:45:56.477Z"
               }
    }'

Response Parameters

The following table lists the parameters included in the response for trip-related requests.

ParameterTypeRequiredDescription
pageIntegerNoThe current page of the response.
pageSizeIntegerYesThe number of items per page.
totalIntegerYesThe total number of items matching the criteria.
idStringYesThe unique identifier of the trip.
tripNumberStringYesThe number associated with the trip.
statusStringNoThe current status of the trip.
loadNumberStringNoThe load number associated with the trip.
stopsArray of ObjectsNoThe list of stops associated with the trip.
stops.idStringNoThe unique identifier of the stop.
stops.addressObjectNoInformation about the stop's address.
stops.address.streetStringNoThe street address of the stop.
stops.address.cityStringNoThe city where the stop is located.
stops.address.stateStringNoThe state where the stop is located.
stops.address.zipCodeStringNoThe ZIP code of the stop.
stops.coordinatesObjectNoInformation about the stop's geographical coordinates.
stops.coordinates.latitudeStringNoThe latitude of the stop's location.
stops.coordinates.longitudeStringNoThe longitude of the stop's location.
stop.statusStringNoThe current status of the trip.
stops.stopTypeStringNoThe type of stop (e.g., Pickup, Delivery).
stops.scheduleTypeStringNoThe schedule type for the stop.
stops.loadingTypeStringNoThe loading type at the stop.
stops.arrivedAtString (DateTime)NoThe timestamp for when the stop was arrived at.
departedAtString (DateTime)NoThe timestamp for when the stop was departed from.
stops.referencesArray of ObjectsNoA list of references related to the stop.
stops.references.idStringNoThe unique identifier of the reference at the stop.
stops.references.nameStringNoThe name of the reference at the stop.
stops.references.valueStringNoThe value of the reference.
stops.references.typeStringNoThe type of reference (e.g., Text, Date).
stops.references.accessStringNoThe access level of the reference (e.g., Internal, Public).
totalMileageObjectNoInformation about the total mileage of the trip.
totalMileage.distanceObjectNoInformation about the distance of the total mileage.
totalMileage.distance.valueNumberNoThe numeric value of the total distance.
totalMileage.distance.unitOfMeasureStringNoThe unit of measure for the total distance (e.g., Miles).
emptyMileageObjectNoInformation about the empty mileage of the trip.
loadedMileageObjectNoInformation about the loaded mileage of the trip.
pickupDateString (DateTime)NoThe scheduled pickup date for the trip.
deliveryDateString (DateTime)NoThe scheduled delivery date for the trip.
pickedUpAtString (DateTime)NoThe actual timestamp for when the load was picked up.
deliveredAtString (DateTime)NoThe actual timestamp for when the load was delivered.
carrierAssignedAtString (DateTime)NoThe timestamp for when the carrier was assigned to the trip.
tripValueObjectNoInformation about the value of the trip.
tripValue.amountNumberNoThe numeric value of the trip.
tripValue.currencyStringNoThe currency for the trip value.
truckObjectNoInformation about the truck assigned to the trip.
truck.idStringNoThe unique identifier of the truck.
truck.fleetObjectNoInformation about the fleet associated with the truck.
trailerObjectNoInformation about the trailer used in the trip.
trailer.idStringNoThe unique identifier of the trailer.
trailer.equipmentTypeStringNoThe type of equipment used for the trailer.
trailer.equipmentLengthObjectNoInformation about the trailer's length.
trailer.equipmentLength.valueNumberNoThe numeric value of the trailer's length.
trailer.equipmentLength.unitOfMeasureStringNoThe unit of measure for the trailer's length (e.g., Feet).
driver1ObjectNoInformation about the first driver assigned to the trip.
driver1.idStringNoThe unique identifier of the first driver.
driver1.contractorTypeStringNoThe contractor type of the first driver.
driver1.ratesArray of ObjectsNoInformation about the rates applied to the first driver.
driver2ObjectNoInformation about the second driver assigned to the trip.
releasedByStringNoThe user who released the trip.
dispatchedByStringNoThe user who executed the action to dispatch the trip.
dispatcherIdStringNoThe user assigned as the dispatcher responsible for managing the load.
carrierObjectNoInformation about the carrier assigned to the trip.
carrier.idStringNoThe unique identifier of the carrier.
carrier.carrierInvoiceNumberStringNoThe invoice number for the carrier.
carrier.rateObjectNoInformation about the rate for the carrier.
carrier.rate.amountNumberNoThe numeric value of the carrier rate.
carrier.rate.currencyStringNoThe currency of the carrier rate.
carrier.linehaulObjectNoThe base transportation cost for moving the load, excluding any additional charges.
carrier.linehaul.amountNumberNoThe numeric amount for the linehaul portion of the carrier's payment.
carrier.linehaul.currencyNumberNoThe currency code for the linehaul amount.
carrier.accessorialsObjectNoThe additional charges applied to the trip (e.g., detention, fuel surcharge).
carrier.accessorials.amountNumberNoThe numeric amount for the accessorial charges.
carrier.accessorials.currencyNumberNoThe currency code for the accessorial charges.
carrier.totalPayableObjectNoThe total amount payable to the carrier (Linehaul + Accessorials).
carrier.totalPayable.amountNumberNoThe total numeric amount payable to the carrier.
arrier.totalPayable.currencyNumberNoThe currency code for the total payable amount.
carrierPaymenOnHoldBooleanNoIndicates whether payment to the carrier is currently on hold (true) or not (false).
updatedAtString (DateTime)NoThe timestamp for when the trip was last updated.
updatedByStringNoThe user who last updated the trip.
releasedAtString (DateTime)NoThis field indicates the timestamp when the load was marked as "Released".

Versioning

The version parameter in the URL path specifies which version of the API you are using. Including the version number 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.

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 and providing the necessary request body. As you fill out the parameters, the Curl command on the right side of the page will be automatically updated. Alternatively, you can fork our Public API Postman Collection directly. 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!