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

# Update account details

> Partially updates the account details.
If new account property value is not specified, existing value will be used.



## OpenAPI

````yaml openapi/bonus-v1.json PATCH /v1/accounts/{accountId}
openapi: 3.0.4
info:
  title: Accounting.Api
  version: v1
servers:
  - url: https://{host}/bonus
    description: Your Lobyco environment
    variables:
      host:
        default: your-environment.lobyco.net
        description: >-
          The API host for your Lobyco environment. Replace it with the host you
          were given — this placeholder does not resolve.
security:
  - Bearer: []
paths:
  /v1/accounts/{accountId}:
    patch:
      tags:
        - Service2Service
      summary: Update account details
      description: >-
        Partially updates the account details.

        If new account property value is not specified, existing value will be
        used.
      parameters:
        - name: accountId
          in: path
          description: Id of account to update
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: New values for account properties
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Accounting.Api.CQRS.Commands.UpdateAccount.UpdateAccountDetails
          text/json:
            schema:
              $ref: >-
                #/components/schemas/Accounting.Api.CQRS.Commands.UpdateAccount.UpdateAccountDetails
          application/*+json:
            schema:
              $ref: >-
                #/components/schemas/Accounting.Api.CQRS.Commands.UpdateAccount.UpdateAccountDetails
        required: true
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/LoopFoundation.Commons.Contracts.WebServiceError
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/LoopFoundation.Commons.Contracts.WebServiceError
components:
  schemas:
    Accounting.Api.CQRS.Commands.UpdateAccount.UpdateAccountDetails:
      type: object
      properties:
        isActive:
          type: boolean
          description: >-
            Changes whether the account is active. Null will leave the current
            value unchanged.
          nullable: true
        isAllowedToSpend:
          type: boolean
          description: >-
            Changes whether the account is allowed to spend funds. Null will
            leave the current value unchanged.
          nullable: true
        expireBalance:
          type: boolean
          description: >-
            Cancels all pending transactions and expire available balance. False
            will do nothing
      additionalProperties: false
    LoopFoundation.Commons.Contracts.WebServiceError:
      required:
        - message
        - name
      type: object
      properties:
        name:
          minLength: 1
          type: string
        message:
          minLength: 1
          type: string
        details:
          nullable: true
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: apiKey
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        "Authorization: Bearer {token}"
      name: Authorization
      in: header

````