Update an existing Transaction
PATCH/transactions/:id
Update an existing Transaction.
Request
Path Parameters
- application/json
Body
required
Partial Transaction, only containing the fields that should be updated.
transaction
object
Partial Transaction, only containing the fields that should be updated. Note that id
, externalId
, type
, user
, amountCents
, fromAccount
, fromDream
, toAccount
and toDream
cannot be changed after creation. The state
is changed by setting the settledAt
and failedAt
timestamps respectively.
Responses
- 200
- 400
The updated transaction.
- application/json
- Schema
- Example (from schema)
Schema
- transaction.Deposit
- transaction.Withdrawal
- transaction.Internal
transaction
object
oneOf
Possible values: [Deposit
]
user
object
required
Possible values: [requested
, settled
, failed
]
toAccount
object
required
toDream
object
Represents how much money (in cents or the smallest currency subunit) the User wants to save to complete this Dream.
(Optional) DateTime before which the User wants to complete this Dream.
Represents when the dream was completed
Current balance cents for dream
Represents when the dream was deleted
Current count of active savehacks
user
object
groupDream
object
(Optional) GroupDream this Dream is a part of.
account
object
Identifies the account where all money towards this dream is stored
dreamInspiration
object
nullable
(Optional) The Dream Inspiration this Dream was created from.
translatedName
object
Possible values: >= 1
and <= 9223372036854776000
Default value: 0
Possible values: [DreamInspiration
]
Possible values: [Withdrawal
]
user
object
required
Possible values: [requested
, settled
, failed
]
fromAccount
object
required
fromDream
object
Possible values: [Internal
]
user
object
required
Possible values: [requested
, settled
, failed
]
fromAccount
object
required
fromDream
object
toAccount
object
required
toDream
object
{}
Bad request.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
errors
object[]
required
{
"errors": [
{
"field": "string",
"errors": [
"string"
]
}
]
}
{
"errors": [
{
"field": "transaction.settledAt",
"errors": [
"settledAt and failedAt are mutually exclusive"
]
},
{
"field": "transaction.failedAt",
"errors": [
"settledAt and failedAt are mutually exclusive"
]
}
]
}