Create a new Dream.
POST/dreams
Create a new Dream.
Request
- application/json
Body
required
Dream details
dream
object
Represents how much money (in cents or the smallest currency subunit) the User wants to save to complete this Dream.
Possible values: [Dream
]
Default value: Dream
(Optional) DateTime before which the User wants to complete this Dream.
This is the owner of the dream
(Optional) GroupDream this Dream is a part of.
The Account connected to this Dream. It is not required to create a Dream, but must be added before any deposit can be made.
Responses
- 201
- 400
Dream created
- 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) 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
]
{
"dream": {
"id": "844830a8-b845-4cbc-b79f-865cd8c8aa8e",
"targetCents": 102000,
"type": "Dream",
"expiresAt": "2006-01-02T15:04:05Z",
"achievedAt": "2006-01-02T15:04:05Z",
"name": "Trip to Japan",
"balanceCents": 12300,
"deletedAt": "2006-01-02T15:04:05Z",
"imageUrl": "https://images.com/photo-123-456",
"activeSavehacksCount": 2,
"user": {
"type": "string",
"id": "string",
"externalId": "string"
},
"groupDream": {
"type": "string",
"id": "string"
},
"account": {
"type": "string",
"id": "string",
"externalId": "string"
},
"dreamInspiration": {
"id": "844830a8-b845-4cbc-b79f-865cd8c8aa8e",
"translatedName": {
"en": "Translated string with %{interpolations} for the `en` locale",
"xx": "Or any other locale you wish to support"
},
"targetCents": 5000,
"durationSeconds": "string",
"imageUrl": "string",
"type": "DreamInspiration"
}
}
}
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"
]
}
]
}