linkfox-amazon-store-pricing

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Amazon 店铺 Product Pricing

Amazon店铺Product Pricing

本 skill 与
linkfox-amazon-store-auth
linkfox-amazon-store-report
linkfox-amazon-store-listings
同属 Amazon Store 系列:先
POST /spApi/storeTokens
accessToken
,再
POST /spApi/developerProxy
转发上游 GETPOST(与 listings 的 PUT/PATCH 代理方式一致)。
本skill与**
linkfox-amazon-store-auth
linkfox-amazon-store-report
linkfox-amazon-store-listings
同属Amazon Store系列:先通过
POST /spApi/storeTokens
获取
accessToken
,再通过
POST /spApi/developerProxy
转发上游的GETPOST**请求(与listings的PUT/PATCH代理方式一致)。

官方参考索引

官方参考索引

能力文档
getPricinggetPricing
getCompetitivePricinggetCompetitivePricing
getListingOffersgetListingOffers
getItemOffersgetItemOffers
getItemOffersBatchgetItemOffersBatch
getListingOffersBatchgetListingOffersBatch
getFeaturedOfferExpectedPriceBatchgetFeaturedOfferExpectedPriceBatch
getCompetitiveSummarygetCompetitiveSummary

能力文档
getPricinggetPricing
getCompetitivePricinggetCompetitivePricing
getListingOffersgetListingOffers
getItemOffersgetItemOffers
getItemOffersBatchgetItemOffersBatch
getListingOffersBatchgetListingOffersBatch
getFeaturedOfferExpectedPriceBatchgetFeaturedOfferExpectedPriceBatch
getCompetitiveSummarygetCompetitiveSummary

Prerequisites(必须先读)

前置要求(必须先读)

本 skill 依赖
linkfox-amazon-store-auth
  1. 运行
    python scripts/check_auth_dependency.py
    ;若 exit code 42 且 stderr 含
    DEPENDENCY_MISSING:
    ,请先安装
    linkfox-amazon-store-auth
  2. 不要在本 skill 内绕过依赖实现授权或令牌逻辑。

本skill依赖
linkfox-amazon-store-auth
  1. 运行
    python scripts/check_auth_dependency.py
    ;若退出码为42且标准错误输出包含
    DEPENDENCY_MISSING:
    ,请先安装
    linkfox-amazon-store-auth
  2. 请勿在本skill内绕过依赖实现授权或令牌逻辑。

Current Capabilities(脚本一览)

当前功能(脚本一览)

能力developerProxy
path
(要点)
脚本
getPricing
products/pricing/v0/price
+ Query
get_pricing.py
getCompetitivePricing
products/pricing/v0/competitivePrice
+ Query
get_competitive_pricing.py
getListingOffers
products/pricing/v0/listings/{sku}/offers
+ Query
get_listing_offers.py
getItemOffers
products/pricing/v0/items/{asin}/offers
+ Query
get_item_offers.py
getItemOffersBatch
batches/products/pricing/v0/itemOffers
,POST JSON body
post_item_offers_batch.py
getListingOffersBatch
batches/products/pricing/v0/listingOffers
,POST JSON body
post_listing_offers_batch.py
getFeaturedOfferExpectedPriceBatch
batches/products/pricing/2022-05-01/offer/featuredOfferExpectedPrice
,POST
post_featured_offer_expected_price_batch.py
getCompetitiveSummary
batches/products/pricing/2022-05-01/items/competitiveSummary
,POST
post_competitive_summary_batch.py
批量脚本(
post_*_batch.py
)在默认模式下会按 Amazon 要求组装子请求;高级用法可设
useAmazonRequestShape
: true
,直接传
requests
为官方原始数组(仍受条数上限约束)。共享逻辑见
scripts/_spapi_pricing_common.py
(仅供同目录脚本 import,非独立 CLI)。

能力developerProxy
path
(要点)
脚本
getPricing
products/pricing/v0/price
+ 查询参数
get_pricing.py
getCompetitivePricing
products/pricing/v0/competitivePrice
+ 查询参数
get_competitive_pricing.py
getListingOffers
products/pricing/v0/listings/{sku}/offers
+ 查询参数
get_listing_offers.py
getItemOffers
products/pricing/v0/items/{asin}/offers
+ 查询参数
get_item_offers.py
getItemOffersBatch
batches/products/pricing/v0/itemOffers
,POST JSON请求体
post_item_offers_batch.py
getListingOffersBatch
batches/products/pricing/v0/listingOffers
,POST JSON请求体
post_listing_offers_batch.py
getFeaturedOfferExpectedPriceBatch
batches/products/pricing/2022-05-01/offer/featuredOfferExpectedPrice
,POST请求
post_featured_offer_expected_price_batch.py
getCompetitiveSummary
batches/products/pricing/2022-05-01/items/competitiveSummary
,POST请求
post_competitive_summary_batch.py
批量脚本(
post_*_batch.py
)在默认模式下会按Amazon要求组装子请求;高级用法可设置**
useAmazonRequestShape
: true**,直接传入**
requests
为官方原始数组(仍受条数上限约束)。共享逻辑见
scripts/_spapi_pricing_common.py
**(仅供同目录脚本导入,非独立CLI工具)。

Quick Parameters(摘要)

快速参数说明(摘要)

  • getPricing / getCompetitivePricing
    sellerId
    region
    marketplaceId
    (或
    marketplaceIds
    取首)、
    itemType
    asins
    skus
    (≤20);getPricing 另有
    itemCondition
    offerType
    ;getCompetitivePricing 另有
    customerType
  • getListingOffers / getItemOffers
    sku
    +path 或
    asin
    +path;
    itemCondition
    必填
    ;可选
    customerType
  • Item / Listing Offers Batch
    requests
    数组,默认每项为简化对象(见
    references/api.md
    );1~20 条(FOEP 批量脚本为 最多 40 条)。
  • getCompetitiveSummary 批量:每项需
    asin
    marketplaceId
    includedData
    (非空字符串数组);可选
    lowestPricedOffersInputs
  • getFeaturedOfferExpectedPriceBatch:每项需
    marketplaceId
    sku
    segment
    (对象,结构以官方为准)。

  • getPricing / getCompetitivePricing
    sellerId
    region
    marketplaceId
    (或
    marketplaceIds
    取第一个值)、
    itemType
    asins
    skus
    (≤20条);getPricing另有
    itemCondition
    offerType
    参数;getCompetitivePricing另有
    customerType
    参数。
  • getListingOffers / getItemOffers:路径中需包含
    sku
    或**
    asin
    itemCondition
    为必填项**;可选参数
    customerType
  • Item / Listing Offers Batch
    requests
    数组,默认每项为简化对象(详见
    references/api.md
    );支持1~20条(FOEP批量脚本最多支持40条)。
  • getCompetitiveSummary批量:每项需包含**
    asin
    marketplaceId
    includedData
    (非空字符串数组);可选参数
    lowestPricedOffersInputs
    **。
  • getFeaturedOfferExpectedPriceBatch:每项需包含**
    marketplaceId
    sku
    segment
    **(对象,结构以官方为准)。

Scripts

脚本列表

  • get_pricing.py
    ·
    get_competitive_pricing.py
    ·
    get_listing_offers.py
    ·
    get_item_offers.py
  • post_item_offers_batch.py
    ·
    post_listing_offers_batch.py
    ·
    post_featured_offer_expected_price_batch.py
    ·
    post_competitive_summary_batch.py
  • check_auth_dependency.py
    ·
    _spapi_pricing_common.py
    (内部模块)
bash
export LINKFOXAGENT_API_KEY="<your-key>"

python scripts/get_item_offers.py '{"sellerId":"A1...","region":"NA","asin":"B0...","marketplaceId":"ATVPDKIKX0DER","itemCondition":"New"}'

python scripts/post_item_offers_batch.py '{"sellerId":"A1...","region":"NA","requests":[{"asin":"B0...","marketplaceId":"ATVPDKIKX0DER","itemCondition":"New"}]}'

  • get_pricing.py
    ·
    get_competitive_pricing.py
    ·
    get_listing_offers.py
    ·
    get_item_offers.py
  • post_item_offers_batch.py
    ·
    post_listing_offers_batch.py
    ·
    post_featured_offer_expected_price_batch.py
    ·
    post_competitive_summary_batch.py
  • check_auth_dependency.py
    ·
    _spapi_pricing_common.py
    (内部模块)
bash
export LINKFOXAGENT_API_KEY="<your-key>"

python scripts/get_item_offers.py '{"sellerId":"A1...","region":"NA","asin":"B0...","marketplaceId":"ATVPDKIKX0DER","itemCondition":"New"}'

python scripts/post_item_offers_batch.py '{"sellerId":"A1...","region":"NA","requests":[{"asin":"B0...","marketplaceId":"ATVPDKIKX0DER","itemCondition":"New"}]}'

Display Rules

显示规则

  1. MarketplaceId
    (单数)与 Listings 的
    marketplaceIds
    勿混用。
  2. 先看网关
    errcode
    /
    httpStatus
    ,再解析各脚本对应的解析字段(如
    itemOffers
    itemOffersBatch
    competitiveSummary
    等)。
  3. POST 类接口:
    stdout
    中含
    requestBody
    (脚本组装的 Amazon 请求体),便于排查。
  4. 白名单:除
    products/pricing/...
    外,批量路径以
    batches/products/pricing/...
    开头;1005 时需后端放行对应前缀。
  5. 各接口 Usage plan 不同(尤其 2022-05-01 批量约 0.033 req/s),注意 429

  1. MarketplaceId
    (单数)与Listings的
    marketplaceIds
    请勿混用。
  2. 先查看网关的**
    errcode
    /
    httpStatus
    ,再解析各脚本对应的字段(如
    itemOffers
    itemOffersBatch
    competitiveSummary
    **等)。
  3. POST类接口:标准输出中包含**
    requestBody
    **(脚本组装的Amazon请求体),便于排查问题。
  4. 白名单:除
    products/pricing/...
    外,批量接口路径以**
    batches/products/pricing/...
    开头;出现1005**错误时需后端放行对应前缀。
  5. 各接口的Usage plan不同(尤其是2022-05-01版本的批量接口约为0.033 req/s),注意处理429限流错误。

Important Limitations

重要限制

  • 权限:Product Pricing 及相关角色;部分 2022-05-01 能力可能另有应用内配置要求,以 Amazon 为准。
  • FOEP 批量
    segment
    须符合官方模型;条数上限脚本按 40 校验(与文档「up to 40」一致)。
  • 返回结构以 Amazon schema 为准;详见
    references/api.md
Feedback:
references/api.md
skillName
linkfox-amazon-store-pricing

更多跨境 skill:LinkFox Skills
<!-- LF_LARGE_RESPONSE_BLOCK -->
  • 权限:需拥有Product Pricing及相关角色权限;部分2022-05-01版本的功能可能另有应用内配置要求,以Amazon官方说明为准。
  • FOEP批量
    segment
    必须符合官方模型;脚本按40条校验条数上限(与文档“up to 40”一致)。
  • 返回结构以Amazon schema为准;详见**
    references/api.md
    **。
反馈: 详见
references/api.md
skillName
linkfox-amazon-store-pricing

更多跨境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/check_auth_dependency.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:
check_auth_dependency.py
,
get_competitive_pricing.py
,
get_item_offers.py
,
get_listing_offers.py
,
get_pricing.py
,
post_competitive_summary_batch.py
,
post_featured_offer_expected_price_batch.py
,
post_item_offers_batch.py
,
post_listing_offers_batch.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/check_auth_dependency.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提供多个入口脚本:
check_auth_dependency.py
get_competitive_pricing.py
get_item_offers.py
get_listing_offers.py
get_pricing.py
post_competitive_summary_batch.py
post_featured_offer_expected_price_batch.py
post_item_offers_batch.py
post_listing_offers_batch.py
。通过
--script scripts/<name>.py
参数选择所需脚本。
run
命令会将完整响应写入文件,并仅输出模式预览+文件路径。
read
命令可提取指定字段,支持通过
--limit/--offset
进行切片,以及通过
--format json|jsonl|csv|table
指定输出格式。
何时优先使用此模式——根据响应数据特征判断,例如:
  • 每条记录字段数量多,或包含不需要的字段
  • 批量/分页结果(单次调用返回多条数据)
  • 长文本字段(描述、评论、HTML、时间序列等)
  • 输出结果需在后续步骤中重复使用,而非立即消耗
对于小型、单次使用的响应,直接调用主脚本即可。
⚠️ 预览内容是截断的模式+示例,并非完整数据。任何字段相关的决策必须通过
read
命令从持久化文件中读取。
<!-- /LF_LARGE_RESPONSE_BLOCK -->