How to use Fuel Consumption with REST API
This guide will show you how to create Fuel Refill reports using REST API replacing the legacy XML file format.
The Fuel Consumption resource will require the following information to be entered, read here how to obtain them:
- Read how to enable REST API
- Read how to generate the REST API token
- Read how to obtain an application ID
- Read how to obtain the userID from a user
- FuelConsumption > Post
Creating fuel consumption events
1. Log in to http://host_name/comGpsGate/api/v.1/test
Note: replace host_name with your actual server IP address or host name.
2. Click on the resource name POST/applications/...../fuelconsumption > Try it out option.
3. Introduce the details of the Fuel Consumption event which are:
- Application ID: Read how to obtain an application ID
- UserID: The ID of the vehicle that will register the fuel event. Read how to obtain the userID.
- Fuel Consumption details. Follow the schema specifications and the examples shown.
4. Click on Execute
5. If the command succeeded, you will see the response in the Response area with the data introduced:
Now your fuel consumption event will be displayed on the GUI