Herald
OpenapiPoints

Update_wallet_status

PATCH
/api/points/wallets/{userId}/{bucketId}/status

Path Parameters

userId*string

User ID

Formatuuid
bucketId*string

Credit Bucket ID

Formatuuid

Request Body

application/json
  1. body
status*string

active, frozen, or closed.

Response Body

Wallet status updated

application/json
  1. 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*integer
Formatint64
bucketId?|

Credit Bucket this wallet belongs to. None for the aggregate user-total view (multi-bucket user).

Formatuuid
createdAt*string
currency*string
expiresAt?|

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?|
Formatuuid
realmId*string
status*string
totalConsumed*integer
Formatint64
totalPaidGranted*integer

Total points granted through paid topups and subscription entitlements.

Formatint64
totalRecharged*integer

Deprecated compatibility alias for total_paid_granted.

Formatint64
unit*string
updatedAt*string
userId*string
Formatuuid
Example Request
curl -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"
}'
Example Response
{
  "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"
}