b23335d5fb
docs: reorganize api docs into categorized subdirectories and fill missing docs - Categorize 77 existing api docs into 16 business-domain subdirectories (auth/ad/wallet/coupon/compare/savings/signin/tasks/invite/user/ device/platform/intent/meituan/other) plus admin/ and internal/ - Split admin/ into 7 sub-resource subdirectories (auth/users/wallet/ withdraws/feedbacks/admins/ad) with 4 single-file docs at root - Create 21 new docs covering 28 previously undocumented endpoints: ad/watch-report, wallet/transfer-auth (3 endpoints), coupon/session+ stats+completed-today+prompt (7), invite/me+invitees+bind+landing-track, user/onboarding (2), platform/flags+ad-config+app-version, intent/step+precoupon/step, analytics/events, order/report, report/submit+records, feedback/config+records, trace/finalize - Add mock request/response JSON examples to all new docs - Create docs/README.md with full category index for LLM navigation - Update docs/api/README.md: fix all links, add new endpoint rows, replace "no doc" markers with actual links - Fix back-navigation links (./README.md -> ../README.md or ../../README.md) in all moved files @
34 lines
949 B
Markdown
34 lines
949 B
Markdown
# GET /api/v1/coupon/stats — 累计领券数
|
||
|
||
> 所属:Coupon 组(前缀 `/api/v1/coupon`) | 鉴权:Bearer | [← 返回 API 索引](../README.md)
|
||
|
||
「我的」页战绩卡「领取优惠券 X 张」数据源。该登录用户累计领到的券数(`SUM(claimed_count)`,与领券完成时给用户看的「本次领了 N 张」同源)。
|
||
|
||
**鉴权(CurrentUser)** — 区别于同文件不鉴权的 `/step` 透传与 `/prompt` 频控:个人战绩按 `user_id` 聚合,必须有登录态。
|
||
|
||
## 入参
|
||
|
||
无(`user_id` 从 JWT 取)。
|
||
|
||
## 出参
|
||
|
||
响应 `200`:`CouponStatsOut`
|
||
|
||
| 字段 | 类型 | 说明 |
|
||
|---|---|---|
|
||
| `coupon_count` | int | 累计领到的券张数 |
|
||
|
||
Mock 出参:
|
||
```json
|
||
{
|
||
"coupon_count": 42
|
||
}
|
||
```
|
||
|
||
## 错误码
|
||
- `401` 未鉴权 / token 失效
|
||
|
||
## 说明
|
||
- 口径:`SUM(claimed_count)` — 各成功领券记录 pricebot 展示张数之和
|
||
- 只算登录用户,按 `user_id` 聚合(非 device_id)
|