Skip to main content

Endpoint

GET /accounts/:id
Retrieves detailed information about a specific account, including optional related data.

Path Parameters

id
string
required
The unique identifier of the account to retrieve

Query Parameters

include
string[]
Optional array of related resources to include in the response. Supported values:
  • balance: Include the associated balance details
  • ledger: Include the ledger details
  • identity: Include the identity/owner details
Example: ?include=balance&include=ledger

Response

account_id
string
The unique identifier for the account
name
string
The account name
number
string
The account number
bank_name
string
The bank or financial institution name
currency
string
The currency code for the account
balance_id
string
The ID of the associated balance
identity_id
string
The ID of the identity that owns this account
ledger_id
string
The ID of the ledger this account belongs to
created_at
string
The timestamp when the account was created (ISO 8601 format)
meta_data
object
Custom metadata associated with the account
balance
object
The balance object (when include=balance is specified)
ledger
object
The ledger object (when include=ledger is specified)
identity
object
The identity object (when include=identity is specified)

Example Request

curl -X GET "https://api.blnk.io/accounts/acc_789ghi?include=balance&include=ledger" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

{
  "account_id": "acc_789ghi",
  "name": "Main Account",
  "number": "1234567890",
  "bank_name": "Blnk Bank",
  "currency": "USD",
  "balance_id": "bln_321xyz",
  "identity_id": "idt_123abc",
  "ledger_id": "ldg_456def",
  "created_at": "2024-03-04T12:00:00Z",
  "meta_data": {
    "account_type": "savings",
    "branch": "main"
  },
  "balance": {
    "balance_id": "bln_321xyz",
    "balance": "10000.00",
    "currency": "USD",
    "credit_balance": "15000.00",
    "debit_balance": "5000.00"
  },
  "ledger": {
    "ledger_id": "ldg_456def",
    "name": "Customer Ledger"
  }
}

Error Responses

error
string
Error message describing what went wrong

Common Errors

  • 400 Bad Request: Invalid account ID or query parameters
  • 404 Not Found: Account not found

Build docs developers (and LLMs) love