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 @
1.4 KiB
1.4 KiB
POST /api/v1/ad/watch-report — 上报激励视频观看时长
所属:Ad 组(前缀
/api/v1/ad) | 鉴权:Bearer | 限流:同 IP ≤120 次/分 | ← 返回 API 索引
客户端在激励视频关闭(onAdClose)后上报本次实际观看秒数,服务端累计到当日总时长。当前产品只保留每日 500 次上限,DAILY_AD_WATCH_SECONDS_LIMIT=0 表示时长闸不启用;该接口仍保留用于旧客户端兼容和排查观看时长。
入参
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
seconds |
int | ✅ (≥0) | 本次观看秒数,服务端夹 [0, MAX_SINGLE_WATCH_SECONDS] |
Mock 入参:
{
"seconds": 28
}
出参
响应 200:WatchReportOut
| 字段 | 类型 | 说明 |
|---|---|---|
watched_seconds_today |
int | 今日累计观看秒数 |
watch_seconds_limit |
int | 每日上限(秒);0 表示当前未启用时长闸 |
watch_seconds_remaining |
int | 今日剩余可观看秒数 |
Mock 出参:
{
"watched_seconds_today": 128,
"watch_seconds_limit": 0,
"watch_seconds_remaining": 0
}
错误码
401未鉴权 / token 失效422seconds缺或为负
说明
- 鉴权靠 Bearer,
user_id取自 JWT(不信 body) - 后端只做累计 + 上限裁切,不据此发奖(发奖靠 S2S 回调)
watch_seconds_limit=0时客户端不据此拦截,按每日 500 次上限走