Update an existing Dream.
PATCH/dreams/:id
Update an existing Dream.
Request
Path Parameters
- application/json
Body
required
Partial Dream, only containing the fields that should be updated.
dream
object
Partial Dream, only containing the fields that should be updated. The dream.Dream schema is re-used for simplicity here, but required
fields can be ignored - all fields are optional.
Represents how much money (in cents or the smallest currency subunit) the User wants to save to complete this Dream.
(Optional) Date 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
Responses
- 200
- 400
- 404
Update was successful
- application/json
- Schema
- Example (from schema)
Schema
dream
object
Represents how much money (in cents or the smallest currency subunit) the User wants to save to complete this Dream.
(Optional) Date before which the User wants to complete this Dream.
DateTime when the dream was completed.
user
object
groupDream
object
(Optional) GroupDream this Dream is a part of.
account
object
The Account connected to this Dream.
{
"dream": {
"id": "844830a8-b845-4cbc-b79f-865cd8c8aa8e",
"targetCents": 102000,
"type": "Dream",
"expiresAt": "2006-01-02",
"achievedAt": "2006-01-02T15:04:05Z",
"name": "Trip to Japan",
"user": {
"type": "string",
"id": "string",
"externalId": "string"
},
"groupDream": {
"type": "string",
"id": "string"
},
"account": {
"type": "string",
"id": "string",
"externalId": "string"
}
}
}
Bad request
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
errors
object[]
required
{
"errors": [
{
"field": "string",
"errors": [
"string"
]
}
]
}
{
"errors": [
{
"field": "dream.targetCents",
"errors": [
"can't be negative"
]
}
]
}
Dream not found