Saltar al contenido principal
PATCH
/
v1
/
organizations
/
{organization_id}
/
ledgers
/
{ledger_id}
/
balances
/
{balance_id}
curl --request PATCH \
  --url https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/{ledger_id}/balances/{balance_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "allowSending": true,
  "allowReceiving": true
}
'
{
  "id": "019c96a0-0c0d-7915-84b9-e497bfee9916",
  "organizationId": "019c96a0-0a98-7287-9a31-786e0809c769",
  "ledgerId": "019c96a0-0ac0-7de9-9f53-9cf842a2ee5a",
  "accountId": "019c96a0-0c0c-7221-8cf3-13313fb60081",
  "alias": "customer-brl-1",
  "key": "default",
  "assetCode": "BRL",
  "available": "1000",
  "onHold": "0",
  "version": 1,
  "accountType": "deposit",
  "allowSending": true,
  "allowReceiving": true,
  "direction": "credit",
  "overdraftUsed": "0",
  "settings": {
    "allowOverdraft": true,
    "overdraftLimitEnabled": true,
    "overdraftLimit": "5000.00",
    "balanceScope": "transactional"
  },
  "position": {
    "available": "1000",
    "onHold": "0",
    "overdraftLimitAvailable": "5000.00"
  },
  "createdAt": "2026-02-25T21:06:37.197596Z",
  "updatedAt": "2026-02-25T21:06:38.420934Z",
  "deletedAt": null
}

Documentation Index

Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt

Use this file to discover all available pages before exploring further.

Autorizaciones

Authorization
string
header
requerido

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Encabezados

Authorization
string

El token de autorización. Este encabezado es requerido si su entorno tiene Access Manager habilitado.

Content-Type
string

El tipo de medio del recurso. El valor recomendado es application/json.

X-Request-Id
string<uuid>

Un identificador único utilizado para rastrear y seguir cada solicitud.

Parámetros de ruta

organization_id
string
requerido

El identificador único de la Organización asociada al Ledger.

ledger_id
string
requerido

El identificador único del Ledger asociado.

balance_id
string
requerido

El identificador único del saldo que desea recuperar.

Cuerpo

application/json
allowSending
boolean

Si es verdadero, indica que el saldo puede ser utilizado para enviar transacciones.

allowReceiving
boolean

Si es verdadero, indica que el saldo puede ser utilizado para recibir transacciones.

settings
object

Cuando se proporciona, reemplaza las configuraciones existentes en su totalidad. Use esto para alternar allowOverdraft o ajustar overdraftLimit. La dirección no puede cambiarse vía update — es inmutable después de la creación.

Respuesta

Indica que la solicitud fue exitosa y la respuesta contiene los datos esperados.

id
string

The unique identifier of the Balance.

organizationId
string<uuid>

The unique identifier of the Organization.

ledgerId
string<uuid>

El identificador único del Ledger.

accountId
string<uuid>

El identificador único de la Cuenta.

alias
string

The alias for the account used in the operation.

key
string

El identificador único del saldo en el contexto de la cuenta.

assetCode
string

The name of the asset used in the operation.

available
string

Previous available balance.

onHold
string

Amount on hold/reserved.

version
integer

Balance version, which is updated with each transaction.

accountType
string

The type of account.

allowSending
boolean

Si es verdadero, indica que el saldo puede ser utilizado para enviar transacciones.

allowReceiving
boolean

Si es verdadero, indica que el saldo puede ser utilizado para recibir transacciones.

direction
enum<string>

La dirección contable del saldo. Saldos credit crecen en crédito y disminuyen en débito (tipo activo); saldos debit crecen en débito y disminuyen en crédito (tipo pasivo). Definida en la creación e inmutable.

Opciones disponibles:
credit,
debit
overdraftUsed
string

La cantidad de overdraft actualmente consumida por este saldo, como string decimal. Siempre no negativa; "0" cuando el saldo no tiene overdraft activo.

settings
object

Configuración opcional por saldo (overdraft, alcance). null para saldos legados sin configuraciones personalizadas.

position
object
read-only

Vista computada del estado del saldo en el momento de la respuesta. Siempre presente; nunca persistida. Recalculada a partir de available, onHold, overdraftUsed y settings en cada lectura.

createdAt
string<date-time>

Timestamp of creation (UTC).

updatedAt
string<date-time>

Timestamp of last update (UTC).

deletedAt
string<date-time> | null

Timestamp of soft deletion, if applicable (UTC).

metadata
object

An object containing key-value pairs to add as metadata, where the field name is the key and the field value is the value. For example, to add a Cost Center, use 'costCenter': 'BR_11101997'.