> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nox.energy/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Device Consumption Historical

> Get the measured historical consumption data for devices associated with your energy supplier account in kWh for a specific timeframe in 15min granularity.

 Our example timeframe might be outside this range.

 The timestamp refers to the data that will happen in the next 15 minutes after the timestamp.



## OpenAPI

````yaml /api-docs/supplier-control/openapi-thermal-control.json get /v1/device/consumption/historical
openapi: 3.1.0
info:
  title: NOX Energy API - Thermal Control
  description: >
    # Thermal Control API Documentation


    This documentation shows only the endpoints available to thermal control
    users.


    ## Authentication


    1. Get your API key from [NOX Energy](mailto:support@nox.energy).

    2. Include the API key in your API calls with the header: `x-api-key:
    YOUR_API_KEY`.


    ## Access Level


    This documentation is specifically for **thermal control users** who have
    access to these endpoints.


    Base URL: [https://api.nox.energy](https://api.nox.energy)
  version: 1.0.0
servers:
  - url: https://api.nox.energy
    description: Production Server
security:
  - ApiKeyAuth: []
tags:
  - name: Asset Info
    description: API to get basic information about your assets.
  - name: Device Consumption
    description: API to get consumption data of your devices.
  - name: Thermal Control
    description: API for thermal control specific endpoints.
  - name: User Management
    description: API endpoints to manage users and their data.
paths:
  /v1/device/consumption/historical:
    get:
      tags:
        - Device Consumption
      summary: Get Device Consumption Historical
      description: >-
        Get the measured historical consumption data for devices associated with
        your energy supplier account in kWh for a specific timeframe in 15min
        granularity.

         Our example timeframe might be outside this range.

         The timestamp refers to the data that will happen in the next 15 minutes after the timestamp.
      operationId: get_device_consumption_historical_v1_device_consumption_historical_get
      parameters:
        - name: start_time
          in: query
          required: true
          schema:
            type: string
            description: |

              Start time when the consumption measurement were taken.
              The time is in UTC in ISO 8601 format.



              Time format examples:
              - 2023-10-01T00:00:00Z
              - 2023-10-01T00:00:00
            title: Start Time
          description: |

            Start time when the consumption measurement were taken.
            The time is in UTC in ISO 8601 format.



            Time format examples:
            - 2023-10-01T00:00:00Z
            - 2023-10-01T00:00:00
        - name: end_time
          in: query
          required: true
          schema:
            type: string
            description: |

              End time when the consumption measurement were taken.
              The time is in UTC in ISO 8601 format.



              Time format examples:
              - 2023-10-01T00:00:00Z
              - 2023-10-01T00:00:00
            title: End Time
          description: |

            End time when the consumption measurement were taken.
            The time is in UTC in ISO 8601 format.



            Time format examples:
            - 2023-10-01T00:00:00Z
            - 2023-10-01T00:00:00
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            description: >

              The maximum number of items to return per page of results.


              This should be used together with the `next_token` parameter to
              paginate through results.


              Read the pagination parameter documentation for more details.
            default: 1000
            title: Limit
          description: >

            The maximum number of items to return per page of results.


            This should be used together with the `next_token` parameter to
            paginate through results.


            Read the pagination parameter documentation for more details.
        - name: next_token
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >

              The `next_token` is a token used to retrieve the next page of
              results when there are more results

              than can fit in a single page(=API response).


              By default, the API will return a `next_token` of the first page
              if no token was given as a parameter.


              If the token is `null` you have reached the end of the results.


              This should be used together with the `limit` parameter to
              paginate through results.




              To get all results of your call, you can keep calling the same API
              call with the previously returned `next_token` until it returns
              `null`.
            title: Next Token
          description: >

            The `next_token` is a token used to retrieve the next page of
            results when there are more results

            than can fit in a single page(=API response).


            By default, the API will return a `next_token` of the first page if
            no token was given as a parameter.


            If the token is `null` you have reached the end of the results.


            This should be used together with the `limit` parameter to paginate
            through results.




            To get all results of your call, you can keep calling the same API
            call with the previously returned `next_token` until it returns
            `null`.
        - name: aggregated
          in: query
          required: false
          schema:
            type: boolean
            description: >

              If `true`, sum the consumption of the devices.


              If `false`, return the consumption of each device separately.


              **Note**: If `device_id` is given in the device_id parameter, the
              aggregated parameter is ignored.
            default: false
            title: Aggregated
          description: >

            If `true`, sum the consumption of the devices.


            If `false`, return the consumption of each device separately.


            **Note**: If `device_id` is given in the device_id parameter, the
            aggregated parameter is ignored.
        - name: device_id
          in: query
          required: false
          schema:
            type: string
            description: >

              Device ID to get consumption of. If `None`, all devices are
              included.
            title: Device Id
          description: >

            Device ID to get consumption of. If `None`, all devices are
            included.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: >-
                  Response Get Device Consumption Historical V1 Device
                  Consumption Historical Get
              example:
                data:
                  - measurement_time: 2025-04-29 16:00
                    device_id: 0910947a-fab9-450e-b5ac-48e9c4f3e725
                    consumption: '2.88'
                    supplier_user_id: '1234'
                  - measurement_time: 2025-04-29 16:00
                    device_id: 1400d85b-47c3-49e1-9317-ae1bfccb635c
                    consumption: '1.16'
                    supplier_user_id: '12345'
                meta:
                  energy_supplier: Energy Supplier A
                  next_token: >-
                    AYABeH50-To0SRdAWC9BY9aCIaEAAAABAAdhd3Mta21zAE5hcm46YXdzOmttczpldS1jZW50cmFsLTE6NDQxMjA5Mzg3MTExOmtleS80Yzk3N2IxMi02NDA4LTRhNzktYWIyMy1hZTk0Y2Y0YTFmZjQAuAECAQB4KL0
                  consumption_unit: kWh
                  granularity: 15min
                  output_timezone: UTC
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: 'API Key authentication. Enter your API key in the format: YOUR_API_KEY'

````