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

# Update an account

> This operation will update given fields given an account id

<Warning>Deprecated: This API endpoint is no longer supported.</Warning>


## OpenAPI

````yaml account patch /v3/{id}
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:
  /v3/{id}:
    patch:
      tags:
        - Update an account
      summary: Update an account
      description: This operation will update given fields given an account id
      operationId: updateAccountUsingPATCH
      parameters:
        - name: auditUser
          in: query
          description: The audit user to log the request
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: The account id for given account
          required: true
          schema:
            type: string
            format: biginteger
      requestBody:
        $ref: '#/components/requestBodies/patchV3ResourceBody'
      responses:
        '200':
          description: Successful update of the account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/resourceResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
        '404':
          description: Account 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: true
components:
  requestBodies:
    patchV3ResourceBody:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/patchV3ResourceBody'
      description: >-
        The fields that you want to apply to your newly cr, these values will
        override the predefined template values
      required: true
  schemas:
    resourceResponse:
      type: object
      properties:
        description:
          type: string
          description: >-
            When a payment is declined, a response description is returned, if
            available, providing more context on why the transaction failed.
            This includes a return code and a brief explanation. If multiple
            issues cause the decline, only one response description is sent; the
            most recent reason for decline is returned. <Note>If the payment is
            successful, the `resourceResponse` attribute is returned with `null`
            value.</Note>
          example: 061-Usage Limit '24H_RETAIL' Amount Exceeded
        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
    patchV3ResourceBody:
      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. Full address object is expected to be set when updating.
        creditLimit:
          $ref: '#/components/schemas/creditLimit'
        customerId:
          $ref: '#/components/schemas/customerId'
        eInvoice:
          $ref: '#/components/schemas/eInvoice'
        number:
          $ref: '#/components/schemas/accountNumber'
        invoiceDeliveryMethod:
          $ref: '#/components/schemas/invoiceDeliveryMethod'
        minimumToPay:
          $ref: '#/components/schemas/minimumToPay'
        paymentReference:
          $ref: '#/components/schemas/paymentReference'
        reason:
          $ref: '#/components/schemas/reason'
        segment:
          $ref: '#/components/schemas/segment'
        status:
          $ref: '#/components/schemas/accountStatusPatch'
        usageLimits:
          type: array
          items:
            $ref: '#/components/schemas/usageLimit'
      title: patchV3ResourceBody
      description: Updating set values
    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
    creditLimit:
      type: number
      description: Credit limit of the account
      example: 10000
    customerId:
      type: string
      description: Customer id for account owner
      example: 55667788990
    eInvoice:
      type: object
      deprecated: true
      properties:
        address:
          maxLength: 32
          type: string
          example: FI7165429021331431
        operator:
          maxLength: 32
          type: string
          example: NDEAFIHH
        paymentInstruction:
          maxLength: 2
          type: string
          example: AA
    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
    invoiceDeliveryMethod:
      type: string
      enum:
        - REGULAR_MAIL
        - EMAIL
        - E_INVOICE
        - CUSTOM_1
        - CUSTOM_2
        - CUSTOM_3
        - CUSTOM_4
        - CUSTOM_5
        - BETALINGSSERVICE
    minimumToPay:
      type: object
      properties:
        amount:
          type: number
        percentage:
          type: number
          maximum: 100
          minimum: 0
    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
    reason:
      type: string
      description: Reason for contract status change
      maxLength: 32
      title: reason
    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
    accountStatusPatch:
      type: string
      enum:
        - ACCOUNT_BLOCKED
        - ACCOUNT_OK
        - ACCOUNT_TO_CLOSE
      title: accountStatusPatch
    usageLimit:
      type: object
      allOf:
        - $ref: '#/components/schemas/baseUsageLimit'
        - properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/limitValues'
      title: usageLimit
    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
    baseUsageLimit:
      type: object
      properties:
        code:
          type: string
          enum:
            - 24H
            - DAILY
            - MONTHLY
            - WEEKLY
            - ANNUAL_YEARLY
            - ROLLING_YEARLY
          description: |
            Usage Limiter Time Periods
            Available usage limiters include:
              * __24H__ - A sliding window limiter covering the last 24 hours.
              * __WEEKLY__ - Limits usage for the current week, starting on Monday.
              * __MONTHLY__ - Limits usage for the current month, starting on the 1st.


              __Note:__ The following usage limiters are not part of the standard usage limiter setup. The use of these fields and their values depends on the institution's configuration and must be coordinated with Enfuce before use.
              * __DAILY__ - Limits usage for the current day, starting at 00:00.
              * __ANNUAL_YEARLY__ - Limits usage for the current year, starting on 1st January.
              * __ROLLING_YEARLY__ - A sliding window limiter covering the year until now.

            (DAILY, WEEKLY, MONTHLY and ANNUAL_YEARLY are reset at midnight UTC)
      title: baseUsageLimit
    limitValues:
      type: object
      properties:
        code:
          type: string
          enum:
            - ATM
            - RETAIL
            - ALL
          description: >
            Note that all values must be present when set. Usage limiter values
            are:
              * __ATM__ - ATM max withdrawal limit
              * __RETAIL__ - Retail max purchase limit
              * __ALL__ - All usage max limit
        reset:
          type: boolean
          description: >
            If set to true this specific usage limit will be reset to product
            default and any other values sent in to the request will be ignored.

              Example: If __usageLimits.values.reset__ = true then all values below will be ignored and the default configuration will apply.

                usageLimits.values.singleAmount = 1000
                usageLimits.values.sumAmount = 1200

                usageLimits.values.count = 5
          example: true
        singleAmount:
          type: number
          description: |
            The max allowed amount of a single transaction.

              Example: Maximum allowed spend per transaction is 1000

                usageLimits.values.singleAmount = 1000
                usageLimits.values.sumAmount = 0

                usageLimits.values.count = 0
          example: 1000
        count:
          type: integer
          description: |
            The max number of transactions allowed under a time period.

              Example: Maximum number of allowed transactions under a certain period of time is 5

                usageLimits.values.singleAmount = 0
                usageLimits.values.sumAmount = 0

                usageLimits.values.count = 5
          example: 5
        sumAmount:
          type: number
          description: |
            The max allowed amount under a time period.

              Example: Maximum allowed spend under a certain period of time is 1200.

                usageLimits.values.singleAmount = 0
                usageLimits.values.sumAmount = 1200

                usageLimits.values.count = 0
          example: 1200
      title: limitValue

````