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:
Parameter | Type | Required | Description |
---|---|---|---|
version | String | Yes | The 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:
Parameter | Type | Required | Description |
---|---|---|---|
page | Integer | Yes | The current page number of the results. |
pageSize | Integer | Yes | The number of results per page. |
total | Integer | Yes | The total number of matching fuel transactions. |
items | Array of Objects | Yes | The list of fuel transaction records matching the criteria. |
items.id | String | Yes | The unique identifier of the fuel transaction. |
items.transactionId | String | No | The transaction ID. |
items.subsidiaryId | String | No | The subsidiary ID associated with the transaction. |
items.subsidiaryName | String | No | The name of the subsidiary associated with the transaction. |
items.truckId | String | No | The unique identifier of the truck. |
items.truckNumber | String | No | The truck number associated with the transaction. |
items.driverId | String | No | The unique identifier of the driver. |
items.driverName | String | No | The name of the driver. |
items.ownerOperatorId | String | No | The unique identifier of the owner-operator. |
items.ownerOperatorName | String | No | The name of the owner-operator. |
items.source | String | No | The source of the transaction data. |
items.location | Object | No | The location details of the transaction. |
items.location.id | String | No | The unique identifier of the location. |
items.location.name | String | No | The name of the location. |
items.location.city | String | No | The city of the location. |
items.location.address | String | No | The address of the location. |
items.location.country | String | No | The country of the location. |
items.fuelTotal | Object | No | The total fuel amount. |
items.fuelTotal.amount | Integer | No | The amount of fuel. |
items.fuelTotal.currency | Integer | No | The currency of the fuel amount. |
items.fees | Object | No | The total fees. |
items.fees.amount | Integer | No | The amount of fees. |
items.fees.currency | Integer | No | The currency of the fees amount. |
items.discounts | Object | No | The total discounts. |
items.discounts.amount | Integer | No | The amount of discounts. |
items.discounts.currency | Integer | No | The currency of the discounts amount. |
items.advances | Object | No | The total advances. |
items.advances.amount | Integer | No | The amount of advances. |
items.advances.currency | Integer | No | The currency of the advances amount. |
items.total | Object | No | The total amount including fuel, fees, discounts, and advances. |
items.total.amount | Integer | No | The total amount. |
items.total.currency | Integer | No | The currency of the total amount. |
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.