Ledgers

Update ledger name

Update the name of an existing ledger with the TypeScript SDK.

PUT/ledgers/{ledger_id}

Use blnk.Ledgers.update to edit the name of a specific ledger.

Call the method

const response = await blnk.Ledgers.update(
  'ldg_049495c6-356e-4ebc-a45e-60d1e1e16afb',
  {
    name: 'Updated Customer Savings Ledger',
  },
);
FieldTypeDescription
idstringLedger ID to update.
namestringNew display name for the ledger.

Confirm the update

The ledger_id in the response stays the same. Verify response.data.name matches the name you passed in the request.

Response

{
  "ledger_id": "ldg_073f7ffe-9dfd-42ce-aa50-d1dca1788adc",
  "name": "Updated Customer Savings Ledger",
  "created_at": "2024-02-20T05:28:03.558281542Z",
  "meta_data": {
    "project_owner": "Acme LLC",
    "description": "For all savings account created & managed by Acme."
  }
}
FieldTypeDescription
ledger_idstringUnique ID for the ledger. Unchanged after the update.
namestringUpdated name you passed in the request.
created_atstringDate and time the ledger was created.
meta_dataRecord<string, unknown>Existing metadata on the ledger. Not modified by this method.