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 @
129 lines
2.7 KiB
Markdown
129 lines
2.7 KiB
Markdown
# 领券引导窗频控(prompt 族)
|
||
|
||
> 所属:Coupon 组(前缀 `/api/v1/coupon`) | 鉴权:无(按 device_id 判断,MVP 阶段) | [← 返回 API 索引](../README.md)
|
||
|
||
领券引导窗频控:今天这台设备**这个 App** 已弹过/领过/拒过 → 不再弹。各 App 独立(美团弹过不压淘宝/京东)。
|
||
|
||
---
|
||
|
||
## GET /prompt/should-show — 是否还应弹引导窗
|
||
|
||
客户端切到外卖 App 时查。
|
||
|
||
### 入参(query)
|
||
|
||
| 字段 | 类型 | 必填 | 说明 |
|
||
|---|---|---|---|
|
||
| `device_id` | string | ✅ | 设备 ID |
|
||
| `package` | string | ❌ | App 包名(默认 "",老客户端兼容全局态) |
|
||
|
||
Mock 请求:
|
||
```
|
||
GET /api/v1/coupon/prompt/should-show?device_id=android_abc&package=com.sankuai.meituan
|
||
```
|
||
|
||
### 出参
|
||
|
||
响应 `200`:`CouponPromptShouldShowOut`
|
||
|
||
| 字段 | 类型 | 说明 |
|
||
|---|---|---|
|
||
| `should_show` | bool | 今天是否还应弹引导窗 |
|
||
|
||
Mock 出参:
|
||
```json
|
||
{"should_show": true}
|
||
```
|
||
|
||
---
|
||
|
||
## POST /prompt/shown — 引导窗弹出即上报
|
||
|
||
客户端弹出引导窗那刻调 → 记一条今日 engagement(shown),今天这个 App 不再自动弹。频控主判据管跨重装。
|
||
|
||
### 入参
|
||
|
||
| 字段 | 类型 | 必填 | 说明 |
|
||
|---|---|---|---|
|
||
| `device_id` | string | ✅ | 设备 ID |
|
||
| `package` | string | ✅ | App 包名 |
|
||
| `user_id` | int \| null | ❌ | 登录用户 ID |
|
||
|
||
Mock 入参:
|
||
```json
|
||
{
|
||
"device_id": "android_abc123def456",
|
||
"package": "com.sankuai.meituan",
|
||
"user_id": 42
|
||
}
|
||
```
|
||
|
||
### 出参
|
||
|
||
```json
|
||
{"ok": true}
|
||
```
|
||
|
||
---
|
||
|
||
## POST /prompt/dismiss — 用户拒绝/关闭引导窗
|
||
|
||
客户端点关闭时调 → 记 dismissed,今天这个 App 不再弹。
|
||
|
||
### 入参
|
||
|
||
| 字段 | 类型 | 必填 | 说明 |
|
||
|---|---|---|---|
|
||
| `device_id` | string | ✅ | 设备 ID |
|
||
| `package` | string | ❌ | App 包名(默认 "") |
|
||
| `user_id` | int \| null | ❌ | 登录用户 ID |
|
||
|
||
Mock 入参:
|
||
```json
|
||
{
|
||
"device_id": "android_abc123def456",
|
||
"package": "com.sankuai.meituan"
|
||
}
|
||
```
|
||
|
||
### 出参
|
||
|
||
```json
|
||
{"ok": true}
|
||
```
|
||
|
||
---
|
||
|
||
## POST /prompt/reset — 重置今日引导窗状态
|
||
|
||
删这台设备今天的 engagement → 今天又能弹。开发测频控用。
|
||
|
||
### 入参
|
||
|
||
| 字段 | 类型 | 必填 | 说明 |
|
||
|---|---|---|---|
|
||
| `device_id` | string | ✅ | 设备 ID |
|
||
| `package` | string | ❌ | App 包名(默认 "") |
|
||
| `user_id` | int \| null | ❌ | 登录用户 ID |
|
||
|
||
Mock 入参:
|
||
```json
|
||
{
|
||
"device_id": "android_abc123def456"
|
||
}
|
||
```
|
||
|
||
### 出参
|
||
|
||
```json
|
||
{"ok": true}
|
||
```
|
||
|
||
---
|
||
|
||
## 说明
|
||
- 频控按 `(device, package, 日)`,各 App 独立
|
||
- 弹出即占用今天一次(管跨重装),后续领取/拒绝再升级 type
|
||
- user_id 可选,登录态带上就一并记(资产留痕)
|
||
- MVP 不鉴权
|