# Update wallet settings

Updates the invoice language and withdrawal settings of the wallet. Sending the `withdraw` object overwrites all existing withdrawal settings.
Withdrawal types:
- `manual`
 - withdrawals requested manually (
`POST /withdraws`
),
- `workdays`
 - automatic withdrawal on every business day,
- `balance_greater_than`
 - automatic withdrawal once the balance exceeds
`balanceToAutoPayout`
,
- `custom_days`
 - automatic withdrawal on selected weekdays (
`customDays`
) when the balance exceeds
`balanceToAutoPayout`
.

Endpoint: PATCH /flow/{flowServiceId}/submerchants/{submerchantId}/finances/{walletId}
Version: 1.0.0
Security: bearerAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer scopes: flow.submerchants.finances, flow.submerchants.withdraws.settings

## Path parameters:

  - `flowServiceId` (string, required)
    Flow service ID

  - `submerchantId` (string, required)
    Submerchant ID (`flsm_...`) or its `customId`

  - `walletId` (string, required)
    Wallet ID

## Request fields (application/json):

  - `invoiceLocale` (string)
    Invoice language
    Enum: "pl", "en"

  - `withdraw` (object)
    Withdrawal settings (overwrite the existing ones)

  - `withdraw.type` (string, required)
    Withdrawal type
    Enum: "manual", "workdays", "balance_greater_than", "custom_days"

  - `withdraw.leftBalance` (number)
    Amount left in the wallet on withdrawal. Not allowed for `manual`.
    Example: 10

  - `withdraw.balanceToAutoPayout` (number)
    Balance above which a withdrawal is made. Required for `balance_greater_than` and `custom_days`.
    Example: 100

  - `withdraw.customDays` (array)
    Withdrawal weekdays (1 = Monday ... 5 = Friday). Required and allowed only for `custom_days`.
    Example: [1,5]

## Request examples:

  - `Withdrawals on Mondays and Fridays` (unknown)

  - `Manual withdrawals` (unknown)

## Response 204:

  - `204` (unknown)
    Changes have been saved

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `feedbackUrl` (string)
    URL for reporting API problems (`POST /feedback`). Returned for authenticated API keys.
    Example: https://api.simpay.pl/feedback

  - `success` (boolean, required)
    Request status

  - `errorCode` (string, required)
    Error status code
    Enum: "UNAUTHORIZED"

## Response 403:

  - `403` (unknown)
    Missing permissions or the submerchant is not active (`FLOW_SUBMERCHANT_NOT_ACTIVE`)

## Response 403 fields (application/json):

  - `success` (boolean, required)
    Request status

  - `message` (string)
    Error description

  - `errorCode` (string, required)
    Error code

## Response 404:

  - `404` (unknown)
    Submerchant not found (`FLOW_SUBMERCHANT_NOT_FOUND`)

## Response 404 fields (application/json):

  - `success` (boolean, required)
    Request status

  - `message` (string)
    Error description

  - `errorCode` (string, required)
    Error code

## Response 422:

  - `422` (unknown)
    Unprocessable Content

## Response 422 fields (application/json):

  - `feedbackUrl` (string)
    URL for reporting API problems (`POST /feedback`). Returned for authenticated API keys.
    Example: https://api.simpay.pl/feedback

  - `success` (boolean, required)
    Request status

  - `errorCode` (string, required)
    Error status code
    Enum: "VALIDATION_ERROR"

  - `errors` (object, required)

  - `errors.amount` (array)

