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

# Submit interval meter records

> Accepts an array of meter records holding energy use values for each period.

- If you are metering a device, submit records under `device_id`.
- If you are metering a location (i.e. main supply address meter), submit records under `location_id`.



## OpenAPI

````yaml api-reference/zero/flatpeak-api-spec-zero.json PUT /meters/interval
openapi: 3.0.3
info:
  description: Flatpeak API
  version: 2024-08-24.zero
  title: Flatpeak API
  termsOfService: https://flatpeak.com/legal
  contact:
    name: Technical Support
    email: support@flatpeak.com
    url: https://flatpeak.com/contact
  license:
    name: Apache 2.0
    url: https://flatpeak.com/legal
servers:
  - url: https://api.flatpeak.com
    description: Location
security: []
tags:
  - name: Consumption
    description: Consumption operations
  - name: Customers
    description: Customer operations
  - name: Devices
    description: Device operations
  - name: Meters
    description: Meter readings operations
  - name: Events
    description: Events operations
  - name: Login
    description: Bearer auth token operations
  - name: Connect
    description: Connect operations
  - name: Locations
    description: Location operations
  - name: Rates
    description: Rates operations
  - name: Costs
    description: Consumption cost calculations
  - name: Schedules
    description: Consumption schedules
  - name: Tariffs
    description: Tariff operations
  - name: Slots
    description: Slots operations
externalDocs:
  description: Location documentation
  url: https://docs.flatpeak.com
paths:
  /meters/interval:
    parameters: []
    put:
      tags:
        - Meters
      summary: Submit interval meter records
      description: >-
        Accepts an array of meter records holding energy use values for each
        period.


        - If you are metering a device, submit records under `device_id`.

        - If you are metering a location (i.e. main supply address meter),
        submit records under `location_id`.
      operationId: submit-meter-flex-reads
      requestBody:
        $ref: '#/components/requestBodies/MeterRecordsSubmit'
      responses:
        '200':
          $ref: '#/components/responses/MeterRecords'
        '403':
          $ref: '#/components/responses/403'
        '500':
          $ref: '#/components/responses/500'
      security:
        - bearerAuth: []
components:
  requestBodies:
    MeterRecordsSubmit:
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/MeterRecordSubmit'
  responses:
    '403':
      description: 403 bad credentials
      content:
        application/json:
          schema:
            type: object
            x-examples:
              Example:
                message: Bad credentials
            properties:
              message:
                type: string
                example: Bad credentials
          examples: {}
    '500':
      description: 500 error
      content:
        application/json:
          schema:
            type: object
            x-examples:
              '':
                message: Internal Server Error
            properties:
              message:
                type: string
                example: Internal Server Error
          examples: {}
    MeterRecords:
      description: ''
      content:
        application/json:
          schema:
            type: object
            x-examples:
              Example:
                meter_events_accepted: 1732
            properties:
              id:
                type: string
                x-stoplight:
                  id: hntltnlblf3pj
                example: bat_65e42b7827c0526548432b9f
                description: Flatpeak ID for this submission.
              object:
                type: string
                x-stoplight:
                  id: y85ovdjf47ve4
                example: meter_batch
                description: Object name, i.e. `meter_batch`.
              records_submitted:
                type: integer
                x-stoplight:
                  id: xhemd7v86wwqe
                description: Number of received metering records.
                example: 18379
              records_accepted:
                type: integer
                x-stoplight:
                  id: yo3qq0mxlg1x1
                description: Number of accepted metering records.
                example: 18378
              records_processed:
                type: integer
                x-stoplight:
                  id: 8z90t8ilt6fmm
                description: Number of processed metering records.
                example: 32
              failed_records:
                x-stoplight:
                  id: fy48c5zw2sbok
                type: array
                description: Returns details of any meter records that failed processing
                items:
                  $ref: '#/components/schemas/FailedMeterRecord'
              time_created:
                type: string
                x-stoplight:
                  id: ej7w537oearlg
                example: '2023-11-07T05:31:56Z'
                description: Time when this object was created. In UTC.
                format: date-time
              account_id:
                type: string
                x-stoplight:
                  id: 7wdddwif8ztmn
                example: acc_661677911f2197045e6cf1b1
                description: Flatpeak account ID.
  schemas:
    MeterRecordSubmit:
      type: object
      x-stoplight:
        id: ggohkmqooylpl
      x-examples: {}
      title: Metering Record Request
      properties:
        location_id:
          type: string
          example: loc_641b90b758fb8e6293716e40
          description: Flatpeak `location_id` that you are submitting metering records for.
          x-stoplight:
            id: 2bm76gqje3md9
        device_id:
          type: string
          example: dev_65e6d8334c8d715963d99db3
          description: >-
            Flatpeak `device_id` you are submitting metering records for. If you
            provided both `location_id` and `device_id`, your records will be
            attributed to `device_id`.
          x-stoplight:
            id: bfmf0zbkzkerf
        session_reference_id:
          type: string
          example: SESSION1234567890
          description: >-
            A reference for a group of metering records, for example, a charging
            session ID.
          x-stoplight:
            id: 5y5sztjasnwz9
        record_reference_id:
          type: string
          example: MET1234567890
          description: A reference for this metering record, for example, meter log ID.
          x-stoplight:
            id: 84jizggwu276k
        direction:
          type: string
          example: IMPORT
          x-stoplight:
            id: sa3mw8pvfzn4h
          description: >-
            Indicates metering direction. Set to `IMPORT` or `EXPORT`. Defaults
            to `IMPORT`.
        tariff_rate:
          type: string
          example: IMPORT
          x-stoplight:
            id: sa3mw8pvfzn4h
          description: >-
            Indicates tariff direction. Set to `IMPORT`, `EXPORT` or `LOCAL`.
            Defaults to match the `direction` parameter.
        measurand:
          type: string
          example: TRANSFERRED
          x-stoplight:
            id: g4u5bdu6vpt8g
          description: >-
            Possible values are `OFFERED` or `TRANSFERRED`. Currently, only
            `TRANSFERRED` is supported.
        units:
          type: string
          example: W
          description: >-
            Units of measure, supported values are W, KW, WH, KWH. When W or KW
            units are submitted, cost will be calculated using the constant
            power rate over the period.
        confidence:
          type: number
          example: 1
          description: >-
            Estimated confidence of data where '1' is 100% accurate and 0.1 is
            10% accurate. Defaults to '1'. *This parameter is in beta. Contact
            support to enable*.
          x-stoplight:
            id: 2zl60dheu7apt
        value:
          type: number
          example: 20567
          description: Amount of energy measured.
        start_time:
          type: string
          example: '2022-02-01T10:30:00Z'
          description: >-
            Metering record start time. In RFC3339 format, e.g.
            `2023-06-15T09:00:00Z` or with time-offset, e.g.
            `2023-06-15T08:00:00+01:00`.
        end_time:
          type: string
          example: '2022-02-01T11:00:00Z'
          description: >-
            Metering record end time. In RFC3339 format, e.g.
            `2023-06-15T09:00:00Z` or with time-offset, e.g.
            `2023-06-15T08:00:00+01:00`.
      required:
        - location_id
        - units
        - value
        - start_time
        - end_time
    FailedMeterRecord:
      title: FailedMeterRecord
      x-stoplight:
        id: nsh6y5iwx5iar
      type: object
      properties:
        record_num:
          type: integer
          x-stoplight:
            id: vdq3wirudmcbk
          description: 0 based position of the metering record in the meter batch.
          example: 1
        record_reference_id:
          type: string
          x-stoplight:
            id: qp5iderk6m8i0
          description: The reference for this metering record if it was provided.
          example: MET1234567890
        error:
          type: string
          x-stoplight:
            id: 3vnfq6t815h55
          description: Error message for this metering record.
          example: end_time must not be before start_time
      required:
        - record_num
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authenticate with `bearer_token` you obtained from
        [/login](/api-reference/zero/login/create-a-bearer-token) endpoint.

````