Authorization
If set, the API uses an API key for authentication. Include the following header in your requests: X-blnk-key: <api-key>.
Replace <api-key> with your secret API key. Ensure the key is kept secure and not exposed in public repositories or client-side code.
See also: Secure your Blnk server
Path
Specifies the unique ID of the balance whose balance should be computed from source transactions.
Query
When set to true, indicates that the balance should be reconstructed directly from its transactions, bypassing balance snapshots and the default running balance.
Response
The computed balance object containing all balance details.
The net amount computed from all transactions (credit_balance - debit_balance).
The unique identifier of the balance.
Total amount computed from all credit transactions (money moving into the balance).
Total amount computed from all debit transactions (money moving out of the balance).
The currency code of the balance.
The unique identifier of the ledger this balance belongs to.
This endpoint computes the balance by processing all transactions from genesis. For balances with extensive transaction history, this may take longer than the standard balance endpoint.
curl --request GET \
--url 'http://localhost:5001/balances/{balance_id}?from_source=true' \
--header 'X-blnk-key: <api-key>'
{
"balance": {
"balance": 9620000,
"balance_id": "bin_be16c4a1-b5a6-4b64-a733-de2f6b24813d",
"credit_balance": 9620000,
"currency": "USD",
"debit_balance": 0,
"ledger_id": "ldg_049495c6-356e-4ebc-a45e-60d1e1e16afb",
"identity_id": "",
"created_at": "2024-11-26T08:36:36.238244338Z",
"meta_data": null
}
}
Need help?
We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool.
To ask questions or discuss issues, please contact us or join our Discord community.
Tip: Connect to Blnk Cloud to see your Core data.You can view your transactions, manage identities, create custom reports, invite other team members to collaborate, and perform operations on your Core — all in one dashboard.Check out Blnk Cloud →