Update an existing Dream.
PATCHhttps://your-api.impactfinance.domain/v1/dreams/:id
Update an existing Dream.
Request
Path Parameters
id uuidrequired
- application/json
Body
required
Partial Dream, only containing the fields that should be updated.
dream
object
Responses
- 200
- 400
- 404
Update was successful
- application/json
- Schema
- Example (from schema)
Schema
dream
object
{
"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
errors
object[]
required
{
"errors": [
{
"field": "string",
"errors": [
"string"
]
}
]
}
{
"errors": [
{
"field": "dream.targetCents",
"errors": [
"can't be negative"
]
}
]
}
Dream not found
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X PATCH 'https://your-api.impactfinance.domain/v1/dreams/:id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"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",
"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"
}
}
}'