Create Fuel
Create a new fuel product in Last Mile Intelligence.
Operation
Section titled “Operation”createFuel
Resource
Section titled “Resource”fuel
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Fuel Data | JSON | Yes | - | Fuel object with required fields |
Fuel Data Fields
Section titled “Fuel Data Fields”| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Fuel product name |
| code | string | Yes | Short code identifier |
| type | string | Yes | Fuel type (diesel, propane, etc.) |
| unitOfMeasure | string | No | Unit (gallon, liter, etc.) |
| currentPrice | number | No | Current price per unit |
| taxRate | number | No | Tax rate |
Response
Section titled “Response”Success
Section titled “Success”{ "id": "fuel_new123", "name": "Biodiesel B20", "code": "B20", "type": "biodiesel", "unitOfMeasure": "gallon", "isActive": true, "createdAt": "2024-06-21T09:00:00Z"}{ "success": false, "error": "Validation failed", "details": { "code": "Code already exists" }}Error Handling
Section titled “Error Handling”- Missing API Token: LMI credential is missing API token
- Duplicate Code: Fuel with this code already exists
- Validation Error: Required fields missing or invalid
- Permission Denied: API token lacks permission for this operation