Create new account
POST/accounts
Create a new Account representation of an existing bank account.
Request
- application/json
Body
required
Account details
- account.SharedSavingsPostRequest
- account.PerformancePostRequest
account
object
required
oneOf
Possible values: [SharedSavings
]
Optional, external reference for this account. When provided, this field will help in preventing duplicate accounts.
Default value: 0
The total worth of all assets, in cents or the smallest currency subunit.
Possible values: [Performance
]
(Optional) external reference for this account.
Default value: 0
The total worth of all assets, in cents or the smallest currency subunit.
Default value: 0
The amount of liquid cash available for withdrawal or internal transfer, in cents or the smallest currency subunit.
Default value: 0
The value gained since valuationFrom
, in cents or the smallest currency subunit.
Default value: 0
The relative value gained since valuationFrom
, in percent.
Default value: 0
The total acquisition cost of the assets on the account, in cents or the smallest currency subunit.
The date time performance indicators are calculated from.
Default value: Time of last update
The date time of market valuation for the assets on the account.
Responses
- 200
- 400
- 409
The created Account representation.
- application/json
- Schema
- Example (from schema)
Schema
- account.SharedSavings
- account.Performance
account
object
oneOf
Possible values: [SharedSavings
]
Optional, external reference for this account.
user
object
required
Default value: 0
The total worth of all assets, in cents or the smallest currency subunit.
Possible values: [Performance
]
Optional, external reference for this account.
user
object
required
Default value: 0
The total worth of all assets, in cents or the smallest currency subunit.
Default value: 0
The amount of liquid cash available for withdrawal or internal transfer, in cents or the smallest currency subunit.
Default value: 0
The value gained since valuationFrom
, in cents or the smallest currency subunit.
Default value: 0
The relative value gained since valuationFrom
, in percent.
Default value: 0
The total acquisition cost of the assets on the account, in cents or the smallest currency subunit.
The date time performance indicators are calculated from.
Default value: Time of last update
The date time of market valuation for the assets on the account.
{
"account": {
"type": "SharedSavings",
"id": "7edd1904-2e55-463a-a359-458d7832af7e",
"externalId": "GB77BARC20201530093459",
"user": {
"type": "user",
"id": "31566c16-c5c4-4ea2-9ec9-4708a2edec2e",
"externalId": "10002345"
},
"balanceCents": 123456
}
}
Bad request.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
errors
object[]
required
{
"errors": [
{
"field": "string",
"errors": [
"string"
]
}
]
}
{
"errors": [
{
"field": "account.type",
"errors": [
"is invalid. Allowed values are `SharedSavings` | `Performance`."
]
},
{
"field": "account.balanceCents",
"errors": [
"can't be negative"
]
},
{
"field": "account.liquidBalanceCents",
"errors": [
"can't be negative"
]
}
]
}
Conflict.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
errors
object[]
required
{
"errors": [
{
"field": "string",
"errors": [
"string"
]
}
]
}
{
"errors": [
{
"field": "account.userId",
"errors": [
"has already been taken."
]
}
]
}