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

# Batch import of account balances



## OpenAPI

````yaml /api/openapi_api_adapter.json post /amlyze-ws-rest/batch-account-balances
openapi: 3.1.0
info:
  title: OpenAPI definition
  version: v0
servers:
  - url: https://{{baseUrl}}
    description: Generated server url
security:
  - bearerAuth: []
tags: []
paths:
  /amlyze-ws-rest/batch-account-balances:
    post:
      tags:
        - account
      summary: Batch import of account balances
      operationId: registerBatchAccountBalances
      requestBody:
        description: A list of account balances to register
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchAccountBalancesRequestApi'
            examples:
              mandatory_fields:
                summary: Mandatory fields example
                value:
                  accountBalances:
                    - communicationNumber: commNumber0
                      requester: financial_institution
                      balanceType: STATEMENT_BALANCE
                      accountExtId: ORG20231117550
                      businessUnit: sandbox
                      balanceAt: '2023-09-05T08:07:34.605Z'
                      value: 11111111111
                      equivalentValue: 33333
                    - communicationNumber: commNumber1
                      requester: financial_institution
                      balanceType: STATEMENT_BALANCE
                      accountExtId: ACC_744251ab-d599-473e-a79f-8bd993a8b33e
                      businessUnit: sandbox
                      balanceAt: '2023-09-05T08:07:34.605Z'
                      value: 11111111111
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchAccountBalancesResponseApi'
              example:
                results:
                  - resultType: REQUEST_ACCEPTED
                    communicationNumber: comNumber0
                    accountExtId: accountExtId0
                    businessUnit: sandbox
                    timeElapsedMs: 203
                  - resultType: REQUEST_REJECTED
                    communicationNumber: comNumber1
                    accountExtId: accountExtId1
                    businessUnit: sandbox
                    errorCode: O005
                    errorDescription: CommunicationNumber already used in AMLYZE
                    timeElapsedMs: 20
                timeElapsedMs: 223
        '400':
          description: >-
            Bad Request. The request is invalid, e.g., a mandatory field is
            missing or a value is incorrect. A list of possible error codes and
            their descriptions is available in the endpoint documentation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiAdapterErrorResponse'
              example:
                resultType: REQUEST_REJECTED
                errorCode: O001
                errorDescription: extId is mandatory
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiAdapterErrorResponse'
              example:
                timestamp: '2024-05-26T16:49:50.237+00:00'
                status: 404
                error: Not Found
                path: /amlyze-ws-rest/batch-account-balances
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiAdapterErrorResponse'
              example:
                resultType: REQUEST_REJECTED
                status: 500
                error: Internal Server Error
components:
  schemas:
    BatchAccountBalancesRequestApi:
      properties:
        accountBalances:
          items:
            $ref: '#/components/schemas/AccountBalanceApi'
          type: array
      required:
        - accountBalances
      type: object
    BatchAccountBalancesResponseApi:
      properties:
        results:
          items:
            $ref: '#/components/schemas/BatchAccountBalanceResultApi'
          type: array
        timeElapsedMs:
          format: int64
          type: integer
      type: object
    ApiAdapterErrorResponse:
      properties:
        errorCode:
          type: string
        errorDescription:
          type: string
        resultType:
          type: string
        errors:
          type: array
          items:
            type: string
        timestamp:
          type: string
        status:
          type: number
        error:
          type: string
        path:
          type: string
    AccountBalanceApi:
      properties:
        accountExtId:
          description: >-
            External account identification number used to track activity
            regarding the specific account.
          type: string
        balanceAt:
          description: Balance datetime.
          format: date-time
          type: string
        balanceType:
          description: Type of account balance.
          type: string
        businessUnit:
          description: >-
            Mandatory field for clients utilizing a multi-organizational
            solution. It serves to specify the unique identifier for the
            business unit. Business units are logical groupings of users and
            data. Each business unit can have its own set of users, permissions,
            and data access rules.
          type: string
        communicationNumber:
          description: >-
            Unique number of communication. It is used for risk assessment
            callback.
          type: string
        equivalentValue:
          description: Equivalent balance value.
          type: number
        requester:
          description: Name of the system requesting web service.
          maxLength: 100
          type: string
        value:
          description: Balance value.
          type: number
      required:
        - accountExtId
        - balanceAt
        - communicationNumber
        - requester
        - value
      type: object
    BatchAccountBalanceResultApi:
      properties:
        accountExtId:
          description: >-
            External account identification number used to track activity
            regarding the specific account.
          type: string
        businessUnit:
          description: >-
            Mandatory field for clients utilizing a multi-organizational
            solution. It serves to specify the unique identifier for the
            business unit. Business units are logical groupings of users and
            data. Each business unit can have its own set of users, permissions,
            and data access rules.
          type: string
        communicationNumber:
          description: Unique number of communication
          maxLength: 255
          type: string
        errorCode:
          description: Error code.
          type: string
        errorDescription:
          description: Error description.
          type: string
        resultType:
          description: result type of specific batch element.
          enum:
            - REQUEST_ACCEPTED
            - REQUEST_REJECTED
          type: string
        timeElapsedMs:
          description: Time elapsed in milliseconds.
          format: int64
          type: integer
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````