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.8 KiB
1.8 KiB
POST /api/v1/meituan/coupons — 券列表 / 搜索
所属:美团 CPS 组(前缀
/api/v1/meituan,全部无鉴权) | 鉴权:无 | ← 返回 API 索引集成实现:见 integrations/meituan(CPS S-Ca 签名、入参换算坑)。
入参
| 字段 | 类型 | 必填 | 默认 | 说明 |
|---|---|---|---|---|
longitude |
float | ✅ | — | 经度 |
latitude |
float | ✅ | — | 纬度 |
platform |
int | ❌ | 1 | 1=外卖/到家, 2=到店 |
biz_line |
int | ❌ | null | 到店子类:1到餐 2到综 3酒店 4门票 |
list_topic_id |
int | ❌ | 3 | 榜单:1精选 2今日必推 3爆款筛选 5限时筛选 |
keyword |
string | ❌ | null | 搜索词(填了则忽略 list_topic_id,走搜索) |
sort_field |
int | ❌ | null | 1价格 2销量 6离我最近(搜索时默认 6) |
search_id |
string | ❌ | null | 翻页 token,首页不填 |
page |
int | ❌ | 1 | ≥1 |
page_size |
int | ❌ | 20 | 1–20 |
出参
响应 200:{ items: CouponCard[], has_next: bool, search_id: string|null, status: "ok"|"empty"|"degraded" }。CouponCard 结构见 API 索引;status 语义见 feed 接口。
错误码
无业务级错误码:未配凭证 / 美团调用失败都返 200 + 空 items + status=degraded(2026-06-10 起不再抛 502,避免前端弹报错 toast)。
说明
- 当前 Android 客户端未调用此接口(搜索功能尚未实现),仅后端实现完整
- 统一软降级(2026-06-10):未配
MT_CPS_APP_KEY/SECRET、或已配但调美团失败,都返空 +status=degraded(此前后者抛 502);成功但无结果 →status=empty。前端按status显示「服务繁忙」/「暂无」,不再弹错误