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

# List device rewards

> Returns the rewards a device has earned under its VPP programs, most recent first.



## OpenAPI

````yaml energy-api/reference/flatpeak-api-spec-energy.json GET /devices/{device_id}/rewards
openapi: 3.0.3
info:
  description: >-
    The Flatpeak Energy API connects energy hardware (batteries, EV chargers,
    vehicles, heat pumps, water heaters, solar and generators) to electricity
    prices, grid fees, and VPP programs.


    ## Create bearer token

    Obtain a bearer token from `POST /auth/tokens` using your `account_id` and
    `secret_key` via basic auth, then send it as `Authorization: Bearer <token>`
    on every request.


    ## Base URL

    `https://energy-api.flatpeak.com`


    ## Pagination

    List endpoints return a `list` envelope with `data`, `next_cursor`, and
    `url`. Page forward by passing `next_cursor` as `cursor` on the next
    request, until it is `null`. Cursors are opaque and bound to the endpoint
    and query parameters that issued them.


    ## Errors

    Every non-2xx response uses a standard error envelope with `object`, `type`,
    `code`, and `message`. Codes are machine-readable and safe to branch on.


    ## Money

    Monetary values are decimal numbers and are always paired with a
    `currency_code` (ISO 4217). Energy is expressed in kilowatt hours (kWh).


    ## Live vs test

    `live_mode` marks live or test data.
  version: 2027-01-01.busbar
  title: Flatpeak Energy 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://energy-api.flatpeak.com
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: >-
      Exchange your account credentials for a bearer token to authenticate API
      requests.
  - name: Connect
    description: >-
      Create and retrieve Connect sessions. Connect drives the user journeys for
      tariff connection, VPP enrollment, and [tariff error
      reporting](/energy-api/reference/connect/tariff/error-report). What
      happens in those journeys reaches your backend as [Connect
      webhooks](/energy-api/guides/platform/events).
    x-tariff-description: >-
      Create and retrieve Connect sessions. Connect drives the user journeys for
      tariff connection and [tariff error
      reporting](/energy-api/reference/connect/tariff/error-report). What
      happens in those journeys reaches your backend as [Connect
      webhooks](/energy-api/guides/platform/events).
  - name: Users
    description: Create, retrieve, update, delete, and list users.
  - name: Locations
    description: Create, retrieve, update, delete, and list locations.
  - name: Devices
    description: >-
      Create, retrieve, update, delete and list devices; submit and retrieve
      their state; read and write their shared settings.
  - name: Meters
    description: Submit meter records and check batch status.
  - name: Tariffs
    description: Create, retrieve, delete, and list tariffs.
  - name: Prices
    description: Retrieve and audit calculated energy prices.
  - name: Costs
    description: Calculate the monetary cost of imported or exported energy.
  - name: Optimizations
    description: >-
      Rank the connected tariff to find the best times to consume or export
      energy, as inputs to your own scheduling.
  - name: Dispatch
    description: >-
      Fetch the VPP operator's instructions for a device, and confirm what the
      device will deliver.
  - name: Events
    description: Retrieve and list account events.
  - name: VPP Enrollments
    description: Create, retrieve and list VPP enrollments, and unenroll a device.
  - name: VPP Programs
    description: List VPP programs available to devices.
  - name: VPP Events
    description: >-
      VPP events committed by VPP operators, with your fleet's share and its
      per-device allocation. You can take over the allocation while it is open.
  - name: Operator groups
    description: >-
      Read-only views of the device groups VPP operators define. You see the
      groups that touch your fleet, and only your own devices in them.
  - name: Zones
    description: >-
      Network areas VPP operators define that touch your fleet. Read-only. You
      see only your own devices in them.
externalDocs:
  description: Documentation
  url: https://docs.flatpeak.com
paths:
  /devices/{device_id}/rewards:
    parameters:
      - schema:
          type: string
        name: device_id
        in: path
        required: true
        description: Flatpeak Device ID.
    get:
      tags:
        - Devices
      summary: List device rewards
      description: >-
        Returns the rewards a device has earned under its VPP programs, most
        recent first.
      operationId: list-device-rewards
      parameters:
        - schema:
            type: string
            format: date-time
          name: start_time
          in: query
          required: false
          description: Start time, in UTC.
        - schema:
            type: string
            format: date-time
          name: end_time
          in: query
          required: false
          description: End time, in UTC.
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
      responses:
        '200':
          $ref: '#/components/responses/DeviceRewardList'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
        '503':
          $ref: '#/components/responses/503'
components:
  parameters:
    limit:
      name: limit
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 30
      description: Maximum number of objects to return per page, default 30. Maximum 100.
    cursor:
      name: cursor
      in: query
      required: false
      schema:
        type: string
      description: >-
        Pagination cursor. Pass `next_cursor` from the previous response
        unchanged; omit for the first page. A cursor used with different
        parameters returns `400 cursor_invalid`.
  responses:
    '401':
      description: '401 Unauthorized: authentication credentials are missing or invalid.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '403':
      description: '403 Forbidden: you do not have permission to access this resource.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '404':
      description: '404 Not Found: the requested resource does not exist.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '429':
      description: '429 Too Many Requests: the rate limit has been exceeded.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '500':
      description: >-
        500 Internal Server Error: an unexpected error occurred. Safe to retry
        with backoff.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '503':
      description: >-
        503 Service Unavailable: the service is temporarily down for
        maintenance. Retry after the indicated delay.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    DeviceRewardList:
      description: Device reward list response.
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/ListResponse'
              - type: object
                properties:
                  data:
                    type: array
                    description: The page of results.
                    items:
                      $ref: '#/components/schemas/Reward'
          example:
            object: list
            url: /devices/dev_63a6087272941ef077a8fd3e/rewards
            next_cursor: null
            data:
              - id: rwd_1a2b3c4d5e6f7a8b9c0d1e2f
                object: reward
                live_mode: true
                device_id: dev_63a6087272941ef077a8fd3e
                program_id: vpr_5c8d1f2a7b3e4d6c9a0f1b2c
                program_display_name: Community Powershare
                start_time: '2026-08-04T20:00:00Z'
                end_time: '2026-08-04T22:00:00Z'
                vpp_event_id: vpe_7d2a4c6e9b1f3a5c8e0d2f4b
                delivered_energy_kwh: -7.9
                committed_energy_kwh: null
                basis: DELIVERED_KWH
                rate: 0.35
                amount: 2.77
                currency_code: USD
                status: ACCRUED
                payment_reference: null
                time_paid: null
                time_created: '2026-08-04T22:40:00Z'
              - id: rwd_5b1e8c3a7d9f2e4b6a0c1d73
                object: reward
                live_mode: true
                device_id: dev_63a6087272941ef077a8fd3e
                program_id: vpr_5c8d1f2a7b3e4d6c9a0f1b2c
                program_display_name: Community Powershare
                start_time: '2026-07-01T00:00:00Z'
                end_time: '2026-10-01T00:00:00Z'
                vpp_event_id: null
                delivered_energy_kwh: null
                committed_energy_kwh: null
                basis: FIXED
                rate: 15
                amount: 15
                currency_code: USD
                status: APPROVED
                payment_reference: null
                time_paid: null
                time_created: '2026-10-01T00:05:00Z'
  schemas:
    ListResponse:
      type: object
      description: Standard envelope for paginated list endpoints.
      required:
        - object
        - url
        - next_cursor
        - data
      properties:
        object:
          type: string
          enum:
            - list
          default: list
          description: Object type.
        url:
          type: string
          description: URL for this list.
          example: /users
        next_cursor:
          type: string
          nullable: true
          description: >-
            Opaque cursor for the next page. Pass it as `cursor` on the next
            request. `null` on the last page. Do not stop on a short or empty
            `data` array.
          example: djF8ZXZ0fGE5ZjN8NjYxNjc3ODdjMTY1MmIzZmJlYmE1ZjAx
        data:
          type: array
          items: {}
          description: The page of results.
    Reward:
      title: Reward
      type: object
      description: >-
        A reward entry earned by the device under a VPP program. The VPP
        operator pays the user; Flatpeak keeps the ledger. Show it natively in
        your app.
      properties:
        id:
          type: string
          description: Flatpeak Reward ID.
          example: rwd_1a2b3c4d5e6f7a8b9c0d1e2f
        object:
          type: string
          example: reward
          description: Object type, `reward`.
          enum:
            - reward
        live_mode:
          type: boolean
          description: '`true` for objects created in live mode.'
          example: true
        device_id:
          type: string
          description: Flatpeak Device ID the entry rewards.
          example: dev_63a6087272941ef077a8fd3e
        program_id:
          type: string
          description: Flatpeak VPP Program ID the entry accrued under.
          example: vpr_5c8d1f2a7b3e4d6c9a0f1b2c
        program_display_name:
          type: string
          example: Community Powershare
          description: Program name shown to the user.
        start_time:
          type: string
          format: date-time
          description: >-
            Start of the commitment or event window the entry rewards. For a
            `FIXED` reward, the start of the calendar period.
          example: '2026-08-09T17:00:00Z'
        end_time:
          type: string
          format: date-time
          description: >-
            End of the commitment or event window the entry rewards. For a
            `FIXED` reward, the end of the calendar period.
          example: '2026-08-09T19:00:00Z'
        vpp_event_id:
          type: string
          nullable: true
          example: vpe_7d2a4c6e9b1f3a5c8e0d2f4b
          description: >-
            Flatpeak VPP event ID the entry rewards. `null` for a `FIXED`
            reward, which follows calendar periods.
        delivered_energy_kwh:
          type: number
          nullable: true
          example: -7.6
          description: >-
            Delivered energy the entry rewards, in kWh, signed like power:
            negative for export. It is the `delivered_energy_kwh` of the
            device's delivery, so it can rise as late meter records arrive while
            the entry is `ACCRUED`, and is fixed once the entry is `APPROVED`.
            `null` for a `FIXED` or `COMMITTED_KWH` reward.
        committed_energy_kwh:
          type: number
          nullable: true
          example: null
          description: >-
            Energy of the device's locked share of the event the entry rewards,
            in kWh, signed like power: negative for export. Set for a
            `COMMITTED_KWH` reward; `null` for every other `basis`.
        basis:
          type: string
          enum:
            - FIXED
            - EVENT
            - DELIVERED_KWH
            - COMMITTED_KWH
          example: DELIVERED_KWH
          description: >-
            The reward in the enrollment's `terms.rewards` the entry was priced
            from.


            | Value | `amount` |

            | :--- | :--- |

            | `FIXED` | `rate` for the calendar period, pro-rated by the days
            the enrollment was `ACTIVE` |

            | `EVENT` | `rate`, for an event the device delivered in full |

            | `DELIVERED_KWH` | The absolute value of `delivered_energy_kwh`
            multiplied by `rate` |

            | `COMMITTED_KWH` | The absolute value of `committed_energy_kwh`
            multiplied by `rate`, whatever the device then delivered |
        rate:
          type: number
          example: 0.35
          description: The `rate` of that reward, in large currency units.
        amount:
          type: number
          description: >-
            Amount in large currency units. Provisional while the entry is
            `ACCRUED`, when late meter records can still change it. Fixed once
            the entry is `APPROVED`.
          example: 2.58
        currency_code:
          type: string
          example: GBP
          description: Currency of `amount`, as an ISO 4217 code.
        status:
          type: string
          enum:
            - ACCRUED
            - APPROVED
            - PAID
          description: >-
            `ACCRUED` entries are provisional, and their amount can still change
            as meter records arrive. `APPROVED` entries are confirmed by the VPP
            operator, and their amount is fixed. `PAID` entries have been paid
            by the VPP operator.
          example: APPROVED
        payment_reference:
          type: string
          nullable: true
          description: >-
            The VPP operator's reference for the payment. `null` until the entry
            is `PAID`.
          example: PAY-2026-09-000184
        time_paid:
          type: string
          format: date-time
          nullable: true
          description: Time the entry was marked paid, in UTC. `null` until then.
          example: '2026-09-05T09:00:00Z'
        time_created:
          type: string
          format: date-time
          description: Time when the entry accrued, in UTC.
          example: '2026-08-09T19:05:00Z'
      required:
        - id
        - object
        - live_mode
        - device_id
        - program_id
        - program_display_name
        - vpp_event_id
        - start_time
        - end_time
        - amount
        - currency_code
        - status
        - time_created
    Error:
      type: object
      description: Standard error envelope returned by every non-2xx response.
      required:
        - object
        - type
        - code
        - message
      properties:
        object:
          type: string
          enum:
            - error
          default: error
          description: Object type.
        type:
          type: string
          description: High-level error category.
          example: invalid_request
        code:
          type: string
          description: Machine-readable error code, safe to branch on.
          example: not_found
        message:
          type: string
          description: Human-readable description of the error.
          example: The requested resource could not be found.
        context:
          type: string
          description: Optional originating context, for example `api.price_get`.
          example: api.price_get
        live_mode:
          type: boolean
          description: Whether the error occurred against live or test data.
        time_created:
          type: string
          format: date-time
          description: Time the error was generated (RFC 3339).
          example: '2026-01-01T00:00:00Z'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token obtained from POST /auth/tokens.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.