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

> Obtain direct debit authorisations for a specified list of accounts



## OpenAPI

````yaml /openapi/cdr.yml post /v1/banking/customer/{customerId}/accounts/direct-debits
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/banking/customer/{customerId}/accounts/direct-debits:
    post:
      tags:
        - Banking
        - Direct Debits
      summary: Get Direct Debits For Specific Accounts
      description: Obtain direct debit authorisations for a specified list of accounts
      operationId: listDirectDebitsSpecificAccounts
      parameters:
        - $ref: '#/components/parameters/customerId'
        - $ref: '#/components/parameters/productCategory'
        - $ref: '#/components/parameters/open-status'
        - $ref: '#/components/parameters/is-owned'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/page-size'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestAccountIds'
        description: Array of specific accountIds to obtain authorisations for
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ResponseBankingDirectDebitAuthorisationList
          description: >-
            List of direct debit authorisations for the accounts queried in
            request body
        '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
    productCategory:
      description: >-
        Used to filter results on the productCategory field applicable to
        accounts. Any one of the valid values for this field can be supplied. If
        absent then all accounts returned.)
      explode: true
      in: query
      name: product-category
      required: false
      schema:
        enum:
          - BUSINESS_LOANS
          - CRED_AND_CHRG_CARDS
          - LEASES
          - MARGIN_LOANS
          - OVERDRAFTS
          - PERS_LOANS
          - REGULATED_TRUST_ACCOUNTS
          - RESIDENTIAL_MORTGAGES
          - TERM_DEPOSITS
          - TRADE_FINANCE
          - TRANS_AND_SAVINGS_ACCOUNTS
          - TRAVEL_CARDS
        type: string
      style: form
    open-status:
      description: >-
        Used to filter results according to open/closed status. Values can be
        OPEN, CLOSED or ALL. If absent then ALL is assumed
      explode: true
      in: query
      name: open-status
      required: false
      schema:
        default: ALL
        enum:
          - ALL
          - CLOSED
          - OPEN
        type: string
      style: form
    is-owned:
      description: >-
        Filters accounts based on whether they are owned by the authorised
        customer.  True for owned accounts, false for unowned accounts and
        absent for all accounts
      explode: true
      in: query
      name: is-owned
      required: false
      schema:
        type: boolean
      style: form
    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
  schemas:
    RequestAccountIds:
      properties:
        data:
          $ref: '#/components/schemas/RequestAccountIds_data'
      required:
        - data
      type: object
    ResponseBankingDirectDebitAuthorisationList:
      example:
        data:
          directDebitAuthorisations:
            - accountId: d27d9568-b894-4b95-b34c-9dfd77f20cf2
              authorisedEntity:
                description: Utility Company
                financialInstitution: MyBank
                abn: 11100022
                acn: 111100022
              lastDebitDateTime: '2025-01-01T07:00:00.000Z'
              lastDebitAmount: '231.56'
        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/ResponseBankingDirectDebitAuthorisationList_data
        links:
          $ref: '#/components/schemas/LinksPaginated'
        meta:
          $ref: '#/components/schemas/MetaPaginated'
      required:
        - data
        - links
        - meta
      type: object
    RequestAccountIds_data:
      properties:
        accountIds:
          items:
            description: Array of specific accountIds to obtain authorisations for
            type: string
            x-cds-type: ASCIIString
          type: array
      required:
        - accountIds
      type: object
    ResponseBankingDirectDebitAuthorisationList_data:
      properties:
        directDebitAuthorisations:
          description: The list of authorisations returned
          items:
            $ref: '#/components/schemas/BankingDirectDebit'
          type: array
      required:
        - directDebitAuthorisations
      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
    BankingDirectDebit:
      properties:
        accountId:
          description: >-
            A unique ID of the account adhering to the standards for ID
            permanence.
          type: string
          x-cds-type: ASCIIString
        authorisedEntity:
          $ref: '#/components/schemas/BankingAuthorisedEntity'
        lastDebitDateTime:
          description: >-
            The date and time of the last debit executed under this
            authorisation
          type: string
          x-cds-type: DateTimeString
        lastDebitAmount:
          description: The amount of the last debit executed under this authorisation
          type: string
          x-cds-type: AmountString
      required:
        - accountId
        - authorisedEntity
      type: object
    BankingAuthorisedEntity:
      properties:
        description:
          description: >-
            Description of the authorised entity derived from previously
            executed direct debits
          type: string
        financialInstitution:
          description: >-
            Name of the financial institution through which the direct debit
            will be executed. Is required unless the payment is made via a
            credit card scheme
          type: string
        abn:
          description: Australian Business Number for the authorised entity
          type: string
        acn:
          description: Australian Company Number for the authorised entity
          type: string
        arbn:
          description: Australian Registered Body Number for the authorised entity
          type: string
      type: object
      x-conditional:
        - financialInstitution
  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

````