Ledgers
Create ledger
Create a new ledger with the Go SDK.
POST
/ledgersUse client.Ledger.Create to create a new ledger for your system.
Call the method
ledger, _, _ := client.Ledger.Create(blnkgo.CreateLedgerRequest{
Name: "Customer wallets",
MetaData: blnkgo.MetaData{
"environment": "production",
},
})
| Field | Type | Description |
|---|---|---|
Name | string | Display name for the ledger. |
MetaData | MetaData | Optional key-value metadata. |
Response
{
"ledger_id": "ldg_073f7ffe-9dfd-42ce-aa50-d1dca1788adc",
"name": "Customer wallets",
"created_at": "2024-02-20T05:28:03.558281542Z",
"meta_data": {
"environment": "production"
}
}Go response (*blnkgo.Ledger)
| Field | Type | Description |
|---|---|---|
LedgerID | string | Unique ID for the ledger. |
Name | string | Name you passed in the request. |
CreatedAt | time.Time | Date and time the ledger was created. |
MetaData | MetaData | Metadata object, if you sent one. |