> ## 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 a prepaid account

> This operation will update given fields given an account id



## OpenAPI

````yaml account patch /v4/PREPAID/{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:
  /v4/PREPAID/{id}:
    patch:
      tags:
        - Update an account
      summary: Update a prepaid account
      description: This operation will update given fields given an account id
      operationId: updatePrepaidAccountV4UsingPATCH
      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/patchPrepaidResourceBody'
      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: false
components:
  requestBodies:
    patchPrepaidResourceBody:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/patchPrepaidResourceBody'
      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: 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
    patchPrepaidResourceBody:
      allOf:
        - $ref: '#/components/schemas/patchLiableResourceBody'
        - properties:
            status:
              $ref: '#/components/schemas/accountStatusPatch'
      title: patchPrepaidResourceBody
    patchLiableResourceBody:
      allOf:
        - $ref: '#/components/schemas/patchBaseResourceBody'
        - 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 top account of the account
                hierarchy.

                Consult Enfuce before using this field.
              example: 9876543210
    accountStatusPatch:
      type: string
      enum:
        - ACCOUNT_BLOCKED
        - ACCOUNT_OK
        - ACCOUNT_TO_CLOSE
      title: accountStatusPatch
    patchBaseResourceBody:
      type: object
      properties:
        address:
          $ref: '#/components/schemas/updateAddress'
          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.
        additionalValues:
          $ref: '#/components/schemas/additionalValues'
        customerId:
          $ref: '#/components/schemas/customerId'
        name:
          $ref: '#/components/schemas/name'
        number:
          $ref: '#/components/schemas/accountNumber'
        reason:
          $ref: '#/components/schemas/reason'
        segment:
          $ref: '#/components/schemas/segment'
        closureReason:
          $ref: '#/components/schemas/closureReason'
        usageLimits:
          type: array
          items:
            $ref: '#/components/schemas/usageLimit'
        paymentReference:
          $ref: '#/components/schemas/paymentReference'
      title: patchBaseResourceBody
      description: Updating set values
    updateAddress:
      type: object
      properties:
        address1:
          type: string
          maxLength: 255
        address2:
          type: string
          maxLength: 255
        address3:
          type: string
          maxLength: 255
        address4:
          type: string
          maxLength: 255
        city:
          type: string
          maxLength: 255
        country:
          $ref: '#/components/schemas/country'
        region:
          type: string
          maxLength: 32
        zipCode:
          type: string
          maxLength: 32
      title: updateAddress
    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'
    customerId:
      type: string
      description: Customer id for account owner
      example: 55667788990
    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
    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
    closureReason:
      type: string
      description: >-
        Field enables to define entity's closure reason. This field will be
        exported but no logic is applied to this in Enfuce API
      enum:
        - CLOSED1
        - CLOSED2
        - CLOSED3
        - CLOSED4
        - CLOSED5
      title: closureReason
    usageLimit:
      type: object
      allOf:
        - $ref: '#/components/schemas/baseUsageLimit'
        - properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/limitValues'
      title: usageLimit
    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|\-_
            +.éàèùçâêîôûëïü'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿĀāĂăĄąĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıĲĳĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňŉŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſǪǫȘșȚțȪȫȮȯȲȳḐḑṢṣẞỌọ]*$
    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

````