Query Amazon SP-API Product Pricing for a chosen seller store—single ASIN/SKU, batch offers, FOEP, competitive summary.
Documents
亚马逊-店铺订单
Try itQuery and update Amazon SP-API Orders via /spApi/developerProxy across v2026-01-01 and v0 endpoints.
What it does
Calls SP-API Orders through /spApi/developerProxy, with sellerId and region supplied by the sibling linkfox-amazon-store-auth skill. Covers v2026-01-01 searchOrders and getOrder, plus v0 endpoints for buyer info, address, order items, shipment status, regulated info, verification status, and shipment confirmation. Responses are written to a per-session JSON file; bodies ≤8 KB are echoed to stdout, larger bodies return a summary with top-level fields, counts, and samples.
When to use it
- Listing orders filtered by createdAfter or lastUpdatedAfter
- Fetching a single order with FULFILLMENT or PACKAGES includedData
- Confirming a shipment or updating shipmentStatus
- Reading or updating regulated order verification status
The skill document
Amazon 店铺 Orders
本 skill 与 linkfox-amazon-store-auth、linkfox-amazon-store-report、linkfox-amazon-store-listings、linkfox-amazon-store-pricing 同属 Amazon Store 系列:依赖 linkfox-amazon-store-auth 选店(sellerId+region);直接 POST /spApi/developerProxy 传入 sellerId+region,由服务端解析 token(勿传 amzAccessToken,除非兼容旧调用)。转发上游 GET / POST / PATCH。
调用方式
- API 端点:
POST /spApi/developerProxy(不同 SP-API 操作通过 path/method 区分;完整参数/响应/错误码见references/api.md) - Python 脚本:
python scripts/<脚本名>.py '' [--inline](可用脚本见上文脚本一览) - 成本约束:本工具会消耗积分;失败/空结果不得自动换关键词、翻页或连续试探;需要继续检索时先向用户说明会产生额外消耗。
输出策略(脚本默认行为):
- 始终将完整响应写入
/linkfox///data/linkfox-amazon-store-orders-.json(为脚本执行时的工作目录,在 Claude Code 里即当前项目目录;取自环境变量SESSION_ID,按用户任务自动聚合;禁止写入 /tmp,当前目录不可写则报错) - 响应体 ≤ 8 KB:落盘后把完整 JSON 打印到 stdout
- 响应体 > 8 KB:落盘后 stdout 只输出摘要(顶层字段、常见计数如
total/costToken、最大列表字段的长度 + 前 3 条样本) - 加
--inline强制全量打印到 stdout(同样落盘)
读数据建议:先看摘要判断是否足够;需要具体字段时优先用 jq或ConvertFrom-Json 从保存的 json 文件按需抽取,避免整份 JSON 进入上下文。
解决认证和积分问题
发生以下异常情况时,采用 references/onboarding.md 引导解决问题:
异常情况
- 未配置API Key:环境变量未配置
LINKFOX_AGENT_API_KEY,也未配置LINKFOXAGENT_API_KEY。 - 响应401或402状态码
- 响应提示积分或余额不足:消息含"积分余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值",或类似含义的内容。
官方参考索引
| 能力 | 文档 |
|---|---|
| searchOrders | searchOrders |
| getOrder (v2026-01-01) | getOrder |
| getOrderBuyerInfo (deprecated) | getOrderBuyerInfo |
| getOrderAddress (deprecated) | getOrderAddress |
| getOrderItems (deprecated) | getOrderItems |
| getOrderItemsBuyerInfo (deprecated) | getOrderItemsBuyerInfo |
| updateShipmentStatus | updateShipmentStatus |
| getOrderRegulatedInfo | getOrderRegulatedInfo |
| updateVerificationStatus | updateVerificationStatus |
| confirmShipment | confirmShipment |
Prerequisites(必须先读)
本 skill 依赖 linkfox-amazon-store-auth。
- 运行
python scripts/check_auth_dependency.py;若 exit code 42 且 stderr 含DEPENDENCY_MISSING:,请先安装linkfox-amazon-store-auth。 - 不要在本 skill 内绕过依赖实现授权或令牌逻辑。
Current Capabilities(脚本一览)
| 能力 | developerProxy path(要点) | 脚本 |
|---|---|---|
| searchOrders | orders/2026-01-01/orders + Query | search_orders.py |
| getOrder | orders/2026-01-01/orders/{orderId} + Query | get_order.py |
| getOrderBuyerInfo | orders/v0/orders/{orderId}/buyerInfo | get_order_buyer_info.py |
| getOrderAddress | orders/v0/orders/{orderId}/address | get_order_address.py |
| getOrderItems | orders/v0/orders/{orderId}/orderItems + NextToken | get_order_items.py |
| getOrderItemsBuyerInfo | orders/v0/orders/{orderId}/orderItems/buyerInfo | get_order_items_buyer_info.py |
| updateShipmentStatus | orders/v0/orders/{orderId}/shipment,POST JSON | update_shipment_status.py |
| getOrderRegulatedInfo | orders/v0/orders/{orderId}/regulatedInfo | get_order_regulated_info.py |
| updateVerificationStatus | orders/v0/orders/{orderId}/regulatedInfo,PATCH JSON | update_verification_status.py |
| confirmShipment | orders/v0/orders/{orderId}/shipmentConfirmation,POST JSON | confirm_shipment.py |
共享逻辑见 scripts/_spapi_orders_common.py(仅供同目录脚本 import,非独立 CLI)。
Quick Parameters(摘要)
- searchOrders:
createdAfter或lastUpdatedAfter(二选一);marketplaceIds;可选fulfillmentStatuses、fulfilledBy、maxResultsPerPage、paginationToken(上一页nextToken)、includedData。 - getOrder:
orderId;可选includedData(如 BUYER、FULFILLMENT、PACKAGES)。 - getOrderItems / getOrderItemsBuyerInfo:可选
nextToken→ 查询参数NextToken。 - updateShipmentStatus:
marketplaceId、shipmentStatus(ReadyForPickup / PickedUp / RefusedPickup);可选orderItems。 - updateVerificationStatus:传
regulatedOrderVerificationStatus对象,或整包requestBody。 - confirmShipment:
requestBody为官方要求的完整对象(通常含packageDetail等)。
Scripts
export LINKFOXAGENT_API_KEY=""
python scripts/search_orders.py '{"sellerId":"A1...","region":"NA","marketplaceIds":["ATVPDKIKX0DER"],"lastUpdatedAfter":"2026-05-01T00:00:00Z"}'
python scripts/get_order.py '{"sellerId":"A1...","region":"NA","orderId":"123-1234567-1234567","includedData":["FULFILLMENT","PACKAGES"]}'
Display Rules
- 先看网关
developerProxy.errcode/httpStatus,再解析各脚本附加字段(如searchOrders、order)。 - POST/PATCH 脚本:
stdout中含requestBody(组装后的 Amazon 请求体),便于排查。 - v0 买家/地址/行项目 接口在官方文档中为 deprecated;新集成优先用 v2026-01-01 的 searchOrders / getOrder 与
includedData拉齐业务字段。 - searchOrders 默认速率较低(官方约 0.0056 req/s),注意 429。
- 受限 PII / RDT 以 Amazon 数据保护政策为准;详见
references/api.md。
Important Limitations
- 权限:Orders 及相关角色;部分读取可能需 Restricted Data Token,不在本 skill 内实现。
- 路径白名单:若网关返回 1005 等拒绝转发,需后端放行
orders/v0/...与orders/2026-01-01/...前缀。 - 返回结构以 Amazon schema 为准;详见
references/api.md。
积分消耗规则
不消耗积分。
Feedback: 见 references/api.md,skillName:linkfox-amazon-store-orders。
更多跨境 skill:LinkFox Skills
Related skills
亚马逊店铺商品目录 Catalog(与 linkfox-amazon-store-auth / report / listings / pricing / orders / feeds 同系列),经 /spApi/developerProxy 调用 SP-API Catalog Items:v0 listCatalogCategories;v2022-04-01(默认)或 v2020-12-01 的 searchCatalogItems、getCatalogItem。当用户提到亚马逊目录、Catalog Items、listCatalogCategories、searchCatalogItems、getCatalogItem、按 ASIN 查目录、关键词搜商品目录、类目节点、includedData、summaries/images 时触发。
Operate Amazon SP-API Listings, Restrictions, and Product Type Definitions through a single proxy.
亚马逊店铺授权与管理技能,提供完整的授权流程、令牌刷新、已授权店铺查询以及授权状态查询能力。获取授权链接时店铺名 sellerName 为必填,用于区分已授权店铺。当用户提到亚马逊店铺授权、绑定亚马逊店铺、刷新令牌、查询店铺授权状态、管理授权店铺、Amazon seller authorization, bind Amazon seller account, refresh access token, query store token status, manage authorized stores时触发此技能。只要其需求涉及亚马逊卖家账号授权、令牌生命周期管理或店铺列表查询,也应触发此技能。
亚马逊店铺买家反馈洞察(与 linkfox-amazon-store-auth 等同系列),经 /spApi/developerProxy 调用 SP-API Customer Feedback v2024-06-01:getItemReviewTopics、getItemBrowseNode、getBrowseNodeReviewTopics、getItemReviewTrends、getBrowseNodeReviewTrends、getBrowseNodeReturnTopics、getBrowseNodeReturnTrends。当用户提到评论主题、评价趋势、退货主题、browse node 反馈、Customer Feedback API、MENTIONS、STAR_RATING_IMPACT、ASIN 评论洞察、类目节点评价 时触发。
亚马逊店铺 Feeds(与 linkfox-amazon-store-auth / report / listings / pricing / orders 同系列),经 /spApi/developerProxy 调用 SP-API Feeds v2021-06-30:createFeedDocument、getFeedDocument、createFeed、getFeed、getFeeds、cancelFeed;另含 upload_feed_document 向预签名 URL 上传内容。当用户提到亚马逊 Feed、提交库存/Listing Feed、POST_FLAT_FILE、feedType、feedDocumentId、feedId、取消 Feed、查询 Feed 处理状态、Feeds API、SP-API 上传文件 时触发。