linkfox-shopee-store-ads
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseShopee 店铺 Ads
Shopee 店铺 Ads
Shopee Open Platform Ads 模块(23 个 API,不含即将下线的 auto product ads)。依赖 ;须目标店存在 授权。经 传入 (或 )+ 路径,服务端自动走 AD 应用 Token(勿传 / )。
linkfox-shopee-store-authappType=adPOST /shopee/developerProxyshopIdmerchantIdapi/v2/ads/...accessTokenappTypeShopee Open Platform Ads 模块(23 个 API,不含即将下线的 auto product ads)。依赖 ;须目标店存在 授权。经 传入 (或 )+ 路径,服务端自动走 AD 应用 Token(勿传 / )。
linkfox-shopee-store-authappType=adPOST /shopee/developerProxyshopIdmerchantIdapi/v2/ads/...accessTokenappType调用方式
调用方式
- API 端点:(不同操作通过请求体区分;完整参数/响应/错误码见
POST /shopee/developerProxy)references/api.md - Python 脚本:(可用脚本见上文脚本一览)
python scripts/<脚本名>.py '<JSON 参数>' [--inline] - 成本约束:本工具会消耗积分;失败/空结果不得自动换关键词、翻页或连续试探;需要继续检索时先向用户说明会产生额外消耗。
输出策略(脚本默认行为):
- 始终将完整响应写入 (
<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-shopee-store-ads-<timestamp>.json为脚本执行时的工作目录,在 Claude Code 里即当前项目目录;<cwd>取自环境变量<session>,按用户任务自动聚合;禁止写入 /tmp,当前目录不可写则报错)SESSION_ID - 响应体 ≤ 8 KB:落盘后把完整 JSON 打印到 stdout
- 响应体 > 8 KB:落盘后 stdout 只输出摘要(顶层字段、常见计数如 /
total、最大列表字段的长度 + 前 3 条样本)costToken - 加 强制全量打印到 stdout(同样落盘)
--inline
读数据建议:先看摘要判断是否足够;需要具体字段时优先用 或 从保存的 json 文件按需抽取,避免整份 JSON 进入上下文。
jqConvertFrom-Json- API 端点:(不同操作通过请求体区分;完整参数/响应/错误码见
POST /shopee/developerProxy)references/api.md - Python 脚本:(可用脚本见上文脚本一览)
python scripts/<脚本名>.py '<JSON 参数>' [--inline] - 成本约束:本工具会消耗积分;失败/空结果不得自动换关键词、翻页或连续试探;需要继续检索时先向用户说明会产生额外消耗。
输出策略(脚本默认行为):
- 始终将完整响应写入 (
<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-shopee-store-ads-<timestamp>.json为脚本执行时的工作目录,在 Claude Code 里即当前项目目录;<cwd>取自环境变量<session>,按用户任务自动聚合;禁止写入 /tmp,当前目录不可写则报错)SESSION_ID - 响应体 ≤ 8 KB:落盘后把完整 JSON 打印到 stdout
- 响应体 > 8 KB:落盘后 stdout 只输出摘要(顶层字段、常见计数如 /
total、最大列表字段的长度 + 前 3 条样本)costToken - 加 强制全量打印到 stdout(同样落盘)
--inline
读数据建议:先看摘要判断是否足够;需要具体字段时优先用 或 从保存的 json 文件按需抽取,避免整份 JSON 进入上下文。
jqConvertFrom-Json解决认证和积分问题
解决认证和积分问题
发生以下异常情况时,采用 references/onboarding.md 引导解决问题:
发生以下异常情况时,采用 references/onboarding.md 引导解决问题:
异常情况
异常情况
- 未配置API Key:环境变量未配置 ,也未配置
LINKFOX_AGENT_API_KEY。LINKFOXAGENT_API_KEY - 响应401或402状态码
- 响应提示积分或余额不足:消息含"积分余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值",或类似含义的内容。
- 未配置API Key:环境变量未配置 ,也未配置
LINKFOX_AGENT_API_KEY。LINKFOXAGENT_API_KEY - 响应401或402状态码
- 响应提示积分或余额不足:消息含"积分余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值",或类似含义的内容。
官方参考
官方参考
Ads 模块索引:v2.ads.get_total_balance
Ads 模块索引:v2.ads.get_total_balance
Prerequisites(必须先读)
Prerequisites(必须先读)
- 运行 ;exit code 42 → 先安装
python scripts/check_auth_dependency.py。linkfox-shopee-store-auth - 不要在本 skill 内实现授权/令牌逻辑;授权一律走 auth skill。
- 调用业务 API 之前,用 auth 的 确认目标店存在
authorized_stores.py:appType=ad- 仅有 (或历史空值)→ 不能当广告已授权;引导
appType=erp且传authorize_url.pyappType=ad - 两项都缺 → 若用户只要广告,只开 AD 授权即可(不必先开 ERP)
- 仅有
- Ads API 还需 Shopee 侧开通广告能力;并非所有站点/店铺可用。
- 禁止向 传
developerProxy或accessToken;path 用appType即可由服务端路由到 AD。api/v2/ads/**
- 运行 ;exit code 42 → 先安装
python scripts/check_auth_dependency.py。linkfox-shopee-store-auth - 不要在本 skill 内实现授权/令牌逻辑;授权一律走 auth skill。
- 调用业务 API 之前,用 auth 的 确认目标店存在
authorized_stores.py:appType=ad- 仅有 (或历史空值)→ 不能当广告已授权;引导
appType=erp且传authorize_url.pyappType=ad - 两项都缺 → 若用户只要广告,只开 AD 授权即可(不必先开 ERP)
- 仅有
- Ads API 还需 Shopee 侧开通广告能力;并非所有站点/店铺可用。
- 禁止向 传
developerProxy或accessToken;path 用appType即可由服务端路由到 AD。api/v2/ads/**
Core Concepts
Core Concepts
- AD 与 ERP 分离:广告 Token 与 ERP Token 独立;店铺在列表中存在 ≠ 广告已授权
- 转发链路:(
developerProxy/shopId+merchantId,服务端注入 AD token)→ 紫鸟api/v2/ads/...→ Shopee APIshopee-proxy/ad/... - 余额:查广告账户余额
get_total_balance - 手动商品广告:→
create_manual_product_ads/edit_manual_product_adsedit_manual_product_ad_keywords - 效果报表:、
get_all_cpc_ads_*_performanceget_product_campaign_*_performance - GMS:等系列
create_gms_product_campaign - 未纳入:、
create_auto_product_ads(官方标注 coming offline soon)edit_auto_product_ads - 联盟营销 AMS(module=127)→ 非本 skill
- AD 与 ERP 分离:广告 Token 与 ERP Token 独立;店铺在列表中存在 ≠ 广告已授权
- 转发链路:(
developerProxy/shopId+merchantId,服务端注入 AD token)→ 紫鸟api/v2/ads/...→ Shopee APIshopee-proxy/ad/... - 余额:查广告账户余额
get_total_balance - 手动商品广告:→
create_manual_product_ads/edit_manual_product_adsedit_manual_product_ad_keywords - 效果报表:、
get_all_cpc_ads_*_performanceget_product_campaign_*_performance - GMS:等系列
create_gms_product_campaign - 未纳入:、
create_auto_product_ads(官方标注 coming offline soon)edit_auto_product_ads - 联盟营销 AMS(module=127)→ 非本 skill
可用脚本(Ads 模块 23 个 API)
可用脚本(Ads 模块 23 个 API)
| 分组 | 脚本 |
|---|---|
| 账户/推荐 | |
| CPC 效果 | |
| 商品广告 | |
| GMS | |
| 通用入口 | |
完整列表见 。共享:、、。
references/api.md_shopee_ads_common.py_ads_endpoints.py_ads_api_runner.py| 分组 | 脚本 |
|---|---|
| 账户/推荐 | |
| CPC 效果 | |
| 商品广告 | |
| GMS | |
| 通用入口 | |
完整列表见 。共享:、、。
references/api.md_shopee_ads_common.py_ads_endpoints.py_ads_api_runner.py接口说明(按 API)
接口说明(按 API)
入参与响应细节放在 ,SKILL 只保留索引。
references/apis/| API | 说明文档 |
|---|---|
| references/apis/check-create-gms-product-campaign-eligibility.md |
| references/apis/create-gms-product-campaign.md |
| references/apis/create-manual-product-ads.md |
| references/apis/edit-gms-item-product-campaign.md |
| references/apis/edit-gms-product-campaign.md |
| references/apis/edit-manual-product-ad-keywords.md |
| references/apis/edit-manual-product-ads.md |
| references/apis/get-ads-facil-shop-rate.md |
| references/apis/get-all-cpc-ads-daily-performance.md |
| references/apis/get-all-cpc-ads-hourly-performance.md |
| references/apis/get-create-product-ad-budget-suggestion.md |
| references/apis/get-gms-campaign-performance.md |
| references/apis/get-gms-item-performance.md |
| references/apis/get-product-campaign-daily-performance.md |
| references/apis/get-product-campaign-hourly-performance.md |
| references/apis/get-product-level-campaign-id-list.md |
| references/apis/get-product-level-campaign-setting-info.md |
| references/apis/get-product-recommended-roi-target.md |
| references/apis/get-recommended-item-list.md |
| references/apis/get-recommended-keyword-list.md |
| references/apis/get-shop-toggle-info.md |
| references/apis/get-total-balance.md |
| references/apis/list-gms-user-deleted-item.md |
模块总览 / Feedback 见 references/api.md。
入参与响应细节放在 ,SKILL 只保留索引。
references/apis/| API | 说明文档 |
|---|---|
| references/apis/check-create-gms-product-campaign-eligibility.md |
| references/apis/create-gms-product-campaign.md |
| references/apis/create-manual-product-ads.md |
| references/apis/edit-gms-item-product-campaign.md |
| references/apis/edit-gms-product-campaign.md |
| references/apis/edit-manual-product-ad-keywords.md |
| references/apis/edit-manual-product-ads.md |
| references/apis/get-ads-facil-shop-rate.md |
| references/apis/get-all-cpc-ads-daily-performance.md |
| references/apis/get-all-cpc-ads-hourly-performance.md |
| references/apis/get-create-product-ad-budget-suggestion.md |
| references/apis/get-gms-campaign-performance.md |
| references/apis/get-gms-item-performance.md |
| references/apis/get-product-campaign-daily-performance.md |
| references/apis/get-product-campaign-hourly-performance.md |
| references/apis/get-product-level-campaign-id-list.md |
| references/apis/get-product-level-campaign-setting-info.md |
| references/apis/get-product-recommended-roi-target.md |
| references/apis/get-recommended-item-list.md |
| references/apis/get-recommended-keyword-list.md |
| references/apis/get-shop-toggle-info.md |
| references/apis/get-total-balance.md |
| references/apis/list-gms-user-deleted-item.md |
模块总览 / Feedback 见 references/api.md。
Usage Scenarios
Usage Scenarios
0. 确认 AD 授权(每次任务开头)
0. 确认 AD 授权(每次任务开头)
- auth:→ 找目标
authorized_stores.py且shopIdappType=ad - 缺失 → auth:传
authorize_url.py,提示用户完成广告授权(URL 1 小时有效)appType=ad - 完成后再进入下列业务场景;收到 1004 时优先怀疑缺 AD 授权,不要用 ERP 记录硬调
- auth:→ 找目标
authorized_stores.py且shopIdappType=ad - 缺失 → auth:传
authorize_url.py,提示用户完成广告授权(URL 1 小时有效)appType=ad - 完成后再进入下列业务场景;收到 1004 时优先怀疑缺 AD 授权,不要用 ERP 记录硬调
1. 查余额与推荐
1. 查余额与推荐
get_total_balance.py- /
get_recommended_item_list.pyget_recommended_keyword_list.py
get_total_balance.py- /
get_recommended_item_list.pyget_recommended_keyword_list.py
2. 创建手动商品广告
2. 创建手动商品广告
get_create_product_ad_budget_suggestion.py- 传完整
create_manual_product_ads.pybody - 查效果
get_product_campaign_daily_performance.py
get_create_product_ad_budget_suggestion.py- 传完整
create_manual_product_ads.pybody - 查效果
get_product_campaign_daily_performance.py
调用原则
调用原则
- 先确认 ,再调脚本
appType=ad - 先看 / 网关
developerProxy.httpStatus,再读errcode字段*Response - GET:业务参数放 JSON 顶层
- POST:复杂接口传 ;create/edit 建议传唯一
body防重复reference_id - 每个脚本 docstring 含 官方文档 URL()
module=117 - 不要先 取 raw token,也不要在 proxy 里塞
storeTokensaccessToken
- 先确认 ,再调脚本
appType=ad - 先看 / 网关
developerProxy.httpStatus,再读errcode字段*Response - GET:业务参数放 JSON 顶层
- POST:复杂接口传 ;create/edit 建议传唯一
body防重复reference_id - 每个脚本 docstring 含 官方文档 URL()
module=117 - 不要先 取 raw token,也不要在 proxy 里塞
storeTokensaccessToken
Not Applicable
Not Applicable
- 店铺授权 →
linkfox-shopee-store-auth - 商品 listing →
linkfox-shopee-store-product - 联盟营销 AMS(module=127)→
linkfox-shopee-store-ams - Amazon 广告 → 系列
linkfox-amazon-ads-*
- 店铺授权 →
linkfox-shopee-store-auth - 商品 listing →
linkfox-shopee-store-product - 联盟营销 AMS(module=127)→
linkfox-shopee-store-ams - Amazon 广告 → 系列
linkfox-amazon-ads-*
积分消耗规则
积分消耗规则
不消耗积分。
Feedback:
Auto-detect and report feedback via the Feedback API when any of the following apply:
- The functionality or purpose described in this skill does not match actual behavior
- The skill's results do not match the user's intent
- The user expresses dissatisfaction or praise about this skill
- Anything you believe could be improved
Call the feedback API as specified in . Do not interrupt the user's flow.
references/api.mdFor more high-quality, professional cross-border e-commerce skills, visit LinkFox Skills.
不消耗积分。
Feedback:
Auto-detect and report feedback via the Feedback API when any of the following apply:
- The functionality or purpose described in this skill does not match actual behavior
- The skill's results do not match the user's intent
- The user expresses dissatisfaction or praise about this skill
- Anything you believe could be improved
Call the feedback API as specified in . Do not interrupt the user's flow.
references/api.mdFor more high-quality, professional cross-border e-commerce skills, visit LinkFox Skills.