获取钱包
OpenAPI 契约
- 方法
- GET
- 路径
/api/v1/billing/wallet- 认证
- jwtBearer (bearer)
- 响应状态
- 200 400 401 403 404 429 500
请求与响应 Schema
JSON
{
"requestBody": {},
"responses": {
"200": {
"description": "Wallet",
"content": {
"application/json": {
"$ref": "#/components/schemas/WalletView"
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"$ref": "#/components/schemas/RequestError"
}
}
},
"401": {
"description": "Authentication required or invalid",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"403": {
"description": "Authenticated but not permitted",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"404": {
"description": "Wallet was not found",
"content": {
"application/json": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"429": {
"description": "Rate limit exceeded",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"500": {
"description": "Unexpected server error",
"content": {
"application/json": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
}GET /api/v1/billing/wallet 仅限 JWT。它返回当前认证用户的 NCU 总余额、分开的赠送与购买余额、每月赠送和结转上限、下一次赠送重置时间、累计购买量、告警阈值以及已获权计划。首次读取时,会以免费计划赠送初始化钱包。
http
GET /api/v1/billing/wallet
Authorization: Bearer <access token>