# Digital Twin — REST APIs

REST APIs

# Digital Twin REST endpoints
Synchronous endpoints, secured by OAuth2 (mTLS at the gateway). Post a transaction, and read balances/statements. The same operations also exist asynchronously over Kafka — see AVRO / Kafka messages.

← Security & access
AVRO / Kafka messages →

> All REST is OAuth2-secured (Bearer token). An account is identified by branch + account; an account group by kind + membershipId (membershipId is the group id). The Transaction operations also exist asynchronously over Kafka — see AVRO / Kafka messages.

## POST /v1/accounts/{branch}/{account}/batches

Approves or declines a group of transactions (credits, debits, blocks, releases, reversals) against an account in a single atomic batch. Requires the transact role.

**Query parameters**
- `balances` — Balances to return, comma-separated; "all" or "none".
- `X-Generate-Balance-Snapshot` — Header; if true, forces a balance snapshot.

**Request body · EntryBatchRequest**

```
{
  "entries": [
    {
      "entryKind": "ledger",
      "correlationId": "770109dc-7564-4558-bcf4-ffe7e46c5a38",
      "status": "POSTED",
      "description": "ATM withdrawal",
      "historyCode": 4919,
      "settlementInfo": {
        "fulfillment": "TOTAL",
        "amount": {
          "value": 5000,
          "currency": "USD"
        }
      }
    }
  ]
}
```

**201 Response · EntryBatchGroupResponse**

```
{
  "createdAt": "2026-06-27T17:32:28Z",
  "entries": [
    {
      "id": "770109dc-7564-4558-bcf4-ffe7e46c5a38",
      "entryKind": "ledger",
      "historyCode": 4919,
      "status": "POSTED",
      "amount": {
        "value": 5000,
        "currency": "USD"
      },
      "balanceChanges": {
        "AVAILABLE": {
          "value": 5000,
          "currency": "USD"
        }
      }
    }
  ],
  "balances": {
    "AVAILABLE": {
      "amount": {
        "value": 15000,
        "currency": "USD"
      }
    }
  }
}
```

**Errors**
- `400` — Invalid attribute in the request (e.g. account not found, inactive account).
- `402` — Insufficient funds.
- `410` — The target resource is gone and cannot be used.
- `422` — Request understood but could not be processed (e.g. already completed).
- `503` — Service temporarily unavailable (e.g. account locked or too many concurrent requests).
- `500` — Unexpected server error.

## DELETE /v1/accounts/{branch}/{account}/entries?correlationId=…

Deletes one or more transactions from an account, identified by their correlation IDs. Requires the transact role.

**Query parameters**
- `correlationId` — Required. One or more correlation IDs of the transactions to delete (1-100).

Returns 204 No Content on success; there is no response body.

**Errors**
- `400` — Invalid attribute in the request (e.g. account not found, inactive account).
- `402` — Insufficient funds.
- `503` — Service temporarily unavailable (e.g. account locked or too many concurrent requests).
- `500` — Unexpected server error.

## GET /v1/accounts/{branch}/{account}/monitorings

Lists the monitoring services set up for an account. Requires the view-monitorings role.

**Query parameters**
- `page` — Page index from 0 (default 0).
- `size` — Page size, 1-100 (default 20).
- `correlationIds` — Optional filter: monitoring correlation IDs (1-100).

**200 Response · MonitoringsAccountResponse**

```
{
  "monitorings": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "status": "ACTIVE",
      "amount": {
        "value": 5000,
        "currency": "USD"
      },
      "amountDue": {
        "value": 5000,
        "currency": "USD"
      }
    }
  ]
}
```

**Errors**
- `404` — The requested resource was not found.
- `401` — Authentication failed or token missing.
- `403` — User lacks the required role for this operation.
- `500` — Unexpected server error.

## POST /v1/accounts/{branch}/{account}/monitorings

Sets up a monitoring service on an account that fires a blueprint transaction when a matching credit arrives. Requires the modify-monitorings role.

**Request body · MonitoringRequest**

```
{
  "monitoringKind": "ledger",
  "correlationId": "770109dc-7564-4558-bcf4-ffe7e46c5a38",
  "amount": {
    "value": 5000,
    "currency": "USD"
  },
  "status": "ACTIVE",
  "blueprint": {
    "entryKind": "ledger",
    "historyCode": 4919,
    "description": "Scheduled credit"
  }
}
```

**201 Response · MonitoringResponse**

```
{
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "ACTIVE",
  "amount": {
    "value": 5000,
    "currency": "USD"
  },
  "amountDue": {
    "value": 5000,
    "currency": "USD"
  },
  "blueprint": {
    "id": "770109dc-7564-4558-bcf4-ffe7e46c5a38",
    "entryKind": "ledger",
    "historyCode": 4919
  }
}
```

**Errors**
- `400` — Invalid attribute in the request (e.g. account not found, inactive account).
- `402` — Insufficient funds.
- `410` — The target resource is gone and cannot be used.
- `503` — Service temporarily unavailable (e.g. account locked or too many concurrent requests).
- `500` — Unexpected server error.

## PATCH /v1/accounts/{branch}/{account}/monitorings?correlationId=…

Updates a monitoring service identified by its correlation ID. Requires the modify-monitorings role and a matching if-match version header.

**Query parameters**
- `if-match` — Required header. Current monitoring version.
- `correlationId` — Required. Single correlation ID of the monitoring to update.

**Request body · MonitoringPatchRequest**

```
{
  "status": "INACTIVE",
  "amount": {
    "value": 3000,
    "currency": "USD"
  }
}
```

**200 Response · MonitoringResponse**

```
{
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "ACTIVE",
  "amount": {
    "value": 5000,
    "currency": "USD"
  },
  "amountDue": {
    "value": 5000,
    "currency": "USD"
  },
  "blueprint": {
    "id": "770109dc-7564-4558-bcf4-ffe7e46c5a38",
    "entryKind": "ledger",
    "historyCode": 4919
  }
}
```

**Errors**
- `400` — Invalid attribute in the request (e.g. account not found, inactive account).
- `402` — Insufficient funds.
- `410` — The target resource is gone and cannot be used.
- `412` — Precondition failed: the if-match version does not match the current monitoring version.
- `503` — Service temporarily unavailable (e.g. account locked or too many concurrent requests).
- `500` — Unexpected server error.

## GET /v1/accounts/{branch}/{account}/monitorings/{id}/entries

Lists the transactions generated by a monitoring service for an account. Requires the view-monitorings role.

**Query parameters**
- `page` — Page index from 0 (default 0).
- `size` — Page size, 1-100 (default 20).

**200 Response · MonitoringAccountEntriesResponse**

```
{
  "monitoringEntries": [
    {
      "id": "770109dc-7564-4558-bcf4-ffe7e46c5a38",
      "entryKind": "ledger",
      "status": "POSTED",
      "branch": 4919,
      "account": 223166,
      "amount": {
        "value": 5000,
        "currency": "USD"
      },
      "createdAt": "2026-06-27T17:32:28Z"
    }
  ]
}
```

**Errors**
- `401` — Authentication failed or token missing.
- `403` — User lacks the required role for this operation.
- `500` — Unexpected server error.

## GET /v1/accounts/{branch}/{account}/monitorings/{id}

Retrieves the details of a single monitoring service for an account by its ID. Requires the view-monitorings role.

**200 Response · MonitoringResponse**

```
{
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "ACTIVE",
  "amount": {
    "value": 5000,
    "currency": "USD"
  },
  "amountDue": {
    "value": 5000,
    "currency": "USD"
  },
  "blueprint": {
    "id": "770109dc-7564-4558-bcf4-ffe7e46c5a38",
    "entryKind": "ledger",
    "historyCode": 4919
  }
}
```

**Errors**
- `404` — The requested resource was not found.
- `401` — Authentication failed or token missing.
- `403` — User lacks the required role for this operation.
- `500` — Unexpected server error.

## PATCH /v1/accounts/{branch}/{account}/monitorings/{id}

Updates a monitoring service for an account by its ID. Requires the modify-monitorings role and a matching if-match version header.

**Query parameters**
- `if-match` — Required header. Current monitoring version.

**Request body · MonitoringPatchRequest**

```
{
  "status": "INACTIVE",
  "amount": {
    "value": 3000,
    "currency": "USD"
  }
}
```

**200 Response · MonitoringResponse**

```
{
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "ACTIVE",
  "amount": {
    "value": 5000,
    "currency": "USD"
  },
  "amountDue": {
    "value": 5000,
    "currency": "USD"
  },
  "blueprint": {
    "id": "770109dc-7564-4558-bcf4-ffe7e46c5a38",
    "entryKind": "ledger",
    "historyCode": 4919
  }
}
```

**Errors**
- `400` — Invalid attribute in the request (e.g. account not found, inactive account).
- `402` — Insufficient funds.
- `410` — The target resource is gone and cannot be used.
- `412` — Precondition failed: the if-match version does not match the current monitoring version.
- `503` — Service temporarily unavailable (e.g. account locked or too many concurrent requests).
- `500` — Unexpected server error.

## POST /v1/accounts/{branch}/{account}/monitorings/cancel?correlationId=…

Cancels a monitoring service for an account, identified by either its ID or correlation ID. Requires the modify-monitorings role.

**Query parameters**
- `id` — Optional. Single monitoring ID to cancel.
- `correlationId` — Optional. Single correlation ID to cancel.

**200 Response · MonitoringResponse**

```
{
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "ACTIVE",
  "amount": {
    "value": 5000,
    "currency": "USD"
  },
  "amountDue": {
    "value": 5000,
    "currency": "USD"
  },
  "blueprint": {
    "id": "770109dc-7564-4558-bcf4-ffe7e46c5a38",
    "entryKind": "ledger",
    "historyCode": 4919
  }
}
```

**Errors**
- `400` — Invalid attribute in the request (e.g. account not found, inactive account).
- `402` — Insufficient funds.
- `410` — The target resource is gone and cannot be used.
- `412` — Precondition failed: the if-match version does not match the current monitoring version.
- `422` — The monitoring service cannot be cancelled in its current state.
- `503` — Service temporarily unavailable (e.g. account locked or too many concurrent requests).
- `500` — Unexpected server error.

## POST /v1/accounts/{branch}/{account}/monitorings/{id}/release

Deprecated. Releases a monitored sum into an account, optionally debiting at the same time via blueprints. Requires the release-monitorings role and an if-match header.

Deprecated — use POST /v2/accounts/{branch}/{account}/monitorings/{id}/release.

**Query parameters**
- `if-match` — Required header. Current monitoring version.

**Request body · MonitoringReleaseRequestV1**

```
{
  "settlementInfo": {
    "fulfillment": "TOTAL",
    "amount": {
      "value": 5000,
      "currency": "USD"
    }
  },
  "blueprints": []
}
```

**200 Response · MonitoringReleaseResponse**

```
{
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "REALIZED",
  "releasedAmount": {
    "value": 5000,
    "currency": "USD"
  }
}
```

**Errors**
- `400` — Invalid attribute in the request (e.g. account not found, inactive account).
- `402` — Insufficient funds.
- `410` — The target resource is gone and cannot be used.
- `412` — Precondition failed: the if-match version does not match the current monitoring version.
- `503` — Service temporarily unavailable (e.g. account locked or too many concurrent requests).
- `500` — Unexpected server error.

## POST /v2/accounts/{branch}/{account}/monitorings/{id}/release

Releases a monitored sum into an account by monitoring ID, optionally debiting at the same time via blueprints. Requires the release-monitorings role.

**Request body · MonitoringReleaseRequest**

```
{
  "correlationId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
  "settlementInfo": {
    "fulfillment": "TOTAL",
    "amount": {
      "value": 5000,
      "currency": "USD"
    }
  },
  "blueprints": [
    {
      "entryKind": "ledger",
      "correlationId": "f71b6072-3ce5-408a-91db-77a5ba7912ae",
      "historyCode": 4919,
      "settlementInfo": {
        "fulfillment": "TOTAL",
        "amount": {
          "value": 5000,
          "currency": "USD"
        }
      }
    }
  ]
}
```

**200 Response · MonitoringReleaseResponse**

```
{
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "REALIZED",
  "releasedAmount": {
    "value": 5000,
    "currency": "USD"
  }
}
```

**Errors**
- `400` — Invalid attribute in the request (e.g. account not found, inactive account).
- `402` — Insufficient funds.
- `409` — Conflicting correlation for the release request.
- `410` — The target resource is gone and cannot be used.
- `412` — Precondition failed: the if-match version does not match the current monitoring version.
- `503` — Service temporarily unavailable (e.g. account locked or too many concurrent requests).
- `500` — Unexpected server error.

## POST /v2/accounts/{branch}/{account}/monitorings/release?correlationId=…

Releases a monitored sum into an account, addressing the monitoring by its correlation ID. Requires the release-monitorings role.

**Query parameters**
- `correlationId` — Required. Single correlation ID of the monitoring to release.

**Request body · MonitoringReleaseRequest**

```
{
  "correlationId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
  "settlementInfo": {
    "fulfillment": "TOTAL",
    "amount": {
      "value": 5000,
      "currency": "USD"
    }
  },
  "blueprints": [
    {
      "entryKind": "ledger",
      "correlationId": "f71b6072-3ce5-408a-91db-77a5ba7912ae",
      "historyCode": 4919,
      "settlementInfo": {
        "fulfillment": "TOTAL",
        "amount": {
          "value": 5000,
          "currency": "USD"
        }
      }
    }
  ]
}
```

**200 Response · MonitoringReleaseResponse**

```
{
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "REALIZED",
  "releasedAmount": {
    "value": 5000,
    "currency": "USD"
  }
}
```

**Errors**
- `400` — Invalid attribute in the request (e.g. account not found, inactive account).
- `402` — Insufficient funds.
- `409` — Conflicting correlation for the release request.
- `410` — The target resource is gone and cannot be used.
- `412` — Precondition failed: the if-match version does not match the current monitoring version.
- `503` — Service temporarily unavailable (e.g. account locked or too many concurrent requests).
- `500` — Unexpected server error.

## GET /v1/account-groups/{kind}/{membershipId}/monitorings

Lists the monitoring services set up for a group of accounts (membershipId is the group ID, kind is the group type). Requires the view-monitorings role.

**Query parameters**
- `page` — Page index from 0 (default 0).
- `size` — Page size, 1-100 (default 20).
- `correlationIds` — Optional filter: monitoring correlation IDs (1-100).

**200 Response · MonitoringsAccountResponse**

```
{
  "monitorings": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "status": "ACTIVE",
      "amount": {
        "value": 5000,
        "currency": "USD"
      },
      "amountDue": {
        "value": 5000,
        "currency": "USD"
      }
    }
  ]
}
```

**Errors**
- `404` — The requested resource was not found.
- `401` — Authentication failed or token missing.
- `403` — User lacks the required role for this operation.
- `500` — Unexpected server error.

## POST /v1/account-groups/{kind}/{membershipId}/monitorings

Sets up a monitoring service across a group of accounts. Requires the modify-monitorings role.

**Request body · MonitoringRequest**

```
{
  "monitoringKind": "ledger",
  "correlationId": "770109dc-7564-4558-bcf4-ffe7e46c5a38",
  "amount": {
    "value": 5000,
    "currency": "USD"
  },
  "status": "ACTIVE",
  "blueprint": {
    "entryKind": "ledger",
    "historyCode": 4919,
    "description": "Scheduled credit"
  }
}
```

**201 Response · MonitoringResponse**

```
{
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "ACTIVE",
  "amount": {
    "value": 5000,
    "currency": "USD"
  },
  "amountDue": {
    "value": 5000,
    "currency": "USD"
  },
  "blueprint": {
    "id": "770109dc-7564-4558-bcf4-ffe7e46c5a38",
    "entryKind": "ledger",
    "historyCode": 4919
  }
}
```

**Errors**
- `400` — Invalid attribute in the request (e.g. account not found, inactive account).
- `402` — Insufficient funds.
- `410` — The target resource is gone and cannot be used.
- `503` — Service temporarily unavailable (e.g. account locked or too many concurrent requests).
- `500` — Unexpected server error.

## PATCH /v1/account-groups/{kind}/{membershipId}/monitorings?correlationId=…

Updates a group monitoring service identified by its correlation ID. Requires the modify-monitorings role and a matching if-match version header.

**Query parameters**
- `if-match` — Required header. Current monitoring version.
- `correlationId` — Required. Single correlation ID of the monitoring to update.

**Request body · MonitoringPatchRequest**

```
{
  "status": "INACTIVE",
  "amount": {
    "value": 3000,
    "currency": "USD"
  }
}
```

**200 Response · MonitoringResponse**

```
{
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "ACTIVE",
  "amount": {
    "value": 5000,
    "currency": "USD"
  },
  "amountDue": {
    "value": 5000,
    "currency": "USD"
  },
  "blueprint": {
    "id": "770109dc-7564-4558-bcf4-ffe7e46c5a38",
    "entryKind": "ledger",
    "historyCode": 4919
  }
}
```

**Errors**
- `400` — Invalid attribute in the request (e.g. account not found, inactive account).
- `402` — Insufficient funds.
- `410` — The target resource is gone and cannot be used.
- `412` — Precondition failed: the if-match version does not match the current monitoring version.
- `503` — Service temporarily unavailable (e.g. account locked or too many concurrent requests).
- `500` — Unexpected server error.

## GET /v1/account-groups/{kind}/{membershipId}/monitorings/{id}/entries

Lists the transactions generated by a monitoring service across a group of accounts. Requires the view-monitorings role.

**Query parameters**
- `page` — Page index from 0 (default 0).
- `size` — Page size, 1-100 (default 20).

**200 Response · MonitoringAccountEntriesResponse**

```
{
  "monitoringEntries": [
    {
      "id": "770109dc-7564-4558-bcf4-ffe7e46c5a38",
      "entryKind": "ledger",
      "status": "POSTED",
      "branch": 4919,
      "account": 223166,
      "amount": {
        "value": 5000,
        "currency": "USD"
      },
      "createdAt": "2026-06-27T17:32:28Z"
    }
  ]
}
```

**Errors**
- `404` — The requested resource was not found.
- `401` — Authentication failed or token missing.
- `403` — User lacks the required role for this operation.
- `500` — Unexpected server error.

## GET /v1/account-groups/{kind}/{membershipId}/monitorings/{id}

Retrieves the details of a single group monitoring service by its ID. Requires the view-monitorings role.

**200 Response · MonitoringResponse**

```
{
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "ACTIVE",
  "amount": {
    "value": 5000,
    "currency": "USD"
  },
  "amountDue": {
    "value": 5000,
    "currency": "USD"
  },
  "blueprint": {
    "id": "770109dc-7564-4558-bcf4-ffe7e46c5a38",
    "entryKind": "ledger",
    "historyCode": 4919
  }
}
```

**Errors**
- `404` — The requested resource was not found.
- `401` — Authentication failed or token missing.
- `403` — User lacks the required role for this operation.
- `500` — Unexpected server error.

## PATCH /v1/account-groups/{kind}/{membershipId}/monitorings/{id}

Updates a group monitoring service by its ID. Requires the modify-monitorings role and a matching if-match version header.

**Query parameters**
- `if-match` — Required header. Current monitoring version.

**Request body · MonitoringPatchRequest**

```
{
  "status": "INACTIVE",
  "amount": {
    "value": 3000,
    "currency": "USD"
  }
}
```

**200 Response · MonitoringResponse**

```
{
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "ACTIVE",
  "amount": {
    "value": 5000,
    "currency": "USD"
  },
  "amountDue": {
    "value": 5000,
    "currency": "USD"
  },
  "blueprint": {
    "id": "770109dc-7564-4558-bcf4-ffe7e46c5a38",
    "entryKind": "ledger",
    "historyCode": 4919
  }
}
```

**Errors**
- `400` — Invalid attribute in the request (e.g. account not found, inactive account).
- `402` — Insufficient funds.
- `410` — The target resource is gone and cannot be used.
- `412` — Precondition failed: the if-match version does not match the current monitoring version.
- `503` — Service temporarily unavailable (e.g. account locked or too many concurrent requests).
- `500` — Unexpected server error.

## POST /v1/account-groups/{kind}/{membershipId}/monitorings/cancel?correlationId=…

Cancels a group monitoring service, identified by either its ID or correlation ID. Requires the modify-monitorings role.

**Query parameters**
- `id` — Optional. Single monitoring ID to cancel.
- `correlationId` — Optional. Single correlation ID to cancel.

**200 Response · MonitoringResponse**

```
{
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "ACTIVE",
  "amount": {
    "value": 5000,
    "currency": "USD"
  },
  "amountDue": {
    "value": 5000,
    "currency": "USD"
  },
  "blueprint": {
    "id": "770109dc-7564-4558-bcf4-ffe7e46c5a38",
    "entryKind": "ledger",
    "historyCode": 4919
  }
}
```

**Errors**
- `400` — Invalid attribute in the request (e.g. account not found, inactive account).
- `402` — Insufficient funds.
- `410` — The target resource is gone and cannot be used.
- `412` — Precondition failed: the if-match version does not match the current monitoring version.
- `422` — The monitoring service cannot be cancelled in its current state.
- `503` — Service temporarily unavailable (e.g. account locked or too many concurrent requests).
- `500` — Unexpected server error.

## POST /v1/account-groups/{kind}/{membershipId}/monitorings/{id}/release

Deprecated. Releases a monitored sum into a group of accounts, optionally debiting via blueprints. Requires the release-monitorings role and an if-match header.

Deprecated — use POST /v2/account-groups/{kind}/{membershipId}/monitorings/{id}/release.

**Query parameters**
- `if-match` — Required header. Current monitoring version.

**Request body · MonitoringReleaseRequestV1**

```
{
  "settlementInfo": {
    "fulfillment": "TOTAL",
    "amount": {
      "value": 5000,
      "currency": "USD"
    }
  },
  "blueprints": []
}
```

**200 Response · MonitoringReleaseResponse**

```
{
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "REALIZED",
  "releasedAmount": {
    "value": 5000,
    "currency": "USD"
  }
}
```

**Errors**
- `400` — Invalid attribute in the request (e.g. account not found, inactive account).
- `402` — Insufficient funds.
- `410` — The target resource is gone and cannot be used.
- `412` — Precondition failed: the if-match version does not match the current monitoring version.
- `503` — Service temporarily unavailable (e.g. account locked or too many concurrent requests).
- `500` — Unexpected server error.

## POST /v2/account-groups/{kind}/{membershipId}/monitorings/{id}/release

Releases a monitored sum into a group of accounts by monitoring ID, optionally debiting via blueprints. Requires the release-monitorings role.

**Request body · MonitoringReleaseRequest**

```
{
  "correlationId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
  "settlementInfo": {
    "fulfillment": "TOTAL",
    "amount": {
      "value": 5000,
      "currency": "USD"
    }
  },
  "blueprints": [
    {
      "entryKind": "ledger",
      "correlationId": "f71b6072-3ce5-408a-91db-77a5ba7912ae",
      "historyCode": 4919,
      "settlementInfo": {
        "fulfillment": "TOTAL",
        "amount": {
          "value": 5000,
          "currency": "USD"
        }
      }
    }
  ]
}
```

**200 Response · MonitoringReleaseResponse**

```
{
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "REALIZED",
  "releasedAmount": {
    "value": 5000,
    "currency": "USD"
  }
}
```

**Errors**
- `400` — Invalid attribute in the request (e.g. account not found, inactive account).
- `402` — Insufficient funds.
- `409` — Conflicting correlation for the release request.
- `410` — The target resource is gone and cannot be used.
- `412` — Precondition failed: the if-match version does not match the current monitoring version.
- `503` — Service temporarily unavailable (e.g. account locked or too many concurrent requests).
- `500` — Unexpected server error.

## POST /v2/account-groups/{kind}/{membershipId}/monitorings/release?correlationId=…

Releases a monitored sum into a group of accounts, addressing the monitoring by its correlation ID. Requires the release-monitorings role.

**Query parameters**
- `correlationId` — Required. Single correlation ID of the monitoring to release.

**Request body · MonitoringReleaseRequest**

```
{
  "correlationId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
  "settlementInfo": {
    "fulfillment": "TOTAL",
    "amount": {
      "value": 5000,
      "currency": "USD"
    }
  },
  "blueprints": [
    {
      "entryKind": "ledger",
      "correlationId": "f71b6072-3ce5-408a-91db-77a5ba7912ae",
      "historyCode": 4919,
      "settlementInfo": {
        "fulfillment": "TOTAL",
        "amount": {
          "value": 5000,
          "currency": "USD"
        }
      }
    }
  ]
}
```

**200 Response · MonitoringReleaseResponse**

```
{
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "REALIZED",
  "releasedAmount": {
    "value": 5000,
    "currency": "USD"
  }
}
```

**Errors**
- `400` — Invalid attribute in the request (e.g. account not found, inactive account).
- `402` — Insufficient funds.
- `409` — Conflicting correlation for the release request.
- `410` — The target resource is gone and cannot be used.
- `412` — Precondition failed: the if-match version does not match the current monitoring version.
- `503` — Service temporarily unavailable (e.g. account locked or too many concurrent requests).
- `500` — Unexpected server error.

## GET /api/v2/contas/{agencia}/{conta}/saldos

Re-exposes the legacy checking-account (Conta Corrente) balance contract. Returns all balance types recorded for the account on the reference date (D) or the previous business day (D-1). The DISPONIVEL (available) balance is always returned.

**Query parameters**
- `Authorization` — Required header. Bearer OAuth2 token.
- `incluirLimite` — Whether the available balance includes the account credit limit (default true).
- `dMenosUm` — If true, returns D-1 balances instead of the reference date D (default false).

**200 Response · SaldoResponse**

```
{
  "data": "2026-06-27",
  "saldoDisponivel": 100.75,
  "saldoVinculado": 200.75,
  "saldoBloqueado": 50.0,
  "saldoContabil": 100.33,
  "saldoInvestimento": 100.0,
  "limiteCreditoDisponivel": 0
}
```

**Errors**
- `400` — Client-side error (e.g. account not found).
- `500` — Unexpected server error.

## GET /api/v1/contas/{agencia}/{conta}/saldo-periodo?dataInicial=…

Re-exposes the legacy checking-account balance-by-period contract. Returns the account balances for a single date or across a date range.

**Query parameters**
- `Authorization` — Required header. Bearer OAuth2 token.
- `dataInicial` — Required. Start date of the balance search (yyyy-MM-dd).
- `dataFinal` — Optional end date; defaults to the system reference date.

**200 Response · saldosPeriodoRetorno**

```
{
  "data": [
    {
      "data": "2026-06-27",
      "saldoDisponivel": 100.75,
      "saldoVinculado": 200.75,
      "saldoBloqueado": 50.0,
      "saldoContabil": 100.33
    }
  ]
}
```

**Errors**
- `400` — Client-side error (e.g. account not found).
- `500` — Unexpected server error.

## GET /api/v1/accounts/{branch}/{account}/balance/{date}

Re-exposes the legacy checking-account contract to check the available balance of an account on a given date.

**Query parameters**
- `Authorization` — Required header. Bearer OAuth2 token.
- `date` — Path. Balance date (yyyy-MM-dd).

**200 Response · availableBalanceByDateResponse**

```
{
  "availableBalance": 1500.0
}
```

**Errors**
- `400` — Client-side error (e.g. account not found).
- `500` — Unexpected server error.

## GET /api/v2/contas/{agencia}/{conta}/movimentoConsolidado?indFuturo=…

Re-exposes the legacy checking-account contract to consolidate entries for statement building. Returns the net movement (total credits minus total debits) for the given filters.

**Query parameters**
- `Authorization` — Required header. Bearer OAuth2 token.
- `indFuturo` — Required. [S] returns only future entries; [N] returns only reference-date entries.
- `tipoLancamento` — Optional. [D] debits only, [C] credits only, or empty for both. With [D] the result is negative.

**200 Response · movimentoConsolidadoRetorno**

```
{
  "totalMovimento": 100.01
}
```

**Errors**
- `400` — Client-side error while processing the request.
- `500` — Unexpected server error.

## GET /api/v1/contas/{agencia}/{conta}/extrato?dataInicial=…

Re-exposes the legacy checking-account statement contract. Returns the entry statement for an account, by date range, from a start date, or for a number of recent days. Entries are ordered by reference date.

**Query parameters**
- `dataInicial` — Optional. Start date of entries to return (yyyy-MM-dd).
- `dataFinal` — Optional. End date of entries to return (yyyy-MM-dd).
- `qtdUltimosDias` — Optional. Returns entries from the last N calendar days.
- `tipoData` — Optional. How date filters apply: LANCAMENTO (posting date), ENTRADA (entry date/time), or ENTRADA_LOTE. Default ENTRADA.

**200 Response · ExtratoResponse**

```
{
  "data": {
    "agencia": 4919,
    "numConta": 223166,
    "lancamentos": [
      {
        "dataLancamento": "2022-11-12",
        "dataEntrada": "2022-11-12T10:30:00",
        "tipoLancamento": "C",
        "valor": 739.39,
        "descHistorico": "PIX recebido",
        "idLancamento": 1001,
        "efetivado": true
      }
    ]
  }
}
```

**Errors**
- `400` — Client-side error (e.g. account not found).
- `500` — Unexpected server error.

## GET /api/v1/entries?dateCategory=…&startDateTime=…&pageNumber=…&pageSize=…

Re-exposes the legacy entry-listing contract. Returns a paginated list of entries filtered by date category and date range, optionally scoped by branch, account, and operation.

**Query parameters**
- `dateCategory` — Required. One of ENTRY_DATE, INCOMING_DATE, INPUT_BUNDLE_DATE, TRANSACTION_DATE.
- `startDateTime` — Required. Start date-time (yyyy-MM-ddTHH:mm:ss).
- `endDateTime` — Optional. End date-time; defaults to the start date.
- `branch` — Optional. Bank branch filter.
- `accountNumber` — Optional. Account number filter.
- `operationCode` — Optional. Operation code filter.
- `operationReference` — Optional. Operation reference filter.
- `pageNumber` — Required. Current page (from 0).
- `pageSize` — Required. Page size, 1-100.

**200 Response · EntriesResponse**

```
{
  "data": {
    "entriesList": [
      {
        "entryId": 123456789,
        "branch": 4919,
        "accountNumber": 223166,
        "entryDate": "2026-06-27",
        "entryType": "D",
        "amount": 50.0,
        "operationCode": 4919
      }
    ],
    "pagination": {
      "pageNumber": 0,
      "totalPages": 1,
      "totalRecords": 1
    }
  }
}
```

**Errors**
- `400` — Client-side error while processing the request.

## GET /v1/accounts

Retrieves information for one or more accounts identified by their account keys. Accounts undergoing migration to Digital Twin are not returned. Requires the view-accounts role.

**Query parameters**
- `key` — Required. One or more account keys, each formed by branch and account number separated by a slash (e.g. 1234/12345); separate multiple keys with commas.
- `page` — Zero-based page index to retrieve. Defaults to 0.
- `size` — Maximum number of items per page (1-100). Defaults to 20.

**200 Response · accountResponse**

```
{
  "accounts": [
    {
      "branch": 4919,
      "account": 223166,
      "status": "ACTIVE",
      "timeZone": "America/Sao_Paulo",
      "type": {
        "id": "1",
        "description": "Checking account",
        "category": "checking"
      },
      "features": [
        {
          "name": "BLOCKED_FOR_DEBIT",
          "value": "true",
          "type": "BOOLEAN"
        }
      ],
      "memberships": [
        {
          "id": "12345678901",
          "kind": "PERSON_HOLDER_TAX_ID"
        }
      ]
    }
  ]
}
```

**Errors**
- `400` — The request has an invalid attribute or parameter.
- `401` — Authentication failed (missing or invalid token).
- `500` — Unexpected server error.

## GET /v1/memberships/accounts

Retrieves all accounts related to one or more membership keys (holder/group). Each membership key is a kind and id separated by a slash. Requires the view-account-memberships role.

**Query parameters**
- `membershipKey` — Required. One or more membership keys in the format [kind]/[id] (e.g. PERSON_HOLDER_TAX_ID/12345678901); separate multiple keys with commas.
- `page` — Zero-based page index to retrieve. Defaults to 0.
- `size` — Maximum number of items per page (1-100). Defaults to 20.

**200 Response · accountResponse**

```
{
  "accounts": [
    {
      "branch": 4919,
      "account": 223166,
      "status": "ACTIVE",
      "timeZone": "America/Sao_Paulo",
      "type": {
        "id": "1",
        "description": "Checking account",
        "category": "checking"
      },
      "features": [
        {
          "name": "BLOCKED_FOR_DEBIT",
          "value": "true",
          "type": "BOOLEAN"
        }
      ],
      "memberships": [
        {
          "id": "12345678901",
          "kind": "PERSON_HOLDER_TAX_ID"
        }
      ]
    }
  ]
}
```

**Errors**
- `400` — The request has an invalid attribute or parameter.
- `401` — Authentication failed (missing or invalid token).
- `500` — Unexpected server error.

## GET /v1/accounts/{branch}/{account}/limits

Lists all limits configured for an account. Requires the view-account-limits role.

**Query parameters**
- `branch` — Path parameter. The account branch; use 0 when the account has no branch number.
- `account` — Path parameter. The account number or unique account identifier.

**200 Response · limits**

```
{
  "limits": [
    { "currency": "USD", "min": 100, "max": 100000, "startAt": "2023-07-01" },
    { "currency": "USD", "min": 0, "max": 10000, "startAt": "2023-01-01", "dueAt": "2023-06-30" }
  ]
}
```

**Errors**
- `400` — The request has an invalid attribute or parameter.
- `401` — Authentication failed (missing or invalid token).
- `404` — The requested resource was not found.
- `500` — Unexpected server error.

## GET /v1/accounts/{branch}/{account}/limits/{limitType}

Retrieves a single account limit by its type. Requires the view-account-limits role.

**Query parameters**
- `branch` — Path parameter. The account branch; use 0 when the account has no branch number.
- `account` — Path parameter. The account number or unique account identifier.
- `limitType` — Path parameter. The limit type to return (e.g. OVERDRAFT).

**200 Response · limitResult**

```
{
  "type": "OVERDRAFT",
  "limit": {
    "currency": "USD",
    "min": 1,
    "max": 10000
  },
  "lastUpdatedAt": "2019-01-03T00:00:00Z"
}
```

**Errors**
- `400` — The request has an invalid attribute or parameter.
- `401` — Authentication failed (missing or invalid token).
- `404` — The requested resource was not found.
- `500` — Unexpected server error.

## PUT /v1/accounts/{branch}/{account}/limits/{limitType}

Adds or updates an account limit of the given type. Requires the modify-account-limits role.

**Query parameters**
- `branch` — Path parameter. The account branch; use 0 when the account has no branch number.
- `account` — Path parameter. The account number or unique account identifier.
- `limitType` — Path parameter. The limit type to add or update.

**Request body**

```
{
  "limit": {
    "currency": "USD",
    "min": 1,
    "max": 10000
  }
}
```

**200 Response · limitResult**

```
{
  "type": "OVERDRAFT",
  "limit": {
    "currency": "USD",
    "min": 1,
    "max": 10000
  },
  "lastUpdatedAt": "2019-01-03T00:00:00Z"
}
```

**Errors**
- `400` — The request has an invalid attribute or parameter.
- `401` — Authentication failed (missing or invalid token).
- `404` — The requested resource was not found.
- `500` — Unexpected server error.

## DELETE /v1/accounts/{branch}/{account}/limits/{limitType}

Deletes an account limit of the given type. Returns 204 No Content on success. Requires the modify-account-limits role.

**Query parameters**
- `branch` — Path parameter. The account branch; use 0 when the account has no branch number.
- `account` — Path parameter. The account number or unique account identifier.
- `limitType` — Path parameter. The limit type to delete.

Returns 204 No Content on success — no response body.

**Errors**
- `400` — The request has an invalid attribute or parameter.
- `401` — Authentication failed (missing or invalid token).
- `404` — The requested resource was not found.
- `500` — Unexpected server error.

## GET /v1/system/limits

Lists all system-wide limits. Requires the view-system-limits role.

**200 Response · limits**

```
[
  {
    "type": "OVERDRAFT",
    "limit": {
      "currency": "USD",
      "min": 1,
      "max": 10000
    },
    "lastUpdatedAt": "2019-01-03T00:00:00Z"
  }
]
```

**Errors**
- `400` — The request has an invalid attribute or parameter.
- `401` — Authentication failed (missing or invalid token).
- `500` — Unexpected server error.

## GET /v1/system/limits/{limitType}

Retrieves a single system limit by its type. Requires the view-system-limits role.

**Query parameters**
- `limitType` — Path parameter. The system limit type to return (e.g. OVERDRAFT).

**200 Response · limitResult**

```
{
  "type": "OVERDRAFT",
  "limit": {
    "currency": "USD",
    "min": 1,
    "max": 10000
  },
  "lastUpdatedAt": "2019-01-03T00:00:00Z"
}
```

**Errors**
- `400` — The request has an invalid attribute or parameter.
- `401` — Authentication failed (missing or invalid token).
- `404` — The requested resource was not found.
- `500` — Unexpected server error.

## PUT /v1/system/limits/{limitType}

Adds or updates a system limit of the given type. Requires the modify-system-limits role.

**Query parameters**
- `limitType` — Path parameter. The system limit type to add or update.

**Request body**

```
{
  "limit": {
    "currency": "USD",
    "min": 1,
    "max": 10000
  }
}
```

**200 Response · limitResult**

```
{
  "type": "OVERDRAFT",
  "limit": {
    "currency": "USD",
    "min": 1,
    "max": 10000
  },
  "lastUpdatedAt": "2019-01-03T00:00:00Z"
}
```

**Errors**
- `400` — The request has an invalid attribute or parameter.
- `401` — Authentication failed (missing or invalid token).
- `500` — Unexpected server error.

## DELETE /v1/system/limits/{limitType}

Deletes a system limit of the given type. Returns 204 No Content on success. Requires the modify-system-limits role.

**Query parameters**
- `limitType` — Path parameter. The system limit type to delete.

Returns 204 No Content on success — no response body.

**Errors**
- `400` — The request has an invalid attribute or parameter.
- `401` — Authentication failed (missing or invalid token).
- `500` — Unexpected server error.

## GET /v1/balances

Lists balances for a group of accounts. Returns the current balance when no date range is given, or balances grouped by date when a range is supplied. Requires the view-balances role.

**Query parameters**
- `accountKeys` — Required. One or more account keys formed by branch and account number separated by a slash (e.g. 1234/12345); separate multiple keys with commas.
- `initialDate` — Start date of the range (YYYY-MM-DD). Omit both dates to get the current balance; if provided, finalDate is also required.
- `finalDate` — End date of the range (YYYY-MM-DD). Required when initialDate is provided.
- `balanceTypes` — Balance types to return, comma-separated (e.g. AVAILABLE,BLOCKED,HELD,BOOK). All types by default.
- `currency` — Currency code (ISO 4217 or canonical crypto/stablecoin ticker). Defaults to the system currency.
- `page` — Zero-based page index. Defaults to 0.
- `size` — Maximum number of items per page (1-100). Defaults to 20.

**200 Response · balancesBatchResponse**

```
{
  "balances": [
    {
      "branch": 1,
      "account": 100,
      "balances": [
        {
          "date": "2024-01-01",
          "balances": {
            "AVAILABLE": {
              "value": 1000,
              "currency": "USD"
            },
            "HELD": {
              "value": 0,
              "currency": "USD"
            }
          }
        }
      ]
    }
  ]
}
```

**Errors**
- `400` — The request has an invalid attribute or parameter.
- `404` — The requested resource was not found.
- `500` — Unexpected server error.

## GET /v1/accounts/{branch}/{account}/balances

Returns balances grouped by date for a single account over a date range. Requires the view-account-balances role.

**Query parameters**
- `branch` — Path parameter. The account branch.
- `account` — Path parameter. The account number.
- `initialDate` — Required. Start reference date of the range (YYYY-MM-DD).
- `finalDate` — Required. End reference date of the range (YYYY-MM-DD).
- `balanceTypes` — Required. Balance types to return, comma-separated (e.g. AVAILABLE,BLOCKED,HELD,BOOK).
- `currency` — Required. Currency code (ISO 4217 or canonical crypto/stablecoin ticker).
- `page` — Zero-based page index. Defaults to 0.
- `size` — Maximum number of items per page (1-100). Defaults to 20.

**200 Response · balancesResponse**

```
{
  "balances": [
    {
      "date": "2022-07-06",
      "balances": {
        "AVAILABLE": {
          "value": 3000,
          "currency": "USD"
        },
        "HELD": {
          "value": 2000,
          "currency": "USD"
        },
        "BLOCKED": {
          "value": 500,
          "currency": "USD"
        },
        "BOOK": {
          "value": 200,
          "currency": "USD"
        }
      }
    }
  ]
}
```

**Errors**
- `400` — The request has an invalid attribute or parameter.
- `404` — The requested resource was not found.
- `500` — Unexpected server error.

## GET /v1/accounts/{branch}/{account}/limits

Lists the saved limits for an account, optionally filtered by a due-date range. Requires the view-account-limits role.

**Query parameters**
- `branch` — Path parameter. The account branch.
- `account` — Path parameter. The account number.
- `limitType` — Required. The limit type to search (e.g. OVERDRAFT).
- `initialDueDate` — Start of the due-date range (YYYY-MM-DD).
- `finalDueDate` — End of the due-date range (YYYY-MM-DD).
- `page` — Zero-based page index. Defaults to 0.
- `size` — Maximum number of items per page (1-100). Defaults to 20.

**200 Response · limitsResponse**

```
{
  "limits": [
    { "currency": "USD", "min": 100, "max": 100000, "startAt": "2023-07-01" },
    { "currency": "USD", "min": 0, "max": 10000, "startAt": "2023-01-01", "dueAt": "2023-06-30" }
  ]
}
```

**Errors**
- `400` — The request has an invalid attribute or parameter.
- `404` — The requested resource was not found.
- `500` — Unexpected server error.

## GET /v1/cubes/balances

Runs an OLAP query over balances using a Multidimensional Expression (MDX) and returns the resulting cube data. Requires the view-balance-cube role.

**Query parameters**
- `mdxQuery` — Required. The MDX query to evaluate against the balances cube.

**200 Response · cubeResponse**

```
{
  "rows": 1,
  "result": [
    {
      "AMOUNT": -200.0
    }
  ]
}
```

**Errors**
- `400` — The request has an invalid attribute or parameter.
- `500` — Unexpected server error.
- `504` — Gateway timeout while processing the query.

## GET /v1/entries

Lists transactions for an account to build a statement and consolidate values. Deprecated in favor of /v2/entries. Requires the view-entries role.

**Query parameters**
- `branch` — The account branch. Required if account is provided.
- `account` — The account number. Required if branch is provided.
- `historyCode` — Deprecated. A single history code categorizing the transaction; use historyCodes instead.
- `historyCodes` — A list of history codes categorizing the transactions (max 1000).
- `initialDate` — Required. Start date-time of the range (ISO 8601, e.g. 2017-07-21T17:32:28Z).
- `finalDate` — Required. End date-time of the range (ISO 8601).
- `dateType` — Required. ENTRY filters by the balance-impact reference date; EVENT filters by when the transaction was recorded.
- `operationType` — Transaction type: C for credits or D for debits. Returns both if omitted; ignored when history codes are provided.
- `currency` — Required. Currency code (ISO 4217 or canonical crypto/stablecoin ticker).
- `fields` — ENTRIES returns only transactions; BALANCE_SUMMARY returns the synthetic sum. Both are returned if omitted.
- `featureName` — Indexed metadata field name to filter by. Required if featureValue is provided.
- `featureValue` — Value matching featureName in the transaction metadata. Required if featureName is provided.
- `page` — Zero-based page index. Defaults to 0.
- `size` — Maximum number of items per page (1-100). Defaults to 20.
- `X-Count-Omit` — Header. When true, pagination headers (X-Total-Elements, X-Total-Pages, X-Has-Next) are omitted.

**200 Response · entriesResponse**

```
{
  "entries": [
    {
      "branch": 1,
      "account": 223166,
      "entryDate": "2022-03-24",
      "eventDate": "2017-07-21T17:32:28Z",
      "operationType": "C",
      "amount": {
        "value": 100000,
        "currency": "USD"
      },
      "entryId": "1a3c5e7g9i",
      "entryKind": "LEDGER",
      "entryDescription": "Credit Card",
      "documentTypeKey": "9",
      "historyCode": 998,
      "historyDescription": "DOC"
    }
  ],
  "balanceSummary": {
    "value": 10000,
    "currency": "USD"
  }
}
```

**Errors**
- `400` — The request has an invalid attribute or parameter.
- `404` — The requested resource was not found.
- `500` — Unexpected server error.
- `504` — Gateway timeout while processing the query.

## GET /v2/entries

Lists transactions for an account with segregated posted and pending summaries. Requires the view-entries role.

**Query parameters**
- `branch` — The account branch. Required if account is provided.
- `account` — The account number. Required if branch is provided.
- `historyCodes` — A list of history codes categorizing the transactions (max 1000).
- `initialDate` — Required. Start date-time of the range (ISO 8601, e.g. 2017-07-21T17:32:28Z).
- `finalDate` — Required. End date-time of the range (ISO 8601).
- `dateType` — Required. ENTRY filters by the balance-impact reference date; EVENT filters by when the transaction was recorded.
- `operationType` — Transaction type: C for credits or D for debits. Returns both if omitted; ignored when history codes are provided.
- `currency` — Required. Currency code (ISO 4217 or canonical crypto/stablecoin ticker).
- `fields` — ENTRIES returns only transactions; BALANCE_SUMMARY returns the synthetic sum. Both are returned if omitted.
- `featureName` — Indexed metadata field name to filter by. Required if featureValue is provided.
- `featureValue` — Value matching featureName in the transaction metadata. Required if featureName is provided.
- `type` — Filter entries by status: POSTED or PENDING. Both are returned if omitted.
- `page` — Zero-based page index. Defaults to 0.
- `size` — Maximum number of items per page (1-100). Defaults to 20.
- `X-Count-Omit` — Header. When true, pagination headers (X-Total-Elements, X-Total-Pages, X-Has-Next) are omitted.

**200 Response · entriesV2Response**

```
{
  "entries": [
    {
      "branch": 1,
      "account": 230621,
      "entryDate": "2023-06-21",
      "eventDate": "2023-06-20T17:20:19Z",
      "operationType": "C",
      "amount": {
        "value": 20,
        "currency": "USD"
      },
      "entryId": "1a3c5e7g9i",
      "entryKind": "LEDGER",
      "entryDescription": "Credit Card",
      "historyCode": 998,
      "type": "POSTED"
    }
  ],
  "balanceSummary": {
    "sumOfPostedEntries": {
      "value": 20,
      "currency": "USD"
    },
    "sumOfPendingCreditEntries": {
      "value": 0,
      "currency": "USD"
    },
    "sumOfPendingDebitEntries": {
      "value": 0,
      "currency": "USD"
    }
  }
}
```

**Errors**
- `400` — The request has an invalid attribute or parameter.
- `404` — The requested resource was not found.
- `500` — Unexpected server error.
- `504` — Gateway timeout while processing the query.

## GET /v1/entries/metadata

Returns the metadata attached to one or more transactions, identified by their entry IDs. Requires the view-entries-metadata role.

**Query parameters**
- `entriesId` — Required. One or more entry IDs, comma-separated.

**200 Response · entriesMetadataResponse**

```
[
  {
    "id": "1a3c5e7g9i",
    "metaData": {
      "key": "value",
      "key2": 1
    }
  }
]
```

**Errors**
- `400` — The request has an invalid attribute or parameter.
- `404` — The requested resource was not found.
- `500` — Unexpected server error.

## GET /v1/cubes/entries

Runs an OLAP query over transactions using a Multidimensional Expression (MDX) and returns the resulting cube data. Requires the view-entry-cube role.

**Query parameters**
- `mdxQuery` — Required. The MDX query to evaluate against the entries cube.

**200 Response · cubeResponse**

```
{
  "rows": 3,
  "result": [
    {
      "[ACCOUNT CHECKING].[ACCOUNT]": "35478",
      "AMOUNT": "979.0",
      "[ACCOUNT CHECKING].[BRANCH]": "12"
    }
  ]
}
```

**Errors**
- `400` — The request has an invalid attribute or parameter.
- `500` — Unexpected server error.
- `504` — Gateway timeout while processing the query.

## POST /v1/transaction-bundles

Posts credits and debits across multiple accounts as a single bundle operation (one atomic transaction). Requires the transact role on both the composite-transaction and transaction modules. Amounts are unscaled integers in minor units.

**Request body**

```
{
  "bundle": "65461321315",
  "kind": "regular",
  "status": "POSTED",
  "entries": [
    {
      "branch": 4919,
      "account": 223166,
      "entryKind": "ledger",
      "correlationId": "c6675439-25e1-4435-8449-5a17fa967d5c",
      "description": "ATM withdraw",
      "historyCode": 4919,
      "amount": {
        "value": 100000,
        "currency": "USD"
      }
    }
  ]
}
```

**201 Response · entryBundleGroupResponse**

```
{
  "bundleId": "65461321315",
  "status": "POSTED",
  "bundleEntries": [
    {
      "branch": 4919,
      "account": 223166,
      "createdAt": "2017-07-21T17:32:28Z",
      "entries": [
        {
          "id": "c6675439-25e1-4435-8449-5a17fa967d5c",
          "entryKind": "ledger",
          "historyCode": 4919,
          "status": "POSTED",
          "amount": {
            "value": 100000,
            "currency": "USD"
          },
          "balanceChanges": {
            "AVAILABLE": {
              "value": 100000,
              "currency": "USD"
            }
          }
        }
      ],
      "balances": {
        "AVAILABLE": {
          "amount": {
            "value": 100000,
            "currency": "USD"
          }
        }
      }
    }
  ]
}
```

**Errors**
- `400` — The request has an invalid attribute or parameter.
- `401` — Authentication failed (missing or invalid token).
- `402` — Insufficient funds.
- `403` — The user lacks the required role for this operation.
- `409` — Conflict while processing the bundle (e.g. idempotency hit or rollback in progress).
- `410` — The entry or transaction is no longer accessible (previously removed).
- `500` — Unexpected server error.

Each bundle entry follows the same 'Required fields by entryKind' rules as POST .../batches.

## DELETE /v1/transaction-bundles/{bundle}

Deletes (reverses) the transactions of a bundle operation. Returns 204 No Content on success. Requires the transact role on both the composite-transaction and transaction modules.

**Query parameters**
- `bundle` — Path parameter. The unique identifier of the bundle operation to delete.

Returns 204 No Content on success — no response body.

**Errors**
- `400` — The request has an invalid attribute or parameter.
- `401` — Authentication failed (missing or invalid token).
- `402` — Insufficient funds.
- `403` — The user lacks the required role for this operation.
- `500` — Unexpected server error.

## POST /v1/accounts/{branch}/{account}/monitorings/{monitoringId}/release

Releases a monitored (held) sum into an account, optionally debiting an amount in the same request via blueprints. Requires release/view/modify-monitorings roles on the transaction module and release-monitorings on composite-transaction.

**Query parameters**
- `branch` — Path parameter. The account branch; use 0 when the account has no branch number.
- `account` — Path parameter. The account number or unique account identifier.
- `monitoringId` — Path parameter. The unique identifier of the monitoring service.
- `if-match` — Required header. The last registered version of the monitoring service.

**Request body**

```
{
  "settlementInfo": {
    "fulfillment": "TOTAL",
    "amount": {
      "value": 100000,
      "currency": "USD"
    }
  },
  "status": "INACTIVE",
  "blueprints": [
    {
      "entryKind": "ledger",
      "correlationId": "c6675439-25e1-4435-8449-5a17fa967d5c",
      "historyCode": 4919,
      "settlementInfo": {
        "fulfillment": "TOTAL",
        "amount": {
          "value": 5000,
          "currency": "USD"
        }
      }
    }
  ]
}
```

**200 Response · monitoringReleaseResponse**

```
{
  "monitoringId": "fd18bfce-5112-4221-ae54-818de9c2cdca",
  "correlations": { "dummy-originator": "130e2a5a-0c34-4810-b72f-dca85defe51e" },
  "status": "REALIZED",
  "releasedAmount": { "value": 100000, "currency": "BRL" },
  "totalAmount": { "value": 100000, "currency": "BRL" },
  "amountDue": { "value": 1, "currency": "BRL" },
  "totalReleased": { "value": 100000, "currency": "BRL" },
  "entries": [
    {
      "branch": 4919,
      "account": 223166,
      "createdAt": "2017-07-21T17:32:28Z",
      "id": "c6675439-25e1-4435-8449-5a17fa967d5c",
      "entryKind": "ledger",
      "status": "POSTED",
      "amount": { "value": 100000, "currency": "BRL" }
    }
  ]
}
```

**Errors**
- `400` — The request has an invalid attribute or parameter.
- `401` — Authentication failed (missing or invalid token).
- `403` — The user lacks the required role for this operation.
- `500` — Unexpected server error.

## POST /v1/account-groups/{kind}/{membershipId}/monitorings/{monitoringId}/release

Releases a monitored (held) sum into a group of accounts, optionally debiting an amount in the same request via blueprints. Requires release/view/modify-monitorings roles on the transaction module and release-monitorings on composite-transaction.

**Query parameters**
- `kind` — Path parameter. The group kind (e.g. HOLDER).
- `membershipId` — Path parameter. The group identifier.
- `monitoringId` — Path parameter. The unique identifier of the monitoring service.
- `if-match` — Required header. The last registered version of the monitoring service.

**Request body**

```
{
  "settlementInfo": {
    "fulfillment": "TOTAL",
    "amount": {
      "value": 100000,
      "currency": "USD"
    }
  },
  "status": "INACTIVE",
  "blueprints": [
    {
      "entryKind": "ledger",
      "correlationId": "c6675439-25e1-4435-8449-5a17fa967d5c",
      "historyCode": 4919,
      "settlementInfo": {
        "fulfillment": "TOTAL",
        "amount": {
          "value": 5000,
          "currency": "USD"
        }
      }
    }
  ]
}
```

**200 Response · monitoringReleaseResponse**

```
{
  "monitoringId": "fd18bfce-5112-4221-ae54-818de9c2cdca",
  "correlations": { "dummy-originator": "130e2a5a-0c34-4810-b72f-dca85defe51e" },
  "status": "REALIZED",
  "releasedAmount": { "value": 100000, "currency": "BRL" },
  "totalAmount": { "value": 100000, "currency": "BRL" },
  "amountDue": { "value": 1, "currency": "BRL" },
  "totalReleased": { "value": 100000, "currency": "BRL" },
  "entries": [
    {
      "branch": 4919,
      "account": 223166,
      "createdAt": "2017-07-21T17:32:28Z",
      "id": "c6675439-25e1-4435-8449-5a17fa967d5c",
      "entryKind": "ledger",
      "status": "POSTED",
      "amount": { "value": 100000, "currency": "BRL" }
    }
  ]
}
```

**Errors**
- `400` — The request has an invalid attribute or parameter.
- `401` — Authentication failed (missing or invalid token).
- `403` — The user lacks the required role for this operation.
- `500` — Unexpected server error.
