Skip to content

Update Snapshot Endpoint

PATCH
/api/v1/snapshots/{snapshot_id}
curl --request PATCH \
--url https://example.com/api/v1/snapshots/1 \
--header 'Content-Type: application/json' \
--data '{ "date": "2026-04-15", "balance": 1, "note": "example" }'

Update a snapshot’s allowed fields.

snapshot_id
required
Snapshot Id
integer
Media typeapplication/json
SnapshotUpdate

Schema for partial snapshot updates — mass assignment prevention.

Excludes id, account_id, currency, source, deleted_at, and timestamps. Balance retains ge=0 validation on update per SNAP-04.

object
date
Any of:
string format: date
balance
Any of:
number
note
Any of:
string
<= 500 characters

Example generated

{
"date": "2026-04-15",
"balance": 1,
"note": "example"
}

Successful Response

Media typeapplication/json
SnapshotOut

Schema for snapshot response — ORM serialization via from_attributes.

object
id
required
Id
integer
account_id
required
Account Id
integer
date
required
Date
string format: date
balance
required
Balance
string
currency
required
Currency
string
source
required
Source
string
note
required
Any of:
string
deleted_at
required
Any of:
string format: date-time
created_at
required
Created At
string format: date-time
updated_at
required
Updated At
string format: date-time

Example generated

{
"id": 1,
"account_id": 1,
"date": "2026-04-15",
"balance": "example",
"currency": "example",
"source": "example",
"note": "example",
"deleted_at": "2026-04-15T12:00:00Z",
"created_at": "2026-04-15T12:00:00Z",
"updated_at": "2026-04-15T12:00:00Z"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object

Example generated

{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}