linkfox-amazon-store-report

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Amazon 店铺报告获取

Amazon Store Report Retrieval

本 skill 提供 亚马逊卖家后台报告的端到端自动化获取:请求 → 轮询 → 下载 → 解压 → 预览。支持 95+ 种报告类型(库存 / 订单 / 销售 / 财务 / FBA / 退货 / Brand Analytics 等)。

This skill provides end-to-end automated retrieval of reports from Amazon Seller Central: request → polling → download → decompression → preview. It supports over 95 report types (inventory / orders / sales / finance / FBA / returns / Brand Analytics, etc.).

⚠️ Prerequisites — MUST READ FIRST

⚠️ Prerequisites — MUST READ FIRST

本 skill 依赖
linkfox-amazon-store-auth
(授权与店铺/令牌管理)。
🛑 如果
linkfox-amazon-store-auth
未安装 / 未加载,请先安装它,再回到本 skill。
This skill depends on
linkfox-amazon-store-auth
(authorization and store/token management).
🛑 If
linkfox-amazon-store-auth
is not installed / loaded, please install it first before using this skill.

怎样判断
linkfox-amazon-store-auth
是否可用

How to Check if
linkfox-amazon-store-auth
is Available

在执行任何报告任务之前,agent 必须先进行依赖检查:
  1. 读取下列任一路径(skill 加载路径取决于运行环境;
    scripts/check_auth_dependency.py
    会按相同规则自动探测):
    • 仓库 / 通用扁平目录:
      <skills_dir>/linkfox-amazon-store-auth/SKILL.md
    • Claude:
      ~/.claude/skills/linkfox-amazon-store-auth/SKILL.md
    • Cursor:
      ~/.cursor/skills/...
      ~/.cursor/skills-cursor/...
    • OpenClaw
      <OPENCLAW_WORKSPACE>/skills/...
      ~/.openclaw/skills/...
      ~/.agents/skills/...
      (与 OpenClaw Skills 文档 的常见路径一致)
    • Hermes Agent
      ~/.hermes/skills/<category>/linkfox-amazon-store-auth/SKILL.md
      ,以及
      ~/.hermes/plugins/<plugin>/skills/linkfox-amazon-store-auth/SKILL.md
      (与 Hermes Skills 文档 的布局一致)
  2. 或直接运行脚本
    python scripts/check_auth_dependency.py
    ,脚本会在缺失时以 exit code
    42
    退出,并在 stderr 输出结构化提示(以
    DEPENDENCY_MISSING:
    开头)。脚本已内置 OpenClaw / Hermes 路径判断;若在 Hermes 的
    config.yaml
    里配置了
    skills.external_dirs
    ,请设置环境变量
    HERMES_SKILLS_EXTERNAL_DIRS
    (使用系统路径分隔符串联多个目录)以便探测。
  3. 如果上述检查全部失败,则判定为
    linkfox-amazon-store-auth
    未安装
Before executing any report tasks, the agent must perform dependency checks first:
  1. Read any of the following paths (skill loading path depends on the runtime environment;
    scripts/check_auth_dependency.py
    will automatically detect following the same rules):
    • Repository / general flat directory:
      <skills_dir>/linkfox-amazon-store-auth/SKILL.md
    • Claude:
      ~/.claude/skills/linkfox-amazon-store-auth/SKILL.md
    • Cursor:
      ~/.cursor/skills/...
      ~/.cursor/skills-cursor/...
    • OpenClaw:
      <OPENCLAW_WORKSPACE>/skills/...
      ~/.openclaw/skills/...
      ~/.agents/skills/...
      (consistent with common paths in OpenClaw Skills Documentation)
    • Hermes Agent:
      ~/.hermes/skills/<category>/linkfox-amazon-store-auth/SKILL.md
      , and
      ~/.hermes/plugins/<plugin>/skills/linkfox-amazon-store-auth/SKILL.md
      (consistent with the layout in Hermes Skills Documentation)
  2. Or run the script directly:
    python scripts/check_auth_dependency.py
    , the script will exit with exit code
    42
    when the dependency is missing, and output structured prompts starting with
    DEPENDENCY_MISSING:
    to stderr. The script has built-in path judgment for OpenClaw / Hermes; if
    skills.external_dirs
    is configured in Hermes'
    config.yaml
    , please set the environment variable
    HERMES_SKILLS_EXTERNAL_DIRS
    (concatenate multiple directories with system path separators) for detection.
  3. If all the above checks fail, it is determined that
    linkfox-amazon-store-auth
    is not installed
    .

发现未安装时的标准处置

Standard Handling When Dependency Is Not Installed

当检测到
linkfox-amazon-store-auth
未安装时,agent 必须按以下顺序执行:
  1. 尝试自动安装(优先):
    • 如果当前运行时具备 skill 安装工具(例如 skill 市场 / skill 管理 MCP /
      install_skill
      类工具),立即调用安装
      linkfox-amazon-store-auth
    • 安装成功后,重新加载并从头执行本 skill。
  2. 引导用户手动安装(兜底):
    • 向用户说明:「本技能依赖
      linkfox-amazon-store-auth
      ,尚未安装。请前往 LinkFox Skills 安装该 skill,安装完成后告诉我一声,我会继续为你拉取报告。」
    • 不要绕过依赖直接去调
      /spApi/authorizeUrl
      /spApi/storeTokens
      /spApi/authorizedStores
      等接口——这些接口的选店铺、令牌流程属于
      linkfox-amazon-store-auth
      的职责,本 skill 只负责报告业务本身。
  3. 不得静默降级:如果既无法自动安装也未获得用户确认,必须停止执行并把依赖缺失的事实回报给用户,不要擅自尝试替代方案。
When detecting that
linkfox-amazon-store-auth
is not installed, the agent must follow the steps below in order:
  1. Attempt automatic installation (priority):
    • If the current runtime has a skill installation tool (such as skill marketplace / skill management MCP /
      install_skill
      -like tools), call it immediately to install
      linkfox-amazon-store-auth
      .
    • After successful installation, reload and execute this skill from the beginning.
  2. Guide users to install manually (fallback):
    • Explain to the user: "This skill depends on
      linkfox-amazon-store-auth
      , which has not been installed yet. Please go to LinkFox Skills to install this skill, and let me know when it's done, I will continue to pull the report for you."
    • Do not bypass the dependency to directly call interfaces like
      /spApi/authorizeUrl
      ,
      /spApi/storeTokens
      ,
      /spApi/authorizedStores
      — the store selection and token processes for authorization are the responsibilities of
      linkfox-amazon-store-auth
      , this skill only handles report-related business.
  3. Do not silently degrade: If neither automatic installation nor user confirmation is available, stop execution and report the dependency missing fact to the user, do not attempt alternative solutions without permission.

依赖已满足后的协作方式

Collaboration Method After Dependencies Are Met

  • 本 skill 会在内部调用依赖 skill 提供的
    /spApi/storeTokens
    accessToken
    ,然后走
    /spApi/developerProxy
    执行报告生命周期。
  • 授权、授权的前置选店铺、令牌刷新等操作——交由
    linkfox-amazon-store-auth
    ;本 skill 不重复做这些事。

  • This skill will internally call
    /spApi/storeTokens
    provided by the dependent skill to obtain
    accessToken
    , then execute the report lifecycle via
    /spApi/developerProxy
    .
  • Operations such as authorization, pre-authorization store selection, token refresh — handled by
    linkfox-amazon-store-auth
    ; this skill does not repeat these tasks.

Core Concepts

Core Concepts

  • Report Type(报告类型):亚马逊官方报告类型枚举,例如
    GET_MERCHANT_LISTINGS_ALL_DATA
    GET_FLAT_FILE_ALL_ORDERS_DATA_BY_ORDER_DATE_GENERAL
    。完整列表见
    references/report-types.md
  • Marketplace ID:区域内具体站点 ID,例如 US =
    ATVPDKIKX0DER
  • Report lifecycle:请求报告 → 轮询
    processingStatus
    IN_QUEUE
    /
    IN_PROGRESS
    /
    DONE
    /
    FATAL
    /
    CANCELLED
    )→
    DONE
    后拿到
    reportDocumentId
    → 取下载 URL → 下载(多为 gzip TSV)→ 解压。
  • Rate limits:Reports API 约 0.0222 req/s;轮询需保留间隔(默认 30s)。
  • Report Type: Official Amazon report type enumerations, such as
    GET_MERCHANT_LISTINGS_ALL_DATA
    ,
    GET_FLAT_FILE_ALL_ORDERS_DATA_BY_ORDER_DATE_GENERAL
    . The complete list can be found in
    references/report-types.md
    .
  • Marketplace ID: Specific site ID within a region, e.g., US =
    ATVPDKIKX0DER
    .
  • Report lifecycle: Request report → poll
    processingStatus
    (
    IN_QUEUE
    /
    IN_PROGRESS
    /
    DONE
    /
    FATAL
    /
    CANCELLED
    ) → get
    reportDocumentId
    when
    DONE
    → retrieve download URL → download (mostly gzip TSV) → decompress.
  • Rate limits: Reports API is approximately 0.0222 req/s; polling intervals must be maintained (default 30s).

Data Fields

Data Fields

Report Request Input

Report Request Input

FieldTypeRequiredDescription
sellerIdstringYes已授权的 Amazon Seller ID
regionstringYesNA / EU / FE
reportTypestringYes报告类型枚举值
marketplaceIdsarrayYes目标 marketplace ID 列表
dataStartTimestringNoISO 8601,报告起始时间
dataEndTimestringNoISO 8601,报告结束时间
lastUpdatedDatestringNo部分 Vendor 报告必填,见
references/report-requests/
对应 md
reportOptionsobjectNo如 Brand Analytics 的
reportPeriod
asin
/
asins
;销售流量的
dateGranularity
/
asinGranularity
等。每一
reportType
说明
references/report-requests/types/<REPORT_TYPE>.md
(索引
types/README.md
);有 JSON Schema 的另见
report-requests/README.md
pollIntervalintNo轮询间隔秒数(默认 30)
maxAttemptsintNo最大轮询次数(默认 20)
FieldTypeRequiredDescription
sellerIdstringYesAuthorized Amazon Seller ID
regionstringYesNA / EU / FE
reportTypestringYesReport type enumeration value
marketplaceIdsarrayYesList of target marketplace IDs
dataStartTimestringNoISO 8601, report start time
dataEndTimestringNoISO 8601, report end time
lastUpdatedDatestringNoRequired for some Vendor reports, see corresponding md in
references/report-requests/
reportOptionsobjectNoSuch as
reportPeriod
,
asin
/
asins
for Brand Analytics;
dateGranularity
/
asinGranularity
for sales and traffic reports, etc. Details for each
reportType
:
references/report-requests/types/<REPORT_TYPE>.md
(indexed in
types/README.md
); for those with JSON Schema, see
report-requests/README.md
pollIntervalintNoPolling interval in seconds (default 30)
maxAttemptsintNoMaximum number of polling attempts (default 20)

Report Output

Report Output

FieldTypeDescription
reportIdstring报告请求 ID
reportDocumentIdstring报告文档 ID
downloadPathstring本地下载后的绝对路径(已解压,含文件名)
fileNamestring保存文件名(与
downloadPath
末段一致)
localFileUristring本机
file://
URI,便于客户端打开本地文件
extractedFileHttpUrlstring本机临时 HTTP 直链,用于在浏览器中下载已解压后的文件(默认
serveExtractedFileHttp
开启)
extractedFileHttpServeSecondsint本地 HTTP 服务保持时长(默认 300,最少 10)
extractedFileHttpNotestring说明该链接仅本机、限时有效
amazonDownloadUrlstring(可选)仅当
includeAmazonSourceUrl: true
时出现:Amazon 源地址,一般为压缩包,通常不必给终端用户
compressionAlgorithmstring若接口返回了压缩算法则带上(如 GZIP)
tempDirectorystring临时目录
fileSizeint文件大小(字节)
FieldTypeDescription
reportIdstringReport request ID
reportDocumentIdstringReport document ID
downloadPathstringAbsolute local path after download (decompressed, including file name)
fileNamestringSaved file name (consistent with the last segment of
downloadPath
)
localFileUristringLocal
file://
URI, convenient for clients to open local files
extractedFileHttpUrlstringTemporary local HTTP direct link for downloading the decompressed file in the browser (default
serveExtractedFileHttp
is enabled)
extractedFileHttpServeSecondsintDuration for keeping the local HTTP service running (default 300, minimum 10)
extractedFileHttpNotestringNote that this link is only valid locally and within a limited time
amazonDownloadUrlstring(Optional) Only appears when
includeAmazonSourceUrl: true
: Amazon source address, usually a compressed package, generally not necessary for end users
compressionAlgorithmstringIncluded if the interface returns a compression algorithm (e.g., GZIP)
tempDirectorystringTemporary directory
fileSizeintFile size (in bytes)

API Usage

API Usage

本 skill 主要调用
/spApi/developerProxy
(LinkFox 店铺网关代理),并复用
linkfox-amazon-store-auth
/spApi/storeTokens
获取
accessToken
。详见
references/api.md
reportType
拼请求体
(含
reportOptions
、日期规则):全覆盖专页
references/report-requests/types/README.md
(与
report-types.md
中每个枚举一一对应);其中带官方 JSON 结果 Schema 的另见
references/report-requests/README.md
GitHub schemas/reports)。
This skill mainly calls
/spApi/developerProxy
(LinkFox Store Gateway Proxy) and reuses
/spApi/storeTokens
from
linkfox-amazon-store-auth
to obtain
accessToken
. For details, see
references/api.md
. Construct request body by
reportType
(including
reportOptions
, date rules): Full coverage page
references/report-requests/types/README.md
(one-to-one correspondence with each enumeration in
report-types.md
); for those with official JSON result Schema, see
references/report-requests/README.md
(GitHub schemas/reports).

Available Scripts

Available Scripts

  • scripts/get_report.py
    ⭐ — 端到端自动化报告获取(推荐
  • scripts/check_auth_dependency.py
    — 主动检测依赖 skill
    linkfox-amazon-store-auth
    是否已安装
  • scripts/get_report.py
    ⭐ — End-to-end automated report retrieval (recommended)
  • scripts/check_auth_dependency.py
    — Actively check if the dependent skill
    linkfox-amazon-store-auth
    is installed

Usage Scenarios

Usage Scenarios

Scenario 0: Dependency Check (MUST run first)

Scenario 0: Dependency Check (MUST run first)

每次进入本 skill 都要先跑这一步。
  1. 尝试读取
    linkfox-amazon-store-auth/SKILL.md
    (若工具允许)
  2. 或执行:
    bash
    python scripts/check_auth_dependency.py
  3. 若 exit code 非 0 或 stderr 含
    DEPENDENCY_MISSING:
    ,按上文「发现未安装时的标准处置」流程处理
  4. 依赖满足后再进入正常业务场景
Run this step every time you enter this skill.
  1. Try to read
    linkfox-amazon-store-auth/SKILL.md
    (if allowed by the tool)
  2. Or execute:
    bash
    python scripts/check_auth_dependency.py
  3. If the exit code is non-zero or stderr contains
    DEPENDENCY_MISSING:
    , follow the process in "Standard Handling When Dependency Is Not Installed" above
  4. Proceed to normal business scenarios only after dependencies are met

Scenario 1: Pull Amazon Report (Automated, Recommended)

Scenario 1: Pull Amazon Report (Automated, Recommended)

User request:「我要拉库存报告」/「获取订单报告」/「下载销售流量报告」等
Steps
  1. 依赖检查(Scenario 0)
  2. 前置选店铺 + 取令牌:委托
    linkfox-amazon-store-auth
    • /spApi/authorizedStores
      让用户选店铺
    • /spApi/storeTokens
      获取令牌(本 skill 的脚本会自动完成此步,无需手动调)
  3. 识别报告类型:按用户诉求匹配
    reportType
    • 库存:
      GET_MERCHANT_LISTINGS_ALL_DATA
      GET_FBA_MYI_UNSUPPRESSED_INVENTORY_DATA
    • 订单:
      GET_FLAT_FILE_ALL_ORDERS_DATA_BY_ORDER_DATE_GENERAL
    • 销售流量:
      GET_SALES_AND_TRAFFIC_REPORT
    • 财务:
      GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE
    • 完整清单:
      references/report-types.md
  4. 执行脚本
    bash
    python scripts/get_report.py '{
      "sellerId": "A1EC6SZ7XAMURH",
      "region": "NA",
      "reportType": "GET_MERCHANT_LISTINGS_ALL_DATA",
      "marketplaceIds": ["ATVPDKIKX0DER"]
    }'
  5. 脚本会自动:取令牌 → 请求报告 → 轮询 → 下载 → 解压 → 预览 → 输出 JSON;完成后在 stderr 与 JSON 中给出 本地绝对路径
    downloadPath
    )、本机 file URI
    localFileUri
    ),并默认启动短时本机 HTTP 服务,生成
    extractedFileHttpUrl
    (用于在同一台机器的浏览器里下载已解压文件)。向用户展示时至少给出
    extractedFileHttpUrl
    downloadPath
    fileName
    ;脚本在
    serveSeconds
    计时结束后会关闭服务,链接随即失效。若需 Amazon 源地址(多为压缩包),仅调试时设
    includeAmazonSourceUrl: true
User request: "I want to pull an inventory report" / "Get an order report" / "Download a sales and traffic report", etc.
Steps:
  1. Dependency check (Scenario 0)
  2. Pre-selection of store + token retrieval: Delegate to
    linkfox-amazon-store-auth
    • Call
      /spApi/authorizedStores
      to let the user select a store
    • Call
      /spApi/storeTokens
      to obtain the token (this skill's script will automatically complete this step, no manual call needed)
  3. Identify report type: Match
    reportType
    based on user's request
    • Inventory:
      GET_MERCHANT_LISTINGS_ALL_DATA
      ,
      GET_FBA_MYI_UNSUPPRESSED_INVENTORY_DATA
    • Orders:
      GET_FLAT_FILE_ALL_ORDERS_DATA_BY_ORDER_DATE_GENERAL
    • Sales and traffic:
      GET_SALES_AND_TRAFFIC_REPORT
    • Finance:
      GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE
    • Complete list:
      references/report-types.md
  4. Execute script:
    bash
    python scripts/get_report.py '{
      "sellerId": "A1EC6SZ7XAMURH",
      "region": "NA",
      "reportType": "GET_MERCHANT_LISTINGS_ALL_DATA",
      "marketplaceIds": ["ATVPDKIKX0DER"]
    }'
  5. The script will automatically: retrieve token → request report → poll → download → decompress → preview → output JSON; upon completion, it will provide the local absolute path (
    downloadPath
    ), local file URI (
    localFileUri
    ) in stderr and JSON, and by default start a temporary local HTTP service to generate
    extractedFileHttpUrl
    (for downloading the decompressed file in the browser on the same machine). When presenting to the user, at least show
    extractedFileHttpUrl
    ,
    downloadPath
    and
    fileName
    ; the script will shut down the service after
    serveSeconds
    expires, and the link will become invalid immediately. To get the Amazon source URL (mostly compressed packages), set
    includeAmazonSourceUrl: true
    only during debugging.

Scenario 2: Manual Report Flow (Advanced)

Scenario 2: Manual Report Flow (Advanced)

对需要精细控制的场景,可通过
/spApi/developerProxy
手工驱动:
  1. 取现有报告(更快):
    path: reports/2021-06-30/reports
    method: GET
    queryString: reportTypes=<type>&marketplaceIds=<ids>
  2. 创建新报告
    path: reports/2021-06-30/reports
    method: POST
    body: {"reportType": "...", "marketplaceIds": [...]}
  3. 查状态
    path: reports/2021-06-30/reports/{reportId}
    method: GET
  4. 取下载链接
    path: reports/2021-06-30/documents/{reportDocumentId}
    method: GET
For scenarios requiring fine-grained control, you can manually drive via
/spApi/developerProxy
:
  1. Retrieve existing reports (faster):
    path: reports/2021-06-30/reports
    method: GET
    queryString: reportTypes=<type>&marketplaceIds=<ids>
  2. Create new report:
    path: reports/2021-06-30/reports
    method: POST
    body: {"reportType": "...", "marketplaceIds": [...]}
  3. Check status:
    path: reports/2021-06-30/reports/{reportId}
    method: GET
  4. Retrieve download link:
    path: reports/2021-06-30/documents/{reportDocumentId}
    method: GET

Scenario 3: Custom Date Range / Polling

Scenario 3: Custom Date Range / Polling

bash
python scripts/get_report.py '{
  "sellerId": "A1EC6SZ7XAMURH",
  "region": "NA",
  "reportType": "GET_FLAT_FILE_ALL_ORDERS_DATA_BY_ORDER_DATE_GENERAL",
  "marketplaceIds": ["ATVPDKIKX0DER"],
  "dataStartTime": "2024-01-01T00:00:00Z",
  "dataEndTime": "2024-01-31T23:59:59Z",
  "pollInterval": 15,
  "maxAttempts": 40
}'
bash
python scripts/get_report.py '{
  "sellerId": "A1EC6SZ7XAMURH",
  "region": "NA",
  "reportType": "GET_FLAT_FILE_ALL_ORDERS_DATA_BY_ORDER_DATE_GENERAL",
  "marketplaceIds": ["ATVPDKIKX0DER"],
  "dataStartTime": "2024-01-01T00:00:00Z",
  "dataEndTime": "2024-01-31T23:59:59Z",
  "pollInterval": 15,
  "maxAttempts": 40
}'

Marketplace IDs by Region

Marketplace IDs by Region

RegionCountryMarketplace ID
NAUnited StatesATVPDKIKX0DER
NACanadaA2EUQ1WTGCTBG2
NAMexicoA1AM78C64UM0Y8
EUUnited KingdomA1F83G8C2ARO7P
EUGermanyA1PA6795UKMFR9
FEJapanA1VC38T7YXB528
更多 marketplace ID 详见
references/report-types.md
RegionCountryMarketplace ID
NAUnited StatesATVPDKIKX0DER
NACanadaA2EUQ1WTGCTBG2
NAMexicoA1AM78C64UM0Y8
EUUnited KingdomA1F83G8C2ARO7P
EUGermanyA1PA6795UKMFR9
FEJapanA1VC38T7YXB528
For more marketplace IDs, see
references/report-types.md
.

Display Rules

Display Rules

  1. 先依赖后业务:依赖检查未通过前,不得开始任何报告相关调用。
  2. 只呈现数据:展示报告获取进度、下载路径、前几行预览;不做业务解读。
  3. 尊重用户选择的报告类型:用户指定了报告类型就只拉那一种,不得擅自换其他类型。
  4. 错误清晰:报告失败(
    FATAL
    / 403 等)时,解释原因并把决定权交还用户。
  5. 安全:日志中 accessToken 掩码展示。
  6. 完成后展示地址与本机下载链接:脚本成功结束后,必须把
    extractedFileHttpUrl
    (已解压文件的本机 HTTP 下载,限时)、
    downloadPath
    (本地绝对路径)、
    fileName
    (文件名)及
    localFileUri
    告知用户;并说明「仅在运行脚本的同一台电脑、在服务保持时间内可用」。不要默认把 Amazon 源 URL 当作用户下载入口;仅在用户明确要求或排障需要时使用
    includeAmazonSourceUrl
  1. Dependencies first, business later: Do not start any report-related calls until dependency check passes.
  2. Only present data: Show report retrieval progress, download path, first few lines of preview; do not provide business interpretation.
  3. Respect user-selected report type: Only pull the specified report type, do not switch to other types without permission.
  4. Clear errors: When report retrieval fails (
    FATAL
    / 403, etc.), explain the reason and return the decision-making power to the user.
  5. Security: Mask accessToken in logs.
  6. Show addresses and local download links after completion: After the script successfully ends, must inform the user of
    extractedFileHttpUrl
    (temporary local HTTP download for decompressed files),
    downloadPath
    (local absolute path),
    fileName
    (file name) and
    localFileUri
    ; and explain that "it is only available on the same computer running the script and within the service retention period". Do not use the Amazon source URL as the default download entry for users; use
    includeAmazonSourceUrl
    only when explicitly requested by the user or for troubleshooting.

CRITICAL: Report Failure Handling Rules

CRITICAL: Report Failure Handling Rules

  • NEVER automatically try alternative report types when user's specified report fails.
  • 报告请求失败(
    FATAL
    、403 等)时,立即停止并把失败事实告知用户
  • 不要替用户决定去拉别的报告类型。
  • 把失败原因说清楚,让用户决定下一步(重试 / 换类型 / 查权限等)。
  • 例:
    GET_BRAND_ANALYTICS_SEARCH_TERMS_REPORT
    失败时,不要自动改拉
    GET_MERCHANT_LISTINGS_ALL_DATA
  • NEVER automatically try alternative report types when user's specified report fails.
  • When report request fails (
    FATAL
    , 403, etc.), stop immediately and inform the user of the failure.
  • Do not decide on behalf of the user to pull other report types.
  • Clearly state the failure reason and let the user decide the next step (retry / change type / check permissions, etc.).
  • Example: When
    GET_BRAND_ANALYTICS_SEARCH_TERMS_REPORT
    fails, do not automatically switch to pulling
    GET_MERCHANT_LISTINGS_ALL_DATA
    .

Common Report Failure Reasons

Common Report Failure Reasons

  • 403 Unauthorized
    :缺少 API 权限或未加入 Amazon Brand Registry
  • FATAL
    :该店铺不支持此报告类型或数据不足
  • Brand Analytics 类报告需要品牌备案
  • Vendor 类报告仅限 Vendor 账号
  • 403 Unauthorized
    : Missing API permissions or not enrolled in Amazon Brand Registry
  • FATAL
    : This store does not support this report type or has insufficient data
  • Brand Analytics reports require brand registration
  • Vendor reports are only available for Vendor accounts

Important Limitations

Important Limitations

  • 依赖
    linkfox-amazon-store-auth
    :未安装则必须先安装,见 Prerequisites。
  • Token expiration
    accessToken
    1 小时过期,脚本内部自动取最新令牌。
  • Rate limits:Reports API 0.0222 req/s,默认 30s 轮询是安全间隔。
  • Report 时效:部分财务报告可能需要 10–30 分钟,按需调大
    maxAttempts
  • Path 白名单:后端
    sp-api.developer-proxy.allowed-path-prefixes
    必须允许
    reports/2021-06-30/reports
  • Depends on
    linkfox-amazon-store-auth
    : Must install it first if not installed, see Prerequisites.
  • Token expiration:
    accessToken
    expires after 1 hour, the script automatically retrieves the latest token internally.
  • Rate limits: Reports API is 0.0222 req/s, default 30s polling interval is safe.
  • Report timeliness: Some financial reports may take 10–30 minutes, adjust
    maxAttempts
    as needed.
  • Path whitelist: Backend
    sp-api.developer-proxy.allowed-path-prefixes
    must allow
    reports/2021-06-30/reports
    .

User Expression & Scenario Quick Reference

User Expression & Scenario Quick Reference

Applicable — 报告获取场景:
User SaysScenario
"拉亚马逊库存报告" / "pull inventory report"Scenario 1
"下载订单数据" / "download orders report"Scenario 1
"获取销售流量报告" / "sales and traffic report"Scenario 1
"拉财务结算报告" / "settlement report"Scenario 1
"查 FBA 库存" / "FBA inventory report"Scenario 1
"拉某时间段的订单报告" / "orders from 2024-01-01 to ..."Scenario 3
Not applicable — 超出本 skill:
  • 授权新店铺、列已授权店铺、刷新/查询令牌 → 请使用
    linkfox-amazon-store-auth
  • 商品 listing 管理、订单处理、广告投放 → 由其他 skill 负责
Boundary judgment
  • 本 skill 只负责「依赖检查 + 报告获取业务」,授权/令牌属于依赖 skill
  • 任何进入本 skill 的调用都要先跑 Scenario 0。

Feedback
出现以下任一情况时,自动调用 Feedback API 上报:
  1. 本 skill 功能描述与实际不符
  2. 结果与用户意图不符
  3. 用户表达了不满或赞赏
  4. 其他你认为可改进的点
references/api.md
中的规范调用 Feedback API,不要打断用户主流程。

For more high-quality, professional cross-border e-commerce skills, visit LinkFox Skills.
Applicable — Report retrieval scenarios:
User SaysScenario
"Pull Amazon inventory report" / "pull inventory report"Scenario 1
"Download order data" / "download orders report"Scenario 1
"Get sales and traffic report" / "sales and traffic report"Scenario 1
"Pull financial settlement report" / "settlement report"Scenario 1
"Check FBA inventory" / "FBA inventory report"Scenario 1
"Pull order report for a specific time period" / "orders from 2024-01-01 to ..."Scenario 3
Not applicable — Beyond this skill:
  • Authorize new stores, list authorized stores, refresh/query tokens → Use
    linkfox-amazon-store-auth
  • Product listing management, order processing, advertising delivery → Handled by other skills
Boundary judgment:
  • This skill only handles "dependency check + report retrieval business", authorization/token management belongs to the dependent skill.
  • Any call entering this skill must run Scenario 0 first.

Feedback:
Automatically call the Feedback API to report when any of the following occurs:
  1. The skill's function description does not match the actual behavior
  2. The result does not match the user's intent
  3. The user expresses dissatisfaction or appreciation
  4. Other areas you think can be improved
Call the Feedback API according to the specifications in
references/api.md
, do not interrupt the user's main process.

For more high-quality, professional cross-border e-commerce skills, visit LinkFox Skills.