linkfox-amazon-store-feeds

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Amazon 店铺 Feeds

亚马逊店铺Feeds

本 skill 与
linkfox-amazon-store-auth
等同属 Amazon Store 系列:先
POST /spApi/storeTokens
,再
POST /spApi/developerProxy
转发 GET / POST / DELETE
本Skill与
linkfox-amazon-store-auth
等同属 Amazon Store 系列:先调用
POST /spApi/storeTokens
,再通过
POST /spApi/developerProxy
转发 GET / POST / DELETE 请求。

官方参考索引

官方参考索引

能力文档
createFeedDocumentcreateFeedDocument
getFeedDocumentgetFeedDocument
createFeedcreateFeed
getFeedgetFeed
getFeedsgetFeeds
cancelFeedcancelFeed

能力文档
createFeedDocumentcreateFeedDocument
getFeedDocumentgetFeedDocument
createFeedcreateFeed
getFeedgetFeed
getFeedsgetFeeds
cancelFeedcancelFeed

Prerequisites

前置条件

  1. 依赖
    linkfox-amazon-store-auth
    ;运行
    python scripts/check_auth_dependency.py
    ,exit 42 时需先安装授权 skill。
  2. 应用需具备 Feeds 相关角色;
    feedType
    须与上传文件格式匹配(见 Amazon Feed Type Values 文档)。

  1. 依赖
    linkfox-amazon-store-auth
    ;运行
    python scripts/check_auth_dependency.py
    ,若退出码为 42,需先安装授权Skill。
  2. 应用需具备 Feeds 相关角色;
    feedType
    必须与上传文件格式匹配(详见Amazon Feed Type Values文档)。

典型工作流

典型工作流

  1. create_feed_document.py
    → 得到
    feedDocumentId
    url
    (上传地址)。
  2. upload_feed_document.py
    → 对
    url
    PUT 上传 feed 文件(不经 developerProxy)。
  3. create_feed.py
    → 传入
    inputFeedDocumentId
    feedType
    marketplaceIds
  4. get_feed.py
    /
    get_feeds.py
    → 轮询
    processingStatus
    (如 IN_QUEUE、IN_PROGRESS、DONE、FATAL)。
  5. 处理完成后用
    get_feed_document.py
    下载 resultFeedDocumentId 对应文档(再按返回 URL 自行下载结果文件)。

  1. create_feed_document.py
    → 获取
    feedDocumentId
    url
    (上传地址)。
  2. upload_feed_document.py
    → 向
    url
    发送 PUT 请求上传feed文件(不经过developerProxy)。
  3. create_feed.py
    → 传入
    inputFeedDocumentId
    feedType
    marketplaceIds
  4. get_feed.py
    /
    get_feeds.py
    → 轮询
    processingStatus
    (例如IN_QUEUE、IN_PROGRESS、DONE、FATAL)。
  5. 处理完成后,使用
    get_feed_document.py
    下载 resultFeedDocumentId 对应的文档(再根据返回URL自行下载结果文件)。

Current Capabilities

当前功能

能力pathmethod脚本
createFeedDocument
feeds/2021-06-30/documents
POST
create_feed_document.py
getFeedDocument
feeds/2021-06-30/documents/{feedDocumentId}
GET
get_feed_document.py
createFeed
feeds/2021-06-30/feeds
POST
create_feed.py
getFeed
feeds/2021-06-30/feeds/{feedId}
GET
get_feed.py
getFeeds
feeds/2021-06-30/feeds
GET
get_feeds.py
cancelFeed
feeds/2021-06-30/feeds/{feedId}
DELETE
cancel_feed.py
上传文档内容createFeedDocument 返回的 URLPUT
upload_feed_document.py
共享模块:
_spapi_feeds_common.py

能力路径请求方法脚本
createFeedDocument
feeds/2021-06-30/documents
POST
create_feed_document.py
getFeedDocument
feeds/2021-06-30/documents/{feedDocumentId}
GET
get_feed_document.py
createFeed
feeds/2021-06-30/feeds
POST
create_feed.py
getFeed
feeds/2021-06-30/feeds/{feedId}
GET
get_feed.py
getFeeds
feeds/2021-06-30/feeds
GET
get_feeds.py
cancelFeed
feeds/2021-06-30/feeds/{feedId}
DELETE
cancel_feed.py
上传文档内容createFeedDocument返回的URLPUT
upload_feed_document.py
共享模块:
_spapi_feeds_common.py

Scripts 示例

脚本示例

bash
export LINKFOXAGENT_API_KEY="<your-key>"

python scripts/create_feed_document.py '{"sellerId":"A1...","region":"NA","contentType":"text/tab-separated-values; charset=UTF-8"}'

python scripts/upload_feed_document.py '{"uploadUrl":"<from createFeedDocument>","contentType":"text/tab-separated-values; charset=UTF-8","filePath":"./inventory.tsv"}'

python scripts/create_feed.py '{"sellerId":"A1...","region":"NA","feedType":"POST_FLAT_FILE_INVLOADER_DATA","marketplaceIds":["ATVPDKIKX0DER"],"inputFeedDocumentId":"<feedDocumentId>"}'

bash
export LINKFOXAGENT_API_KEY="<your-key>"

python scripts/create_feed_document.py '{"sellerId":"A1...","region":"NA","contentType":"text/tab-separated-values; charset=UTF-8"}'

python scripts/upload_feed_document.py '{"uploadUrl":"<from createFeedDocument>","contentType":"text/tab-separated-values; charset=UTF-8","filePath":"./inventory.tsv"}'

python scripts/create_feed.py '{"sellerId":"A1...","region":"NA","feedType":"POST_FLAT_FILE_INVLOADER_DATA","marketplaceIds":["ATVPDKIKX0DER"],"inputFeedDocumentId":"<feedDocumentId>"}'

Display Rules

显示规则

  1. 先看
    developerProxy.errcode
    /
    httpStatus
    ;createFeedDocument 常为 201,createFeed 常为 202
  2. getFeeds 分页:仅用上一页
    nextToken
    作为下一请求的
    paginationToken
    参数名在 Amazon 侧为
    nextToken
    (脚本字段名
    nextToken
    )。
  3. upload 失败与 SP-API 网关无关,检查
    uploadUrl
    是否过期、Content-Type 是否与 createFeedDocument 一致。
  4. 网关 path 白名单需包含
    feeds/2021-06-30/
    前缀。

  1. 优先查看
    developerProxy.errcode
    /
    httpStatus
    ;createFeedDocument的常见状态码为 201,createFeed的常见状态码为 202
  2. getFeeds 分页:仅将上一页的
    nextToken
    作为下一次请求的
    paginationToken
    (Amazon侧的参数名为
    nextToken
    ,脚本字段名为
    nextToken
    )。
  3. 上传 失败与SP-API网关无关,请检查
    uploadUrl
    是否过期、Content-Type是否与createFeedDocument设置一致。
  4. 网关路径白名单需包含
    feeds/2021-06-30/
    前缀。

Important Limitations

重要限制

  • 本 skill 代替 Amazon 侧 feed 文件 schema 校验;
    feedType
    、TSV/XML 格式以官方为准。
  • 下载 getFeedDocument 返回的 url 内容需另行 HTTP GET(与 upload 类似,不经 developerProxy)。
  • 详见
    references/api.md
Feedback:
skillName
linkfox-amazon-store-feeds

更多跨境 skill:LinkFox Skills
<!-- LF_LARGE_RESPONSE_BLOCK -->
  • 本Skill 替代Amazon侧的feed文件schema校验;
    feedType
    、TSV/XML格式请以官方要求为准。
  • 下载getFeedDocument返回的url内容需另行发送HTTP GET请求(与上传类似,不经过developerProxy)。
  • 详情请见
    references/api.md
反馈:
skillName
linkfox-amazon-store-feeds

更多跨境Skill:LinkFox Skills
<!-- LF_LARGE_RESPONSE_BLOCK -->

Handling Large Responses

处理大响应结果

To avoid overflowing the agent context, persist the response to disk and extract only the fields you need:
python scripts/response_io.py run --script scripts/cancel_feed.py --out-dir <DIR> '<params>'
python scripts/response_io.py read <file> --fields "<paths>"   # or --path "<JMESPath>"
Pick
--out-dir
outside any git working tree (e.g.
/tmp/...
on Unix,
%TEMP%/...
on Windows). Persisted responses may contain PII, pricing, or auth-sensitive data — do not commit them. Files are not auto-deleted; clean up when the task is done.
This skill exposes multiple entry scripts:
cancel_feed.py
,
check_auth_dependency.py
,
create_feed.py
,
create_feed_document.py
,
get_feed.py
,
get_feed_document.py
,
get_feeds.py
,
upload_feed_document.py
. Pass
--script scripts/<name>.py
to choose the one you need.
run
writes the full response to a file and emits only a schema preview + file path.
read
projects specific fields, with
--limit/--offset
for slicing and
--format json|jsonl|csv|table
for output.
When to prefer this pattern — apply your judgment based on the response characteristics, e.g.:
  • High field count per record, or fields you don't need
  • Batch/paginated results (multiple items per call)
  • Long-text fields (descriptions, reviews, HTML, time series)
  • Output reused across later steps rather than consumed immediately
For small, single-use responses, calling the main script directly is fine.
⚠️ The preview is a truncated schema + sample, not the full data. Any field-level decision must read from the persisted file via
read
.
<!-- /LF_LARGE_RESPONSE_BLOCK -->
为避免超出Agent上下文限制,请将响应结果持久化到磁盘,并仅提取所需字段:
python scripts/response_io.py run --script scripts/cancel_feed.py --out-dir <DIR> '<params>'
python scripts/response_io.py read <file> --fields "<paths>"   # 或 --path "<JMESPath>"
请选择Git工作区外的
--out-dir
(例如Unix系统的
/tmp/...
,Windows系统的
%TEMP%/...
)。持久化的响应结果可能包含个人身份信息(PII)、定价或敏感授权数据——请勿提交到代码仓库。文件不会自动删除,完成任务后请自行清理。
本Skill提供多个入口脚本:
cancel_feed.py
check_auth_dependency.py
create_feed.py
create_feed_document.py
get_feed.py
get_feed_document.py
get_feeds.py
upload_feed_document.py
。通过传递
--script scripts/<name>.py
参数选择所需脚本。
run
命令会将完整响应写入文件,并仅输出schema预览+文件路径。
read
命令可提取特定字段,支持通过
--limit/--offset
进行切片,通过
--format json|jsonl|csv|table
指定输出格式。
何时优先使用此模式——请根据响应特征判断,例如:
  • 每条记录字段数量多,或包含不需要的字段
  • 批量/分页结果(单次调用返回多条数据)
  • 长文本字段(描述、评论、HTML、时间序列等)
  • 输出结果需在后续步骤复用,而非立即使用
对于小型、单次使用的响应结果,直接调用主脚本即可。
⚠️ 预览内容是截断的schema+示例,而非完整数据。任何字段相关的决策都必须通过
read
命令从持久化文件中读取。
<!-- /LF_LARGE_RESPONSE_BLOCK -->