This endpoint allows you to retrieve detailed information about a specific fuel entry within the Alvys system. The data includes comprehensive details such as vehicle information, fuel card details, and additional metadata.
The endpoint for retrieving fuel information by ID requires specifying the fuel entry's unique ID and 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 parameters are required in the URL path:
Parameter | Type | Required | Description |
---|---|---|---|
version | String | Yes | The API version to use. |
id | String | Yes | The unique identifier of the fuel entry. |
Example CURL request
curl --location 'https://integrations.alvys.com/api/p/v{version}/fuel/{id}' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Replace {version}
with the API version number, {id}
with the actual fuel ID, and YOUR_ACCESS_TOKEN
with your actual Bearer token:
curl --location 'https://integrations.alvys.com/api/p/v1/fuel/43000ba1-b001-408d-b00f-c00f8004add' \
--header 'Authorization: Bearer eLOETt0hFmWxz_1VBt_oYx9YuSVTWCbZjjNUz8DTKN_EPhH12hs3al...'
Response Parameters
The following table lists the parameters included in the response for the fuel-related request:
Parameter | Type | Required | Description |
---|---|---|---|
id | String | Yes | The unique identifier of the fuel transaction. |
transactionId | String | No | The transaction ID. |
subsidiaryId | String | No | The subsidiary ID associated with the transaction. |
subsidiaryName | String | No | The name of the subsidiary associated with the transaction. |
truckId | String | No | The unique identifier of the truck. |
truckNumber | String | No | The truck number associated with the transaction. |
driverId | String | No | The unique identifier of the driver. |
driverName | String | No | The name of the driver. |
ownerOperatorId | String | No | The unique identifier of the owner-operator. |
ownerOperatorName | String | No | The name of the owner-operator. |
source | String | No | The source of the transaction data. |
location | Object | No | The location details of the transaction. |
location.id | String | No | The unique identifier of the location. |
location.name | String | No | The name of the location. |
location.city | String | No | The city of the location. |
location.address | String | No | The address of the location. |
location.country | String | No | The country of the location. |
fuelTotal | Object | No | The total fuel amount. |
fuelTotal.amount | Integer | No | The amount of fuel. |
fuelTotal.currency | Integer | No | The currency of the fuel amount. |
fees | Object | No | The total fees. |
fees.amount | Integer | No | The amount of fees. |
fees.currency | Integer | No | The currency of the fees amount. |
discounts | Object | No | The total discounts. |
discounts.amount | Integer | No | The amount of discounts. |
discounts.currency | Integer | No | The currency of the discounts amount. |
advances | Object | No | The total advances. |
advances.amount | Integer | No | The amount of advances. |
advances.currency | Integer | No | The currency of the advances amount. |
total | Object | No | The total amount including fuel, fees, discounts, and advances. |
total.amount | Integer | No | The total amount. |
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 and fuel ID 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.