Update Fuel Entry
Update a Fuel Entry
Path Parameters
- id string required
Possible values: Value must match regular expression
^[0-9]+$
The id of the relevant record
- application/json
Request Body
- vehicle_id integer
Possible values:
>= 1
- fuel_type_id integer
Possible values:
>= 1
The Fleetio
id
of the Fuel Type associated with this Fuel Entry. - date date-time
We recommend using ISO-8601 formatted dates to avoid ambiguity.
- us_gallons float
The fuel volume amount in US gallons. This field will only be used if the Vehicle is configured to use US gallons, otherwise it will be ignored.
- uk_gallons float
The fuel volume amount in UK gallons. This field will only be used if the Vehicle is configured to use UK gallons, otherwise it will be ignored.
- liters float
The fuel volume amount in liters. This field will be used if the Vehicle is configured to use liters.
- price_per_volume_unit float
The unit price for the Vehicle's configured volume unit.
meter_entry_attributes object
Each Fuel Entry requires an associated Meter Entry
value floatThe value is the actual number on the meter that increments over time. The unit is determined by the configured
meter_unit
on the associated Vehicle.void booleanIf you attempt to save a meter value, which is too high or too low, Fleetio's validation rules will reject it. If you need to bypass this validation, you may mark an entry as void.
- reference string
A reference number or identifier for this Fuel Entry. This field is often used to store a receipt number or other unique identifier.
- partial boolean
Indicates whether this Fuel Entry is a partial fill-up. Partial fill-ups are used to record Fuel Entries that are not full fill-ups. This field is
false
if not provided. - personal boolean
Indicates whether this Fuel Entry is personal. Personal Fuel Entries are used to record fuel purchases that are not associated with a specific Vehicle or Equipment. This field is
false
if not provided. - custom_fields object
*Full details on working with Custom Fields here.
documents_attributes object[]
An array of one or more document objects to add to the record. You may provide your own
file_url
, or follow our Attaching Documents and Images guide to upload to our third party storage provider.name stringPossible values:
<= 255 characters
The name to give the file which will be shown in the UI.
file_url stringPossible values:
<= 255 characters
The URL pointing to the file.
file_mime_type stringPossible values:
<= 255 characters
The MIME type of the file. For example,
application/pdf
.file_name stringPossible values:
<= 255 characters
The name of the file.
file_size integerThe size of the file in bytes.
images_attributes object[]
An array of one or more image objects to add to the record. You may provide your own
file_url
, or follow our Attaching Documents and Images guide to upload to our third party storage provider.name stringPossible values:
<= 255 characters
The name to give the image which will be shown in the UI.
file_url stringPossible values:
<= 255 characters
The URL pointing to the image.
file_mime_type stringPossible values:
<= 255 characters
The MIME type of the image. For example,
image/png
.file_name stringPossible values:
<= 255 characters
The name of the image.
file_size integerThe size of the image file in bytes.
- 200
- 401
- 403
- 404
- 422
- 500
OK
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
- id integer
Possible values:
>= 1
- created_at date-time
The date and time at which this record was created.
- updated_at date-time
The date and time at which this record was most recently updated.
- cost_per_hr float
The automatically calculated cost per hour since the last Fuel Entry.
- cost_per_km float
The automatically calculated cost per km since the last Fuel Entry.
- cost_per_mi float
The automatically calculated cost per mi since the last Fuel Entry.
- date date-time
The date and time at which this Fuel Entry was recorded.
- external_id string
Used to uniquely identify Fuel Entries that are imported from external systems, such as Fleetcor and Wex.
- fuel_type_id integer
Possible values:
>= 1
The Fleetio
id
of theFuel Type
associated with this Fuel Entry. - fuel_type_name string
The name of the
Fuel Type
associated with this Fuel Entry. - kpl float
Running average recorded kilometers per liter (calculated automatically).
- liters string
The fuel volume amount in liters. This field will only be used if the Vehicle is configured to use liters, otherwise it will be ignored.
- liters_per_hr float
Running average recorded liters per hour (calculated automatically).
- lp100k float
Running average recorded liters per 100 kilometers (calculated automatically).
- mpg_uk float
Running average recorded miles per UK Gallon (calculated automatically).
- mpg_us float
Running average recorded miles per US Gallon (calculated automatically).
- partial boolean
Used to denote a partial fuel up as opposed to a complete fuel up. Learn more about partial Fuel Entries here.
- personal boolean
Used to denote a personal expense.
- price_per_volume_unit float
The unit price for the
Vehicle
's volume unit. - raw_transaction_data object
This object is dynamically populated by external fuel card integrations.
- reference string
Optional data field for collecting information such as the invoice number, transaction id, or receipt number, for example.
- region string
- reset boolean
Default value:
false
- uk_gallons string
The fuel volume amount in UK gallons. This field will only be used if the Vehicle is configured to use UK Gallons, otherwise it will be ignored.
- uk_gallons_per_hr float
Running average of UK gallons used per hour. Calculated automatically.
- us_gallons string
The fuel volume amount in US gallons. This field will only be used if the Vehicle is configured to use US Gallons, otherwise it will be ignored.
- us_gallons_per_hr float
Running average of US gallons used per hour. Calculated automatically.
- usage_in_hr string
The automatically calculated usage in hours since the most recent Fuel Entry.
- usage_in_km string
The automatically calculated usage in kilometers since the most recent Fuel Entry.
- usage_in_mi string
The automatically calculated usage in miles since the most recent Fuel Entry.
- vehicle_id integer
Possible values:
>= 1
The Fleetio
id
of the Vehicle associated with this Fuel Entry. - vehicle_name string
The name of the Vehicle associated with this Fuel Entry.
- vendor_name string
The name of the Vendor associated with this Fuel Entry.
- is_sample boolean
- custom_fields object
*Full details on working with Custom Fields here.
- fuel_economy_for_current_user string
- fuel_economy_units_for_current_user string
Default value:
MPG
meter_entry object
A Meter Entry
id integercreated_at date-timeupdated_at date-timeauto_voided_at date-timeThe date and time at which this Meter Entry was automatically voided. Formatted according to ISO-8601 in
User
's local time.category stringPossible values: [
starting
,ending
,nightly
,manual
]A category to describe the function of this Meter Entry.
meter_type stringPossible values: [
secondary
]Indicates whether or not this Meter is a secondary Meter.
meterable_id NullableIdPossible values:
>= 1
meterable_type stringPossible values: [
FuelEntry
,Issue
,PurchaseDetail
,ServiceEntry
,SubmittedInspectionItem
,VehicleAssignment
,WorkOrder
]The type of the object with which this Meter Entry is associated.
value stringThe current value of the meter.
vehicle_id NullableIdPossible values:
>= 1
void booleanDefault value:
false
Indicates whether or not this Meter Entry has been voided.
type stringPossible values: [
GpsMeterEntry
]date dateThe date on which this Meter Entry was recorded. Formatted according to ISO-8601.
geolocation object
gps_device stringoriginal_vendor stringexception_distance_in_mi numberexception_distance_in_km numbermap_previews object
small stringlarge stringsmall_short stringlarge_short stringattachment_permissions object
read_photos booleanIndicates whether the user has read permission for photos.
manage_photos booleanIndicates whether the user has permission to manage (eg. upload, delete) photos.
read_documents booleanIndicates whether the user has read permission for documents.
manage_documents booleanIndicates whether the user has permission to manage (eg. upload, delete) documents.
- total_amount float
The total amount of the Fuel Entry.
comments object[]
A list of the comments made on this record.
id integerPossible values:
>= 1
created_at date-timeThe date and time at which this record was created.
updated_at date-timeThe date and time at which this record was most recently updated.
commentable_type CommentableTypePossible values: [
Contact
,FleetcorCard
,FuelEntry
,InventoryJournalEntry
,Issue
,Part
,PurchaseOrder
,ServiceEntry
,ServiceReminder
,SubmittedInspectionItem
,Vehicle
,VehicleAssignment
,Vendor
,WexCard
,WorkOrder
]The type of record that the Comment will be left on. Must be associated with a matching
commentable_id
.commentable_id integerPossible values:
>= 1
user_id integerPossible values:
>= 1
title string deprecatedThe title of the Comment.
comment stringThe content of the Comment message body.
user_full_name stringThe full name of the
User
who created the Comment.user_image_url stringThe image url for the
User
who created the Comment.rich_content objecthtml_content stringThe comment message body rendered as HTML.
with_mentions booleanIndicates if the message body contains @mentions.
- comments_count integer
The number of comments made on this record.
images object[]
A list of the images attached to this record.
id integerPossible values:
>= 1
created_at date-timeThe date and time at which this record was created.
updated_at date-timeThe date and time at which this record was most recently updated.
imageable_id integerPossible values:
>= 1
imageable_type ImageableTypePossible values: [
ExpenseEntry
,WorkOrder
,Equipment
,IssueResolution
,ServiceEntry
,Vendor
,ServiceProgram
,Issue
,Contact
,Part
,Vehicle
,FuelEntry
,SubmittedInspectionItem
]file_name stringThe name of the image file.
file_mime_type Image MIME TypePossible values: [
image/jpeg
,image/gif
,image/jif
,image/jfif
,image/jfi
,image/tiff
,image/png
,image/jpg
,image/jpe
,image/pdf
,image/webp
,image/tif
,image/psd
,image/raw
,image/arw
,image/cr2
,image/nrw
,image/k25
,image/bmp
,image/dip
,image/ai
,image/eps
,image/heif
,image/heic
,image/ind
,image/indd
,image/indt
,image/jp2
,image/j2k
,image/jpf
,image/jpx
,image/jpm
,image/mj2
,image/x-png
]file_size numberThe size of the image file in bytes.
file_url stringThe URL to access the image file.
full_url stringThe full URL to access the image file, including any necessary authentication or parameters.
- images_count integer
The number of images attached to this record.
documents object[]
A list of the documents attached to this record.
id integerPossible values:
>= 1
created_at date-timeThe date and time at which this record was created.
updated_at date-timeThe date and time at which this record was most recently updated.
documentable_id integerPossible values:
>= 1
documentable_type DocumentableTypePossible values: [
ServiceEntry
,FuelEntry
,Issue
,WorkOrder
,ExpenseEntry
]file_name stringThe name of the file.
file_mime_type stringThe MIME type of the file.
file_size numberThe size of the file in bytes.
file_url stringThe URL to access the file.
full_file_url stringThe full URL to access the file, including any necessary authentication or parameters.
- documents_count integer
The number of documents attached to this record.
{
"id": 0,
"created_at": "2023-03-14T13:46:27-06:00",
"updated_at": "2023-03-14T13:46:27-06:00",
"cost_per_hr": 0,
"cost_per_km": 0,
"cost_per_mi": 0,
"date": "2023-03-14T13:46:27-06:00",
"external_id": "string",
"fuel_type_id": 0,
"fuel_type_name": "string",
"kpl": 0,
"liters": "string",
"liters_per_hr": 0,
"lp100k": 0,
"mpg_uk": 0,
"mpg_us": 0,
"partial": true,
"personal": true,
"price_per_volume_unit": 0,
"raw_transaction_data": {},
"reference": "string",
"region": "string",
"reset": false,
"uk_gallons": "string",
"uk_gallons_per_hr": 0,
"us_gallons": "string",
"us_gallons_per_hr": 0,
"usage_in_hr": "string",
"usage_in_km": "string",
"usage_in_mi": "string",
"vehicle_id": 0,
"vehicle_name": "string",
"vendor_id": 0,
"vendor_name": "string",
"is_sample": true,
"custom_fields": {},
"fuel_economy_for_current_user": "string",
"fuel_economy_units_for_current_user": "MPG",
"meter_entry": {
"id": 0,
"created_at": "2024-10-07",
"updated_at": "2024-10-07",
"auto_voided_at": "2023-03-14T13:46:27-06:00",
"category": "starting",
"meter_type": "secondary",
"meterable_id": 0,
"meterable_type": "FuelEntry",
"value": "string",
"vehicle_id": 0,
"void": false,
"type": "GpsMeterEntry",
"date": "2023-03-14"
},
"geolocation": {
"gps_device": "string",
"original_vendor": "string",
"exception_distance_in_mi": 0,
"exception_distance_in_km": 0
},
"map_previews": {
"small": "string",
"large": "string",
"small_short": "string",
"large_short": "string"
},
"attachment_permissions": {
"read_photos": true,
"manage_photos": true,
"read_documents": true,
"manage_documents": true
},
"total_amount": 0,
"comments": [
{
"id": 0,
"created_at": "2023-03-14T13:46:27-06:00",
"updated_at": "2023-03-14T13:46:27-06:00",
"commentable_type": "Contact",
"commentable_id": 0,
"user_id": 0,
"comment": "string",
"user_full_name": "string",
"user_image_url": "string",
"rich_content": {},
"html_content": "string",
"with_mentions": true
}
],
"comments_count": 0,
"images": [
{
"id": 0,
"created_at": "2023-03-14T13:46:27-06:00",
"updated_at": "2023-03-14T13:46:27-06:00",
"imageable_id": 0,
"imageable_type": "ExpenseEntry",
"file_name": "string",
"file_mime_type": "image/jpeg",
"file_size": 0,
"file_url": "string",
"full_url": "string"
}
],
"images_count": 0,
"documents": [
{
"id": 0,
"created_at": "2023-03-14T13:46:27-06:00",
"updated_at": "2023-03-14T13:46:27-06:00",
"documentable_id": 0,
"documentable_type": "ServiceEntry",
"file_name": "string",
"file_mime_type": "string",
"file_size": 0,
"file_url": "string",
"full_file_url": "string"
}
],
"documents_count": 0
}
Request could not be authenticated
- application/json
- Schema
- Example (from schema)
Schema
- status integer
Possible values:
>= 400
and<= 599
- title string
A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- instance string
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
{
"status": 0,
"title": "string",
"detail": "string",
"instance": "string"
}
Insufficient permission to perform this operation
- application/json
- Schema
- Example (from schema)
Schema
- status integer
Possible values:
>= 400
and<= 599
- title string
A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- instance string
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
{
"status": 0,
"title": "string",
"detail": "string",
"instance": "string"
}
The requested resource could not be located
- application/json
- Schema
- Example (from schema)
Schema
- status integer
Possible values:
>= 400
and<= 599
- title string
A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- instance string
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
{
"status": 0,
"title": "string",
"detail": "string",
"instance": "string"
}
Unprocessable Entity
- application/json
- Schema
- Example (from schema)
- Example
Schema
errors object
typeitems string
{
"errors": {}
}
{
"errors": {
"field1": [
"error1",
"error2"
],
"field2": [
"error3"
]
}
}
Something unexpected happened
- application/json
- Schema
- Example (from schema)
Schema
- status integer
Possible values:
>= 400
and<= 599
- title string
A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- instance string
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
{
"status": 0,
"title": "string",
"detail": "string",
"instance": "string"
}