> ## 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 Invoices For Specific Accounts

> Obtain invoices for a specified set of accounts



## OpenAPI

````yaml /openapi/cdr.yml post /v1/energy/customer/{customerId}/accounts/invoices
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/invoices:
    post:
      tags:
        - Energy
        - Invoices
      summary: Get Invoices For Specific Accounts
      description: Obtain invoices for a specified set of accounts
      operationId: listInvoicesForAccounts
      parameters:
        - $ref: '#/components/parameters/customerId'
        - $ref: '#/components/parameters/newest-date'
        - $ref: '#/components/parameters/oldest-date'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/page-size'
      requestBody:
        $ref: '#/components/requestBodies/accountIdList'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnergyInvoiceListResponse'
          description: List of invoices for the queried accounts
        '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
    newest-date:
      description: >-
        Constrain the request to records with effective date at or before this
        date.  If absent defaults to current date.  Format is aligned to
        DateString common type
      explode: true
      in: query
      name: newest-date
      required: false
      schema:
        type: string
      style: form
      x-cds-type: DateString
    oldest-date:
      description: >-
        Constrain the request to records with effective date at or after this
        date. If absent defaults to newest-date minus 24 months.  Format is
        aligned to DateString common type
      explode: true
      in: query
      name: oldest-date
      required: false
      schema:
        type: string
      style: form
      x-cds-type: DateString
    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:
    EnergyInvoiceListResponse:
      example:
        data:
          invoices:
            - accountId: 019a09f5-f0bf-7341-91e4-919f1a028b08
              invoiceNumber: '125'
              issueDate: '2025-10-01'
              dueDate: '2025-16-01'
              period:
                endDate: '2025-09-30'
                startDate: '2025-07-01'
              invoiceAmount: '120.00'
              gstAmount: '12.00'
              payOnTimeDiscount:
                gstAmount: '0.10'
                discountAmount: '1.00'
                date: '2025-16-01'
              balanceAtIssue: '0.00'
              servicePoints:
                - 019a09f9-7a2d-7591-94dd-695bf62c70c9
              electricity:
                totalGst: '12.00'
                totalGenerationCredits: '0.00'
                totalOnceOffCharges: '0.00'
                totalOnceOffDiscounts: '0.00'
                totalUsageCharges: '120.00'
              paymentStatus: NOT_PAID
        meta:
          totalRecords: 1
          totalPages: 1
        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
      properties:
        data:
          $ref: '#/components/schemas/EnergyInvoiceListResponse_data'
        links:
          $ref: '#/components/schemas/LinksPaginated'
        meta:
          $ref: '#/components/schemas/MetaPaginated'
      required:
        - data
        - links
        - meta
      type: object
    EnergyInvoiceListResponse_data:
      properties:
        invoices:
          description: Array of invoices sorted by issue date in descending order
          items:
            $ref: '#/components/schemas/EnergyInvoice'
          type: array
      required:
        - invoices
      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
    EnergyInvoice:
      properties:
        accountId:
          description: The ID of the account for which the invoice was issued
          type: string
        invoiceNumber:
          description: The number assigned to this invoice by the energy Retailer
          type: string
        issueDate:
          description: >-
            The date that the invoice was actually issued (as opposed to
            generated or calculated)
          type: string
          x-cds-type: DateString
        dueDate:
          description: The date that the invoice is due to be paid
          type: string
          x-cds-type: DateString
        period:
          $ref: '#/components/schemas/EnergyInvoice_period'
        invoiceAmount:
          description: The net amount due for this invoice regardless of previous balance
          type: string
          x-cds-type: AmountString
        gstAmount:
          description: >-
            The total GST amount for this invoice.  If absent then zero is
            assumed
          type: string
          x-cds-type: AmountString
        payOnTimeDiscount:
          $ref: '#/components/schemas/EnergyInvoice_payOnTimeDiscount'
        balanceAtIssue:
          description: The account balance at the time the invoice was issued
          type: string
          x-cds-type: AmountString
        servicePoints:
          description: >-
            Array of service point IDs to which this invoice applies. May be
            empty if the invoice contains no electricity usage related charges
          items:
            type: string
          type: array
        gas:
          $ref: '#/components/schemas/EnergyInvoiceGasUsageCharges'
        electricity:
          $ref: '#/components/schemas/EnergyInvoiceElectricityUsageCharges'
        accountCharges:
          $ref: '#/components/schemas/EnergyInvoiceAccountCharges'
        paymentStatus:
          description: Indicator of the payment status for the invoice
          enum:
            - PAID
            - PARTIALLY_PAID
            - NOT_PAID
          type: string
      required:
        - accountId
        - balanceAtIssue
        - invoiceNumber
        - issueDate
        - paymentStatus
        - servicePoints
      type: object
      x-conditional:
        - period
    EnergyInvoice_period:
      description: >-
        Object containing the start and end date for the period covered by the
        invoice.  Mandatory if any usage or demand based charges are included in
        the invoice
      properties:
        startDate:
          description: The start date of the period covered by this invoice
          type: string
          x-cds-type: DateString
        endDate:
          description: The end date of the period covered by this invoice
          type: string
          x-cds-type: DateString
      required:
        - endDate
        - startDate
      type: object
    EnergyInvoice_payOnTimeDiscount:
      description: A discount for on time payment
      properties:
        discountAmount:
          description: >-
            The amount that will be discounted if the invoice is paid by the
            date specified
          type: string
          x-cds-type: AmountString
        gstAmount:
          description: >-
            The GST amount that will be discounted if the invoice is paid by the
            date specified.  If absent then zero is assumed
          type: string
          x-cds-type: AmountString
        date:
          description: >-
            The date by which the invoice must be paid to receive the pay on
            time discount
          type: string
          x-cds-type: DateString
      required:
        - date
        - discountAmount
      type: object
    EnergyInvoiceGasUsageCharges:
      properties:
        totalUsageCharges:
          description: >-
            The aggregate total of usage charges for the period covered by the
            invoice (exclusive of GST)
          type: string
          x-cds-type: AmountString
        totalGenerationCredits:
          description: >-
            The aggregate total of generation credits for the period covered by
            the invoice (exclusive of GST)
          type: string
          x-cds-type: AmountString
        totalOnceOffCharges:
          description: >-
            The aggregate total of any once off charges arising from electricity
            usage for the period covered by the invoice (exclusive of GST)
          type: string
          x-cds-type: AmountString
        totalOnceOffDiscounts:
          description: >-
            The aggregate total of any once off discounts or credits arising
            from electricity usage for the period covered by the invoice
            (exclusive of GST)
          type: string
          x-cds-type: AmountString
        otherCharges:
          description: >-
            Optional array of charges that may be part of the invoice (for e.g.
            environmental charges for C&I consumers) (exclusive of GST)
          items:
            $ref: '#/components/schemas/EnergyInvoiceGasUsageCharges_otherCharges'
          type: array
        totalGst:
          description: >-
            The total GST for all electricity usage charges.  If absent then
            zero is assumed
          type: string
          x-cds-type: AmountString
      required:
        - totalGenerationCredits
        - totalOnceOffCharges
        - totalOnceOffDiscounts
        - totalUsageCharges
      type: object
    EnergyInvoiceElectricityUsageCharges:
      properties:
        totalUsageCharges:
          description: >-
            The aggregate total of usage charges for the period covered by the
            invoice (exclusive of GST)
          type: string
          x-cds-type: AmountString
        totalGenerationCredits:
          description: >-
            The aggregate total of generation credits for the period covered by
            the invoice (exclusive of GST)
          type: string
          x-cds-type: AmountString
        totalOnceOffCharges:
          description: >-
            The aggregate total of any once off charges arising from electricity
            usage for the period covered by the invoice (exclusive of GST)
          type: string
          x-cds-type: AmountString
        totalOnceOffDiscounts:
          description: >-
            The aggregate total of any once off discounts or credits arising
            from electricity usage for the period covered by the invoice
            (exclusive of GST)
          type: string
          x-cds-type: AmountString
        otherCharges:
          description: >-
            Optional array of charges that may be part of the invoice (for e.g.
            environmental charges for C&I consumers) (exclusive of GST)
          items:
            $ref: '#/components/schemas/EnergyInvoiceGasUsageCharges_otherCharges'
          type: array
        totalGst:
          description: >-
            The total GST for all electricity usage charges.  If absent then
            zero is assumed
          type: string
          x-cds-type: AmountString
      required:
        - totalGenerationCredits
        - totalOnceOffCharges
        - totalOnceOffDiscounts
        - totalUsageCharges
      type: object
    EnergyInvoiceAccountCharges:
      description: >-
        Object contains account level charges and credits related to electricity
        usage
      properties:
        totalCharges:
          description: >-
            The aggregate total of account level charges for the period covered
            by the invoice
          type: string
          x-cds-type: AmountString
        totalDiscounts:
          description: >-
            The aggregate total of account level discounts or credits for the
            period covered by the invoice
          type: string
          x-cds-type: AmountString
        totalGst:
          description: >-
            The total GST for all account level charges.  If absent then zero is
            assumed
          type: string
          x-cds-type: AmountString
      required:
        - totalCharges
        - totalDiscounts
      type: object
    EnergyInvoiceGasUsageCharges_otherCharges:
      properties:
        type:
          description: Type of charge. Assumed to be other if absent
          enum:
            - ENVIRONMENTAL
            - REGULATED
            - NETWORK
            - METERING
            - RETAIL_SERVICE
            - RCTI
            - OTHER
          type: string
        amount:
          description: The aggregate total of charges for this item (exclusive of GST)
          type: string
          x-cds-type: AmountString
        description:
          description: A free text description of the type of charge
          type: string
      required:
        - amount
        - description
      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

````