Skip to main content
GET
/
balances
/
{balance_id}
/
lineage
curl --request GET \
  --url http://localhost:5001/balances/{balance_id}/lineage \
  --header 'X-blnk-key: <api-key>'
{
  "balance_id": "bln_5ce86029-3c2e-4e2a-aae2-7fb931ca4c4f",
  "aggregate_balance_id": "bln_aggregate_shadow_balance_id",
  "total_with_lineage": "7500",
  "providers": [
    {
      "provider": "stripe",
      "amount": "10000",
      "available": "7500",
      "spent": "2500",
      "shadow_balance_id": "bln_shadow_balance_id"
    }
  ]
}
If you’re using the auto-provisioned Enterprise Core instance included with your Production License deployment, set the base URL to: https://ENTERPRISE_PUBLIC_URL/core.If you’re connecting to a different Core instance, use the publicly accessible base URL for that instance instead.

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

balance_id
string
required
Specifies the unique ID of the balance whose lineage you want to retrieve.

Response

balance_id
string
required
The ID of the balance being queried.
aggregate_balance_id
string
required
The internal aggregate balance ID used to track combined provider funds.
total_with_lineage
string
required
Total available funds tracked by lineage (in minor units, like precise_amount).
providers
array
required
Provider-by-provider breakdown of received and spent funds.
All amounts are returned as strings in minor units.
curl --request GET \
  --url http://localhost:5001/balances/{balance_id}/lineage \
  --header 'X-blnk-key: <api-key>'
{
  "balance_id": "bln_5ce86029-3c2e-4e2a-aae2-7fb931ca4c4f",
  "aggregate_balance_id": "bln_aggregate_shadow_balance_id",
  "total_with_lineage": "7500",
  "providers": [
    {
      "provider": "stripe",
      "amount": "10000",
      "available": "7500",
      "spent": "2500",
      "shadow_balance_id": "bln_shadow_balance_id"
    }
  ]
}

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.