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

# Daily maximum power

> The service returns the daily maximal power of a given site between two specified dates.



## OpenAPI

````yaml /api-reference/energy-consumption.yaml get /v3/sites/{site-id}/elec-max-powers
openapi: 3.1.0
info:
  title: Energy consumption
  termsOfService: TODO
  contact:
    email: api@datanumia.com
  version: 2.0.0
servers:
  - url: https://api.home.datanumia.com/api
    description: Production Server
security: []
paths:
  /v3/sites/{site-id}/elec-max-powers:
    get:
      tags:
        - Electric energy consumptions
      summary: Daily maximum power
      description: >-
        The service returns the daily maximal power of a given site between two
        specified dates.
      operationId: getMaxPowers
      parameters:
        - name: site-id
          in: path
          description: The site identifier
          required: true
          schema:
            type: string
        - name: beginTs
          in: query
          description: >-
            The starting date (excluded) to return daily maximal power from. If
            not specified, it will be set using the tenant history limit
            configuration.
          required: false
          schema:
            type: string
            format: date-time
          example: '2021-01-01T00:00:00.00Z'
        - name: endTs
          in: query
          description: >-
            The ending date (included) until which to return daily maximal
            power. If not specified, it will be set with the current date.
          required: false
          schema:
            type: string
            format: date-time
          example: '2021-02-01T00:00:00.00Z'
        - name: categories
          in: query
          description: >-
            Categories of the requested power. The default values depend on the
            tenant. Allowed values : SUPPLIER, MARKETER, RTM
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - SUPPLIER
                - RTM
                - MARKETER
      responses:
        '200':
          description: OK - return the maximum power values for the requested period.
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/MaxPowersDto'
        '400':
          description: >-
            Bad request. Possible error codes: [INCONSISTENT_PERIOD,
            INVALID_DATE_FORMAT]
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Site not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: Unexpected error
          content: {}
components:
  schemas:
    MaxPowersDto:
      properties:
        maxPowers:
          type: array
          items:
            $ref: '#/components/schemas/MaxPowerDto'
        maxMaxPower:
          $ref: '#/components/schemas/MaxPowerByPeriodDto'
        units:
          $ref: '#/components/schemas/MaxPowerUnitsDto'
    ApiError:
      type: object
      properties:
        errorCode:
          type: string
        errorDescription:
          type: string
    MaxPowerDto:
      properties:
        date:
          type: string
          format: date-time
          description: Timestamp of the day beginning, according to the tenant timezone.
          example: '2023-03-01T00:00:00+01:00'
        value:
          type: number
          description: Maximum power, in watts, reached by the site on this day.
          example: 3240
    MaxPowerByPeriodDto:
      properties:
        date:
          type: string
          format: date-time
          description: >-
            Timestamp of the day beginning, according to the tenant timezone, of
            the maximum power reached by the site on the whole period.
          example: '2023-03-23T00:00:00+01:00'
        value:
          type: number
          description: Maximum power, in watts, reached by the site on the whole period.
          example: 5200
    MaxPowerUnitsDto:
      properties:
        value:
          type: string
          description: Unit in which power is expressed.
          example: WH

````