Ledgers

Get ledger

Get a ledger by ID with the Python SDK.

GET/ledgers/{ledger_id}

Use blnk.ledgers.get to retrieve a ledger by its ledger ID.

Call the method

response = blnk.ledgers.get(
  "ldg_049495c6-356e-4ebc-a45e-60d1e1e16afb",
)
FieldTypeDescription
idstrLedger ID to retrieve.

Use the ledger details

Read response.data for the ledger name, metadata, and creation time. Use these values to confirm you have the correct ledger before creating balances or transactions.

Response

{
  "ledger_id": "ldg_049495c6-356e-4ebc-a45e-60d1e1e16afb",
  "name": "Customer Checking Ledger",
  "created_at": "2024-11-26T08:23:57.509804Z",
  "meta_data": {
    "project_owner": "Blnk Tech"
  }
}
FieldTypeDescription
ledger_idstrUnique ID for the ledger.
namestrCurrent display name.
created_atstrDate and time the ledger was created.
meta_datadictMetadata object, if one was set at creation.