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

# Create fleet account

> This operation will create a fleet account



## OpenAPI

````yaml account post /v4/FLEET/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/FLEET/customer/{customerId}:
    post:
      tags:
        - Create an account
      summary: Create fleet account
      description: This operation will create a fleet account
      operationId: createFleetAccountV4UsingPOST
      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 of which customer you want to create the account on
          required: true
          schema:
            type: string
            format: biginteger
      requestBody:
        $ref: '#/components/requestBodies/createFleetResourceBody'
      responses:
        '201':
          description: Successful creation of the account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/resourceResponse'
        '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:
  requestBodies:
    createFleetResourceBody:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/createFleetResourceBody'
      description: >-
        The fields that you want to apply to your newly created account, these
        values will override the predefined template values
      required: true
  schemas:
    resourceResponse:
      type: object
      properties:
        description:
          type: string
          description: Short description of the result of the action
        id:
          type: string
          description: Will contain the ID of the resource that has been created or updated
      title: resourceResponse
    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
    createFleetResourceBody:
      allOf:
        - $ref: '#/components/schemas/createLiableBaseResourceBody'
        - properties:
            creditLimit:
              $ref: '#/components/schemas/creditLimit'
            invoiceDayOfMonth:
              $ref: '#/components/schemas/invoiceDayOfMonth'
            invoiceDeliveryMethod:
              $ref: '#/components/schemas/invoiceDeliveryMethod'
            externalCustomerReference:
              $ref: '#/components/schemas/externalCustomerReference'
            productCode:
              type: string
              description: >
                This field is used when the institution has multiple account
                products setup.

                The productCode is used to determine the specific account
                product.

                Use of this field as well as the values of the field, is
                dependent on institution setup and should be aligned with Enfuce
                prior to use.
              pattern: FLEET(?:\d?_[A-Z]{3}_[A-Z]{2}|_ACCOUNT_[A-Z]{2}_[A-Z]+)\d?
              example: FLEET_EUR_FI
            invoicePaymentMethod:
              $ref: '#/components/schemas/invoicePaymentMethod'
      title: createFleetResourceBody
    createLiableBaseResourceBody:
      allOf:
        - $ref: '#/components/schemas/createBaseResourceBody'
        - properties:
            parentId:
              type: string
              format: biginteger
              description: >
                This field is used when the institution is setting up an account
                liability hierarchy.

                The parentId is used to determine the parent of this account.

                Consult Enfuce before using this field.
              example: 9876543210
      title: createCreditResourceBody
    creditLimit:
      type: number
      description: Credit limit of the account
      example: 10000
    invoiceDayOfMonth:
      type: integer
      maximum: 31
      minimum: 1
      description: >-
        This indicates the last day of the billing period. An invoice is created
        and sent on the next day. If the scheduled day exceeds the total number
        of days in a month, then the invoice is generated on last day of the
        month.
      example: 21
    invoiceDeliveryMethod:
      type: string
      enum:
        - REGULAR_MAIL
        - EMAIL
        - E_INVOICE
        - CUSTOM_1
        - CUSTOM_2
        - CUSTOM_3
        - CUSTOM_4
        - CUSTOM_5
        - BETALINGSSERVICE
    externalCustomerReference:
      type: string
      maxLength: 30
      description: >-
        To be printed on invoice in order for customer to handle invoice
        properly
      example: Example customer ref
    invoicePaymentMethod:
      type: string
      description: >
        Use of this field as well as the values of the field, is dependent on
        institution setup and should be aligned with Enfuce prior to use. Also,
        it is only a value, there is no functionality behind it.
      enum:
        - DIRECT_DEBIT
        - PLUS_GIROT
        - BANK_GIROT
        - BANK_TRANSFER
        - IBAN
    createBaseResourceBody:
      type: object
      properties:
        address:
          $ref: '#/components/schemas/address'
          description: >-
            Address connected to an account that will override the address set
            on customer level. This is for example used when sending out
            statements
        additionalValues:
          $ref: '#/components/schemas/additionalValues'
        name:
          $ref: '#/components/schemas/name'
        number:
          $ref: '#/components/schemas/accountNumber'
        segment:
          $ref: '#/components/schemas/segment'
        paymentReference:
          $ref: '#/components/schemas/paymentReference'
      title: createBaseResourceBody
    address:
      type: object
      required:
        - address1
        - city
        - country
        - zipCode
      properties:
        address1:
          type: string
          minLength: 1
          maxLength: 255
          example: Kings street 12
        address2:
          type: string
          maxLength: 255
        address3:
          type: string
          maxLength: 255
        address4:
          type: string
          maxLength: 255
        city:
          type: string
          minLength: 1
          maxLength: 255
          example: Mariehamn
        country:
          $ref: '#/components/schemas/country'
        region:
          type: string
          maxLength: 32
          example: Åland Islands
        zipCode:
          type: string
          minLength: 1
          maxLength: 32
          example: 22100
      title: address
    additionalValues:
      type: array
      maxItems: 4
      description: >
        List of additional key-value pairs that can be associated with the
        account.

        Known keys:

        - BALC: Balance check configuration. Possible values: true (Shadow
        Balancing Disabled) or false (Shadow Balancing Enabled)
      items:
        $ref: '#/components/schemas/keyValuePair'
    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
    segment:
      type: string
      description: >-
        Field enables to group an entity into a segment. This field will be
        exported but no logic is applied to this in Enfuce API
      enum:
        - SEGMENT_A
        - SEGMENT_B
        - SEGMENT_C
        - SEGMENT_D
        - SEGMENT_E
        - SEGMENT_F
      title: segment
    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
    country:
      type: string
      description: >-
        A valid ISO 3166-1 alpha-3 country code, except for QZZ (UNMIK in
        Kosovo) and ROM for Romania.
      pattern: '[A-Z]{3}'
      example: FIN
    keyValuePair:
      type: object
      properties:
        key:
          type: string
          minLength: 1
          maxLength: 8
          pattern: ^[a-zA-Z0-9\-\_ ]*$
        value:
          type: string
          minLength: 1
          maxLength: 50
          pattern: >-
            ^[a-zA-Z0-9|\-_
            +.éàèùçâêîôûëïü'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿĀāĂăĄąĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıĲĳĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňŉŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſǪǫȘșȚțȪȫȮȯȲȳḐḑṢṣẞỌọ]*$

````