Charging Entries

Create Charging Entry

Creates a new Charging Entry

post/charging_entries

Request

Request body

additional_fees_centsinteger

The amount, in cents, of any fees applied to the Charging Entry.

approved_atstring date-time

The time a Charging Entry was approved.

approved_by_idinteger

The ID associated with the User who approved this Charging Entry.

custom_fieldsCustomFields nullable

*Full details on working with Custom Fields here.

discount_centsinteger

The amount, in cents, of any discounts applied to the Charging Entry, must be a negative number.

duration_secondsinteger

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_atstring date-time

The date and time at which the Charging Entry ended.

personalboolean

Indicates whether this Charging Entry was for personal use. This field is false if not provided.

price_per_kwh_centsnumber float

The unit price per kilowatt hour for the Charging Entry.

referencestring

A reference number or identifier for this Charging Entry. This field is often used to store a receipt number or other unique identifier.

started_atstring date-time required

We recommend using ISO-8601 formatted dates to avoid ambiguity.

status'in_progress' | 'target_reached' | 'ready_for_review' | 'manually_completed' | 'approved' | 'auto_approved' | 'unknown'

The status of the Charging Entry. This field is "manually_completed" if not provided.

total_amount_centsinteger

The total cost, in cents, of the Charging Entry.

total_kwhnumber float

The total kilowatt hours of the Charging Entry.

vehicle_idinteger required
vendor_idinteger

The Fleetio id of the Vendor associated with this Charging Entry.

Example request

{
  "approved_at": "2023-03-14T13:46:27-06:00",
  "ended_at": "2023-03-14T13:46:27-06:00",
  "meter_entry_attributes": {
    "value": 108043
  },
  "started_at": "2023-03-14T13:46:27-06:00"
}

Response

OK

additional_fees_centsinteger nullable required

The amount, in cents, of any fees applied to the Charging Entry.

approved_atstring date-time nullable required

The time a Charging Entry was approved.

approved_by_idinteger nullable required

The ID associated with the User who approved this Charging Entry.

cost_per_hrstring nullable required

The automatically calculated cost per hour since the last Charging Entry.

cost_per_kmstring nullable required

The automatically calculated cost per kilometer since the last Charging Entry.

cost_per_mistring nullable required

The automatically calculated cost per mile since the last Charging Entry.

discount_centsinteger nullable required

The amount, in cents, of any discounts applied to the Charging Entry, must be a negative number.

duration_secondsinteger required

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_atstring date-time nullable required

The date and time at which the Charging Entry ended.

km_per_kwhstring required

The automatically calculated kilometers per kilowatt hour since the last Charging Entry.

mi_per_kwhstring required

The automatically calculated miles per kilowatt hour since the last Charging Entry.

personalboolean required

Indicates whether this Charging Entry was for personal use. This field is false if not provided.

price_per_kwh_centsstring nullable required

The unit price per kilowatt hour for the Charging Entry.

referencestring nullable required

Optional data field for collecting information such as the invoice number, transaction id, or receipt number, for example.

started_atstring date-time required

The date and time at which this Charging Entry started.

status'in_progress' | 'target_reached' | 'ready_for_review' | 'manually_completed' | 'approved' | 'auto_approved' | 'unknown' required

The status of the Charging Entry. This field is "manually_completed" if not provided.

total_amount_centsinteger nullable required

The total cost, in cents, of the Charging Entry.

total_kwhstring required

The total kilowatt hours of the Charging Entry.

usage_in_hrstring nullable required

The automatically calculated usage in hours since the most recent Charging Entry.

usage_in_kmstring nullable required

The automatically calculated usage in kilometers since the most recent Charging Entry.

usage_in_mistring nullable required

The automatically calculated usage in miles since the most recent Charging Entry.

vehicle_idinteger required

The Fleetio id of the Vehicle associated with this Charging Entry.

vendor_idinteger nullable required

The Fleetio id of the Vendor associated with this Charging Entry.

comments_countinteger required

The number of comments on this Charging Entry.

documents_countinteger required

The number of documents added to this Charging Entry.

images_countinteger required

The number of images added to this Charging Entry.

Example response

{
  "ended_at": "2023-03-14T13:46:27-06:00",
  "started_at": "2023-03-14T13:46:27-06:00",
  "comments": [
    {
      "created_at": "2023-03-14T13:46:27-06:00",
      "updated_at": "2023-03-14T13:46:27-06:00"
    }
  ],
  "documents": [
    {
      "created_at": "2023-03-14T13:46:27-06:00",
      "updated_at": "2023-03-14T13:46:27-06:00"
    }
  ],
  "images": [
    {
      "created_at": "2023-03-14T13:46:27-06:00",
      "updated_at": "2023-03-14T13:46:27-06:00"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.