Update Charging Entry
Update a Charging 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
- additional_fees_cents integer
The amount, in cents, of any fees applied to the Charging Entry.
- approved_at date-time
The time a Charging Entry was approved.
- approved_by_id integer
The ID associated with the User who approved this Charging Entry.
- custom_fields object
*Full details on working with Custom Fields here.
- discount_cents integer
The amount, in cents, of any discounts applied to the Charging Entry, must be a negative number.
documents_attributes object[]
An array of one or more document objects to add to the record. Follow our Attaching Documents and Images guide to upload to our third party storage provider in order to obtain
file_url
.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 obtained from our storage provider that points 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.
- duration_seconds integer
The duration, in seconds, between the Charging Entry start and end events. If started_at and ended_at are provided, it will automatically calculate the duration_seconds using those attributes.
- ended_at date-time
The date and time at which the Charging Entry ended.
geolocation object
gps_device stringoriginal_vendor stringexception_distance_in_mi numberexception_distance_in_km numberimages_attributes object[]
An array of one or more image objects to add to the record. Follow our Attaching Documents and Images guide to upload to our third party storage provider in order to obtain
file_url
.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 obtained from our storage provider that points 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.
meter_entry_attributes object
Each Charging Entry can have 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.
- personal boolean
Indicates whether this Charging Entry was for personal use. This field is
false
if not provided. - price_per_kwh_cents float
The unit price per kilowatt hour for the Charging Entry.
- reference string
A reference number or identifier for this Charging Entry. This field is often used to store a receipt number or other unique identifier.
- started_at date-time
We recommend using ISO-8601 formatted dates to avoid ambiguity.
- status string
Possible values: [
in_progress
,target_reached
,ready_for_review
,manually_completed
,approved
,auto_approved
,unknown
]Default value:
manually_completed
The status of the Charging Entry. This field is "manually_completed" if not provided.
- total_amount_cents integer
The total cost, in cents, of the Charging Entry.
- total_kwh float
The total kilowatt hours of the Charging Entry.
- vehicle_id integer
Possible values:
>= 1
- vendor_id integer
Possible values:
>= 1
The Fleetio
id
of the Vendor associated with this Charging Entry.
- 200
- 401
- 403
- 404
- 422
- 500
OK
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
- additional_fees_cents integer
The amount, in cents, of any fees applied to the Charging Entry.
- approved_at date-time
The time a Charging Entry was approved.
- approved_by_id integer
The ID associated with the User who approved this Charging Entry.
- cost_per_hr string
The automatically calculated cost per hour since the last Charging Entry.
- cost_per_km string
The automatically calculated cost per kilometer since the last Charging Entry.
- cost_per_mi string
The automatically calculated cost per mile since the last Charging Entry.
- discount_cents integer
The amount, in cents, of any discounts applied to the Charging Entry, must be a negative number.
- duration_seconds integer
The duration, in seconds, between the Charging Entry start and end events. If started_at and ended_at are provided, it will automatically calculate the duration_seconds using those attributes.
- ended_at date-time
The date and time at which the Charging Entry ended.
geolocation object
gps_device stringoriginal_vendor stringexception_distance_in_mi numberexception_distance_in_km number- km_per_kwh string
The automatically calculated kilometers per kilowatt hour since the last Charging Entry.
- mi_per_kwh string
The automatically calculated miles per kilowatt hour since the last Charging Entry.
- personal boolean
Default value:
false
Indicates whether this Charging Entry was for personal use. This field is
false
if not provided. - price_per_kwh_cents string
The unit price per kilowatt hour for the Charging Entry.
- reference string
Optional data field for collecting information such as the invoice number, transaction id, or receipt number, for example.
- started_at date-time
The date and time at which this Charging Entry started.
- status string
Possible values: [
in_progress
,target_reached
,ready_for_review
,manually_completed
,approved
,auto_approved
,unknown
]Default value:
manually_completed
The status of the Charging Entry. This field is "manually_completed" if not provided.
- total_amount_cents integer
The total cost, in cents, of the Charging Entry.
- total_kwh string
The total kilowatt hours of the Charging Entry.
- usage_in_hr string
The automatically calculated usage in hours since the most recent Charging Entry.
- usage_in_km string
The automatically calculated usage in kilometers since the most recent Charging Entry.
- usage_in_mi string
The automatically calculated usage in miles since the most recent Charging Entry.
- vehicle_id integer
Possible values:
>= 1
The Fleetio
id
of the Vehicle associated with this Charging Entry. - vendor_id integer
Possible values:
>= 1
The Fleetio
id
of the Vendor associated with this Charging Entry. - comments_count integer
The number of comments on this Charging Entry.
- documents_count integer
The number of documents added to this Charging Entry.
- images_count integer
The number of images added to this Charging Entry.
- comments object[]
Comments associated with this Charging Entry.
- documents object[]
Documents associated with this Charging Entry.
- images object[]
Images associated with this Charging Entry.
{
"additional_fees_cents": 0,
"approved_at": "2024-12-19",
"approved_by_id": 0,
"cost_per_hr": "string",
"cost_per_km": "string",
"cost_per_mi": "string",
"discount_cents": 0,
"duration_seconds": 0,
"ended_at": "2023-03-14T13:46:27-06:00",
"geolocation": {
"gps_device": "string",
"original_vendor": "string",
"exception_distance_in_mi": 0,
"exception_distance_in_km": 0
},
"km_per_kwh": "string",
"mi_per_kwh": "string",
"personal": false,
"price_per_kwh_cents": "string",
"reference": "string",
"started_at": "2023-03-14T13:46:27-06:00",
"status": "manually_completed",
"total_amount_cents": 0,
"total_kwh": "string",
"usage_in_hr": "string",
"usage_in_km": "string",
"usage_in_mi": "string",
"vehicle_id": 0,
"vendor_id": 0,
"comments_count": 0,
"documents_count": 0,
"images_count": 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
}
],
"documents": [
{
"id": 0,
"created_at": "2023-03-14T13:46:27-06:00",
"updated_at": "2023-03-14T13:46:27-06:00",
"name": "string",
"description": "string",
"documentable_id": 0,
"documentable_type": "ServiceEntry",
"file_name": "string",
"file_mime_type": "string",
"file_size": 0,
"file_url": "string",
"full_file_url": "string"
}
],
"images": [
{
"id": 0,
"created_at": "2023-03-14T13:46:27-06:00",
"updated_at": "2023-03-14T13:46:27-06:00",
"name": "string",
"description": "string",
"imageable_id": 0,
"imageable_type": "ExpenseEntry",
"file_name": "string",
"file_mime_type": "string",
"file_size": 0,
"file_url": "string",
"full_url": "string"
}
]
}
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"
}