Skip to main content
POST
/
v1
/
organizations
/
{organization_id}
/
ledgers
/
{ledger_id}
/
transactions
/
unblock
Create an Unblock Transaction
curl --request POST \
  --url https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/{ledger_id}/transactions/unblock \
  --header 'Content-Type: application/json' \
  --data '
{
  "chartOfAccountsGroupName": "FUNDING",
  "description": "Release previously blocked funds",
  "code": "UNB-2026-001",
  "transactionDate": "2026-06-23T12:00:00Z",
  "metadata": {
    "reason": "investigation cleared",
    "channel": "api"
  },
  "send": {
    "asset": "BRL",
    "value": "1000",
    "source": {
      "from": [
        {
          "accountAlias": "@source-account",
          "balanceKey": "default",
          "amount": {
            "asset": "BRL",
            "value": "1000"
          },
          "description": "Debit from the source"
        }
      ]
    },
    "distribute": {
      "to": [
        {
          "accountAlias": "@destination-account",
          "balanceKey": "default",
          "remaining": "remaining",
          "description": "Credit at destination"
        }
      ]
    }
  }
}
'
{ "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "parentTransactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "ledgerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "description": "<string>", "route": "<string>", "routeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "status": { "code": "<string>", "description": "<string>" }, "amount": "<string>", "assetCode": "<string>", "chartOfAccountsGroupName": "<string>", "source": [ "<string>" ], "destination": [ "<string>" ], "createdAt": "2023-11-07T05:31:56Z", "updatedAt": "2023-11-07T05:31:56Z", "deletedAt": "2023-11-07T05:31:56Z", "operations": [ { "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "transactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "ledgerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "accountAlias": "<string>", "balanceId": "<string>", "balanceKey": "<string>", "description": "<string>", "assetCode": "<string>", "chartOfAccounts": "<string>", "route": "<string>", "routeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "routeCode": "<string>", "routeDescription": "<string>", "amount": { "value": "<string>" }, "balance": { "available": "<string>", "onHold": "<string>", "version": 123, "overdraftUsed": "<string>" }, "balanceAfter": { "available": "<string>", "onHold": "<string>", "version": 123, "overdraftUsed": "<string>" }, "status": { "code": "<string>", "description": "<string>" }, "balanceAffected": true, "createdAt": "2023-11-07T05:31:56Z", "updatedAt": "2023-11-07T05:31:56Z", "deletedAt": "2023-11-07T05:31:56Z", "metadata": {} } ], "metadata": {} }

Headers

Content-Type
string

The type of media of the resource. Recommended value is application/json.

X-Request-Id
string<uuid>

A unique identifier used to trace and track each request.

Authorization
string

Bearer JWT token for authentication. Required when PLUGIN_AUTH_ENABLED=true (enforced in multi-tenant deployments). Optional in default OSS single-tenant mode. Format: Bearer <token>

X-Idempotency
string

A unique key that ensures transaction idempotency. If not provided, the system automatically generates a SHA-256 hash based on the request body. Keys are scoped per organization and ledger.

Always validate the X-Idempotency-Replayed response header to distinguish new transactions from cached replays.

See Retries and idempotency for best practices.

X-TTL
integer

The time-to-live for the idempotency key, defined in seconds. Defaults to 300 seconds (5 minutes) if not provided. Only the TTL from the first request is used; changing it on retries has no effect.

See Retries and idempotency for details.

Path Parameters

organization_id
string<uuid>
required

The unique identifier of the Organization associated with the Ledger.

ledger_id
string<uuid>
required

The unique identifier of the associated Ledger.

Body

application/json
chartOfAccountsGroupName
string

The name of the chart-of-accounts group associated with the transaction.

Maximum string length: 256
description
string

A description for the transaction.

Maximum string length: 256
pending
boolean
default:false

Indicates whether the transaction should follow a two-step process: authorization followed by execution. When set to true, the transaction is created in a pending state, reserving funds (on_hold) without immediately moving them. A subsequent commit is required to finalize the transfer.

code
string

Transaction code for reference.

Maximum string length: 100
route
string
deprecated

Deprecated. Use routeId instead. Legacy route identifier kept for backward compatibility; accepted from the client but not used for routing validation.

routeId
string<uuid>

The unique identifier (UUID) of the Transaction Route associated with this transaction. Important: When Transaction Routing validation is enabled for your Ledger, this field becomes mandatory and must match an existing id from your configured Transaction Routes. However, when validation is disabled (default behavior), this field is optional.

transactionDate
string

The time when the transaction was made. Used to add past transactions. Must be a date in the past.

send
object

An object containing information about the transaction that will be sent.

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'.

Constraints: keys must be at most 100 characters; string values at most 2000 characters. Nested objects are not allowed (values must be string, number, or boolean), the structure may not exceed a maximum depth of 10, and a maximum of 100 keys is permitted.

Response

Indicates that the resource was successfully created and the operation was completed as expected.

The response includes the X-Idempotency-Replayed header.

If the value is false, the transaction was just processed. If the value is true, the response is a replay of a previously processed request.

See Retries and idempotency for more details.

id
string<uuid>

The unique identifier of the transaction.

parentTransactionId
string<uuid> | null

The unique identifier of the parent/original transaction for reversals. This field is populated by the server when a transaction is reverted and should be treated as read-only by clients.

organizationId
string<uuid>

The unique identifier of the Organization.

ledgerId
string<uuid>

The unique identifier of the Ledger.

description
string

Description of the transaction.

route
string

Specifies the Transaction Route associated with the transaction.

routeId
string<uuid>

The unique identifier of the Transaction Route applied to this transaction.

status
object

The transaction status (pending, completed, reversed).

amount
string

The sent amount.

assetCode
string

The name of the asset used in the operation.

chartOfAccountsGroupName
string

The name of the chart-of-accounts group.

source
string[]

The list of accounts used as source.

destination
string[]

The list of accounts used as destination.

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).

operations
object[]
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'.

Constraints: keys must be at most 100 characters; string values at most 2000 characters. Nested objects are not allowed (values must be string, number, or boolean), the structure may not exceed a maximum depth of 10, and a maximum of 100 keys is permitted.