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

# Get accounts given customerId

> This operation will respond with a list of accounts given the customer id

<ResponseExample>
  ```json Credit response  theme={null}
  {
    "available": 1000,
    "balance": 1000,
    "creditLimit": 10000,
    "currency": "EUR",
    "customerId": 55667788990,
    "id": 1234567890,
    "name": "My example account name",
    "number": 123456789,
    "parentId": 9876543210,
    "paymentReference": {
      "number": 1234567897,
      "type": "MOD10"
    },
    "status": "ACCOUNT_BLOCKED",
    "template": "string"
  }
  ```

  ```json Debit response  theme={null}
  {
    "available": 1000,
    "balance": 1000,
    "currency": "EUR",
    "customerId": 55667788990,
    "iban": {
      "iban": "FI7165429021331431"
    },
    "id": 1234567890,
    "name": "My example account name",
    "number": 123456789,
    "parentId": 9876543210,
    "paymentReference": {
      "number": 1234567897,
      "type": "MOD10"
    },
    "status": "ACCOUNT_BLOCKED",
    "template": "string"
  }
  ```

  ```json Prepaid response  theme={null}
  {
    "available": 1000,
    "balance": 1000,
    "currency": "EUR",
    "customerId": 55667788990,
    "id": 1234567890,
    "name": "My example account name",
    "number": 123456789,
    "parentId": 9876543210,
    "paymentReference": {
      "number": 1234567897,
      "type": "MOD10"
    },
    "status": "ACCOUNT_BLOCKED",
    "template": "string"
  }
  ```

  ```json Fleet response  theme={null}
  {
    "available": 1000,
    "balance": 1000,
    "creditLimit": 10000,
    "currency": "EUR",
    "customerId": 55667788990,
    "id": 1234567890,
    "name": "My example account name",
    "number": 123456789,
    "parentId": 9876543210,
    "paymentReference": {
      "number": 1234567897,
      "type": "MOD10"
    },
    "status": "ACCOUNT_BLOCKED",
    "template": "string"
  }
  ```

  ```json Multi-currency response  theme={null}
  {
    "available": 1000,
    "balance": 1000,
    "currency": "EUR",
    "customerId": 55667788990,
    "id": 1234567890,
    "name": "My example account name",
    "number": 123456789,
    "parentId": 9876543210,
    "paymentReference": {
      "number": 1234567897,
      "type": "MOD10"
    },
    "status": "ACCOUNT_BLOCKED",
    "template": "string"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml account get /v4/customer/{customerId}
openapi: 3.0.3
info:
  description: Endpoint for doing various actions connected to a account
  version: '1'
  title: Account details API
  contact:
    name: Enfuce Financial Services
    url: https://enfuce.com
    email: info@enfuce.com
  x-logo:
    url: https://developer.enfuce.com/images/enfuce.svg
    altText: Enfuce logo
servers:
  - url: >-
      https://integration-api-cat2.{{environment}}.ext.{{realm}}.cia.enfuce.com/account
  - url: https://integration-api-cat2.live.ext.prod.cia.enfuce.com/account
    description: Live environment
security: []
tags:
  - name: Create an account
    description: <p>Endpoints for creating an account</p>
  - name: Update an account
    description: <p>Endpoints for updating an account</p>
  - name: Get account information
    description: Endpoints for fetching an account
paths:
  /v4/customer/{customerId}:
    get:
      tags:
        - Get account information
      summary: Get accounts given customerId
      description: >-
        This operation will respond with a list of accounts given the customer
        id
      operationId: getAccountsGivenCustomerIdV4UsingGET
      parameters:
        - name: auditUser
          in: query
          description: The audit user to log the request
          required: true
          schema:
            type: string
        - name: customerId
          in: path
          description: The customer id to fetch list of accounts for
          required: true
          schema:
            type: string
            format: biginteger
        - name: page
          in: query
          description: Current page
          schema:
            type: integer
            default: 0
        - name: size
          in: query
          description: >-
            How many accounts should be returned per page, default is 30. Cannot
            be more than 100.
          schema:
            type: integer
            default: 30
            minimum: 1
            exclusiveMinimum: false
            maximum: 100
            exclusiveMaximum: false
      responses:
        '200':
          description: Successful lookup of accounts
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                discriminator:
                  propertyName: template
                  mapping:
                    CREDIT:
                      $ref: '#/components/schemas/listCreditAccountResponse'
                    DEBIT:
                      $ref: '#/components/schemas/listDebitAccountResponse'
                    PREPAID:
                      $ref: '#/components/schemas/listPrepaidAccountResponse'
                    FLEET:
                      $ref: '#/components/schemas/listFleetAccountResponse'
                    MULTICURR_EUR_DE:
                      $ref: '#/components/schemas/listMultiCurrAccountResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
        '404':
          description: Customer does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
      deprecated: false
components:
  schemas:
    listCreditAccountResponse:
      allOf:
        - $ref: '#/components/schemas/listAccountResponse'
        - properties:
            creditLimit:
              $ref: '#/components/schemas/creditLimit'
      title: listCreditAccountResponse
    listDebitAccountResponse:
      allOf:
        - $ref: '#/components/schemas/listAccountResponse'
        - properties:
            iban:
              $ref: '#/components/schemas/iban'
      title: listDebitAccountResponse
    listPrepaidAccountResponse:
      allOf:
        - $ref: '#/components/schemas/listAccountResponse'
      title: listPrepaidAccountResponse
    listFleetAccountResponse:
      allOf:
        - $ref: '#/components/schemas/listAccountResponse'
        - properties:
            creditLimit:
              $ref: '#/components/schemas/creditLimit'
      title: listFleetAccountResponse
    listMultiCurrAccountResponse:
      allOf:
        - $ref: '#/components/schemas/listAccountResponse'
      title: listMultiCurrAccountResponse
    errorResponse:
      type: object
      properties:
        code:
          type: string
          description: An error code indicating what kind of error. I.e. HTTP error code
        message:
          type: string
          description: Error message in human-readable format
        id:
          type: string
          format: uuid
          description: Unique error identifier
        errorCode:
          type: string
          description: Enfuce code for a specific error type
        errorType:
          type: string
          description: Error type
          enum:
            - STATIC_VALIDATION_ERROR
            - DYNAMIC_VALIDATION_ERROR
            - INTEGRATION_ERROR
            - SECURITY_ERROR
            - UNEXPECTED_ERROR
        errorReason:
          type: string
          description: Free-form text explaining the error reason
        timestamp:
          type: string
          format: date-time
          description: Datetime when error occurred
    listAccountResponse:
      allOf:
        - $ref: '#/components/schemas/baseAccountResponse'
      title: listAccountResponse
    creditLimit:
      type: number
      description: Credit limit of the account
      example: 10000
    iban:
      type: object
      properties:
        iban:
          type: string
          description: An IBAN number
          example: FI7165429021331431
    baseAccountResponse:
      type: object
      properties:
        available:
          $ref: '#/components/schemas/available'
        balance:
          $ref: '#/components/schemas/balance'
        currency:
          $ref: '#/components/schemas/currency'
        customerId:
          $ref: '#/components/schemas/customerId'
        id:
          $ref: '#/components/schemas/id'
        name:
          $ref: '#/components/schemas/name'
        number:
          $ref: '#/components/schemas/accountNumber'
        parentId:
          $ref: '#/components/schemas/parentId'
        status:
          $ref: '#/components/schemas/accountStatusGet'
        paymentReference:
          $ref: '#/components/schemas/paymentReference'
        productCode:
          $ref: '#/components/schemas/productCodeInResponse'
          example: DEBIT_EUR_FI
        template:
          type: string
          description: Template name for which the account is connected to
    available:
      type: number
      description: Accounts's available amount
      example: 1000
    balance:
      type: number
      description: Account's balance
      example: 1000
    currency:
      type: string
      description: A valid ISO 4217 currency code
      pattern: '[A-Z]{3}'
      example: EUR
    customerId:
      type: string
      description: Customer id for account owner
      example: 55667788990
    id:
      type: string
      description: Unique account id for given account
      example: 1234567890
    name:
      type: string
      maxLength: 64
      description: Human readable name of an account
      example: My example account name
    accountNumber:
      type: string
      description: >-
        Unique account number for given account. Must be numeric if
        paymentRefence.type defined as MOD10 or FINNISH_7_3_1! Note that
        selected account numbers might be reserved by Enfuce for internal usage.
      maxLength: 64
      example: 123456789
    parentId:
      type: string
      description: Account id of parent account. If empty then this is parent contract.
      example: 9876543210
    accountStatusGet:
      type: string
      enum:
        - ACCOUNT_BLOCKED
        - ACCOUNT_COLLECTION
        - ACCOUNT_OK
        - ACCOUNT_TO_CLOSE
        - ACCOUNT_CLOSED
        - ACCOUNT_AUTO_CLOSED
      title: accountStatusGet
    paymentReference:
      type: object
      description: >-
        Number connected to account that will be used to map incoming payments
        to
      required:
        - type
      properties:
        number:
          type: string
          description: Payment reference number
          example: 1234567897
        type:
          type: string
          enum:
            - MOD10
            - FINNISH_7_3_1
            - CUSTOMER_SPECIFIC
    productCodeInResponse:
      type: string
      description: |
        The productCode is used to determine the specific account product.
        Values of the field are dependent on institution setup.
      example: CARD_EUR_FI

````