Create Account
POST
/accounts
const url = 'https://example.com/accounts';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"currency":"USD","description":"example","external_id":"example","min_balance":1,"name":"example","parent_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","path":"example","type":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/accounts \ --header 'Content-Type: application/json' \ --data '{ "currency": "USD", "description": "example", "external_id": "example", "min_balance": 1, "name": "example", "parent_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "path": "example", "type": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
AccountOut
object
created_at
required
Created At
string format: date-time
currency
required
Currency
string
feed_invert
Feed Invert
boolean
holdings_source
Holdings Source
string
id
required
Id
string format: uuid
is_virtual
required
Is Virtual
boolean
name
required
Name
string
path
required
Path
string
reconciliation
Any of:
ReconciliationOut
A recorded reconciliation (issue #268), re-checked against the ledger
when it is read — so a backdated import, edit or replay that moved the
balance on as_of shows up here as a nonzero difference instead of
leaving the reconciled-through marker silently wrong.
statement_balance is the figure as the statement shows it (positive =
money held; for a credit card, the amount owed). Every other amount is in
ledger sign (a card is negative when owed).
object
adjustment
required
Adjustment
string
as_of
required
As Of
string format: date
basis
required
Basis
string
created_at
required
Created At
string format: date-time
difference
required
Difference
string
id
required
Id
string format: uuid
in_balance
required
In Balance
boolean
ledger_balance
required
Ledger Balance
string
statement_balance
required
Statement Balance
string
target_balance
required
Target Balance
string
null
type
required
Type
string
Example
{ "drift_basis_override": "pending_inclusive", "feed_invert": false, "holdings_source": "feed", "reconciliation": { "basis": "posted" }}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}