---
title: "Replace balance configuration"
method: PUT
path: "/v1/balances-config/{configId}"
tags: ["Balance configurations"]
---

# Replace balance configuration

`PUT /v1/balances-config/{configId}`

## Request

- Base URL: `https://api-sandbox.pismolabs.io/balances-config`
- URL: `https://api-sandbox.pismolabs.io/balances-config/v1/balances-config/{configId}`
- Auth: HTTP bearer

Replace an exiting balance configuration.

## Path parameters

- `configId` string, required

## Headers

- `x-tenant` string, required
- `x-cid` string

## Request body

- PUTBalancesConfigRequest
  - `global_configs` GlobalConfig: Global configuration settings that always apply regardless of the filter.
    - `impact_parent_accounts` boolean: Indicates that the ledger should impact parent accounts also.
  - `configs` Config[]: Array of balance configurations
    - `name` string: Configuration name.
    - `is_active` boolean: Indicates active configuration.
    - `filter_template_id` string: Reference to a filter template ID. Use this to apply a predefined filter template instead of defining filters inline. **Cannot be used together with `filters`.**
    - `filters` object: Inline filter criteria for the configuration. **Cannot be used together with `filter_template_id`.**
      - `processing_codes` string[]: A processing code defines how the Pismo platform handles a certain financial operation type. For more information, refer to [Processing codes and transaction types](doc:processing-codes-and-transaction-types).
      - `min_installments` integer: Min installments to validate.
      - `max_installments` integer: Max installments to validate.
      - `mcc` string[]: Merchant category codes to validate.
      - `account_type` '00' | '10' | '20' | '30': Account type that impacts limit or different account. Account types: "00" = Non-specified account "10" = Savings account "20" = Checking account "30" = Credit card account
      - `currency_code` string: Alphanumeric ISO 4217 standard currency code that impacts different limits or accounts.
    - `scenarios` object[]: Balance configuration scenarios. Scenarios determine how the evaluated transactions impact balances and limits.
      - `condition` object: Evaluated condition.
        - `order` integer, required: Condition priority order. The lower the number, the higher the priority.
        - `type` 'default' | 'custom', required: Condition type: `default` or `custom`. `custom` allows for available balance or limit validation, `default` does not. If `default` is used, the `consider` field is not used to validate. The validation stops when `default` is used.
        - `amount_to_check_balance` 'amount' | 'installment_amount': Amount to check for available balance: `amount` or `installment_amount`. `amount` is the principal amount. This field is **REQUIRED** if `type` is `custom`.
      - `result` ConditionResult: Expected result described at evaluated conditions.
        - `amount` 'principal_amount' | 'contract_amount' | 'installment_amount', required: Amount used to credit or debit the account balances or limits. * `principal_amount`: Original amount, excluding any interest or fees. * `contract_amount`: Final amount, including any interest or fees. * `installment_amount`: Amount of each portion of an installment plan.
        - `impact` string[], required: Limits or balances credited or debited. Can be none when the condition doesn't impact any balances or limits.
        - `consider` string[]: Limits or balances summed for authorization. If `type` = `custom`: * The sum is validated against `amount_to_check_balance`. * If this field is not passed, what's in `impact` is summed instead and used for validation. If `type` = `default`: * This object is ignored and no validation is done. * Since no validation is done, `impact` is not used instead if this object is not passed.
        - `amount_consider` 'principal_amount' | 'contract_amount' | 'installment_amount': Amount considered to validate whether the account has sufficient limit or balance. * `principal_amount`: Original amount, excluding any interest or fees. * `contract_amount`: Final amount, including any interest or fees. * `installment_amount`: Amount of each portion of an installment plan.
        - `reset_limit` 'never' | 'payment' | 'last_installment': Indicates when the limit resets. * `never`: Limit referenced in the authorization is never reset. * `payment`: Limit resets when the client pays the credit card bill. * `last_installment`: Limit resets after last customer installment payment.
        - `impact_account` ImpactAccount: Impacted account with credit or debit applied. `impact_account` must be related to the principal account. Only available for account-level configurations. For more information, refer to [Related accounts](doc:related-accounts).
          - `account_id` integer: Account ID. **REQUIRED** if `level` is `account`.
          - `customer_id` integer: Impacted customer ID.
        - `counterpart_account` CounterpartAccount: This counter account must be related to the principal account. This account is impacted in the same amount with an opposite transaction operation from the operation for the `impact_account`. For example, if `impact_account` is debited $100, `counterpart_account` is credited $100. Only available for account-level configurations. For more information, refer to [Related accounts](doc:related-accounts).
          - `account_id` integer: Account ID. **REQUIRED** if `level` is `account`.
          - `processing_code` string: Counterpart account processing code.
        - `confirmation` Confirmation: Confirmation indicates which balances must be impacted upon confirmation in dual message scenarios where authorization impacts one balance but confirmation should impact a different balance.
          - `impact` string[]: Limits or balances credited or debited. Can be none when the condition doesn't impact any balances or limits.
          - `opposite_impact` string[]: This field contains a list of limits that should be oppositely impacted in response to the `operation_type`. For instance, if a credit operation affects `AvailableCreditLimit`, the limits specified in this list will be debited to counterbalance the credit impact.
        - `opposite_impact` string[]: This field contains a list of limits that should be oppositely impacted in response to the `operation_type`. For instance, if a credit operation affects `AvailableCreditLimit`, the limits specified in this list will be debited to counterbalance the credit impact.

## Response `204`

No content

## Other responses

- `400`: Bad request
- `404`: Not found
- `500`: Internal server error

---

[API](https://skmtc.dev/pismo/apis/core-platform-balance-configurations.md) - [All operations](https://skmtc.dev/pismo/apis/core-platform-balance-configurations/llms.txt) - [OpenAPI document](https://skmtc.dev/pismo/apis/core-platform-balance-configurations/revisions/d7e580187a0c?raw)
