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.7 KiB
1.7 KiB
POST /api/v1/meituan/referral-link — 换取推广链接
所属:美团 CPS 组(前缀
/api/v1/meituan,全部无鉴权) | 鉴权:无 | ← 返回 API 索引集成实现:见 integrations/meituan(CPS S-Ca 签名、入参换算坑)。
入参
| 字段 | 类型 | 必填 | 默认 | 说明 |
|---|---|---|---|---|
product_view_sign |
string | ✅ | — | 券的换链主键(来自 CouponCard) |
platform |
int | ❌ | 1 | 1=外卖/到家, 2=到店 |
biz_line |
int | ❌ | null | 到店子类 |
sid |
string | ❌ | 服务端默认 sgbjia |
渠道追踪标识 |
link_type_list |
int[] | ❌ | [1, 3] |
1=H5长链 2=H5短链 3=deeplink |
出参
响应 200:
| 字段 | 类型 | 说明 |
|---|---|---|
link |
string | 默认推广链接(按 data > H5(1) > deeplink(3) > 任意 兜底) |
link_map |
object | 各类型链接 { "linkType": "url" },如 {"1": "<H5>", "3": "<deeplink>"} |
错误码
502美团接口失败(仅在已配置MT_CPS_APP_KEY/APP_SECRET但调用失败时;未配凭证场景见下)
说明
- 客户端实际优先用
link_map["3"](deeplink)拉起美团 App,失败降级link_map["1"](H5) - 未配置 MT_CPS 凭证时降级:
settings.mt_cps_configured == false时直接返{ link: "", link_map: {} },不报 502。客户端拿到空 link 时跳转会失败——客户端应做兜底(toast "暂无可用链接"或不显示「抢」按钮) - ⚠️ 安全:
sid允许客户端传值覆盖服务端默认渠道,理论上他人可借本接口刷自己渠道的分佣;建议服务端锁定sid、忽略客户端传值