# Retrieve periodic energy usage intervals for a charging sub-session Retrieve periodic energy usage intervals for a specific charging sub-session. If you are looking for intervals that cover the whole time energy is being delivered (which are therefore of irregular length) use the merge_consecutive_intervals query parameter. Endpoint: GET /charging_sub_sessions/{charging_sub_session_id}/energy_usage Version: 2.0 Security: oauth2 ## Path parameters: - `charging_sub_session_id` (string, required) Uniquely identify a specific charging sub-session. Example: "csub01HSH04KDEWF6Z4DB2J77J74K5" ## Header parameters: - `EvEnergy-Version` (number) Specify the version of this endpoint to use. Enum: 2 ## Query parameters: - `expand` (array) Specify a url field to expand into a nested resource. Enum: "charging_sub_session" - `energy_delivered_watt_hours__gt` (integer) Filters for values greater than a value. - `merge_consecutive_intervals` (boolean) Request consecutive intervals of energy delivery (and intervals of no delivery) to be merged into combined periods of irregular length. ## Response 200 fields (application/json): - `url` (string) Example: "https://api.ev.energy/v2/charging_sub_sessions/csub01HSH04KDEWF6Z4DB2J77J74K5/energy_usage" - `currency` (string) The currency that prices for intervals are quoted in. Note that we always use the smallest unit of the currency. Example: "GBP" - `charging_sub_session` (string) Example: "https://api.ev.energy/v2/charging_sub_sessions/csub01HSH04KDEWF6Z4DB2J77J74K5" - `intervals` (array) A list of energy usage intervals for this charging sub-session. - `intervals.interval_seconds` (integer) The number of seconds that this interval lasts for. - `intervals.started_at` (string) When this interval began. - `intervals.total_energy_delivered_watt_hours` (integer) The total number of watt hours delivered during the interval. - `intervals.energy_delivered_by_price` (object) Energy delivered during the interval, broken down by the price paid for that energy. For example, if half the period was at peak price (50p) and half at off-peak price (20p), this field would contain an entry for 20p and an entry for 50p with the total energy delivered at each price. Note that prices are always quoted in the smallest sub-unit of the currency. (Ie. cents for USD, pence for GBP.) - `intervals.energy_delivered_by_price.price` (string) The price paid for the energy in the smallest unit of the currency. Example: "21.3" - `intervals.energy_delivered_by_price.energy_delivered_watt_hours` (integer) Example: 1800 - `last_updated_at` (string) The datetime when the energy usages were last updated at. ## Response 400 fields (application/problem+json): - `type` (string) Example: "https://api.ev.energy/v2/problems/example-problem/" - `status` (number) Example: 400 - `title` (string, required) Example: "Short description" - `detail` (string, required) Example: "Long, more specific description." - `instance` (string) Example: "https://api.ev.energy/v2/users/user01HN2P75GBNFRJPCZJXEFVXH5E" - `notification` (object) Something that the user should be informed about. - `notification.id` (string, required) Unique identifier for the Notification Example: "notf67O36PLTFDB57M0E5L33JZLGM0" - `notification.url` (string, required) Example: "https://api.ev.energy/notifications/notf67O36PLTFDB57M0E5L33JZLGM0" - `notification.message_id` (string, required) Internal identifier for this notification type. E.g. 'ERR0023' - `notification.category` (any, required) Category of this notification type Enum: "ACTIONABLE", "SERVICE", "RETRY", "MARKETING", "INTERNAL" - `notification.event_time` (string, required) The timestamp of the event described by this notification - `notification.short_text_title` (string, required) Short title for the notification - `notification.short_text_body` (string, required) Short description of the event being notified - `notification.detail_page_title` (string) Title of a help page giving more information about this notification - `notification.detail_page_body` (string) Text of a help page giving more information about this notification - `notification.external_link` (string,null) URL of a web page giving further information about this notification - `notification.external_button_label` (string) Text to be displayed on a button leading to the external_link location - `notification.read_at` (string) When the user examined the contents of this notification - `notification.resolved_at` (string) When the problem associated with this notification was resolved ## Response 401 fields (application/problem+json): - `status` (number) Example: 401 - `title` (string, required) Example: "Unauthorized" - `detail` (string, required) Example: "Authentication credentials were not provided." ## Response 403 fields (application/problem+json): - `status` (number) Example: 403 - `title` (string, required) Example: "Forbidden" - `detail` (string, required) Example: "You do not have permission to perform this action." ## Response 404 fields (application/problem+json): - `status` (number) Example: 404 - `title` (string, required) Example: "Not found" - `detail` (string, required) Example: "Resource does not exist or cannot be accessed." ## Response 406 fields (application/problem+json): - `status` (number) Example: 406 - `title` (string, required) Example: "Not Acceptable" - `detail` (string, required) Example: "Could not satisfy the request Accept header." ## Response 429 fields (application/problem+json): - `type` (string) Example: "https://api.ev.energy/v2/problems/example-problem/" - `status` (number) Example: 400 - `title` (string, required) Example: "Short description" - `detail` (string, required) Example: "Long, more specific description." - `instance` (string) Example: "https://api.ev.energy/v2/users/user01HN2P75GBNFRJPCZJXEFVXH5E" - `notification` (object) Something that the user should be informed about. - `notification.id` (string, required) Unique identifier for the Notification Example: "notf67O36PLTFDB57M0E5L33JZLGM0" - `notification.url` (string, required) Example: "https://api.ev.energy/notifications/notf67O36PLTFDB57M0E5L33JZLGM0" - `notification.message_id` (string, required) Internal identifier for this notification type. E.g. 'ERR0023' - `notification.category` (any, required) Category of this notification type Enum: "ACTIONABLE", "SERVICE", "RETRY", "MARKETING", "INTERNAL" - `notification.event_time` (string, required) The timestamp of the event described by this notification - `notification.short_text_title` (string, required) Short title for the notification - `notification.short_text_body` (string, required) Short description of the event being notified - `notification.detail_page_title` (string) Title of a help page giving more information about this notification - `notification.detail_page_body` (string) Text of a help page giving more information about this notification - `notification.external_link` (string,null) URL of a web page giving further information about this notification - `notification.external_button_label` (string) Text to be displayed on a button leading to the external_link location - `notification.read_at` (string) When the user examined the contents of this notification - `notification.resolved_at` (string) When the problem associated with this notification was resolved