亚马逊 Listing 与刊登的定义/限制(与 linkfox-amazon-store-auth、linkfox-amazon-store-report 同系列),通过 LinkFox /spApi/developerProxy 调用 SP-API 的 Listings Items(获取/搜索等)
本 skill 与 linkfox-amazon-store-auth、 linkfox-amazon-store-report 同属 Amazon Store 系列:依赖 linkfox-amazon-store-auth 选店( sellerId + region);直接 POST /spApi/developerProxy 传入 sellerId + region,由服务端解析 token(勿传 amzAccessToken,除非兼容旧调用)。转发上游 GET、 PATCH、 PUT 或 DELETE。
操作官方参考单条刊登getListingsItem检索列表searchListingsItems部分更新刊登patchListingsItem创建 / 全量更新刊登putListingsItem删除刊登deleteListingsItem刊登限制(ASIN)getListingsRestrictions搜索 product typesearchDefinitionsProductTypes获取 product type 定义getDefinitionsProductType
POST /spApi/developerProxy(不同操作通过请求体区分;完整参数/响应/错误码见 references/api.md)python scripts/<脚本名>.py '<JSON 参数>' [--inline](可用脚本见上文脚本一览)输出策略(脚本默认行为):
<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/<skill-name>-<timestamp>.json( <cwd> 为脚本执行时的工作目录,在 Claude Code 里即当前项目目录; <session> 取自环境变量 SESSION_ID,按用户任务自动聚合; 禁止写入 /tmp,当前目录不可写则报错)total/ costToken、最大列表字段的长度 + 前 3 条样本)--inline 强制全量打印到 stdout(同样落盘)读数据建议:先看摘要判断是否足够;需要具体字段时优先用 jq 或 ConvertFrom-Json 或 ConvertFrom-Json 从保存的 json 文件按需抽取,避免整份 JSON 进入上下文。
发生以下异常情况时,采用 references/onboarding.md 引导解决问题:
LINKFOX_AGENT_API_KEY,也未配置 LINKFOXAGENT_API_KEY。本 skill 依赖 linkfox-amazon-store-auth。流程与 linkfox-amazon-store-report 相同:
python scripts/check_auth_dependency.py;若 exit code 42 且 stderr 含 DEPENDENCY_MISSING:,请先安装 linkfox-amazon-store-auth。能力Path 要点脚本获取单条 Listinglistings/2021-08-01/items/{sellerId}/{sku} + Queryscripts/get_listings_item.py搜索刊登列表listings/2021-08-01/items/{sellerId} + Query( 无 路径尾段 SKU)scripts/search_listings_items.py**部分更新 Listing(PATCH)**同 get 路径 + Query + JSON bodyscripts/patch_listings_item.py**创建 / 全量更新 Listing(PUT)**同 get 路径 + Query + body; marketplaceIds 仅 1 个scripts/put_listings_item.py**删除 Listing(DELETE)**同 get 路径 + Query( marketplaceIds 仅 1 个)scripts/delete_listings_item.py刊登限制listings/2021-08-01/restrictions + Query(asin、sellerId、marketplaceIds 等)scripts/get_listings_restrictions.py搜索 Product Typedefinitions/2020-09-01/productTypes + Queryscripts/search_definitions_product_types.py获取 Product Type 定义definitions/2020-09-01/productTypes/{productType} + Query; marketplaceIds 仅 1 个scripts/get_definitions_product_type.py
searchListingsItems 下 identifiers / variationParentSku / packageHierarchySku 三者互斥(仅该接口;见 references/api.md)。 searchDefinitionsProductTypes 下 keywords 与 itemName 互斥。
字段必填说明sellerId是已授权 Seller IDregion是NA / EU / FEsku是卖家 SKU(非 ASIN)marketplaceIds是建议仅 一个 marketplace idincludedData / issueLocale否见 references/api.md
字段必填说明sellerId是已授权 Seller IDregion是NA / EU / FEmarketplaceIds是建议仅 一个 marketplace ididentifiers + identifiersType否最多 20 个;与 variationParentSku、 packageHierarchySku 不能同用variationParentSku / packageHierarchySku否与 identifiers 互斥时间窗 / 状态 / 排序 / 分页否createdAfter、 lastUpdatedBefore、 withStatus、 sortBy、 pageSize(≤20)、 pageToken 等,见 references/api.md
字段必填说明sellerId是已授权 Seller IDregion是NA / EU / FEsku是卖家 SKUmarketplaceIds是数组或逗号字符串;脚本拼入 QueryproductType是Amazon product typepatches是至少 1 条 JSON Patch( op、 path 等)includedData / mode / issueLocale否见 references/api.md
字段必填说明sellerId是已授权 Seller IDregion是NA / EU / FEsku是卖家 SKUmarketplaceIds是恰好一个 marketplace idproductType是Amazon product typerequirements是LISTING | LISTING_PRODUCT_ONLY | LISTING_OFFER_ONLYattributes是须符合该 product type schemaincludedData / mode / issueLocale否见 references/api.md
字段必填说明sellerId是已授权 Seller IDregion是NA / EU / FEsku是卖家 SKUmarketplaceIds是恰好一个 marketplace idissueLocale否见 references/api.md
字段必填说明sellerId是用于 storeTokens 与 Queryregion是NA / EU / FEasin是目录 ASINmarketplaceIds是数组或逗号字符串conditionType / reasonLocale否见 references/api.md
字段必填说明sellerId是用于 storeTokensregion是NA / EU / FEmarketplaceIds是数组或逗号字符串keywords 或 itemName否二者不可同时传(非空时互斥)locale / searchLocale否见 references/api.md
字段必填说明sellerId是用于 storeTokensregion是NA / EU / FEproductType是如 LUGGAGE(写入 path)marketplaceIds是恰好一个 idquerySellerId否若需上游 Query sellerId(卖家专属 schema),传入;常与 sellerId 相同productTypeVersion / requirements / requirementsEnforced / locale否见 references/api.md
scripts/get_listings_item.py — 单条 listing。scripts/search_listings_items.py — 搜索列表。scripts/patch_listings_item.py — PATCH 部分更新。scripts/put_listings_item.py — PUT 创建或全量更新。scripts/delete_listings_item.py — DELETE 删除刊登。scripts/get_listings_restrictions.py — GET 刊登限制。scripts/search_definitions_product_types.py — GET 搜索 product type。scripts/get_definitions_product_type.py — GET product type JSON Schema。scripts/check_auth_dependency.py — 依赖检测。示例:
bash
export LINKFOXAGENT_API_KEY="<your-key>"
python scripts/get_listings_item.py '{"sellerId":"A1...","region":"NA","sku":"MY-SKU","marketplaceIds":["ATVPDKIKX0DER"]}'
python scripts/search_listings_items.py '{"sellerId":"A1...","region":"NA","marketplaceIds":["ATVPDKIKX0DER"],"identifiers":["B0XXXXXXXX"],"identifiersType":"ASIN"}'
python scripts/patch_listings_item.py '{"sellerId":"A1...","region":"NA","sku":"MY-SKU","marketplaceIds":["ATVPDKIKX0DER"],"productType":"LUGGAGE","patches":[{"op":"replace","path":"/attributes/item_name","value":[{"value":"New Title","marketplace_id":"ATVPDKIKX0DER"}]}]}'
python scripts/put_listings_item.py '{"sellerId":"A1...","region":"NA","sku":"MY-SKU","marketplaceIds":["ATVPDKIKX0DER"],"productType":"LUGGAGE","requirements":"LISTING","attributes":{"item_name":[{"value":"Title","marketplace_id":"ATVPDKIKX0DER"}]}}'
python scripts/delete_listings_item.py '{"sellerId":"A1...","region":"NA","sku":"MY-SKU","marketplaceIds":["ATVPDKIKX0DER"]}'
python scripts/get_listings_restrictions.py '{"sellerId":"A1...","region":"NA","asin":"B0XXXXXXXX","marketplaceIds":["ATVPDKIKX0DER"]}'
python scripts/search_definitions_product_types.py '{"sellerId":"A1...","region":"NA","marketplaceIds":["ATVPDKIKX0DER"],"keywords":["luggage"]}'
python scripts/get_definitions_product_type.py '{"sellerId":"A1...","region":"NA","productType":"LUGGAGE","marketplaceIds":["ATVPDKIKX0DER"],"querySellerId":"A1..."}'
sellerId。errcode / httpStatus;成功后再解析 body( listing / searchResult / patchResult / putResult / deleteResult / restrictionsResult / productTypesSearchResult / productTypeDefinitionResult)。searchResult 取下一页 token(字段名以 Amazon 响应为准),传入 pageToken。listings/2021-08-01/restrictions 与 definitions/2020-09-01/productTypes 等前缀分别配置白名单(以运维为准)。attributes; patch 仅顶层属性可 patch(以官方为准)。references/api.md。pageSize ≤ 20; identifiers ≤ 20。patches 至少 1 条;JSON Patch 的 delete 与 deleteListingsItem 接口不同;Vendor 对部分 patch 可能 400。listings/.../items、 listings/.../restrictions、 definitions/2020-09-01/productTypes 均须按需放行。同一店铺连续收到 Amazon SP-API 的 400、403、404 或 429 时,网关会返回 450、453、454 或 459 并短暂冷却。这些自定义状态码不是 Amazon 原生状态,也不表示封号;目的是避免持续异常或高频调用扩大店铺风险。
状态与 message范围触发与冷却处理450: 400,请求异常,请优化您的参数店铺+接口60 秒内超过 3 次:5 分钟;10 分钟内超过 4 次:20 分钟停止原参数重试,检查必填字段、marketplace、ID、日期和请求体453: 403,店铺未授权,请先授权店铺全部接口60 秒内超过 2 次:5 分钟;10 分钟内超过 4 次:30 分钟停止该店铺调用,检查授权、权限、店铺归属和区域454: 404,资源不存在,请优化您的参数店铺+接口60 秒内超过 3 次:5 分钟;10 分钟内超过 4 次:30 分钟确认资源 ID、所属店铺/站点、资源状态和接口路径459: 429限流中,请降低频率店铺+接口首次:15 秒;2 分钟内超过 2 次:30 秒;3 分钟内超过 4 次:2 分钟降低并发、分页和轮询频率并逐级退避
retryAfter、 blockedUntil,没有时按表中时长说明。reportId、 feedId 等任务 ID;写操作结果不确定时先查询状态,不直接重放。不消耗算力。
Feedback: 见 references/api.md 中 Feedback API, skillName: linkfox-amazon-store-listings。
更多跨境 skill: LinkFox Skills