Update an existing Account.
PATCH/accounts/:id
Update an existing Account.
Request
Path Parameters
- application/json
Body
required
Partial Account, only containing the fields that should be updated.
- account.SharedSavingsPatchRequest
- account.PerformancePatchRequest
account
object
oneOf
Only some properties of SharedSavings accounts can be updated after creation. In order to update the balance on the account, create a transaction instead.
Optional, external reference for this account. When provided, this field will help in preventing duplicate accounts.
Partial Performance account, only containing the fields that should be updated. Note that id
, externalId
, type
and user
cannot be changed after creation.
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
The updated account.
- 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.balanceCents",
"errors": [
"can't be negative"
]
},
{
"field": "account.liquidBalanceCents",
"errors": [
"can't be negative"
]
}
]
}