Get all Dreams in a paginated listing.
GET/dreams
Get all Dreams in a paginated listing.
Request
Query Parameters
Possible values: >= 1
Default value: 1
The page number in a paginated listing.
Possible values: >= 1
and <= 20
Default value: 20
The number of items to return on each page.
Possible values: [active
, deleted
]
Filter dreams based on their state
Possible values: [true
, false
]
Return Image URL in response if set true
Possible values: [true
, false
]
Return Number of active savehacks in response if set true
Filter dreams to only include those with a userId
equal to the supplied userId
.
Filter dreams to only include those with a externalUserId
equal to the supplied externalUserId
.
Responses
- 200
All non-deleted Dreams in a paginated listing.
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
dreams
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.
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
meta
object
URL for the next page.
The total count of items.
The number of returned items on this page.
The number of pages.
Index of the first item on this page (starting from 1).
Index of the last item on this page.
{
"dreams": [
{
"id": "844830a8-b845-4cbc-b79f-865cd8c8aa8e",
"targetCents": 102000,
"type": "Dream",
"expiresAt": "2006-01-02",
"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"
}
}
],
"meta": true
}