> ## 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.

# Account import

> This section provides information how to submit account details to our database.



## OpenAPI

````yaml /api/openapi_api_adapter.json post /amlyze-ws-rest/account
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/account:
    post:
      tags:
        - account
      summary: Account import
      description: >-
        This section provides information how to submit account details to our
        database.
      operationId: postAccount
      requestBody:
        description: Account to create or update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AmlyzeAccountApi'
            examples:
              mandatory_fields:
                summary: Mandatory fields example
                value:
                  communicationNumber: 1b1e1c23-f62f-4338-90b9-8d54993dd2cd
                  requester: SYSTEMX
                  businessUnit: sandbox
                  businessEntityExtId: ORG_IMPORT_B1_TEST
                  accountExtId: ACC_001
                  accountNumber: LI9208800274335945522
                  accountStatus: ACTIVE
                  currencyCode: EUR
                  openingDate: '2023-09-05T08:07:34.605Z'
              all_fields:
                summary: All fields example
                value:
                  communicationNumber: 1b1e1c23-f62f-4338-90b9-8d54993dd2cd
                  requester: SYSTEMX
                  businessUnit: sandbox
                  businessEntityExtId: ORG_IMPORT_B1_TEST
                  accountExtId: ACC_001
                  accountNumber: LI9208800274335945522
                  accountStatus: CLOSED
                  currencyCode: EUR
                  openingDate: '2023-09-05T08:07:34.605Z'
                  bic: AMLYZEXX22
                  isOtherFinInstAccount: true
                  bankTitle: MyBank
                  accountPurpose: PURPOSE_INVEST
                  accountType: ACC_CC
                  closingDate: '2023-12-11T12:10:11+02:00'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AccountResultApi'
        '400':
          description: >-
            Bad Request. The request is invalid, e.g., a mandatory field is
            missing or a value is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountResultApi'
              example:
                resultType: REQUEST_REJECTED
                errorCode: O001
                errorDescription: CommunicationNumber already used in AMLYZE
        '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:
    AmlyzeAccountApi:
      properties:
        accountExtId:
          description: >-
            External account identification number used to track activity
            regarding the specific account.
          type: string
        accountNumber:
          description: Unique account identification number used in performing operations.
          type: string
        accountPurpose:
          description: The purpose of owning the account in question.
          type: string
        accountStatus:
          description: >-
            Refers to the current condition or state of an account. `ACTIVE` -
            Account is in use. `SUSPENDED` - Account is restricted. `CLOSED` -
            Account is disabled.
          enum:
            - ACTIVE
            - CLOSED
            - SUSPENDED
          type: string
        accountType:
          description: >-
            Categorizes accounts by their intended purposes and features. Values
            can be retrieved from the `/classifier/accountType` endpoint.
          type: string
          x-dynamic-enum:
            path: /classifier/accountType
            valueField: code
        action:
          description: >-
            Element is used to indicate whether an account needs to be created
            or the existing account's data to be updated. If not provided,
            'CREATE' is the default. When using 'UPDATE', all existing data for
            the account will be replaced by the new data provided.
          enum:
            - CREATE
            - UPDATE
          type: string
        bankTitle:
          description: Title of the bank with which the operations are happening.
          type: string
        bic:
          description: >-
            Bank identifier code for account number. Mandatory if
            `isOtherFinInstAccount` is `true`.
          type: string
        businessEntityExtId:
          description: >-
            External business entity indicator. Refers to the same value used
            for the `customerExtId`, which links an account to a customer. This
            identifier corresponds to the client's identifier in the financial
            institution.
          type: string
        businessUnit:
          description: >-
            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. Value is taken from /classifier/businessUnit
            endpoint.❗Mandatory field for clients utilizing a
            multi-organizational solution. Omit this parameter unless instructed
            about it. 
          maxLength: 255
          type: string
          x-dynamic-enum:
            path: /classifier/businessUnit
            valueField: code
        closingDate:
          description: >-
            Account closing date. Timestamp format: RFC 3339 (ISO 8601).
            Mandatory if `accountStatus` is `CLOSED`. if `accountStatus`:
            `SUSPENDED`, instead of `closingDate` field, `suspensionReasons`
            field could be provided. e.g. `suspensionReasons`:`Security breach
            investigation in progress.`
          format: date-time
          type: string
        communicationNumber:
          description: >-
            Unique number of communication. It is used for risk assessment
            callback.
          maxLength: 255
          type: string
        currencyCode:
          description: International currency code.
          type: string
        isOtherFinInstAccount:
          description: >-
            Declaring whether the account belongs to other financial
            institution. If true, the `bic` value needs to be provided.
          type: boolean
        openingDate:
          description: 'Account opening date. Timestamp format: RFC 3339 (ISO 8601)'
          format: date-time
          type: string
        requester:
          description: Name of the system requesting web service.
          maxLength: 100
          type: string
        suspensionReasons:
          description: >-
            A reason for suspension. Can only be provided if `accountStatus` is
            `SUSPENDED`.
          type: string
      required:
        - accountExtId
        - accountNumber
        - accountStatus
        - businessEntityExtId
        - communicationNumber
        - currencyCode
        - openingDate
        - requester
      type: object
    AccountResultApi:
      properties:
        errorCode:
          type: string
        errorDescription:
          type: string
        resultType:
          enum:
            - ERROR
            - OK
          type: string
      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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````