{"id":"d4362451-de19-4b32-b0a9-624b19572c04","entityType":"agent","slug":"clawhub-linkfox-ai-linkfox-shopee-store-discount","name":"Shopee-店铺折扣","canonicalUrl":"https://www.xpersona.co/agent/clawhub-linkfox-ai-linkfox-shopee-store-discount","canonicalPath":"/agent/clawhub-linkfox-ai-linkfox-shopee-store-discount","generatedAt":"2026-10-12T13:32:38.947Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T22:03:00.980Z","emptyReason":null},"description":"Shopee（虾皮）店铺折扣促销 Discount（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Discount 模块全部 12 个接口：add_discount、get_discount_list、update_discount、add_discount_item、end_discount、SIP折扣等。当用户提到 Shopee 折扣、Discount、促销活动、限时折扣、add_discount、discount_id、打折活动 时触发。即使未明确提及\"折扣\"，只要涉及已授权 Shopee 店铺的折扣活动创建或管理，也应触发。","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 987 downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s171g8b6m2khwdy9ye8bxj0wx183vd4z:linkfox-shopee-store-discount","sourceUrl":"https://clawhub.ai/linkfox-ai/linkfox-shopee-store-discount","homepage":"https://clawhub.ai/linkfox-ai/skills/linkfox-shopee-store-discount","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/linkfox-ai/linkfox-shopee-store-discount","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/linkfox-ai/skills/linkfox-shopee-store-discount","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":60,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Shopee-店铺折扣 technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T22:03:00.980Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T22:03:00.980Z","emptyReason":null},"stars":null,"forks":null,"downloads":987,"likes":null,"task":null,"library":null,"packageName":null,"latestVersion":"1.0.6","tractionLabel":"987 downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T22:03:00.907Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T22:03:00.980Z","lastCrawledAt":"2026-10-11T22:03:00.907Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T22:03:00.907Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.6","createdAt":"2026-09-14T05:26:48.195Z","changelog":"Update from 1.0.5 to 1.0.6","fileCount":35,"zipByteSize":43637},{"version":"1.0.5","createdAt":"2026-08-14T15:02:58.217Z","changelog":"Update from 1.0.4 to 1.0.5","fileCount":35,"zipByteSize":43657},{"version":"1.0.4","createdAt":"2026-08-07T11:00:13.554Z","changelog":"Update from 1.0.3 to 1.0.4","fileCount":35,"zipByteSize":43761},{"version":"1.0.3","createdAt":"2026-07-13T12:20:22.098Z","changelog":"Update from 1.0.2 to 1.0.3","fileCount":21,"zipByteSize":21547},{"version":"1.0.2","createdAt":"2026-07-06T11:28:56.174Z","changelog":"Update from 1.0.1 to 1.0.2","fileCount":21,"zipByteSize":20901},{"version":"1.0.1","createdAt":"2026-07-03T08:28:17.421Z","changelog":"Update from 1.0.0 to 1.0.1","fileCount":20,"zipByteSize":19705},{"version":"1.0.0","createdAt":"2026-07-02T13:39:15.342Z","changelog":"Initial release","fileCount":20,"zipByteSize":19687}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s171g8b6m2khwdy9ye8bxj0wx183vd4z:linkfox-shopee-store-discount","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s171g8b6m2khwdy9ye8bxj0wx183vd4z:linkfox-shopee-store-discount` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/linkfox-ai/linkfox-shopee-store-discount before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-discount/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-discount/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-discount/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-discount/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-discount/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-discount/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-12T13:32:38.945Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-discount/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-discount/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-discount/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-discount/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T22:03:00.980Z","emptyReason":null},"readme":"Skill: Shopee-店铺折扣\n\nOwner: linkfox-ai\n\nSummary: Shopee（虾皮）店铺折扣促销 Discount（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Discount 模块全部 12 个接口：add_discount、get_discount_list、update_discount、add_discount_item、end_discount、SIP折扣等。当用户提到 Shopee 折扣、Discount、促销活动、限时折扣、add_discount、discount_id、打折活动 时触发。即使未明确提及\"折扣\"，只要涉及已授权 Shopee 店铺的折扣活动创建或管理，也应触发。\n\nTags: latest:1.0.6\n\nVersion history:\n\nv1.0.6 | 2026-09-14T05:26:48.195Z | user\n\nUpdate from 1.0.5 to 1.0.6\n\nv1.0.5 | 2026-08-14T15:02:58.217Z | user\n\nUpdate from 1.0.4 to 1.0.5\n\nv1.0.4 | 2026-08-07T11:00:13.554Z | user\n\nUpdate from 1.0.3 to 1.0.4\n\nv1.0.3 | 2026-07-13T12:20:22.098Z | user\n\nUpdate from 1.0.2 to 1.0.3\n\nv1.0.2 | 2026-07-06T11:28:56.174Z | user\n\nUpdate from 1.0.1 to 1.0.2\n\nv1.0.1 | 2026-07-03T08:28:17.421Z | user\n\nUpdate from 1.0.0 to 1.0.1\n\nv1.0.0 | 2026-07-02T13:39:15.342Z | user\n\nInitial release\n\nArchive index:\n\nArchive v1.0.6: 35 files, 43637 bytes\n\nFiles: references/api.md (4193b), references/apis/add-discount-item.md (1396b), references/apis/add-discount.md (1375b), references/apis/delete-discount-item.md (1408b), references/apis/delete-discount.md (1403b), references/apis/delete-sip-discount.md (1386b), references/apis/end-discount.md (1329b), references/apis/get-discount-list.md (1420b), references/apis/get-discount.md (1367b), references/apis/get-sip-discounts.md (1398b), references/apis/set-sip-discount.md (1356b), references/apis/update-discount-item.md (1414b), references/apis/update-discount.md (1365b), references/onboarding.md (1999b), scripts/_discount_api_runner.py (4300b), scripts/_discount_endpoints.py (3266b), scripts/_shopee_discount_common.py (12168b), scripts/add_discount_item.py (693b), scripts/add_discount.py (663b), scripts/check_auth_dependency.py (3985b), scripts/delete_discount_item.py (711b), scripts/delete_discount.py (681b), scripts/delete_sip_discount.py (705b), scripts/discount_api.py (1050b), scripts/end_discount.py (663b), scripts/get_discount_list.py (693b), scripts/get_discount.py (663b), scripts/get_sip_discounts.py (693b), scripts/onboarding.py (24027b), scripts/set_sip_discount.py (687b), scripts/update_discount_item.py (711b), scripts/update_discount.py (681b), skill-card.md (2459b), SKILL.md (6287b), _meta.json (148b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: linkfox-shopee-store-discount\ndescription: Shopee（虾皮）店铺折扣促销 Discount（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Discount 模块全部 12 个接口：add_discount、get_discount_list、update_discount、add_discount_item、end_discount、SIP折扣等。当用户提到 Shopee 折扣、Discount、促销活动、限时折扣、add_discount、discount_id、打折活动 时触发。即使未明确提及\"折扣\"，只要涉及已授权 Shopee 店铺的折扣活动创建或管理，也应触发。\n---\n\n# Shopee 店铺 Discount\n\nShopee Open Platform **Discount 模块**（12 个 API）。**依赖 `linkfox-shopee-store-auth`** 选店；经 **`POST /shopee/developerProxy`** 传入 `shopId`（或 `merchantId`），由服务端解析 token 转发（`path` 须 `api/v2/discount/...`）。\n\n## 调用方式\n\n- **API 端点**：`POST /shopee/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗算力；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-shopee-store-discount-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\n\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\n\n## 解决认证和算力问题\n发生以下异常情况时，采用 references/onboarding.md 引导解决问题：\n\n### 异常情况\n- **未配置API Key**：环境变量未配置 `LINKFOX_AGENT_API_KEY`，也未配置 `LINKFOXAGENT_API_KEY`。\n- **响应401或402状态码**\n- **响应提示算力或余额不足**：消息含\"算力余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值\"，或类似含义的内容。\n\n## 官方参考\n\nDiscount 模块索引：[v2.discount.add_discount](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1)\n\n---\n\n## Prerequisites\n\n1. 运行 `python scripts/check_auth_dependency.py`；exit code **42** → 先安装 **`linkfox-shopee-store-auth`**。\n2. Bundle Deal / Voucher 等其它促销模块 → 非本 skill。\n\n## 可用脚本（12 个 API）\n\n| 脚本 | API | Method |\n|------|-----|--------|\n| `add_discount.py` | add_discount | POST |\n| `add_discount_item.py` | add_discount_item | POST |\n| `get_discount_list.py` | get_discount_list | GET |\n| `get_discount.py` | get_discount | GET |\n| `update_discount.py` | update_discount | POST |\n| `update_discount_item.py` | update_discount_item | POST |\n| `end_discount.py` | end_discount | POST |\n| `delete_discount.py` | delete_discount | POST |\n| `delete_discount_item.py` | delete_discount_item | POST |\n| `get_sip_discounts.py` | get_sip_discounts | GET |\n| `set_sip_discount.py` | set_sip_discount | POST |\n| `delete_sip_discount.py` | delete_sip_discount | POST |\n| `discount_api.py` | 通用入口 | — |\n\n## 接口说明（按 API）\n\n入参与响应细节放在 `references/apis/`，SKILL 只保留索引。\n\n| API | 说明文档 |\n|-----|----------|\n| `add_discount` | [references/apis/add-discount.md](./references/apis/add-discount.md) |\n| `add_discount_item` | [references/apis/add-discount-item.md](./references/apis/add-discount-item.md) |\n| `delete_discount` | [references/apis/delete-discount.md](./references/apis/delete-discount.md) |\n| `delete_discount_item` | [references/apis/delete-discount-item.md](./references/apis/delete-discount-item.md) |\n| `delete_sip_discount` | [references/apis/delete-sip-discount.md](./references/apis/delete-sip-discount.md) |\n| `end_discount` | [references/apis/end-discount.md](./references/apis/end-discount.md) |\n| `get_discount` | [references/apis/get-discount.md](./references/apis/get-discount.md) |\n| `get_discount_list` | [references/apis/get-discount-list.md](./references/apis/get-discount-list.md) |\n| `get_sip_discounts` | [references/apis/get-sip-discounts.md](./references/apis/get-sip-discounts.md) |\n| `set_sip_discount` | [references/apis/set-sip-discount.md](./references/apis/set-sip-discount.md) |\n| `update_discount` | [references/apis/update-discount.md](./references/apis/update-discount.md) |\n| `update_discount_item` | [references/apis/update-discount-item.md](./references/apis/update-discount-item.md) |\n\n模块总览 / Feedback 见 [references/api.md](./references/api.md)。\n\n## Usage Scenarios\n\n### 1. 创建折扣活动\n1. `add_discount.py` 传完整 `body`（名称、时间、折扣类型等）\n2. `add_discount_item.py` 添加参与商品\n3. `get_discount_list.py` 确认活动状态\n\n### 2. 管理现有活动\n- `get_discount.py` 查详情\n- `update_discount.py` / `update_discount_item.py` 修改\n- `end_discount.py` 提前结束\n\n## Not Applicable\n\n- 店铺授权 → `linkfox-shopee-store-auth`\n- Bundle Deal / Voucher / Add-On Deal / Shop Flash Sale / Follow Prize → 其它促销模块 skill（Bundle Deal → `linkfox-shopee-store-bundle-deal`；Add-On Deal → `linkfox-shopee-store-add-on-deal`；Voucher → `linkfox-shopee-store-voucher`；Shop Flash Sale → `linkfox-shopee-store-shop-flash-sale`；Follow Prize → `linkfox-shopee-store-follow-prize`）\n- 商品 listing → `linkfox-shopee-store-product`\n\n## 算力消耗规则\n\n不消耗算力。\n\n**Feedback:** 见 `references/api.md`。\n\n\n---\n*For more high-quality, professional cross-border e-commerce skills, visit [LinkFox Skills](https://skill.linkfox.com/).*\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-shopee-store-discount\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1789363608195\n}\n\nFile v1.0.6:references/api.md\n\n# linkfox-shopee-store-discount — 参数与字段参考\r\n\r\n> 单接口入参/响应说明已拆到 **`apis/`**（按 API 一份）；本文件保留模块总览与 Feedback。\r\nShopee **Discount 模块**全部 12 个 API，经 **`POST /shopee/developerProxy`** 转发。\r\n\r\n授权见 **`linkfox-shopee-store-auth`**。官方索引：[v2.discount.add_discount](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1)\r\n\r\n## 通用约定\r\n\r\n- **path**：须 `api/v2/discount/...`\r\n- **标识**：通常传 **`shopId`**\r\n- **官方文档 URL 规则**：`https://open.shopee.com/documents/v2/v2.discount.{api}?module=99&type=1`\r\n\r\n---\r\n\r\n## Discount 模块总览\r\n\r\n| # | API | Method | path | 脚本 | 官方文档 |\r\n|---|-----|--------|------|------|----------|\r\n| 1 | add_discount | POST | `api/v2/discount/add_discount` | `add_discount.py` | [apis/add-discount.md](./apis/add-discount.md) |\r\n| 2 | add_discount_item | POST | `api/v2/discount/add_discount_item` | `add_discount_item.py` | [apis/add-discount-item.md](./apis/add-discount-item.md) |\r\n| 3 | delete_discount | POST | `api/v2/discount/delete_discount` | `delete_discount.py` | [apis/delete-discount.md](./apis/delete-discount.md) |\r\n| 4 | delete_discount_item | POST | `api/v2/discount/delete_discount_item` | `delete_discount_item.py` | [apis/delete-discount-item.md](./apis/delete-discount-item.md) |\r\n| 5 | delete_sip_discount | POST | `api/v2/discount/delete_sip_discount` | `delete_sip_discount.py` | [apis/delete-sip-discount.md](./apis/delete-sip-discount.md) |\r\n| 6 | end_discount | POST | `api/v2/discount/end_discount` | `end_discount.py` | [apis/end-discount.md](./apis/end-discount.md) |\r\n| 7 | get_discount | GET | `api/v2/discount/get_discount` | `get_discount.py` | [apis/get-discount.md](./apis/get-discount.md) |\r\n| 8 | get_discount_list | GET | `api/v2/discount/get_discount_list` | `get_discount_list.py` | [apis/get-discount-list.md](./apis/get-discount-list.md) |\r\n| 9 | get_sip_discounts | GET | `api/v2/discount/get_sip_discounts` | `get_sip_discounts.py` | [apis/get-sip-discounts.md](./apis/get-sip-discounts.md) |\r\n| 10 | set_sip_discount | POST | `api/v2/discount/set_sip_discount` | `set_sip_discount.py` | [apis/set-sip-discount.md](./apis/set-sip-discount.md) |\r\n| 11 | update_discount | POST | `api/v2/discount/update_discount` | `update_discount.py` | [apis/update-discount.md](./apis/update-discount.md) |\r\n| 12 | update_discount_item | POST | `api/v2/discount/update_discount_item` | `update_discount_item.py` | [apis/update-discount-item.md](./apis/update-discount-item.md) |\r\n通用入口：`discount_api.py`（JSON 含 `\"api\": \"<上表 API 名>\"`）。\r\n\r\n---\r\n\r\n## 常用接口说明\r\n\r\n| API | 要点 |\r\n|-----|------|\r\n| `add_discount` | 创建折扣活动；POST `body` — [apis/add-discount.md](./apis/add-discount.md) |\r\n| `add_discount_item` | 向活动添加商品/SKU — [apis/add-discount-item.md](./apis/add-discount-item.md) |\r\n| `get_discount_list` | 折扣活动列表 — [apis/get-discount-list.md](./apis/get-discount-list.md) |\r\n| `get_discount` | 单个活动详情 — [apis/get-discount.md](./apis/get-discount.md) |\r\n| `update_discount` / `update_discount_item` | 更新活动/商品折扣 |\r\n| `end_discount` | 提前结束活动 — [apis/end-discount.md](./apis/end-discount.md) |\r\n| `delete_discount` / `delete_discount_item` | 删除活动/商品 |\r\n| `get_sip_discounts` / `set_sip_discount` / `delete_sip_discount` | SIP 跨境折扣 |\r\n\r\n---\r\n\r\n## curl 示例\r\n\r\n```bash\r\ncurl -X POST https://tool-gateway.linkfox.com/shopee/developerProxy \\\r\n  -H \"Authorization: $LINKFOXAGENT_API_KEY\" \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\r\n    \"path\": \"api/v2/discount/get_discount_list\",\r\n    \"method\": \"GET\",\r\n    \"accessToken\": \"xxx\",\r\n    \"shopId\": \"67890\",\r\n    \"queryString\": \"discount_status=ongoing&page_no=1&page_size=20\"\r\n  }'\r\n```\r\n\r\n---\r\n\r\n## Feedback API\r\n\r\n```bash\r\ncurl -X POST https://skill-api.linkfox.com/api/v1/public/feedback \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\"skillName\":\"linkfox-shopee-store-discount\",\"sentiment\":\"POSITIVE\",\r\n       \"category\":\"OTHER\",\"content\":\"折扣活动查询正常\"}'\r\n```\n\nFile v1.0.6:references/apis/add-discount-item.md\n\n# add_discount_item\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/add_discount_item.py` |\n| Method / path | POST `api/v2/discount/add_discount_item` |\n| 官方文档 | [add_discount_item](https://open.shopee.com/documents/v2/v2.discount.add_discount_item?module=99&type=1) |\n| 用途 | Add items to discount; pass body |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Add items to discount; pass body\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/add_discount_item.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"add_discount_item\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`addDiscountItem`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.6:references/apis/add-discount.md\n\n# add_discount\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/add_discount.py` |\n| Method / path | POST `api/v2/discount/add_discount` |\n| 官方文档 | [add_discount](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1) |\n| 用途 | Create discount promotion; pass full body |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Create discount promotion; pass full body\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/add_discount.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"add_discount\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`addDiscount`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.6:references/apis/delete-discount-item.md\n\n# delete_discount_item\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/delete_discount_item.py` |\n| Method / path | POST `api/v2/discount/delete_discount_item` |\n| 官方文档 | [delete_discount_item](https://open.shopee.com/documents/v2/v2.discount.delete_discount_item?module=99&type=1) |\n| 用途 | Remove items from discount |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Remove items from discount\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/delete_discount_item.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"delete_discount_item\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`deleteDiscountItem`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.6:references/apis/delete-discount.md\n\n# delete_discount\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/delete_discount.py` |\n| Method / path | POST `api/v2/discount/delete_discount` |\n| 官方文档 | [delete_discount](https://open.shopee.com/documents/v2/v2.discount.delete_discount?module=99&type=1) |\n| 用途 | Delete discount; pass body with discount_id |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Delete discount; pass body with discount_id\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/delete_discount.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"delete_discount\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`deleteDiscount`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.6:references/apis/delete-sip-discount.md\n\n# delete_sip_discount\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/delete_sip_discount.py` |\n| Method / path | POST `api/v2/discount/delete_sip_discount` |\n| 官方文档 | [delete_sip_discount](https://open.shopee.com/documents/v2/v2.discount.delete_sip_discount?module=99&type=1) |\n| 用途 | Delete SIP discount |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Delete SIP discount\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/delete_sip_discount.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"delete_sip_discount\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`deleteSipDiscount`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.6:references/apis/end-discount.md\n\n# end_discount\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/end_discount.py` |\n| Method / path | POST `api/v2/discount/end_discount` |\n| 官方文档 | [end_discount](https://open.shopee.com/documents/v2/v2.discount.end_discount?module=99&type=1) |\n| 用途 | End discount early |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：End discount early\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/end_discount.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"end_discount\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`endDiscount`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.6:references/apis/get-discount-list.md\n\n# get_discount_list\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_discount_list.py` |\n| Method / path | GET `api/v2/discount/get_discount_list` |\n| 官方文档 | [get_discount_list](https://open.shopee.com/documents/v2/v2.discount.get_discount_list?module=99&type=1) |\n| 用途 | List discounts; pagination/status filters |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**GET**\n- GET：业务字段放 JSON **顶层**，runner 拼进 `queryString`（不含 `?`）\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：List discounts; pagination/status filters\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_discount_list.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"get_discount_list\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getDiscountList`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.6:references/apis/get-discount.md\n\n# get_discount\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_discount.py` |\n| Method / path | GET `api/v2/discount/get_discount` |\n| 官方文档 | [get_discount](https://open.shopee.com/documents/v2/v2.discount.get_discount?module=99&type=1) |\n| 用途 | Get discount detail by discount_id |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**GET**\n- GET：业务字段放 JSON **顶层**，runner 拼进 `queryString`（不含 `?`）\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Get discount detail by discount_id\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_discount.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"get_discount\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getDiscount`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.6:references/apis/get-sip-discounts.md\n\n# get_sip_discounts\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_sip_discounts.py` |\n| Method / path | GET `api/v2/discount/get_sip_discounts` |\n| 官方文档 | [get_sip_discounts](https://open.shopee.com/documents/v2/v2.discount.get_sip_discounts?module=99&type=1) |\n| 用途 | SIP cross-border discount list |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**GET**\n- GET：业务字段放 JSON **顶层**，runner 拼进 `queryString`（不含 `?`）\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：SIP cross-border discount list\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_sip_discounts.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"get_sip_discounts\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getSipDiscounts`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nArchive v1.0.5: 35 files, 43657 bytes\n\nFiles: references/api.md (4193b), references/apis/add-discount-item.md (1396b), references/apis/add-discount.md (1375b), references/apis/delete-discount-item.md (1408b), references/apis/delete-discount.md (1403b), references/apis/delete-sip-discount.md (1386b), references/apis/end-discount.md (1329b), references/apis/get-discount-list.md (1420b), references/apis/get-discount.md (1367b), references/apis/get-sip-discounts.md (1398b), references/apis/set-sip-discount.md (1356b), references/apis/update-discount-item.md (1414b), references/apis/update-discount.md (1365b), references/onboarding.md (2046b), scripts/_discount_api_runner.py (4300b), scripts/_discount_endpoints.py (3266b), scripts/_shopee_discount_common.py (11934b), scripts/add_discount_item.py (693b), scripts/add_discount.py (663b), scripts/check_auth_dependency.py (3985b), scripts/delete_discount_item.py (711b), scripts/delete_discount.py (681b), scripts/delete_sip_discount.py (705b), scripts/discount_api.py (1050b), scripts/end_discount.py (663b), scripts/get_discount_list.py (693b), scripts/get_discount.py (663b), scripts/get_sip_discounts.py (693b), scripts/onboarding.py (24089b), scripts/set_sip_discount.py (687b), scripts/update_discount_item.py (711b), scripts/update_discount.py (681b), skill-card.md (2479b), SKILL.md (6287b), _meta.json (148b)\n\nFile v1.0.5:SKILL.md\n\n---\nname: linkfox-shopee-store-discount\ndescription: Shopee（虾皮）店铺折扣促销 Discount（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Discount 模块全部 12 个接口：add_discount、get_discount_list、update_discount、add_discount_item、end_discount、SIP折扣等。当用户提到 Shopee 折扣、Discount、促销活动、限时折扣、add_discount、discount_id、打折活动 时触发。即使未明确提及\"折扣\"，只要涉及已授权 Shopee 店铺的折扣活动创建或管理，也应触发。\n---\n\n# Shopee 店铺 Discount\n\nShopee Open Platform **Discount 模块**（12 个 API）。**依赖 `linkfox-shopee-store-auth`** 选店；经 **`POST /shopee/developerProxy`** 传入 `shopId`（或 `merchantId`），由服务端解析 token 转发（`path` 须 `api/v2/discount/...`）。\n\n## 调用方式\n\n- **API 端点**：`POST /shopee/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-shopee-store-discount-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\n\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\n\n## 解决认证和积分问题\n发生以下异常情况时，采用 references/onboarding.md 引导解决问题：\n\n### 异常情况\n- **未配置API Key**：环境变量未配置 `LINKFOX_AGENT_API_KEY`，也未配置 `LINKFOXAGENT_API_KEY`。\n- **响应401或402状态码**\n- **响应提示积分或余额不足**：消息含\"积分余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值\"，或类似含义的内容。\n\n## 官方参考\n\nDiscount 模块索引：[v2.discount.add_discount](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1)\n\n---\n\n## Prerequisites\n\n1. 运行 `python scripts/check_auth_dependency.py`；exit code **42** → 先安装 **`linkfox-shopee-store-auth`**。\n2. Bundle Deal / Voucher 等其它促销模块 → 非本 skill。\n\n## 可用脚本（12 个 API）\n\n| 脚本 | API | Method |\n|------|-----|--------|\n| `add_discount.py` | add_discount | POST |\n| `add_discount_item.py` | add_discount_item | POST |\n| `get_discount_list.py` | get_discount_list | GET |\n| `get_discount.py` | get_discount | GET |\n| `update_discount.py` | update_discount | POST |\n| `update_discount_item.py` | update_discount_item | POST |\n| `end_discount.py` | end_discount | POST |\n| `delete_discount.py` | delete_discount | POST |\n| `delete_discount_item.py` | delete_discount_item | POST |\n| `get_sip_discounts.py` | get_sip_discounts | GET |\n| `set_sip_discount.py` | set_sip_discount | POST |\n| `delete_sip_discount.py` | delete_sip_discount | POST |\n| `discount_api.py` | 通用入口 | — |\n\n## 接口说明（按 API）\n\n入参与响应细节放在 `references/apis/`，SKILL 只保留索引。\n\n| API | 说明文档 |\n|-----|----------|\n| `add_discount` | [references/apis/add-discount.md](./references/apis/add-discount.md) |\n| `add_discount_item` | [references/apis/add-discount-item.md](./references/apis/add-discount-item.md) |\n| `delete_discount` | [references/apis/delete-discount.md](./references/apis/delete-discount.md) |\n| `delete_discount_item` | [references/apis/delete-discount-item.md](./references/apis/delete-discount-item.md) |\n| `delete_sip_discount` | [references/apis/delete-sip-discount.md](./references/apis/delete-sip-discount.md) |\n| `end_discount` | [references/apis/end-discount.md](./references/apis/end-discount.md) |\n| `get_discount` | [references/apis/get-discount.md](./references/apis/get-discount.md) |\n| `get_discount_list` | [references/apis/get-discount-list.md](./references/apis/get-discount-list.md) |\n| `get_sip_discounts` | [references/apis/get-sip-discounts.md](./references/apis/get-sip-discounts.md) |\n| `set_sip_discount` | [references/apis/set-sip-discount.md](./references/apis/set-sip-discount.md) |\n| `update_discount` | [references/apis/update-discount.md](./references/apis/update-discount.md) |\n| `update_discount_item` | [references/apis/update-discount-item.md](./references/apis/update-discount-item.md) |\n\n模块总览 / Feedback 见 [references/api.md](./references/api.md)。\n\n## Usage Scenarios\n\n### 1. 创建折扣活动\n1. `add_discount.py` 传完整 `body`（名称、时间、折扣类型等）\n2. `add_discount_item.py` 添加参与商品\n3. `get_discount_list.py` 确认活动状态\n\n### 2. 管理现有活动\n- `get_discount.py` 查详情\n- `update_discount.py` / `update_discount_item.py` 修改\n- `end_discount.py` 提前结束\n\n## Not Applicable\n\n- 店铺授权 → `linkfox-shopee-store-auth`\n- Bundle Deal / Voucher / Add-On Deal / Shop Flash Sale / Follow Prize → 其它促销模块 skill（Bundle Deal → `linkfox-shopee-store-bundle-deal`；Add-On Deal → `linkfox-shopee-store-add-on-deal`；Voucher → `linkfox-shopee-store-voucher`；Shop Flash Sale → `linkfox-shopee-store-shop-flash-sale`；Follow Prize → `linkfox-shopee-store-follow-prize`）\n- 商品 listing → `linkfox-shopee-store-product`\n\n## 积分消耗规则\n\n不消耗积分。\n\n**Feedback:** 见 `references/api.md`。\n\n\n---\n*For more high-quality, professional cross-border e-commerce skills, visit [LinkFox Skills](https://skill.linkfox.com/).*\n\nFile v1.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-shopee-store-discount\",\n  \"version\": \"1.0.5\",\n  \"publishedAt\": 1786719778217\n}\n\nFile v1.0.5:references/api.md\n\n# linkfox-shopee-store-discount — 参数与字段参考\r\n\r\n> 单接口入参/响应说明已拆到 **`apis/`**（按 API 一份）；本文件保留模块总览与 Feedback。\r\nShopee **Discount 模块**全部 12 个 API，经 **`POST /shopee/developerProxy`** 转发。\r\n\r\n授权见 **`linkfox-shopee-store-auth`**。官方索引：[v2.discount.add_discount](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1)\r\n\r\n## 通用约定\r\n\r\n- **path**：须 `api/v2/discount/...`\r\n- **标识**：通常传 **`shopId`**\r\n- **官方文档 URL 规则**：`https://open.shopee.com/documents/v2/v2.discount.{api}?module=99&type=1`\r\n\r\n---\r\n\r\n## Discount 模块总览\r\n\r\n| # | API | Method | path | 脚本 | 官方文档 |\r\n|---|-----|--------|------|------|----------|\r\n| 1 | add_discount | POST | `api/v2/discount/add_discount` | `add_discount.py` | [apis/add-discount.md](./apis/add-discount.md) |\r\n| 2 | add_discount_item | POST | `api/v2/discount/add_discount_item` | `add_discount_item.py` | [apis/add-discount-item.md](./apis/add-discount-item.md) |\r\n| 3 | delete_discount | POST | `api/v2/discount/delete_discount` | `delete_discount.py` | [apis/delete-discount.md](./apis/delete-discount.md) |\r\n| 4 | delete_discount_item | POST | `api/v2/discount/delete_discount_item` | `delete_discount_item.py` | [apis/delete-discount-item.md](./apis/delete-discount-item.md) |\r\n| 5 | delete_sip_discount | POST | `api/v2/discount/delete_sip_discount` | `delete_sip_discount.py` | [apis/delete-sip-discount.md](./apis/delete-sip-discount.md) |\r\n| 6 | end_discount | POST | `api/v2/discount/end_discount` | `end_discount.py` | [apis/end-discount.md](./apis/end-discount.md) |\r\n| 7 | get_discount | GET | `api/v2/discount/get_discount` | `get_discount.py` | [apis/get-discount.md](./apis/get-discount.md) |\r\n| 8 | get_discount_list | GET | `api/v2/discount/get_discount_list` | `get_discount_list.py` | [apis/get-discount-list.md](./apis/get-discount-list.md) |\r\n| 9 | get_sip_discounts | GET | `api/v2/discount/get_sip_discounts` | `get_sip_discounts.py` | [apis/get-sip-discounts.md](./apis/get-sip-discounts.md) |\r\n| 10 | set_sip_discount | POST | `api/v2/discount/set_sip_discount` | `set_sip_discount.py` | [apis/set-sip-discount.md](./apis/set-sip-discount.md) |\r\n| 11 | update_discount | POST | `api/v2/discount/update_discount` | `update_discount.py` | [apis/update-discount.md](./apis/update-discount.md) |\r\n| 12 | update_discount_item | POST | `api/v2/discount/update_discount_item` | `update_discount_item.py` | [apis/update-discount-item.md](./apis/update-discount-item.md) |\r\n通用入口：`discount_api.py`（JSON 含 `\"api\": \"<上表 API 名>\"`）。\r\n\r\n---\r\n\r\n## 常用接口说明\r\n\r\n| API | 要点 |\r\n|-----|------|\r\n| `add_discount` | 创建折扣活动；POST `body` — [apis/add-discount.md](./apis/add-discount.md) |\r\n| `add_discount_item` | 向活动添加商品/SKU — [apis/add-discount-item.md](./apis/add-discount-item.md) |\r\n| `get_discount_list` | 折扣活动列表 — [apis/get-discount-list.md](./apis/get-discount-list.md) |\r\n| `get_discount` | 单个活动详情 — [apis/get-discount.md](./apis/get-discount.md) |\r\n| `update_discount` / `update_discount_item` | 更新活动/商品折扣 |\r\n| `end_discount` | 提前结束活动 — [apis/end-discount.md](./apis/end-discount.md) |\r\n| `delete_discount` / `delete_discount_item` | 删除活动/商品 |\r\n| `get_sip_discounts` / `set_sip_discount` / `delete_sip_discount` | SIP 跨境折扣 |\r\n\r\n---\r\n\r\n## curl 示例\r\n\r\n```bash\r\ncurl -X POST https://tool-gateway.linkfox.com/shopee/developerProxy \\\r\n  -H \"Authorization: $LINKFOXAGENT_API_KEY\" \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\r\n    \"path\": \"api/v2/discount/get_discount_list\",\r\n    \"method\": \"GET\",\r\n    \"accessToken\": \"xxx\",\r\n    \"shopId\": \"67890\",\r\n    \"queryString\": \"discount_status=ongoing&page_no=1&page_size=20\"\r\n  }'\r\n```\r\n\r\n---\r\n\r\n## Feedback API\r\n\r\n```bash\r\ncurl -X POST https://skill-api.linkfox.com/api/v1/public/feedback \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\"skillName\":\"linkfox-shopee-store-discount\",\"sentiment\":\"POSITIVE\",\r\n       \"category\":\"OTHER\",\"content\":\"折扣活动查询正常\"}'\r\n```\n\nFile v1.0.5:references/apis/add-discount-item.md\n\n# add_discount_item\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/add_discount_item.py` |\n| Method / path | POST `api/v2/discount/add_discount_item` |\n| 官方文档 | [add_discount_item](https://open.shopee.com/documents/v2/v2.discount.add_discount_item?module=99&type=1) |\n| 用途 | Add items to discount; pass body |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Add items to discount; pass body\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/add_discount_item.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"add_discount_item\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`addDiscountItem`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.5:references/apis/add-discount.md\n\n# add_discount\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/add_discount.py` |\n| Method / path | POST `api/v2/discount/add_discount` |\n| 官方文档 | [add_discount](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1) |\n| 用途 | Create discount promotion; pass full body |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Create discount promotion; pass full body\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/add_discount.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"add_discount\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`addDiscount`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.5:references/apis/delete-discount-item.md\n\n# delete_discount_item\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/delete_discount_item.py` |\n| Method / path | POST `api/v2/discount/delete_discount_item` |\n| 官方文档 | [delete_discount_item](https://open.shopee.com/documents/v2/v2.discount.delete_discount_item?module=99&type=1) |\n| 用途 | Remove items from discount |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Remove items from discount\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/delete_discount_item.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"delete_discount_item\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`deleteDiscountItem`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.5:references/apis/delete-discount.md\n\n# delete_discount\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/delete_discount.py` |\n| Method / path | POST `api/v2/discount/delete_discount` |\n| 官方文档 | [delete_discount](https://open.shopee.com/documents/v2/v2.discount.delete_discount?module=99&type=1) |\n| 用途 | Delete discount; pass body with discount_id |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Delete discount; pass body with discount_id\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/delete_discount.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"delete_discount\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`deleteDiscount`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.5:references/apis/delete-sip-discount.md\n\n# delete_sip_discount\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/delete_sip_discount.py` |\n| Method / path | POST `api/v2/discount/delete_sip_discount` |\n| 官方文档 | [delete_sip_discount](https://open.shopee.com/documents/v2/v2.discount.delete_sip_discount?module=99&type=1) |\n| 用途 | Delete SIP discount |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Delete SIP discount\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/delete_sip_discount.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"delete_sip_discount\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`deleteSipDiscount`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.5:references/apis/end-discount.md\n\n# end_discount\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/end_discount.py` |\n| Method / path | POST `api/v2/discount/end_discount` |\n| 官方文档 | [end_discount](https://open.shopee.com/documents/v2/v2.discount.end_discount?module=99&type=1) |\n| 用途 | End discount early |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：End discount early\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/end_discount.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"end_discount\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`endDiscount`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.5:references/apis/get-discount-list.md\n\n# get_discount_list\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_discount_list.py` |\n| Method / path | GET `api/v2/discount/get_discount_list` |\n| 官方文档 | [get_discount_list](https://open.shopee.com/documents/v2/v2.discount.get_discount_list?module=99&type=1) |\n| 用途 | List discounts; pagination/status filters |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**GET**\n- GET：业务字段放 JSON **顶层**，runner 拼进 `queryString`（不含 `?`）\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：List discounts; pagination/status filters\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_discount_list.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"get_discount_list\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getDiscountList`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.5:references/apis/get-discount.md\n\n# get_discount\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_discount.py` |\n| Method / path | GET `api/v2/discount/get_discount` |\n| 官方文档 | [get_discount](https://open.shopee.com/documents/v2/v2.discount.get_discount?module=99&type=1) |\n| 用途 | Get discount detail by discount_id |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**GET**\n- GET：业务字段放 JSON **顶层**，runner 拼进 `queryString`（不含 `?`）\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Get discount detail by discount_id\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_discount.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"get_discount\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getDiscount`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.5:references/apis/get-sip-discounts.md\n\n# get_sip_discounts\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_sip_discounts.py` |\n| Method / path | GET `api/v2/discount/get_sip_discounts` |\n| 官方文档 | [get_sip_discounts](https://open.shopee.com/documents/v2/v2.discount.get_sip_discounts?module=99&type=1) |\n| 用途 | SIP cross-border discount list |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**GET**\n- GET：业务字段放 JSON **顶层**，runner 拼进 `queryString`（不含 `?`）\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：SIP cross-border discount list\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_sip_discounts.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"get_sip_discounts\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getSipDiscounts`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nArchive v1.0.4: 35 files, 43761 bytes\n\nFiles: references/api.md (4193b), references/apis/add-discount-item.md (1396b), references/apis/add-discount.md (1375b), references/apis/delete-discount-item.md (1408b), references/apis/delete-discount.md (1403b), references/apis/delete-sip-discount.md (1386b), references/apis/end-discount.md (1329b), references/apis/get-discount-list.md (1420b), references/apis/get-discount.md (1367b), references/apis/get-sip-discounts.md (1398b), references/apis/set-sip-discount.md (1356b), references/apis/update-discount-item.md (1414b), references/apis/update-discount.md (1365b), references/onboarding.md (2046b), scripts/_discount_api_runner.py (4300b), scripts/_discount_endpoints.py (3266b), scripts/_shopee_discount_common.py (11934b), scripts/add_discount_item.py (693b), scripts/add_discount.py (663b), scripts/check_auth_dependency.py (3985b), scripts/delete_discount_item.py (711b), scripts/delete_discount.py (681b), scripts/delete_sip_discount.py (705b), scripts/discount_api.py (1050b), scripts/end_discount.py (663b), scripts/get_discount_list.py (693b), scripts/get_discount.py (663b), scripts/get_sip_discounts.py (693b), scripts/onboarding.py (24089b), scripts/set_sip_discount.py (687b), scripts/update_discount_item.py (711b), scripts/update_discount.py (681b), skill-card.md (2785b), SKILL.md (6287b), _meta.json (148b)\n\nFile v1.0.4:SKILL.md\n\n---\nname: linkfox-shopee-store-discount\ndescription: Shopee（虾皮）店铺折扣促销 Discount（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Discount 模块全部 12 个接口：add_discount、get_discount_list、update_discount、add_discount_item、end_discount、SIP折扣等。当用户提到 Shopee 折扣、Discount、促销活动、限时折扣、add_discount、discount_id、打折活动 时触发。即使未明确提及\"折扣\"，只要涉及已授权 Shopee 店铺的折扣活动创建或管理，也应触发。\n---\n\n# Shopee 店铺 Discount\n\nShopee Open Platform **Discount 模块**（12 个 API）。**依赖 `linkfox-shopee-store-auth`** 选店；经 **`POST /shopee/developerProxy`** 传入 `shopId`（或 `merchantId`），由服务端解析 token 转发（`path` 须 `api/v2/discount/...`）。\n\n## 调用方式\n\n- **API 端点**：`POST /shopee/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-shopee-store-discount-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\n\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\n\n## 解决认证和积分问题\n发生以下异常情况时，采用 references/onboarding.md 引导解决问题：\n\n### 异常情况\n- **未配置API Key**：环境变量未配置 `LINKFOX_AGENT_API_KEY`，也未配置 `LINKFOXAGENT_API_KEY`。\n- **响应401或402状态码**\n- **响应提示积分或余额不足**：消息含\"积分余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值\"，或类似含义的内容。\n\n## 官方参考\n\nDiscount 模块索引：[v2.discount.add_discount](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1)\n\n---\n\n## Prerequisites\n\n1. 运行 `python scripts/check_auth_dependency.py`；exit code **42** → 先安装 **`linkfox-shopee-store-auth`**。\n2. Bundle Deal / Voucher 等其它促销模块 → 非本 skill。\n\n## 可用脚本（12 个 API）\n\n| 脚本 | API | Method |\n|------|-----|--------|\n| `add_discount.py` | add_discount | POST |\n| `add_discount_item.py` | add_discount_item | POST |\n| `get_discount_list.py` | get_discount_list | GET |\n| `get_discount.py` | get_discount | GET |\n| `update_discount.py` | update_discount | POST |\n| `update_discount_item.py` | update_discount_item | POST |\n| `end_discount.py` | end_discount | POST |\n| `delete_discount.py` | delete_discount | POST |\n| `delete_discount_item.py` | delete_discount_item | POST |\n| `get_sip_discounts.py` | get_sip_discounts | GET |\n| `set_sip_discount.py` | set_sip_discount | POST |\n| `delete_sip_discount.py` | delete_sip_discount | POST |\n| `discount_api.py` | 通用入口 | — |\n\n## 接口说明（按 API）\n\n入参与响应细节放在 `references/apis/`，SKILL 只保留索引。\n\n| API | 说明文档 |\n|-----|----------|\n| `add_discount` | [references/apis/add-discount.md](./references/apis/add-discount.md) |\n| `add_discount_item` | [references/apis/add-discount-item.md](./references/apis/add-discount-item.md) |\n| `delete_discount` | [references/apis/delete-discount.md](./references/apis/delete-discount.md) |\n| `delete_discount_item` | [references/apis/delete-discount-item.md](./references/apis/delete-discount-item.md) |\n| `delete_sip_discount` | [references/apis/delete-sip-discount.md](./references/apis/delete-sip-discount.md) |\n| `end_discount` | [references/apis/end-discount.md](./references/apis/end-discount.md) |\n| `get_discount` | [references/apis/get-discount.md](./references/apis/get-discount.md) |\n| `get_discount_list` | [references/apis/get-discount-list.md](./references/apis/get-discount-list.md) |\n| `get_sip_discounts` | [references/apis/get-sip-discounts.md](./references/apis/get-sip-discounts.md) |\n| `set_sip_discount` | [references/apis/set-sip-discount.md](./references/apis/set-sip-discount.md) |\n| `update_discount` | [references/apis/update-discount.md](./references/apis/update-discount.md) |\n| `update_discount_item` | [references/apis/update-discount-item.md](./references/apis/update-discount-item.md) |\n\n模块总览 / Feedback 见 [references/api.md](./references/api.md)。\n\n## Usage Scenarios\n\n### 1. 创建折扣活动\n1. `add_discount.py` 传完整 `body`（名称、时间、折扣类型等）\n2. `add_discount_item.py` 添加参与商品\n3. `get_discount_list.py` 确认活动状态\n\n### 2. 管理现有活动\n- `get_discount.py` 查详情\n- `update_discount.py` / `update_discount_item.py` 修改\n- `end_discount.py` 提前结束\n\n## Not Applicable\n\n- 店铺授权 → `linkfox-shopee-store-auth`\n- Bundle Deal / Voucher / Add-On Deal / Shop Flash Sale / Follow Prize → 其它促销模块 skill（Bundle Deal → `linkfox-shopee-store-bundle-deal`；Add-On Deal → `linkfox-shopee-store-add-on-deal`；Voucher → `linkfox-shopee-store-voucher`；Shop Flash Sale → `linkfox-shopee-store-shop-flash-sale`；Follow Prize → `linkfox-shopee-store-follow-prize`）\n- 商品 listing → `linkfox-shopee-store-product`\n\n## 积分消耗规则\n\n不消耗积分。\n\n**Feedback:** 见 `references/api.md`。\n\n\n---\n*For more high-quality, professional cross-border e-commerce skills, visit [LinkFox Skills](https://skill.linkfox.com/).*\n\nFile v1.0.4:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-shopee-store-discount\",\n  \"version\": \"1.0.4\",\n  \"publishedAt\": 1786100413554\n}\n\nFile v1.0.4:references/api.md\n\n# linkfox-shopee-store-discount — 参数与字段参考\r\n\r\n> 单接口入参/响应说明已拆到 **`apis/`**（按 API 一份）；本文件保留模块总览与 Feedback。\r\nShopee **Discount 模块**全部 12 个 API，经 **`POST /shopee/developerProxy`** 转发。\r\n\r\n授权见 **`linkfox-shopee-store-auth`**。官方索引：[v2.discount.add_discount](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1)\r\n\r\n## 通用约定\r\n\r\n- **path**：须 `api/v2/discount/...`\r\n- **标识**：通常传 **`shopId`**\r\n- **官方文档 URL 规则**：`https://open.shopee.com/documents/v2/v2.discount.{api}?module=99&type=1`\r\n\r\n---\r\n\r\n## Discount 模块总览\r\n\r\n| # | API | Method | path | 脚本 | 官方文档 |\r\n|---|-----|--------|------|------|----------|\r\n| 1 | add_discount | POST | `api/v2/discount/add_discount` | `add_discount.py` | [apis/add-discount.md](./apis/add-discount.md) |\r\n| 2 | add_discount_item | POST | `api/v2/discount/add_discount_item` | `add_discount_item.py` | [apis/add-discount-item.md](./apis/add-discount-item.md) |\r\n| 3 | delete_discount | POST | `api/v2/discount/delete_discount` | `delete_discount.py` | [apis/delete-discount.md](./apis/delete-discount.md) |\r\n| 4 | delete_discount_item | POST | `api/v2/discount/delete_discount_item` | `delete_discount_item.py` | [apis/delete-discount-item.md](./apis/delete-discount-item.md) |\r\n| 5 | delete_sip_discount | POST | `api/v2/discount/delete_sip_discount` | `delete_sip_discount.py` | [apis/delete-sip-discount.md](./apis/delete-sip-discount.md) |\r\n| 6 | end_discount | POST | `api/v2/discount/end_discount` | `end_discount.py` | [apis/end-discount.md](./apis/end-discount.md) |\r\n| 7 | get_discount | GET | `api/v2/discount/get_discount` | `get_discount.py` | [apis/get-discount.md](./apis/get-discount.md) |\r\n| 8 | get_discount_list | GET | `api/v2/discount/get_discount_list` | `get_discount_list.py` | [apis/get-discount-list.md](./apis/get-discount-list.md) |\r\n| 9 | get_sip_discounts | GET | `api/v2/discount/get_sip_discounts` | `get_sip_discounts.py` | [apis/get-sip-discounts.md](./apis/get-sip-discounts.md) |\r\n| 10 | set_sip_discount | POST | `api/v2/discount/set_sip_discount` | `set_sip_discount.py` | [apis/set-sip-discount.md](./apis/set-sip-discount.md) |\r\n| 11 | update_discount | POST | `api/v2/discount/update_discount` | `update_discount.py` | [apis/update-discount.md](./apis/update-discount.md) |\r\n| 12 | update_discount_item | POST | `api/v2/discount/update_discount_item` | `update_discount_item.py` | [apis/update-discount-item.md](./apis/update-discount-item.md) |\r\n通用入口：`discount_api.py`（JSON 含 `\"api\": \"<上表 API 名>\"`）。\r\n\r\n---\r\n\r\n## 常用接口说明\r\n\r\n| API | 要点 |\r\n|-----|------|\r\n| `add_discount` | 创建折扣活动；POST `body` — [apis/add-discount.md](./apis/add-discount.md) |\r\n| `add_discount_item` | 向活动添加商品/SKU — [apis/add-discount-item.md](./apis/add-discount-item.md) |\r\n| `get_discount_list` | 折扣活动列表 — [apis/get-discount-list.md](./apis/get-discount-list.md) |\r\n| `get_discount` | 单个活动详情 — [apis/get-discount.md](./apis/get-discount.md) |\r\n| `update_discount` / `update_discount_item` | 更新活动/商品折扣 |\r\n| `end_discount` | 提前结束活动 — [apis/end-discount.md](./apis/end-discount.md) |\r\n| `delete_discount` / `delete_discount_item` | 删除活动/商品 |\r\n| `get_sip_discounts` / `set_sip_discount` / `delete_sip_discount` | SIP 跨境折扣 |\r\n\r\n---\r\n\r\n## curl 示例\r\n\r\n```bash\r\ncurl -X POST https://tool-gateway.linkfox.com/shopee/developerProxy \\\r\n  -H \"Authorization: $LINKFOXAGENT_API_KEY\" \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\r\n    \"path\": \"api/v2/discount/get_discount_list\",\r\n    \"method\": \"GET\",\r\n    \"accessToken\": \"xxx\",\r\n    \"shopId\": \"67890\",\r\n    \"queryString\": \"discount_status=ongoing&page_no=1&page_size=20\"\r\n  }'\r\n```\r\n\r\n---\r\n\r\n## Feedback API\r\n\r\n```bash\r\ncurl -X POST https://skill-api.linkfox.com/api/v1/public/feedback \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\"skillName\":\"linkfox-shopee-store-discount\",\"sentiment\":\"POSITIVE\",\r\n       \"category\":\"OTHER\",\"content\":\"折扣活动查询正常\"}'\r\n```\n\nFile v1.0.4:references/apis/add-discount-item.md\n\n# add_discount_item\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/add_discount_item.py` |\n| Method / path | POST `api/v2/discount/add_discount_item` |\n| 官方文档 | [add_discount_item](https://open.shopee.com/documents/v2/v2.discount.add_discount_item?module=99&type=1) |\n| 用途 | Add items to discount; pass body |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Add items to discount; pass body\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/add_discount_item.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"add_discount_item\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`addDiscountItem`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.4:references/apis/add-discount.md\n\n# add_discount\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/add_discount.py` |\n| Method / path | POST `api/v2/discount/add_discount` |\n| 官方文档 | [add_discount](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1) |\n| 用途 | Create discount promotion; pass full body |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Create discount promotion; pass full body\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/add_discount.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"add_discount\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`addDiscount`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.4:references/apis/delete-discount-item.md\n\n# delete_discount_item\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/delete_discount_item.py` |\n| Method / path | POST `api/v2/discount/delete_discount_item` |\n| 官方文档 | [delete_discount_item](https://open.shopee.com/documents/v2/v2.discount.delete_discount_item?module=99&type=1) |\n| 用途 | Remove items from discount |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Remove items from discount\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/delete_discount_item.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"delete_discount_item\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`deleteDiscountItem`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.4:references/apis/delete-discount.md\n\n# delete_discount\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/delete_discount.py` |\n| Method / path | POST `api/v2/discount/delete_discount` |\n| 官方文档 | [delete_discount](https://open.shopee.com/documents/v2/v2.discount.delete_discount?module=99&type=1) |\n| 用途 | Delete discount; pass body with discount_id |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Delete discount; pass body with discount_id\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/delete_discount.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"delete_discount\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`deleteDiscount`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.4:references/apis/delete-sip-discount.md\n\n# delete_sip_discount\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/delete_sip_discount.py` |\n| Method / path | POST `api/v2/discount/delete_sip_discount` |\n| 官方文档 | [delete_sip_discount](https://open.shopee.com/documents/v2/v2.discount.delete_sip_discount?module=99&type=1) |\n| 用途 | Delete SIP discount |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Delete SIP discount\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/delete_sip_discount.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"delete_sip_discount\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`deleteSipDiscount`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.4:references/apis/end-discount.md\n\n# end_discount\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/end_discount.py` |\n| Method / path | POST `api/v2/discount/end_discount` |\n| 官方文档 | [end_discount](https://open.shopee.com/documents/v2/v2.discount.end_discount?module=99&type=1) |\n| 用途 | End discount early |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：End discount early\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/end_discount.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"end_discount\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`endDiscount`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.4:references/apis/get-discount-list.md\n\n# get_discount_list\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_discount_list.py` |\n| Method / path | GET `api/v2/discount/get_discount_list` |\n| 官方文档 | [get_discount_list](https://open.shopee.com/documents/v2/v2.discount.get_discount_list?module=99&type=1) |\n| 用途 | List discounts; pagination/status filters |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**GET**\n- GET：业务字段放 JSON **顶层**，runner 拼进 `queryString`（不含 `?`）\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：List discounts; pagination/status filters\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_discount_list.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"get_discount_list\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getDiscountList`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.4:references/apis/get-discount.md\n\n# get_discount\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_discount.py` |\n| Method / path | GET `api/v2/discount/get_discount` |\n| 官方文档 | [get_discount](https://open.shopee.com/documents/v2/v2.discount.get_discount?module=99&type=1) |\n| 用途 | Get discount detail by discount_id |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**GET**\n- GET：业务字段放 JSON **顶层**，runner 拼进 `queryString`（不含 `?`）\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Get discount detail by discount_id\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_discount.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"get_discount\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getDiscount`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.4:references/apis/get-sip-discounts.md\n\n# get_sip_discounts\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_sip_discounts.py` |\n| Method / path | GET `api/v2/discount/get_sip_discounts` |\n| 官方文档 | [get_sip_discounts](https://open.shopee.com/documents/v2/v2.discount.get_sip_discounts?module=99&type=1) |\n| 用途 | SIP cross-border discount list |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**GET**\n- GET：业务字段放 JSON **顶层**，runner 拼进 `queryString`（不含 `?`）\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：SIP cross-border discount list\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_sip_discounts.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"get_sip_discounts\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getSipDiscounts`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nArchive v1.0.3: 21 files, 21547 bytes\n\nFiles: references/api.md (4214b), scripts/_discount_api_runner.py (4287b), scripts/_discount_endpoints.py (3266b), scripts/_shopee_discount_common.py (11742b), scripts/add_discount_item.py (732b), scripts/add_discount.py (702b), scripts/check_auth_dependency.py (3985b), scripts/delete_discount_item.py (750b), scripts/delete_discount.py (720b), scripts/delete_sip_discount.py (744b), scripts/discount_api.py (1050b), scripts/end_discount.py (702b), scripts/get_discount_list.py (732b), scripts/get_discount.py (702b), scripts/get_sip_discounts.py (732b), scripts/set_sip_discount.py (726b), scripts/update_discount_item.py (750b), scripts/update_discount.py (720b), skill-card.md (2161b), SKILL.md (5413b), _meta.json (148b)\n\nFile v1.0.3:SKILL.md\n\n---\nname: linkfox-shopee-store-discount\ndescription: Shopee（虾皮）店铺折扣促销 Discount（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Discount 模块全部 12 个接口：add_discount、get_discount_list、update_discount、add_discount_item、end_discount、SIP折扣等。当用户提到 Shopee 折扣、Discount、促销活动、限时折扣、add_discount、discount_id、打折活动 时触发。即使未明确提及\"折扣\"，只要涉及已授权 Shopee 店铺的折扣活动创建或管理，也应触发。\n---\n\n# Shopee 店铺 Discount\n\nShopee Open Platform **Discount 模块**（12 个 API）。**依赖 `linkfox-shopee-store-auth`**：先取 `accessToken`，再经 **`POST /shopee/developerProxy`** 转发（`path` 须 `api/v2/discount/...`）。\n\n## 调用方式\n\n- **API 端点**：`POST /shopee/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-shopee-store-discount-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\n\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\n\n## 解决认证和积分问题\n发生以下异常情况时，采用以下措施来处理：\n\n### 异常情况\n- **未配置API Key**：环境变量未配置 `LINKFOX_AGENT_API_KEY`，也未配置 `LINKFOXAGENT_API_KEY`。\n- **响应401或402状态码**\n- **响应提示积分或余额不足**：消息含\"积分余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值\"，或类似含义的内容。\n\n### 措施\n- 优先采用skill内的 onboarding.md 引导解决问题。\n- 如找不到 onboarding.md 文件，则加载 /linkfox-onboarding 这个skill并根据它的引导来处理。如未安装请先安装：\n    - 下载 https://agent-files.linkfox.com/skills/linkfox-onboarding/release.zip，解压后安装这个skill。如需用户授权才可下载，要询问用户获得授权，你不能自己放弃下载。\n- 兜底措施：仅当前面两个措施经过所有努力都走不通时，才提示用户依据 https://skill.linkfox.com/linkfoxskills/guide.htm 指引获取API Key，或去 https://os.linkfox.com/ 补充积分。\n\n## 官方参考\n\nDiscount 模块索引：[v2.discount.add_discount](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1)\n\n---\n\n## Prerequisites\n\n1. 运行 `python scripts/check_auth_dependency.py`；exit code **42** → 先安装 **`linkfox-shopee-store-auth`**。\n2. Bundle Deal / Voucher 等其它促销模块 → 非本 skill。\n\n## 可用脚本（12 个 API）\n\n| 脚本 | API | Method |\n|------|-----|--------|\n| `add_discount.py` | add_discount | POST |\n| `add_discount_item.py` | add_discount_item | POST |\n| `get_discount_list.py` | get_discount_list | GET |\n| `get_discount.py` | get_discount | GET |\n| `update_discount.py` | update_discount | POST |\n| `update_discount_item.py` | update_discount_item | POST |\n| `end_discount.py` | end_discount | POST |\n| `delete_discount.py` | delete_discount | POST |\n| `delete_discount_item.py` | delete_discount_item | POST |\n| `get_sip_discounts.py` | get_sip_discounts | GET |\n| `set_sip_discount.py` | set_sip_discount | POST |\n| `delete_sip_discount.py` | delete_sip_discount | POST |\n| `discount_api.py` | 通用入口 | — |\n\n## Usage Scenarios\n\n### 1. 创建折扣活动\n1. `add_discount.py` 传完整 `body`（名称、时间、折扣类型等）\n2. `add_discount_item.py` 添加参与商品\n3. `get_discount_list.py` 确认活动状态\n\n### 2. 管理现有活动\n- `get_discount.py` 查详情\n- `update_discount.py` / `update_discount_item.py` 修改\n- `end_discount.py` 提前结束\n\n## Not Applicable\n\n- 店铺授权 → `linkfox-shopee-store-auth`\n- Bundle Deal / Voucher / Add-On Deal / Shop Flash Sale / Follow Prize → 其它促销模块 skill（Bundle Deal → `linkfox-shopee-store-bundle-deal`；Add-On Deal → `linkfox-shopee-store-add-on-deal`；Voucher → `linkfox-shopee-store-voucher`；Shop Flash Sale → `linkfox-shopee-store-shop-flash-sale`；Follow Prize → `linkfox-shopee-store-follow-prize`）\n- 商品 listing → `linkfox-shopee-store-product`\n\n## 积分消耗规则\n\n不消耗积分。\n\n**Feedback:** 见 `references/api.md`。\n\n\n---\n*For more high-quality, professional cross-border e-commerce skills, visit [LinkFox Skills](https://skill.linkfox.com/).*\n\nFile v1.0.3:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-shopee-store-discount\",\n  \"version\": \"1.0.3\",\n  \"publishedAt\": 1783945222098\n}\n\nFile v1.0.3:references/api.md\n\n# linkfox-shopee-store-discount — 参数与字段参考\r\n\r\nShopee **Discount 模块**全部 12 个 API，经 **`POST /shopee/developerProxy`** 转发。\r\n\r\n授权见 **`linkfox-shopee-store-auth`**。官方索引：[v2.discount.add_discount](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1)\r\n\r\n## 通用约定\r\n\r\n- **path**：须 `api/v2/discount/...`\r\n- **标识**：通常传 **`shopId`**\r\n- **官方文档 URL 规则**：`https://open.shopee.com/documents/v2/v2.discount.{api}?module=99&type=1`\r\n\r\n---\r\n\r\n## Discount 模块总览\r\n\r\n| # | API | Method | path | 脚本 | 官方文档 |\r\n|---|-----|--------|------|------|----------|\r\n| 1 | add_discount | POST | `api/v2/discount/add_discount` | `add_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1) |\r\n| 2 | add_discount_item | POST | `api/v2/discount/add_discount_item` | `add_discount_item.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.add_discount_item?module=99&type=1) |\r\n| 3 | delete_discount | POST | `api/v2/discount/delete_discount` | `delete_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.delete_discount?module=99&type=1) |\r\n| 4 | delete_discount_item | POST | `api/v2/discount/delete_discount_item` | `delete_discount_item.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.delete_discount_item?module=99&type=1) |\r\n| 5 | delete_sip_discount | POST | `api/v2/discount/delete_sip_discount` | `delete_sip_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.delete_sip_discount?module=99&type=1) |\r\n| 6 | end_discount | POST | `api/v2/discount/end_discount` | `end_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.end_discount?module=99&type=1) |\r\n| 7 | get_discount | GET | `api/v2/discount/get_discount` | `get_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.get_discount?module=99&type=1) |\r\n| 8 | get_discount_list | GET | `api/v2/discount/get_discount_list` | `get_discount_list.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.get_discount_list?module=99&type=1) |\r\n| 9 | get_sip_discounts | GET | `api/v2/discount/get_sip_discounts` | `get_sip_discounts.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.get_sip_discounts?module=99&type=1) |\r\n| 10 | set_sip_discount | POST | `api/v2/discount/set_sip_discount` | `set_sip_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.set_sip_discount?module=99&type=1) |\r\n| 11 | update_discount | POST | `api/v2/discount/update_discount` | `update_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.update_discount?module=99&type=1) |\r\n| 12 | update_discount_item | POST | `api/v2/discount/update_discount_item` | `update_discount_item.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.update_discount_item?module=99&type=1) |\r\n通用入口：`discount_api.py`（JSON 含 `\"api\": \"<上表 API 名>\"`）。\r\n\r\n---\r\n\r\n## 常用接口说明\r\n\r\n| API | 要点 |\r\n|-----|------|\r\n| `add_discount` | 创建折扣活动；POST `body` |\r\n| `add_discount_item` | 向活动添加商品/SKU |\r\n| `get_discount_list` | 折扣活动列表 |\r\n| `get_discount` | 单个活动详情 |\r\n| `update_discount` / `update_discount_item` | 更新活动/商品折扣 |\r\n| `end_discount` | 提前结束活动 |\r\n| `delete_discount` / `delete_discount_item` | 删除活动/商品 |\r\n| `get_sip_discounts` / `set_sip_discount` / `delete_sip_discount` | SIP 跨境折扣 |\r\n\r\n---\r\n\r\n## curl 示例\r\n\r\n```bash\r\ncurl -X POST ${LINKFOX_TOOL_GATEWAY}/shopee/developerProxy \\\r\n  -H \"Authorization: ${LINKFOX_AGENT_API_KEY}\" \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\r\n    \"path\": \"api/v2/discount/get_discount_list\",\r\n    \"method\": \"GET\",\r\n    \"accessToken\": \"xxx\",\r\n    \"shopId\": \"67890\",\r\n    \"queryString\": \"discount_status=ongoing&page_no=1&page_size=20\"\r\n  }'\r\n```\r\n\r\n---\r\n\r\n## Feedback API\r\n\r\n```bash\r\ncurl -X POST https://skill-api.linkfox.com/api/v1/public/feedback \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\"skillName\":\"linkfox-shopee-store-discount\",\"sentiment\":\"POSITIVE\",\r\n       \"category\":\"OTHER\",\"content\":\"折扣活动查询正常\"}'\r\n```\n\nFile v1.0.3:skill-card.md\n\n## Description: <br>\nShopee-店铺折扣 helps agents create, list, update, end, and delete Shopee store discount promotions through LinkFox's Shopee developer proxy. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[linkfox-ai](https://clawhub.ai/user/linkfox-ai) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal sellers, operators, and developers use this skill to manage authorized Shopee store discount campaigns, including creating promotions, adding or updating items, ending promotions, and reviewing discount details. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill can create, update, end, and delete live Shopee store discount promotions. <br>\nMitigation: Require explicit user confirmation before any create, update, end, or delete action and review request parameters before execution. <br>\nRisk: Full LinkFox and Shopee API responses may be saved locally and can contain sensitive merchant data. <br>\nMitigation: Treat saved response files as sensitive, keep them in an appropriate workspace, and review or delete them after use. <br>\n\n\n## Reference(s): <br>\n- [API reference](references/api.md) <br>\n- [Shopee Open Platform Discount API](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, shell commands, JSON, files, guidance] <br>\n**Output Format:** [Markdown guidance with shell commands and JSON response output or summaries] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Full API responses are saved under a local linkfox data directory; small responses print full JSON and larger responses print summaries unless inline output is requested.] <br>\n\n## Skill Version(s): <br>\n1.0.3 (source: server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.0.2: 21 files, 20901 bytes\n\nFiles: references/api.md (4214b), scripts/_discount_api_runner.py (4287b), scripts/_discount_endpoints.py (3266b), scripts/_shopee_discount_common.py (11643b), scripts/add_discount_item.py (732b), scripts/add_discount.py (702b), scripts/check_auth_dependency.py (3985b), scripts/delete_discount_item.py (750b), scripts/delete_discount.py (720b), scripts/delete_sip_discount.py (744b), scripts/discount_api.py (1050b), scripts/end_discount.py (702b), scripts/get_discount_list.py (732b), scripts/get_discount.py (702b), scripts/get_sip_discounts.py (732b), scripts/set_sip_discount.py (726b), scripts/update_discount_item.py (750b), scripts/update_discount.py (720b), skill-card.md (2254b), SKILL.md (4354b), _meta.json (148b)\n\nFile v1.0.2:SKILL.md\n\n---\r\nname: linkfox-shopee-store-discount\r\ndescription: Shopee（虾皮）店铺折扣促销 Discount（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Discount 模块全部 12 个接口：add_discount、get_discount_list、update_discount、add_discount_item、end_discount、SIP折扣等。当用户提到 Shopee 折扣、Discount、促销活动、限时折扣、add_discount、discount_id、打折活动 时触发。即使未明确提及\"折扣\"，只要涉及已授权 Shopee 店铺的折扣活动创建或管理，也应触发。\r\n---\r\n\r\n# Shopee 店铺 Discount\r\n\r\nShopee Open Platform **Discount 模块**（12 个 API）。**依赖 `linkfox-shopee-store-auth`**：先取 `accessToken`，再经 **`POST /shopee/developerProxy`** 转发（`path` 须 `api/v2/discount/...`）。\r\n\r\n## 调用方式\r\n\r\n- **API 端点**：`POST /shopee/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\r\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\r\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\r\n\r\n**输出策略（脚本默认行为）**：\r\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-shopee-store-discount-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\r\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\r\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\r\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\r\n\r\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\r\n\r\n## 官方参考\r\n\r\nDiscount 模块索引：[v2.discount.add_discount](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1)\r\n\r\n---\r\n\r\n## Prerequisites\r\n\r\n1. 运行 `python scripts/check_auth_dependency.py`；exit code **42** → 先安装 **`linkfox-shopee-store-auth`**。\r\n2. Bundle Deal / Voucher 等其它促销模块 → 非本 skill。\r\n\r\n## 可用脚本（12 个 API）\r\n\r\n| 脚本 | API | Method |\r\n|------|-----|--------|\r\n| `add_discount.py` | add_discount | POST |\r\n| `add_discount_item.py` | add_discount_item | POST |\r\n| `get_discount_list.py` | get_discount_list | GET |\r\n| `get_discount.py` | get_discount | GET |\r\n| `update_discount.py` | update_discount | POST |\r\n| `update_discount_item.py` | update_discount_item | POST |\r\n| `end_discount.py` | end_discount | POST |\r\n| `delete_discount.py` | delete_discount | POST |\r\n| `delete_discount_item.py` | delete_discount_item | POST |\r\n| `get_sip_discounts.py` | get_sip_discounts | GET |\r\n| `set_sip_discount.py` | set_sip_discount | POST |\r\n| `delete_sip_discount.py` | delete_sip_discount | POST |\r\n| `discount_api.py` | 通用入口 | — |\r\n\r\n## Usage Scenarios\r\n\r\n### 1. 创建折扣活动\r\n1. `add_discount.py` 传完整 `body`（名称、时间、折扣类型等）\r\n2. `add_discount_item.py` 添加参与商品\r\n3. `get_discount_list.py` 确认活动状态\r\n\r\n### 2. 管理现有活动\r\n- `get_discount.py` 查详情\r\n- `update_discount.py` / `update_discount_item.py` 修改\r\n- `end_discount.py` 提前结束\r\n\r\n## Not Applicable\r\n\r\n- 店铺授权 → `linkfox-shopee-store-auth`\r\n- Bundle Deal / Voucher / Add-On Deal / Shop Flash Sale / Follow Prize → 其它促销模块 skill（Bundle Deal → `linkfox-shopee-store-bundle-deal`；Add-On Deal → `linkfox-shopee-store-add-on-deal`；Voucher → `linkfox-shopee-store-voucher`；Shop Flash Sale → `linkfox-shopee-store-shop-flash-sale`；Follow Prize → `linkfox-shopee-store-follow-prize`）\r\n- 商品 listing → `linkfox-shopee-store-product`\r\n\r\n**Feedback:** 见 `references/api.md`。\r\n\r\n\r\n---\r\n*For more high-quality, professional cross-border e-commerce skills, visit [LinkFox Skills](https://skill.linkfox.com/).*\n\nFile v1.0.2:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-shopee-store-discount\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1783337336174\n}\n\nFile v1.0.2:references/api.md\n\n# linkfox-shopee-store-discount — 参数与字段参考\r\n\r\nShopee **Discount 模块**全部 12 个 API，经 **`POST /shopee/developerProxy`** 转发。\r\n\r\n授权见 **`linkfox-shopee-store-auth`**。官方索引：[v2.discount.add_discount](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1)\r\n\r\n## 通用约定\r\n\r\n- **path**：须 `api/v2/discount/...`\r\n- **标识**：通常传 **`shopId`**\r\n- **官方文档 URL 规则**：`https://open.shopee.com/documents/v2/v2.discount.{api}?module=99&type=1`\r\n\r\n---\r\n\r\n## Discount 模块总览\r\n\r\n| # | API | Method | path | 脚本 | 官方文档 |\r\n|---|-----|--------|------|------|----------|\r\n| 1 | add_discount | POST | `api/v2/discount/add_discount` | `add_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1) |\r\n| 2 | add_discount_item | POST | `api/v2/discount/add_discount_item` | `add_discount_item.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.add_discount_item?module=99&type=1) |\r\n| 3 | delete_discount | POST | `api/v2/discount/delete_discount` | `delete_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.delete_discount?module=99&type=1) |\r\n| 4 | delete_discount_item | POST | `api/v2/discount/delete_discount_item` | `delete_discount_item.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.delete_discount_item?module=99&type=1) |\r\n| 5 | delete_sip_discount | POST | `api/v2/discount/delete_sip_discount` | `delete_sip_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.delete_sip_discount?module=99&type=1) |\r\n| 6 | end_discount | POST | `api/v2/discount/end_discount` | `end_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.end_discount?module=99&type=1) |\r\n| 7 | get_discount | GET | `api/v2/discount/get_discount` | `get_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.get_discount?module=99&type=1) |\r\n| 8 | get_discount_list | GET | `api/v2/discount/get_discount_list` | `get_discount_list.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.get_discount_list?module=99&type=1) |\r\n| 9 | get_sip_discounts | GET | `api/v2/discount/get_sip_discounts` | `get_sip_discounts.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.get_sip_discounts?module=99&type=1) |\r\n| 10 | set_sip_discount | POST | `api/v2/discount/set_sip_discount` | `set_sip_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.set_sip_discount?module=99&type=1) |\r\n| 11 | update_discount | POST | `api/v2/discount/update_discount` | `update_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.update_discount?module=99&type=1) |\r\n| 12 | update_discount_item | POST | `api/v2/discount/update_discount_item` | `update_discount_item.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.update_discount_item?module=99&type=1) |\r\n通用入口：`discount_api.py`（JSON 含 `\"api\": \"<上表 API 名>\"`）。\r\n\r\n---\r\n\r\n## 常用接口说明\r\n\r\n| API | 要点 |\r\n|-----|------|\r\n| `add_discount` | 创建折扣活动；POST `body` |\r\n| `add_discount_item` | 向活动添加商品/SKU |\r\n| `get_discount_list` | 折扣活动列表 |\r\n| `get_discount` | 单个活动详情 |\r\n| `update_discount` / `update_discount_item` | 更新活动/商品折扣 |\r\n| `end_discount` | 提前结束活动 |\r\n| `delete_discount` / `delete_discount_item` | 删除活动/商品 |\r\n| `get_sip_discounts` / `set_sip_discount` / `delete_sip_discount` | SIP 跨境折扣 |\r\n\r\n---\r\n\r\n## curl 示例\r\n\r\n```bash\r\ncurl -X POST ${LINKFOX_TOOL_GATEWAY}/shopee/developerProxy \\\r\n  -H \"Authorization: ${LINKFOX_AGENT_API_KEY}\" \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\r\n    \"path\": \"api/v2/discount/get_discount_list\",\r\n    \"method\": \"GET\",\r\n    \"accessToken\": \"xxx\",\r\n    \"shopId\": \"67890\",\r\n    \"queryString\": \"discount_status=ongoing&page_no=1&page_size=20\"\r\n  }'\r\n```\r\n\r\n---\r\n\r\n## Feedback API\r\n\r\n```bash\r\ncurl -X POST https://skill-api.linkfox.com/api/v1/public/feedback \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\"skillName\":\"linkfox-shopee-store-discount\",\"sentiment\":\"POSITIVE\",\r\n       \"category\":\"OTHER\",\"content\":\"折扣活动查询正常\"}'\r\n```\n\nFile v1.0.2:skill-card.md\n\n## Description: <br>\nHelps agents create, inspect, update, end, and delete Shopee store discount promotions through LinkFox's Shopee developer proxy. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[linkfox-ai](https://clawhub.ai/user/linkfox-ai) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal sellers, ecommerce operators, and agents use this skill to manage Shopee Discount promotions for authorized stores, including creating campaigns, adding or updating items, listing promotions, ending campaigns, deleting discounts, and managing SIP discounts. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill can create, update, end, and delete live Shopee discount promotions. <br>\nMitigation: Confirm target shop IDs, discount IDs, payloads, and destructive actions before running the scripts. <br>\nRisk: Full API responses are persisted to local linkfox JSON files and may include sensitive business data. <br>\nMitigation: Use an appropriate workspace, limit sharing of saved outputs, and remove generated JSON files when they are no longer needed. <br>\n\n\n## Reference(s): <br>\n- [Skill API reference](references/api.md) <br>\n- [Shopee Discount API documentation](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1) <br>\n- [ClawHub skill page](https://clawhub.ai/linkfox-ai/skills/linkfox-shopee-store-discount) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, shell commands, JSON, files, guidance] <br>\n**Output Format:** [JSON responses saved to local files, with stdout JSON for small responses or summaries for larger responses.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Scripts call LinkFox APIs, require LinkFox authentication, and persist full responses under a linkfox session data directory.] <br>\n\n## Skill Version(s): <br>\n1.0.2 (source: server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.0.1: 20 files, 19705 bytes\n\nFiles: references/api.md (4214b), scripts/_discount_api_runner.py (4287b), scripts/_discount_endpoints.py (3266b), scripts/_shopee_discount_common.py (11643b), scripts/add_discount_item.py (732b), scripts/add_discount.py (702b), scripts/check_auth_dependency.py (3985b), scripts/delete_discount_item.py (750b), scripts/delete_discount.py (720b), scripts/delete_sip_discount.py (744b), scripts/discount_api.py (1050b), scripts/end_discount.py (702b), scripts/get_discount_list.py (732b), scripts/get_discount.py (702b), scripts/get_sip_discounts.py (732b), scripts/set_sip_discount.py (726b), scripts/update_discount_item.py (750b), scripts/update_discount.py (720b), SKILL.md (4354b), _meta.json (148b)\n\nFile v1.0.1:SKILL.md\n\n---\r\nname: linkfox-shopee-store-discount\r\ndescription: Shopee（虾皮）店铺折扣促销 Discount（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Discount 模块全部 12 个接口：add_discount、get_discount_list、update_discount、add_discount_item、end_discount、SIP折扣等。当用户提到 Shopee 折扣、Discount、促销活动、限时折扣、add_discount、discount_id、打折活动 时触发。即使未明确提及\"折扣\"，只要涉及已授权 Shopee 店铺的折扣活动创建或管理，也应触发。\r\n---\r\n\r\n# Shopee 店铺 Discount\r\n\r\nShopee Open Platform **Discount 模块**（12 个 API）。**依赖 `linkfox-shopee-store-auth`**：先取 `accessToken`，再经 **`POST /shopee/developerProxy`** 转发（`path` 须 `api/v2/discount/...`）。\r\n\r\n## 调用方式\r\n\r\n- **API 端点**：`POST /shopee/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\r\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\r\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\r\n\r\n**输出策略（脚本默认行为）**：\r\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-shopee-store-discount-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\r\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\r\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\r\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\r\n\r\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\r\n\r\n## 官方参考\r\n\r\nDiscount 模块索引：[v2.discount.add_discount](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1)\r\n\r\n---\r\n\r\n## Prerequisites\r\n\r\n1. 运行 `python scripts/check_auth_dependency.py`；exit code **42** → 先安装 **`linkfox-shopee-store-auth`**。\r\n2. Bundle Deal / Voucher 等其它促销模块 → 非本 skill。\r\n\r\n## 可用脚本（12 个 API）\r\n\r\n| 脚本 | API | Method |\r\n|------|-----|--------|\r\n| `add_discount.py` | add_discount | POST |\r\n| `add_discount_item.py` | add_discount_item | POST |\r\n| `get_discount_list.py` | get_discount_list | GET |\r\n| `get_discount.py` | get_discount | GET |\r\n| `update_discount.py` | update_discount | POST |\r\n| `update_discount_item.py` | update_discount_item | POST |\r\n| `end_discount.py` | end_discount | POST |\r\n| `delete_discount.py` | delete_discount | POST |\r\n| `delete_discount_item.py` | delete_discount_item | POST |\r\n| `get_sip_discounts.py` | get_sip_discounts | GET |\r\n| `set_sip_discount.py` | set_sip_discount | POST |\r\n| `delete_sip_discount.py` | delete_sip_discount | POST |\r\n| `discount_api.py` | 通用入口 | — |\r\n\r\n## Usage Scenarios\r\n\r\n### 1. 创建折扣活动\r\n1. `add_discount.py` 传完整 `body`（名称、时间、折扣类型等）\r\n2. `add_discount_item.py` 添加参与商品\r\n3. `get_discount_list.py` 确认活动状态\r\n\r\n### 2. 管理现有活动\r\n- `get_discount.py` 查详情\r\n- `update_discount.py` / `update_discount_item.py` 修改\r\n- `end_discount.py` 提前结束\r\n\r\n## Not Applicable\r\n\r\n- 店铺授权 → `linkfox-shopee-store-auth`\r\n- Bundle Deal / Voucher / Add-On Deal / Shop Flash Sale / Follow Prize → 其它促销模块 skill（Bundle Deal → `linkfox-shopee-store-bundle-deal`；Add-On Deal → `linkfox-shopee-store-add-on-deal`；Voucher → `linkfox-shopee-store-voucher`；Shop Flash Sale → `linkfox-shopee-store-shop-flash-sale`；Follow Prize → `linkfox-shopee-store-follow-prize`）\r\n- 商品 listing → `linkfox-shopee-store-product`\r\n\r\n**Feedback:** 见 `references/api.md`。\r\n\r\n\r\n---\r\n*For more high-quality, professional cross-border e-commerce skills, visit [LinkFox Skills](https://skill.linkfox.com/).*\n\nFile v1.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-shopee-store-discount\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1783067297421\n}\n\nFile v1.0.1:references/api.md\n\n# linkfox-shopee-store-discount — 参数与字段参考\r\n\r\nShopee **Discount 模块**全部 12 个 API，经 **`POST /shopee/developerProxy`** 转发。\r\n\r\n授权见 **`linkfox-shopee-store-auth`**。官方索引：[v2.discount.add_discount](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1)\r\n\r\n## 通用约定\r\n\r\n- **path**：须 `api/v2/discount/...`\r\n- **标识**：通常传 **`shopId`**\r\n- **官方文档 URL 规则**：`https://open.shopee.com/documents/v2/v2.discount.{api}?module=99&type=1`\r\n\r\n---\r\n\r\n## Discount 模块总览\r\n\r\n| # | API | Method | path | 脚本 | 官方文档 |\r\n|---|-----|--------|------|------|----------|\r\n| 1 | add_discount | POST | `api/v2/discount/add_discount` | `add_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1) |\r\n| 2 | add_discount_item | POST | `api/v2/discount/add_discount_item` | `add_discount_item.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.add_discount_item?module=99&type=1) |\r\n| 3 | delete_discount | POST | `api/v2/discount/delete_discount` | `delete_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.delete_discount?module=99&type=1) |\r\n| 4 | delete_discount_item | POST | `api/v2/discount/delete_discount_item` | `delete_discount_item.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.delete_discount_item?module=99&type=1) |\r\n| 5 | delete_sip_discount | POST | `api/v2/discount/delete_sip_discount` | `delete_sip_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.delete_sip_discount?module=99&type=1) |\r\n| 6 | end_discount | POST | `api/v2/discount/end_discount` | `end_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.end_discount?module=99&type=1) |\r\n| 7 | get_discount | GET | `api/v2/discount/get_discount` | `get_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.get_discount?module=99&type=1) |\r\n| 8 | get_discount_list | GET | `api/v2/discount/get_discount_list` | `get_discount_list.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.get_discount_list?module=99&type=1) |\r\n| 9 | get_sip_discounts | GET | `api/v2/discount/get_sip_discounts` | `get_sip_discounts.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.get_sip_discounts?module=99&type=1) |\r\n| 10 | set_sip_discount | POST | `api/v2/discount/set_sip_discount` | `set_sip_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.set_sip_discount?module=99&type=1) |\r\n| 11 | update_discount | POST | `api/v2/discount/update_discount` | `update_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.update_discount?module=99&type=1) |\r\n| 12 | update_discount_item | POST | `api/v2/discount/update_discount_item` | `update_discount_item.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.update_discount_item?module=99&type=1) |\r\n通用入口：`discount_api.py`（JSON 含 `\"api\": \"<上表 API 名>\"`）。\r\n\r\n---\r\n\r\n## 常用接口说明\r\n\r\n| API | 要点 |\r\n|-----|------|\r\n| `add_discount` | 创建折扣活动；POST `body` |\r\n| `add_discount_item` | 向活动添加商品/SKU |\r\n| `get_discount_list` | 折扣活动列表 |\r\n| `get_discount` | 单个活动详情 |\r\n| `update_discount` / `update_discount_item` | 更新活动/商品折扣 |\r\n| `end_discount` | 提前结束活动 |\r\n| `delete_discount` / `delete_discount_item` | 删除活动/商品 |\r\n| `get_sip_discounts` / `set_sip_discount` / `delete_sip_discount` | SIP 跨境折扣 |\r\n\r\n---\r\n\r\n## curl 示例\r\n\r\n```bash\r\ncurl -X POST ${LINKFOX_TOOL_GATEWAY}/shopee/developerProxy \\\r\n  -H \"Authorization: ${LINKFOX_AGENT_API_KEY}\" \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\r\n    \"path\": \"api/v2/discount/get_discount_list\",\r\n    \"method\": \"GET\",\r\n    \"accessToken\": \"xxx\",\r\n    \"shopId\": \"67890\",\r\n    \"queryString\": \"discount_status=ongoing&page_no=1&page_size=20\"\r\n  }'\r\n```\r\n\r\n---\r\n\r\n## Feedback API\r\n\r\n```bash\r\ncurl -X POST https://skill-api.linkfox.com/api/v1/public/feedback \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\"skillName\":\"linkfox-shopee-store-discount\",\"sentiment\":\"POSITIVE\",\r\n       \"category\":\"OTHER\",\"content\":\"折扣活动查询正常\"}'\r\n```\n\nArchive v1.0.0: 20 files, 19687 bytes\n\nFiles: references/api.md (4215b), scripts/_discount_api_runner.py (4287b), scripts/_discount_endpoints.py (3266b), scripts/_shopee_discount_common.py (11644b), scripts/add_discount_item.py (732b), scripts/add_discount.py (702b), scripts/check_auth_dependency.py (3985b), scripts/delete_discount_item.py (750b), scripts/delete_discount.py (720b), scripts/delete_sip_discount.py (744b), scripts/discount_api.py (1050b), scripts/end_discount.py (702b), scripts/get_discount_list.py (732b), scripts/get_discount.py (702b), scripts/get_sip_discounts.py (732b), scripts/set_sip_discount.py (726b), scripts/update_discount_item.py (750b), scripts/update_discount.py (720b), SKILL.md (4354b), _meta.json (148b)\n\nFile v1.0.0:SKILL.md\n\n---\r\nname: linkfox-shopee-store-discount\r\ndescription: Shopee（虾皮）店铺折扣促销 Discount（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Discount 模块全部 12 个接口：add_discount、get_discount_list、update_discount、add_discount_item、end_discount、SIP折扣等。当用户提到 Shopee 折扣、Discount、促销活动、限时折扣、add_discount、discount_id、打折活动 时触发。即使未明确提及\"折扣\"，只要涉及已授权 Shopee 店铺的折扣活动创建或管理，也应触发。\r\n---\r\n\r\n# Shopee 店铺 Discount\r\n\r\nShopee Open Platform **Discount 模块**（12 个 API）。**依赖 `linkfox-shopee-store-auth`**：先取 `accessToken`，再经 **`POST /shopee/developerProxy`** 转发（`path` 须 `api/v2/discount/...`）。\r\n\r\n## 调用方式\r\n\r\n- **API 端点**：`POST /shopee/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\r\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\r\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\r\n\r\n**输出策略（脚本默认行为）**：\r\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-shopee-store-discount-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\r\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\r\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\r\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\r\n\r\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\r\n\r\n## 官方参考\r\n\r\nDiscount 模块索引：[v2.discount.add_discount](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1)\r\n\r\n---\r\n\r\n## Prerequisites\r\n\r\n1. 运行 `python scripts/check_auth_dependency.py`；exit code **42** → 先安装 **`linkfox-shopee-store-auth`**。\r\n2. Bundle Deal / Voucher 等其它促销模块 → 非本 skill。\r\n\r\n## 可用脚本（12 个 API）\r\n\r\n| 脚本 | API | Method |\r\n|------|-----|--------|\r\n| `add_discount.py` | add_discount | POST |\r\n| `add_discount_item.py` | add_discount_item | POST |\r\n| `get_discount_list.py` | get_discount_list | GET |\r\n| `get_discount.py` | get_discount | GET |\r\n| `update_discount.py` | update_discount | POST |\r\n| `update_discount_item.py` | update_discount_item | POST |\r\n| `end_discount.py` | end_discount | POST |\r\n| `delete_discount.py` | delete_discount | POST |\r\n| `delete_discount_item.py` | delete_discount_item | POST |\r\n| `get_sip_discounts.py` | get_sip_discounts | GET |\r\n| `set_sip_discount.py` | set_sip_discount | POST |\r\n| `delete_sip_discount.py` | delete_sip_discount | POST |\r\n| `discount_api.py` | 通用入口 | — |\r\n\r\n## Usage Scenarios\r\n\r\n### 1. 创建折扣活动\r\n1. `add_discount.py` 传完整 `body`（名称、时间、折扣类型等）\r\n2. `add_discount_item.py` 添加参与商品\r\n3. `get_discount_list.py` 确认活动状态\r\n\r\n### 2. 管理现有活动\r\n- `get_discount.py` 查详情\r\n- `update_discount.py` / `update_discount_item.py` 修改\r\n- `end_discount.py` 提前结束\r\n\r\n## Not Applicable\r\n\r\n- 店铺授权 → `linkfox-shopee-store-auth`\r\n- Bundle Deal / Voucher / Add-On Deal / Shop Flash Sale / Follow Prize → 其它促销模块 skill（Bundle Deal → `linkfox-shopee-store-bundle-deal`；Add-On Deal → `linkfox-shopee-store-add-on-deal`；Voucher → `linkfox-shopee-store-voucher`；Shop Flash Sale → `linkfox-shopee-store-shop-flash-sale`；Follow Prize → `linkfox-shopee-store-follow-prize`）\r\n- 商品 listing → `linkfox-shopee-store-product`\r\n\r\n**Feedback:** 见 `references/api.md`。\r\n\r\n\r\n---\r\n*For more high-quality, professional cross-border e-commerce skills, visit [LinkFox Skills](https://skill.linkfox.com/).*\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-shopee-store-discount\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1782999555342\n}\n\nFile v1.0.0:references/api.md\n\n# linkfox-shopee-store-discount — 参数与字段参考\r\n\r\nShopee **Discount 模块**全部 12 个 API，经 **`POST /shopee/developerProxy`** 转发。\r\n\r\n授权见 **`linkfox-shopee-store-auth`**。官方索引：[v2.discount.add_discount](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1)\r\n\r\n## 通用约定\r\n\r\n- **path**：须 `api/v2/discount/...`\r\n- **标识**：通常传 **`shopId`**\r\n- **官方文档 URL 规则**：`https://open.shopee.com/documents/v2/v2.discount.{api}?module=99&type=1`\r\n\r\n---\r\n\r\n## Discount 模块总览\r\n\r\n| # | API | Method | path | 脚本 | 官方文档 |\r\n|---|-----|--------|------|------|----------|\r\n| 1 | add_discount | POST | `api/v2/discount/add_discount` | `add_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1) |\r\n| 2 | add_discount_item | POST | `api/v2/discount/add_discount_item` | `add_discount_item.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.add_discount_item?module=99&type=1) |\r\n| 3 | delete_discount | POST | `api/v2/discount/delete_discount` | `delete_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.delete_discount?module=99&type=1) |\r\n| 4 | delete_discount_item | POST | `api/v2/discount/delete_discount_item` | `delete_discount_item.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.delete_discount_item?module=99&type=1) |\r\n| 5 | delete_sip_discount | POST | `api/v2/discount/delete_sip_discount` | `delete_sip_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.delete_sip_discount?module=99&type=1) |\r\n| 6 | end_discount | POST | `api/v2/discount/end_discount` | `end_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.end_discount?module=99&type=1) |\r\n| 7 | get_discount | GET | `api/v2/discount/get_discount` | `get_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.get_discount?module=99&type=1) |\r\n| 8 | get_discount_list | GET | `api/v2/discount/get_discount_list` | `get_discount_list.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.get_discount_list?module=99&type=1) |\r\n| 9 | get_sip_discounts | GET | `api/v2/discount/get_sip_discounts` | `get_sip_discounts.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.get_sip_discounts?module=99&type=1) |\r\n| 10 | set_sip_discount | POST | `api/v2/discount/set_sip_discount` | `set_sip_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.set_sip_discount?module=99&type=1) |\r\n| 11 | update_discount | POST | `api/v2/discount/update_discount` | `update_discount.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.update_discount?module=99&type=1) |\r\n| 12 | update_discount_item | POST | `api/v2/discount/update_discount_item` | `update_discount_item.py` | [doc](https://open.shopee.com/documents/v2/v2.discount.update_discount_item?module=99&type=1) |\r\n通用入口：`discount_api.py`（JSON 含 `\"api\": \"<上表 API 名>\"`）。\r\n\r\n---\r\n\r\n## 常用接口说明\r\n\r\n| API | 要点 |\r\n|-----|------|\r\n| `add_discount` | 创建折扣活动；POST `body` |\r\n| `add_discount_item` | 向活动添加商品/SKU |\r\n| `get_discount_list` | 折扣活动列表 |\r\n| `get_discount` | 单个活动详情 |\r\n| `update_discount` / `update_discount_item` | 更新活动/商品折扣 |\r\n| `end_discount` | 提前结束活动 |\r\n| `delete_discount` / `delete_discount_item` | 删除活动/商品 |\r\n| `get_sip_discounts` / `set_sip_discount` / `delete_sip_discount` | SIP 跨境折扣 |\r\n\r\n---\r\n\r\n## curl 示例\r\n\r\n```bash\r\ncurl -X POST ${LINKFOX_AGENT_API_URL}/shopee/developerProxy \\\r\n  -H \"Authorization: ${LINKFOX_AGENT_API_KEY}\" \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\r\n    \"path\": \"api/v2/discount/get_discount_list\",\r\n    \"method\": \"GET\",\r\n    \"accessToken\": \"xxx\",\r\n    \"shopId\": \"67890\",\r\n    \"queryString\": \"discount_status=ongoing&page_no=1&page_size=20\"\r\n  }'\r\n```\r\n\r\n---\r\n\r\n## Feedback API\r\n\r\n```bash\r\ncurl -X POST https://skill-api.linkfox.com/api/v1/public/feedback \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\"skillName\":\"linkfox-shopee-store-discount\",\"sentiment\":\"POSITIVE\",\r\n       \"category\":\"OTHER\",\"content\":\"折扣活动查询正常\"}'\r\n```","readmeExcerpt":"Skill: Shopee-店铺折扣 Owner: linkfox-ai Summary: Shopee（虾皮）店铺折扣促销 Discount（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Discount 模块全部 12 个接口：add_discount、get_discount_list、update_discount、add_discount_item、end_discount、SIP折扣等。当用户提到 Shopee 折扣、Discount、促销活动、限时折扣、add_discount、discount_id、打折活动 时触发。即使未明确提及\"折扣\"，只要涉及已授权 Shopee 店铺的折扣活动创建或管理，也应触发。 Tags: latest:1.0.6 Version history: v1.0.6 | 2026-","codeSnippets":[],"executableExamples":[{"language":"text","snippet":"File v1.0.6:references/apis/add-discount-item.md\n\n# add_discount_item\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/add_discount_item.py` |\n| Method / path | POST `api/v2/discount/add_discount_item` |\n| 官方文档 | [add_discount_item](https://open.shopee.com/documents/v2/v2.discount.add_discount_item?module=99&type=1) |\n| 用途 | Add items to discount; pass body |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Add items to discount; pass body\n\n---\n\n## 调用示例"},{"language":"text","snippet":"---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`addDiscountItem`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.6:references/apis/add-discount.md\n\n# add_discount\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/add_discount.py` |\n| Method / path | POST `api/v2/discount/add_discount` |\n| 官方文档 | [add_discount](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1) |\n| 用途 | Create discount promotion; pass full body |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Create discount promotion; pass full body\n\n---\n\n## 调用示例"},{"language":"text","snippet":"---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`addDiscount`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.6:references/apis/delete-discount-item.md\n\n# delete_discount_item\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/delete_discount_item.py` |\n| Method / path | POST `api/v2/discount/delete_discount_item` |\n| 官方文档 | [delete_discount_item](https://open.shopee.com/documents/v2/v2.discount.delete_discount_item?module=99&type=1) |\n| 用途 | Remove items from discount |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Remove items from discount\n\n---\n\n## 调用示例"},{"language":"text","snippet":"---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`deleteDiscountItem`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.6:references/apis/delete-discount.md\n\n# delete_discount\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/delete_discount.py` |\n| Method / path | POST `api/v2/discount/delete_discount` |\n| 官方文档 | [delete_discount](https://open.shopee.com/documents/v2/v2.discount.delete_discount?module=99&type=1) |\n| 用途 | Delete discount; pass body with discount_id |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Delete discount; pass body with discount_id\n\n---\n\n## 调用示例"},{"language":"text","snippet":"---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`deleteDiscount`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.6:references/apis/delete-sip-discount.md\n\n# delete_sip_discount\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/delete_sip_discount.py` |\n| Method / path | POST `api/v2/discount/delete_sip_discount` |\n| 官方文档 | [delete_sip_discount](https://open.shopee.com/documents/v2/v2.discount.delete_sip_discount?module=99&type=1) |\n| 用途 | Delete SIP discount |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Delete SIP discount\n\n---\n\n## 调用示例"},{"language":"text","snippet":"---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`deleteSipDiscount`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\nFile v1.0.6:references/apis/end-discount.md\n\n# end_discount\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/end_discount.py` |\n| Method / path | POST `api/v2/discount/end_discount` |\n| 官方文档 | [end_discount](https://open.shopee.com/documents/v2/v2.discount.end_discount?module=99&type=1) |\n| 用途 | End discount early |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：End discount early\n\n---\n\n## 调用示例"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: linkfox-shopee-store-discount\ndescription: Shopee（虾皮）店铺折扣促销 Discount（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Discount 模块全部 12 个接口：add_discount、get_discount_list、update_discount、add_discount_item、end_discount、SIP折扣等。当用户提到 Shopee 折扣、Discount、促销活动、限时折扣、add_discount、discount_id、打折活动 时触发。即使未明确提及\"折扣\"，只要涉及已授权 Shopee 店铺的折扣活动创建或管理，也应触发。\n---\n\n# Shopee 店铺 Discount\n\nShopee Open Platform **Discount 模块**（12 个 API）。**依赖 `linkfox-shopee-store-auth`** 选店；经 **`POST /shopee/developerProxy`** 传入 `shopId`（或 `merchantId`），由服务端解析 token 转发（`path` 须 `api/v2/discount/...`）。\n\n## 调用方式\n\n- **API 端点**：`POST /shopee/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗算力；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-shopee-store-discount-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\n\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\n\n## 解决认证和算力问题\n发生以下异常情况时，采用 references/onboarding.md 引导解决问题：\n\n### 异常情况\n- **未配置API Key**：环境变量未配置 `LINKFOX_AGENT_API_KEY`，也未配置 `LINKFOXAGENT_API_KEY`。\n- **响应401或402状态码**\n- **响应提示算力或余额不足**：消息含\"算力余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值\"，或类似含义的内容。\n\n## 官方参考\n\nDiscount 模块索引：[v2.discount.add_discount](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1)\n\n---\n\n## Prerequisites\n\n1. 运行 `python scripts/check_auth_dependency.py`；exit code **42** → 先安装 **`linkfox-shopee-store-auth`**。\n2. Bundle Deal / Voucher 等其它促销模块 → 非本 skill。\n\n## 可用脚本（12 个 API）\n\n| 脚本 | API | Method |\n|------|-----|--------|\n| `add_discount.py` | add_discount | POST |\n| `add_discount_item.py` | add_discount_item | POST |\n| `get_discount_list.py` | get_discount_list | GET |\n| `get_discount.py` | get_discount | GET |\n| `update_discount.py` | update_discount | POST |\n| `update_discount_item.py` | update_discount_item | POST |\n| `end_discount.py` | end_discount | POST |\n| `delete_discount.py` | delete_discount | POST |\n| `delete_discount_item.py` | delete_discount_item | POST |\n| `get_sip_discounts.py` | get_sip_discounts | GET |\n| `set_sip_discount.py` | set_sip_discount | POST |\n| `delete_sip_discount.py` | delete_sip_discount | POST |\n| `discount_api.py` | 通用入口 | — |\n\n## 接口说明（按 API）\n\n入参与响应细节放在 `references/apis/`，SKILL 只保留索引。\n\n| API | 说明文档 |\n|-----|----------|\n| `add_discount` | [references/apis/add-discount.md](./references/apis/add-discount.md) |\n| `add_discount_item` | [references/apis/add-discount-item.md](./references/apis/add-discount-item.md) |\n| `delete_discount` | [references/apis/delete-discount.md](./references/apis/delete-discount.md"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-shopee-store-discount\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1789363608195\n}"},{"path":"references/api.md","content":"# linkfox-shopee-store-discount — 参数与字段参考\r\n\r\n> 单接口入参/响应说明已拆到 **`apis/`**（按 API 一份）；本文件保留模块总览与 Feedback。\r\nShopee **Discount 模块**全部 12 个 API，经 **`POST /shopee/developerProxy`** 转发。\r\n\r\n授权见 **`linkfox-shopee-store-auth`**。官方索引：[v2.discount.add_discount](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1)\r\n\r\n## 通用约定\r\n\r\n- **path**：须 `api/v2/discount/...`\r\n- **标识**：通常传 **`shopId`**\r\n- **官方文档 URL 规则**：`https://open.shopee.com/documents/v2/v2.discount.{api}?module=99&type=1`\r\n\r\n---\r\n\r\n## Discount 模块总览\r\n\r\n| # | API | Method | path | 脚本 | 官方文档 |\r\n|---|-----|--------|------|------|----------|\r\n| 1 | add_discount | POST | `api/v2/discount/add_discount` | `add_discount.py` | [apis/add-discount.md](./apis/add-discount.md) |\r\n| 2 | add_discount_item | POST | `api/v2/discount/add_discount_item` | `add_discount_item.py` | [apis/add-discount-item.md](./apis/add-discount-item.md) |\r\n| 3 | delete_discount | POST | `api/v2/discount/delete_discount` | `delete_discount.py` | [apis/delete-discount.md](./apis/delete-discount.md) |\r\n| 4 | delete_discount_item | POST | `api/v2/discount/delete_discount_item` | `delete_discount_item.py` | [apis/delete-discount-item.md](./apis/delete-discount-item.md) |\r\n| 5 | delete_sip_discount | POST | `api/v2/discount/delete_sip_discount` | `delete_sip_discount.py` | [apis/delete-sip-discount.md](./apis/delete-sip-discount.md) |\r\n| 6 | end_discount | POST | `api/v2/discount/end_discount` | `end_discount.py` | [apis/end-discount.md](./apis/end-discount.md) |\r\n| 7 | get_discount | GET | `api/v2/discount/get_discount` | `get_discount.py` | [apis/get-discount.md](./apis/get-discount.md) |\r\n| 8 | get_discount_list | GET | `api/v2/discount/get_discount_list` | `get_discount_list.py` | [apis/get-discount-list.md](./apis/get-discount-list.md) |\r\n| 9 | get_sip_discounts | GET | `api/v2/discount/get_sip_discounts` | `get_sip_discounts.py` | [apis/get-sip-discounts.md](./apis/get-sip-discounts.md) |\r\n| 10 | set_sip_discount | POST | `api/v2/discount/set_sip_discount` | `set_sip_discount.py` | [apis/set-sip-discount.md](./apis/set-sip-discount.md) |\r\n| 11 | update_discount | POST | `api/v2/discount/update_discount` | `update_discount.py` | [apis/update-discount.md](./apis/update-discount.md) |\r\n| 12 | update_discount_item | POST | `api/v2/discount/update_discount_item` | `update_discount_item.py` | [apis/update-discount-item.md](./apis/update-discount-item.md) |\r\n通用入口：`discount_api.py`（JSON 含 `\"api\": \"<上表 API 名>\"`）。\r\n\r\n---\r\n\r\n## 常用接口说明\r\n\r\n| API | 要点 |\r\n|-----|------|\r\n| `add_discount` | 创建折扣活动；POST `body` — [apis/add-discount.md](./apis/add-discount.md) |\r\n| `add_discount_item` | 向活动添加商品/SKU — [apis/add-discount-item.md](./apis/add-discount-item.md) |\r\n| `get_discount_list` | 折扣活动列表 — [apis/get-discount-list.md](./apis/get-discount-list.md) |\r\n| `get_discount` | 单个活动详情 — [apis/get-discount.md](./apis/get-discount.md) |\r\n| `update_discount` / `update_discount_item` | 更新活动/商品折扣 |\r\n| `end_discount` | 提前结束活动 — [apis/end-discoun"},{"path":"references/apis/add-discount-item.md","content":"# add_discount_item\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/add_discount_item.py` |\n| Method / path | POST `api/v2/discount/add_discount_item` |\n| 官方文档 | [add_discount_item](https://open.shopee.com/documents/v2/v2.discount.add_discount_item?module=99&type=1) |\n| 用途 | Add items to discount; pass body |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Add items to discount; pass body\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/add_discount_item.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"add_discount_item\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`addDiscountItem`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准"},{"path":"references/apis/add-discount.md","content":"# add_discount\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/add_discount.py` |\n| Method / path | POST `api/v2/discount/add_discount` |\n| 官方文档 | [add_discount](https://open.shopee.com/documents/v2/v2.discount.add_discount?module=99&type=1) |\n| 用途 | Create discount promotion; pass full body |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Create discount promotion; pass full body\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/add_discount.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/discount_api.py '{\"api\": \"add_discount\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`addDiscount`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1092,"uniquenessScore":32,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T22:03:00.980Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-11T22:03:00.980Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-12T13:32:38.947Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}