/api/p/v{version}/trips

The Retrieve All Trips API endpoint allows you to retrieve a list of all trips in the Alvys system. This endpoint provides comprehensive data about each trip, facilitating effective management and tracking of trips within the system.

Request Parameters

The following parameter is required in the URL path:

ParameterTypeRequiredDescription
versionStringYesThe API version to use.
tripNumberStringConditionallyThe trip number to filter results. This field is required if the other conditionally required fields are left empty.
idStringConditionallyThe trip id to filter results. This field is required if the other conditionally required fields are left empty.

Example CURL request

Example using Trip ID:

curl --location 'https://integrations.alvys.com/api/p/v{version}/trips?id={tripId}' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'

Example using Trip Number:

curl --location 'https://integrations.alvys.com/api/p/v{version}/trips?tripNumber={tripNumber}' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'

Replace {version} with the API version number, {tripId} with the actual trip ID, {tripNumber} with the actual trip number, and YOUR_ACCESS_TOKEN with your actual Bearer token:

Using Trip ID:

curl --location 'https://integrations.alvys.com/api/p/v1/trips?id=000c3a9bf0000000bf000d000e000a0b' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ...'

Using Trip Number:

curl --location 'https://integrations.alvys.com/api/p/v1/trips?tripNumber=123456789' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ....'

Response Parameters

The following table lists the parameters included in the response for a single trip request:

ParameterTypeRequiredDescription
idstringYesUnique identifier of the trip.
tripNumberstringYesNumber associated with the trip.
statusstringNoCurrent status of the trip.
loadNumberstringNoLoad number associated with the trip.
tenderAsstringNoRole under which the trip was tendered.
tenderAsSubsidiaryTypestringNoSubsidiary type under which the trip was tendered (e.g., "Carrier").
stops[]arrayNoList of stops for the trip.
stops[].idstringNoUnique identifier of the stop.
stops[].address.streetstringNoStreet address of the stop.
stops[].address.citystringNoCity of the stop.
stops[].address.statestringNoState of the stop.
stops[].address.zipCodestringNoZIP code of the stop.
stops[].coordinates.latitudestringNoLatitude of the stop.
stops[].coordinates.longitudestringNoLongitude of the stop.
stops[].statusstringNoStatus of the stop.
stops[].stopTypestringNoType of stop (e.g., Pickup, Delivery).
stops[].appointmentDatestring (datetime)NoAppointment date/time for the stop.
totalMileage.distance.valuenumberNoTotal mileage value.
totalMileage.distance.unitOfMeasurestringNoUnit of measure for total mileage.
totalMileage.sourcestringNoSource of mileage data.
totalMileage.profileNamestringNoName of the mileage profile used.
emptyMileage.distance.valuenumberNoEmpty mileage value.
loadedMileage.distance.valuenumberNoLoaded mileage value.
pickupDatestring (datetime)NoScheduled pickup date.
deliveryDatestring (datetime)NoScheduled delivery date.
pickedUpAtstring (datetime)NoActual pickup timestamp.
deliveredAtstring (datetime)NoActual delivery timestamp.
carrierAssignedAtstring (datetime)NoCarrier assignment timestamp.
tripValue.amountnumberNoTotal trip value.
tripValue.currencystringNoCurrency for trip value.
truck.idstringNoTruck ID.
truck.fleet.idstringNoFleet ID of the truck.
truck.fleet.namestringNoFleet name of the truck.
trailer.idstringNoTrailer ID.
trailer.equipmentTypestringNoEquipment type of trailer.
driver1.idstringNoUnique ID of Driver 1.
driver1.contractorTypestringNoContractor type of Driver 1.
driver1.rates[]arrayNoLegacy field. Old driver rate objects (rate, extraStops, rateType, etc.). Returned empty and will be deprecated.
driver1.ratesV2[]arrayNoNew structured rate objects for Driver 1 showing applied pay rules and calculated line items.
driver1.ratesV2[].policyIdstringNoUnique identifier of the applied rate policy.
driver1.ratesV2[].policyNamestringNoDisplay name of the rate policy.
driver1.ratesV2[].perTripRate.ratenumberNoFlat per-trip pay rate applied to the trip.
driver1.ratesV2[].perTripRate.rateIdstringNoIdentifier of the per-trip rate type.
driver1.ratesV2[]. perTripRate.rateNamestringNoName of the per-trip rate type.
driver1.ratesV2[]. perTripRate.lineItems[]arrayNoDetailed line-item breakdown for per-trip rate.
driver1.ratesV2[]. tripValuePercentageRate.percentagenumberNoPercentage of trip value used to calculate pay.
driver1.ratesV2[]. tripValuePercentageRate.rateIdstringNoIdentifier of the percentage-based rate type.
driver1.ratesV2[]. tripValuePercentageRate.rateNamestringNoName of the percentage-based rate.
driver1.ratesV2[]. tripValuePercentageRate.lineItems[]arrayNoLine-item breakdown for percentage-based rate (description, amount, currency).
driver2.idstringNoUnique ID of Driver 2.
driver2.contractorTypestringNoContractor type of Driver 2.
driver2.rates[]arrayNoLegacy rate list for Driver 2 — empty and will be deprecated.
driver2.ratesV2[]arrayNoStructured rate objects for Driver 2.
ownerOperator.idstringNoUnique ID of the owner-operator.
ownerOperator.rates[]arrayNoLegacy rate list for Owner Operator — empty and will be deprecated.
ownerOperator.ratesV2[]arrayNoStructured rate objects for Owner Operator.
carrier.idstringNoCarrier ID.
carrier.rate.amountnumberNoCarrier rate amount.
carrier.rate.currencystringNoCarrier rate currency.
carrier.linehaul.amountnumberNoCarrier linehaul amount.
carrier.linehaul.currencystringNoCurrency of linehaul.
carrier.totalPayable.amountnumberNoTotal payable amount to the carrier.
carrier.totalPayable.currencystringNoCurrency for total payable amount.
dispatchedBystringNoUser who dispatched the trip.
dispatcherIdstringNoID of the dispatcher.
updatedAtstring (datetime)NoTimestamp when the trip was last updated.
updatedBystringNoUser who last updated the trip.

⚠️ Important Note on Rates and RatesV2 Fields

Both the legacy Rates[] and the new RatesV2[] fields are currently returned in the Trips API response under Driver1, Driver2, and OwnerOperator.

  • The legacy Rates[] field remains available for backward compatibility but is no longer populated for new trips created after migration to Driver Settlement.
  • For trips that existed prior to migration, Rates[] may still contain historical data; however, it can be out of sync with RatesV2[] if additional rate changes were made after migration.
  • Integrations that continue to read data from Rates[] will receive empty or outdated arrays.
  • To ensure accurate and complete pay information, integrations should rely solely on RatesV2[] going forward.

Each rate type (e.g., TripValuePercentageRate, PerTripRate, MinimumPayRate, etc.) within RatesV2[] is provided as a structured object with detailed breakdowns via optional LineItems[].

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.

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