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

This endpoint allows users to retrieve a list of fuel transactions filtered by specific criteria such as fuel card number, truck number, and transaction date range.

The endpoint for searching fuel transactions 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.

Request Body

The following fields are required 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.

fuelCardNumber

String

Conditionally

The fuel card number used for the transactions. This field is required if the other conditionally required fields are left empty.

truckNumber

String

Conditionally

The truck number associated with the transactions.This field is required if the other conditionally required fields are left empty.

transactionRange

Object

Conditionally

The date range for the transactions. This field is required if the other conditionally required fields are left empty.

transactionRange.start

String (Date-Time)

Conditionally

The start date of the transaction range. This field is required if the other conditionally required fields are left empty.

transactionRange.end

String (Date-Time)

Conditionally

The end date of the transaction range. 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/fuel/search' \
--header 'Authorization: Bearer eP90PNFxr_y74mLOETt0hFmWxz_1VBt_oYx9YuSNUz8....' \
--header 'Content-Type: application/json' \
--data '{ 
  "page": 0,
  "pageSize": 100,
  "fuelCardNumber": "",
  "truckNumber": "",
  "transactionRange": {
     "start": "2022-07-29T15:33:17.224Z",
     "end": "2025-07-29T15:33:17.224Z"
  }
}'

Response Parameters

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

ParameterTypeDescription
PageIntegerThe current page number of the results.
PageSizeIntegerThe number of results per page.
TotalIntegerThe total number of matching fuel transactions.
ItemsArray of ObjectsThe list of fuel transaction records matching the criteria.
Items.IdStringThe unique identifier of the fuel transaction.
Items.TransactionIdStringThe transaction ID.
Items.SubsidiaryIdStringThe subsidiary ID associated with the transaction.
Items.SubsidiaryNameStringThe name of the subsidiary associated with the transaction.
Items.TruckIdStringThe unique identifier of the truck.
Items.TruckNumberStringThe truck number associated with the transaction.
Items.DriverIdStringThe unique identifier of the driver.
Items.DriverNameStringThe name of the driver.
Items.OwnerOperatorIdStringThe unique identifier of the owner-operator.
Items.OwnerOperatorNameStringThe name of the owner-operator.
Items.SourceStringThe source of the transaction data.
Items.LocationObjectThe location details of the transaction.
Items.Location.IdStringThe unique identifier of the location.
Items.Location.NameStringThe name of the location.
Items.Location.CityStringThe city of the location.
Items.Location.AddressStringThe address of the location.
Items.Location.CountryStringThe country of the location.
Items.FuelTotalObjectThe total fuel amount.
Items.FuelTotal.AmountIntegerThe amount of fuel.
Items.FuelTotal.CurrencyIntegerThe currency of the fuel amount.
Items.FeesObjectThe total fees.
Items.Fees.AmountIntegerThe amount of fees.
Items.Fees.CurrencyIntegerThe currency of the fees amount.
Items.DiscountsObjectThe total discounts.
Items.Discounts.AmountIntegerThe amount of discounts.
Items.Discounts.CurrencyIntegerThe currency of the discounts amount.
Items.AdvancesObjectThe total advances.
Items.Advances.AmountIntegerThe amount of advances.
Items.Advances.CurrencyIntegerThe currency of the advances amount.
Items.TotalObjectThe total amount including fuel, fees, discounts, and advances.
Items.Total.AmountIntegerThe total amount.
Items.Total.CurrencyIntegerThe currency of the total amount.
Items.QuantityObjectDetails of the fuel quantity purchased.
Items.Quantity.ValueNumberThe numeric value of the fuel purchased.
Items.Quantity.UnitOfMeasureStringThe unit of measure (e.g., Gallons).
Items.TransactionDateString (date-time)The date and time of the fuel transaction.

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 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!