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

# Get Balances For Specific Energy Accounts

> Obtain the current balance for a specified set of accounts



## OpenAPI

````yaml /openapi/cdr.yml post /v1/energy/customer/{customerId}/accounts/balances
openapi: 3.0.3
info:
  description: Fiskil Data Holder as a Service (DHaaS) endpoints for the Energy sector
  title: Fiskil Data APIs
  version: 1.5.0
servers:
  - url: https://api.provider.fiskil.com
security:
  - bearerAuth: []
paths:
  /v1/energy/customer/{customerId}/accounts/balances:
    post:
      tags:
        - Energy
        - Balances
      summary: Get Balances For Specific Energy Accounts
      description: Obtain the current balance for a specified set of accounts
      operationId: listBalancesForAccounts
      parameters:
        - $ref: '#/components/parameters/customerId'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/page-size'
      requestBody:
        $ref: '#/components/requestBodies/accountIdList'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnergyBalanceListResponse'
          description: Successful response
        '404':
          $ref: '#/components/responses/responseErrorCustomerIdNotFound'
        '422':
          $ref: '#/components/responses/responseErrorAccountsNotInBody'
components:
  parameters:
    customerId:
      description: >-
        Unique ID of a customer. This ID must not change for the lifecycle of
        the customer
      explode: false
      in: path
      name: customerId
      required: true
      schema:
        type: string
      style: simple
    page:
      description: Page of results to request (standard pagination)
      explode: true
      in: query
      name: page
      required: false
      schema:
        type: integer
      style: form
      x-cds-type: PositiveInteger
    page-size:
      description: Page size to request.  Default is 25 (standard pagination)
      explode: true
      in: query
      name: page-size
      required: false
      schema:
        type: integer
      style: form
      x-cds-type: PositiveInteger
  requestBodies:
    accountIdList:
      content:
        application/json:
          schema:
            example:
              data:
                accountIds:
                  - account-1
                  - account-2
            properties:
              data:
                properties:
                  accountIds:
                    description: Array of specific accountIds to obtain data for
                    items:
                      type: string
                    type: array
                required:
                  - accountIds
                type: object
            required:
              - data
            type: object
      description: Request payload containing list of specific Accounts to obtain data for
      required: true
  schemas:
    EnergyBalanceListResponse:
      example:
        data:
          balances:
            - accountId: 019a09f1-a76c-7751-9fee-45e34c25523a
              balance: '120.00'
        links:
          first: page=1&page-size=25&oldest-date=2023-04-24
          last: page=4&page-size=25&oldest-date=2023-04-24
          next: page=3&page-size=25&oldest-date=2023-04-24
          prev: page=1&page-size=25&oldest-date=2023-04-24
        meta:
          totalRecords: 1
          totalPages: 1
      properties:
        data:
          $ref: '#/components/schemas/EnergyBalanceListResponse_data'
        links:
          $ref: '#/components/schemas/LinksPaginated'
        meta:
          $ref: '#/components/schemas/MetaPaginated'
      required:
        - data
        - links
        - meta
      type: object
    EnergyBalanceListResponse_data:
      properties:
        balances:
          description: Array of account balances
          items:
            $ref: '#/components/schemas/EnergyBalanceListResponse_data_balances'
          type: array
      required:
        - balances
      type: object
    LinksPaginated:
      description: >-
        URL Query parameters to obtain different pages of the response. Fiskil
        will combine these with the rest of the request URL to build full link
        URLs in the final response.
      example:
        first: page=1&page-size=25&oldest-date=2023-04-24
        last: page=4&page-size=25&oldest-date=2023-04-24
        next: page=3&page-size=25&oldest-date=2023-04-24
        prev: page=1&page-size=25&oldest-date=2023-04-24
      properties:
        first:
          description: >-
            A url-encoded query for the first page of this result set. Mandatory
            if this response is not the first page.
          type: string
        prev:
          description: >-
            A url-encoded query for the previous page. Mandatory if this
            response is not the first page
          type: string
        next:
          description: >-
            A url-encoded query for the next page. Mandatory if this response is
            not the last page.
          type: string
        last:
          description: >-
            A url-encoded query for the last page. Mandatory if this response is
            not the last page.
          type: string
      type: object
    MetaPaginated:
      example:
        totalRecords: 150
        totalPages: 6
      properties:
        totalRecords:
          description: >-
            The total number of records in the full set. See
            [pagination](#pagination).
          type: integer
          x-cds-type: NaturalNumber
        totalPages:
          description: >-
            The total number of pages in the full set. See
            [pagination](#pagination).
          type: integer
          x-cds-type: NaturalNumber
      required:
        - totalPages
        - totalRecords
      type: object
    GenericError:
      example:
        error: An error message
      type: object
      properties:
        error:
          type: string
          description: A message describing what caused the error
      required:
        - error
    EnergyBalanceListResponse_data_balances:
      example:
        accountId: accountId
        balance: balance
      properties:
        accountId:
          description: The ID of the account
          type: string
        balance:
          description: >-
            The current balance of the account.  A positive value indicates that
            amount is owing to be paid.  A negative value indicates that the
            account is in credit
          type: string
          x-cds-type: AmountString
      required:
        - accountId
        - balance
      type: object
  responses:
    responseErrorCustomerIdNotFound:
      description: The customer ID in the URL path is invalid or not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GenericError'
            example:
              error: Customer not found
    responseErrorAccountsNotInBody:
      description: One or more of the accounts specified in the request body do not exist
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GenericError'
            example:
              error: Account in query not found
  securitySchemes:
    bearerAuth:
      description: >
        The Fiskil Data Provider will include a self-signed JWT as a Bearer
        token in the `Authorization` header.

        You should verify this JWT using the JWKS URL you can find for your Data
        Provider instance in the Fiskil

        Console. To verify the JWT you **must**:
          * Verify the signature
          * Ensure the token has not expired by checking the `exp` claim
          * The `sub` and `iss` claims are your data provider subdomain
          * The `aud` claim is the URI of the resource being requested (excluding any query parameters)
          * The `jti` value is unique
        For further detail on security and authentication refer to our
        [Authentication](/docs/get-started/authentication) documentation
      type: http
      scheme: bearer
      bearerFormat: JWT

````