WalletD developers
Accounts

Create an account

Opens an account on the natural key (ledger, owner_type, owner_id, purpose, commodity, shard).

POST/v1/ledgers/{ledgerId}/accounts

Opens an account on the natural key (ledger, owner_type, owner_id, purpose, commodity, shard). Purpose and commodity must already be registered vocabulary or the request is refused as invalid. Balances are signed (ADR-0007): credit_limit is how far below zero the account may legitimately go, and skip_floor opts a system account out of the floor entirely. A second create on the same natural key refuses with conflict (409) rather than opening a duplicate.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

ledgerId*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/v1/ledgers/497f6eca-6276-4993-bfeb-53cbbbba6f08/accounts" \  -H "Content-Type: application/json" \  -d '{    "owner_type": "string",    "purpose": "string",    "commodity": "string"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "owner_type": "string",  "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05",  "purpose": "string",  "commodity": "string",  "balance": 0,  "credit_limit": 0,  "enforce_floor": true,  "status": "active",  "version": 0,  "created_at": "2019-08-24T14:15:22Z"}