Update_wallet_status
userId*stringUser ID
uuidbucketId*stringCredit Bucket ID
uuidapplication/json- body
status*stringactive, frozen, or closed.
Wallet status updated
application/json- response
Points account response.
The GET /wallets/{user} endpoint is a read-only user-total balance view:
for users with multiple Credit Buckets, find_by_user_id synthesizes a
single aggregated PointsWallet with bucket_id = None. In that case
id is None too — there is no single concrete wallet to point at, and a
fabricated id would be a misleading handle a client could mistake for "the
wallet". id is Some only for a single-bucket user, where it is the
wallet row id of that one bucket (still not a writable handle here).
balance*integerint64bucketId?|Credit Bucket this wallet belongs to. None for the
aggregate user-total view (multi-bucket user).
uuidcreatedAt*stringcurrency*stringexpiresAt?|Earliest upcoming pool expiry (RFC3339) across the wallets in this
view's scope — MIN(points_credit_ledger.expires_at) over the same
predicate as balance (compute_next_pool_expiry). null ⟺ no
expiring pool balance (permanent-only or empty). PRD points.md §4.1
「用户可查看即将过期的池子类型积分」: the backend supplies the time;
"即将过期" presentation thresholds are frontend concerns.
id?|uuidrealmId*stringstatus*stringtotalConsumed*integerint64totalPaidGranted*integerTotal points granted through paid topups and subscription entitlements.
int64totalRecharged*integerDeprecated compatibility alias for total_paid_granted.
int64unit*stringupdatedAt*stringuserId*stringuuidcurl -X PATCH 'https://example.com/api/points/wallets/497f6eca-6276-4993-bfeb-53cbbbba6f08/497f6eca-6276-4993-bfeb-53cbbbba6f08/status' \
-H 'Content-Type: application/json' \
-d '{
"status": "string"
}'{
"balance": 0,
"bucketId": "1980377d-7926-47e0-9e64-a9d0c746404d",
"createdAt": "string",
"currency": "string",
"expiresAt": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"realmId": "string",
"status": "string",
"totalConsumed": 0,
"totalPaidGranted": 0,
"totalRecharged": 0,
"unit": "string",
"updatedAt": "string",
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b"
}